cdk-perl-20240606/0000755000000000000000000000000014630441166012163 5ustar rootrootcdk-perl-20240606/configure.in0000644000000000000000000001253314367740565014514 0ustar rootrootdnl Process this file with autoconf to produce a configure script. dnl --------------------------------------------------------------------------- dnl Copyright 2012-2022,2023 Thomas E. Dickey dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the "Software"), dnl to deal in the Software without restriction, including without limitation dnl the rights to use, copy, modify, merge, publish, distribute, distribute dnl with modifications, sublicense, and/or sell copies of the Software, and to dnl permit persons to whom the Software is furnished to do so, subject to the dnl following conditions: dnl dnl The above copyright notice and this permission notice shall be included in dnl all copies or substantial portions of the Software. dnl dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL dnl THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER dnl DEALINGS IN THE SOFTWARE. dnl dnl Except as contained in this notice, the name(s) of the above copyright dnl holders shall not be used in advertising or otherwise to promote the sale, dnl use or other dealings in this Software without prior written authorization. dnl --------------------------------------------------------------------------- AC_REVISION($Revision: 1.25 $) AC_PREREQ(2.25.20210509) rm -f config.cache dnl $Id: configure.in,v 1.25 2023/02/05 14:47:17 tom Exp $ AC_INIT(Cdk.xs) AC_PREFIX_DEFAULT(/usr) AC_MSG_CHECKING(for version used by Cdk.pm) VERSION=`egrep '[[$]]VERSION[[ ]][[ ]]*=' $srcdir/Cdk.pm | sed -e 's/^[[^"]]*"//' -e 's/".*//'` AC_MSG_RESULT($VERSION) AC_SUBST(VERSION) CF_PROG_CC CF_PROG_AR CF_PKG_CONFIG AC_CHECK_TOOL(LD,ld,'$(CC)') AC_PATH_TOOL(FULL_AR,ar,'$(AR)') AC_PROG_RANLIB CF_LIB_SUFFIX($LIB_MODEL, DFT_LIB_SUFFIX, DFT_DEP_SUFFIX) AC_SUBST(DFT_LIB_SUFFIX) CF_WITH_SCREEN_PDCURSES CF_XOPEN_SOURCE AC_CHECK_DECL(exit) CF_ENABLE_WARNINGS CF_DISABLE_LEAKS AC_CHECK_PROGS(PERL,[perl perl5],none) if test "$PERL" = none then AC_MSG_ERROR(no perl found) fi AC_MSG_CHECKING(if you want to use cdk5-config for C flags) AC_ARG_WITH(cdk, [ --with-cdk use cdk5-config for C flags], [with_cdk=$withval], [with_cdk=yes]) AC_MSG_RESULT($with_cdk) test "$with_cdk" != no && with_cdk="cdk5-config" if test "$with_cdk" = no then AC_MSG_CHECKING(if you want to use cdkw5-config for C flags) AC_ARG_WITH(cdkw, [ --with-cdkw use cdkw5-config for C flags], [with_cdk=$withval], [with_cdk=yes]) AC_MSG_RESULT($with_cdk) test "$with_cdk" != no && with_cdk="cdkw5-config" fi if test $with_cdk = no then # before looking for Cdk, check for the curses library it will use CF_WITH_CURSES_DIR CF_CURSES_CHTYPE CF_WITH_NCURSES_ETC # now look for Cdk cf_pkg_exists=no if test "x${PKG_CONFIG:=none}" != xnone; then for cf_pkg_name in cdk5 cdkw5 do AC_MSG_CHECKING(pkg-config for $cf_pkg_name) "$PKG_CONFIG" --exists $cf_pkg_name && cf_pkg_exists=yes AC_MSG_RESULT($cf_pkg_exists) test $cf_pkg_exists = yes && break done if test "$cf_pkg_exists" = yes; then cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_pkg_name` cf_pkg_libs=`$PKG_CONFIG --libs $cf_pkg_name` CF_ADD_CFLAGS($cf_pkg_cflags) CF_ADD_LIBS($cf_pkg_libs) fi fi if test "$cf_pkg_exists" = no; then AC_CHECK_HEADER(cdk.h,,[ CPPFLAGS="$CPPFLAGS -I/usr/include/cdk" AC_CHECK_HEADER(cdk/cdk.h,[ AC_DEFINE(HAVE_CDK_CDK_H) ],[ AC_MSG_ERROR(cannot find cdk header file) ]) ]) AC_CHECK_LIB(cdk,initCDKScreen,[LIBS="-lcdk $LIBS"],[ AC_CHECK_LIB(cdkw,initCDKScreen,[LIBS="-lcdkw $LIBS"],[ AC_MSG_ERROR(cannot find cdk library)])]) fi elif $with_cdk --version 2>/dev/null >/dev/null then CFLAGS=`$with_cdk --cflags` LIBS=`$with_cdk --libs` else AC_MSG_ERROR(cannot use $cdk_config script) fi AC_SUBST(LIBS) AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) ### output makefile script AC_OUTPUT(Makefile.PL,[ # move confdefs.h aside while using perl, since it gets confused test -f "confdefs.h" && mv confdefs.h confdefs.hdr $PERL Makefile.PL test -f "confdefs.hdr" && mv confdefs.hdr confdefs.h # add to the distclean rule to cleanup files created by the configure script cat >>Makefile <Makefile.old echo "** updated Makefile to allow in-tree test-builds" diff Makefile Makefile.old mv Makefile.old Makefile fi ],[ PERL="$PERL" ]) cdk-perl-20240606/fixpaths0000755000000000000000000000144714324113505013736 0ustar rootroot#!/bin/sh # $Id: fixpaths,v 1.2 2022/10/20 00:33:09 tom Exp $ # # Run this script to update the paths in scripts under the current directory # which have perl's pathname, so they can be run in your configuration. # save_IFS="$IFS" IFS=':' PERL=perl for p in $PATH do if [ -f "$p/perl" ] then PERL="$p/perl" break fi done IFS="$save_IFS" TEXT="#!$PERL -w" find . -type f -print | while read name do case $name in *~) ;; *) head=`head -1 "$name"` case $head in #(vi \#!*perl*) #(vi echo "process $name" if test "$TEXT" != "$head" ; then echo "...updating " rm -f "${name}"~ mv "${name}" "${name}"~ sed -e "s@$head@$TEXT@" "${name}"~ >"${name}" chmod +x "${name}" else echo "...unchanged" fi ;; *) # echo ignored $name ;; esac ;; esac done cdk-perl-20240606/config.guess0000755000000000000000000014304614532712033014506 0ustar rootroot#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale timestamp='2023-10-19' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to . # The "shellcheck disable" line above the timestamp inhibits complaints # about features and limitations of the classic Bourne shell that were # superseded or lifted in POSIX. However, this script identifies a wide # variety of pre-POSIX systems that do not have POSIX shells at all, and # even some reasonably current systems (Solaris 10 as case-in-point) still # have a pre-POSIX /bin/sh. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system '$me' is run on. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi # Just in case it came from the environment. GUESS= # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still # use 'HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. tmp= # shellcheck disable=SC2172 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 set_cc_for_build() { # prevent multiple calls if $tmp is already set test "$tmp" && return 0 : "${TMPDIR=/tmp}" # shellcheck disable=SC2039,SC3028 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } dummy=$tmp/dummy case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD=$driver break fi done if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac } # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case $UNAME_SYSTEM in Linux|GNU|GNU/*) LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" #if defined(__ANDROID__) LIBC=android #else #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #elif defined(__GLIBC__) LIBC=gnu #elif defined(__LLVM_LIBC__) LIBC=llvm #else #include /* First heuristic to detect musl libc. */ #ifdef __DEFINED_va_list LIBC=musl #endif #endif #endif EOF cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` eval "$cc_set_libc" # Second heuristic to detect musl libc. if [ "$LIBC" = unknown ] && command -v ldd >/dev/null && ldd --version 2>&1 | grep -q ^musl; then LIBC=musl fi # If the system lacks a compiler, then just pick glibc. # We could probably try harder. if [ "$LIBC" = unknown ]; then LIBC=gnu fi ;; esac # Note: order is significant - the case branches are not exclusive. case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)` case $UNAME_MACHINE_ARCH in aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` machine=${arch}${endian}-unknown ;; *) machine=$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case $UNAME_VERSION in Debian*) release='-gnu' ;; *) release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. GUESS=$machine-${os}${release}${abi-} ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE ;; *:SecBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE ;; *:MidnightBSD:*:*) GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE ;; *:ekkoBSD:*:*) GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE ;; *:SolidBSD:*:*) GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE ;; *:OS108:*:*) GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE ;; macppc:MirBSD:*:*) GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE ;; *:MirBSD:*:*) GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE ;; *:Sortix:*:*) GUESS=$UNAME_MACHINE-unknown-sortix ;; *:Twizzler:*:*) GUESS=$UNAME_MACHINE-unknown-twizzler ;; *:Redox:*:*) GUESS=$UNAME_MACHINE-unknown-redox ;; mips:OSF1:*.*) GUESS=mips-dec-osf1 ;; alpha:OSF1:*:*) # Reset EXIT trap before exiting to avoid spurious non-zero exit code. trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") UNAME_MACHINE=alpha ;; "EV5 (21164)") UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` GUESS=$UNAME_MACHINE-dec-osf$OSF_REL ;; Amiga*:UNIX_System_V:4.0:*) GUESS=m68k-unknown-sysv4 ;; *:[Aa]miga[Oo][Ss]:*:*) GUESS=$UNAME_MACHINE-unknown-amigaos ;; *:[Mm]orph[Oo][Ss]:*:*) GUESS=$UNAME_MACHINE-unknown-morphos ;; *:OS/390:*:*) GUESS=i370-ibm-openedition ;; *:z/VM:*:*) GUESS=s390-ibm-zvmoe ;; *:OS400:*:*) GUESS=powerpc-ibm-os400 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) GUESS=arm-acorn-riscix$UNAME_RELEASE ;; arm*:riscos:*:*|arm*:RISCOS:*:*) GUESS=arm-unknown-riscos ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) GUESS=hppa1.1-hitachi-hiuxmpp ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. case `(/bin/universe) 2>/dev/null` in att) GUESS=pyramid-pyramid-sysv3 ;; *) GUESS=pyramid-pyramid-bsd ;; esac ;; NILE*:*:*:dcosx) GUESS=pyramid-pyramid-svr4 ;; DRS?6000:unix:4.0:6*) GUESS=sparc-icl-nx6 ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) GUESS=sparc-icl-nx7 ;; esac ;; s390x:SunOS:*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL ;; sun4H:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-hal-solaris2$SUN_REL ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-sun-solaris2$SUN_REL ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) GUESS=i386-pc-auroraux$UNAME_RELEASE ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) set_cc_for_build SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=$SUN_ARCH-pc-solaris2$SUN_REL ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-sun-solaris3$SUN_REL ;; sun4*:SunOS:*:*) case `/usr/bin/arch -k` in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like '4.1.3-JL'. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` GUESS=sparc-sun-sunos$SUN_REL ;; sun3*:SunOS:*:*) GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case `/bin/arch` in sun3) GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac ;; aushp:SunOS:*:*) GUESS=sparc-auspex-sunos$UNAME_RELEASE ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) GUESS=m68k-milan-mint$UNAME_RELEASE ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) GUESS=m68k-hades-mint$UNAME_RELEASE ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) GUESS=m68k-unknown-mint$UNAME_RELEASE ;; m68k:machten:*:*) GUESS=m68k-apple-machten$UNAME_RELEASE ;; powerpc:machten:*:*) GUESS=powerpc-apple-machten$UNAME_RELEASE ;; RISC*:Mach:*:*) GUESS=mips-dec-mach_bsd4.3 ;; RISC*:ULTRIX:*:*) GUESS=mips-dec-ultrix$UNAME_RELEASE ;; VAX*:ULTRIX*:*:*) GUESS=vax-dec-ultrix$UNAME_RELEASE ;; 2020:CLIX:*:* | 2430:CLIX:*:*) GUESS=clipper-intergraph-clix$UNAME_RELEASE ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } GUESS=mips-mips-riscos$UNAME_RELEASE ;; Motorola:PowerMAX_OS:*:*) GUESS=powerpc-motorola-powermax ;; Motorola:*:4.3:PL8-*) GUESS=powerpc-harris-powermax ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) GUESS=powerpc-harris-powermax ;; Night_Hawk:Power_UNIX:*:*) GUESS=powerpc-harris-powerunix ;; m88k:CX/UX:7*:*) GUESS=m88k-harris-cxux7 ;; m88k:*:4*:R4*) GUESS=m88k-motorola-sysv4 ;; m88k:*:3*:R3*) GUESS=m88k-motorola-sysv3 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ test "$TARGET_BINARY_INTERFACE"x = x then GUESS=m88k-dg-dgux$UNAME_RELEASE else GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else GUESS=i586-dg-dgux$UNAME_RELEASE fi ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) GUESS=m88k-dolphin-sysv3 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 GUESS=m88k-motorola-sysv3 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) GUESS=m88k-tektronix-sysv3 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) GUESS=m68k-tektronix-bsd ;; *:IRIX*:*:*) IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` GUESS=mips-sgi-irix$IRIX_REL ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) GUESS=i386-ibm-aix ;; ia64:AIX:*:*) if test -x /usr/bin/oslevel ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then GUESS=$SYSTEM_NAME else GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then GUESS=rs6000-ibm-aix3.2.4 else GUESS=rs6000-ibm-aix3.2 fi ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if test -x /usr/bin/lslpp ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi GUESS=$IBM_ARCH-ibm-aix$IBM_REV ;; *:AIX:*:*) GUESS=rs6000-ibm-aix ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) GUESS=romp-ibm-bsd4.4 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) GUESS=rs6000-bull-bosx ;; DPX/2?00:B.O.S.:*:*) GUESS=m68k-bull-sysv3 ;; 9000/[34]??:4.3bsd:1.*:*) GUESS=m68k-hp-bsd ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) GUESS=m68k-hp-bsd4.4 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` case $UNAME_MACHINE in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if test -x /usr/bin/getconf; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case $sc_cpu_version in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case $sc_kernel_bits in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi if test "$HP_ARCH" = ""; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if test "$HP_ARCH" = hppa2.0w then set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH=hppa2.0w else HP_ARCH=hppa64 fi fi GUESS=$HP_ARCH-hp-hpux$HPUX_REV ;; ia64:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` GUESS=ia64-hp-hpux$HPUX_REV ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } GUESS=unknown-hitachi-hiuxwe2 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) GUESS=hppa1.1-hp-bsd ;; 9000/8??:4.3bsd:*:*) GUESS=hppa1.0-hp-bsd ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) GUESS=hppa1.0-hp-mpeix ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) GUESS=hppa1.1-hp-osf ;; hp8??:OSF1:*:*) GUESS=hppa1.0-hp-osf ;; i*86:OSF1:*:*) if test -x /usr/sbin/sysversion ; then GUESS=$UNAME_MACHINE-unknown-osf1mk else GUESS=$UNAME_MACHINE-unknown-osf1 fi ;; parisc*:Lites*:*:*) GUESS=hppa1.1-hp-lites ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) GUESS=c1-convex-bsd ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) GUESS=c34-convex-bsd ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) GUESS=c38-convex-bsd ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) GUESS=c4-convex-bsd ;; CRAY*Y-MP:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=ymp-cray-unicos$CRAY_REL ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=t90-cray-unicos$CRAY_REL ;; CRAY*T3E:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=alphaev5-cray-unicosmk$CRAY_REL ;; CRAY*SV1:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=sv1-cray-unicos$CRAY_REL ;; *:UNICOS/mp:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=craynv-cray-unicosmp$CRAY_REL ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE ;; sparc*:BSD/OS:*:*) GUESS=sparc-unknown-bsdi$UNAME_RELEASE ;; *:BSD/OS:*:*) GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE ;; arm:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi else FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf fi ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL ;; i*:CYGWIN*:*) GUESS=$UNAME_MACHINE-pc-cygwin ;; *:MINGW64*:*) GUESS=$UNAME_MACHINE-pc-mingw64 ;; *:MINGW*:*) GUESS=$UNAME_MACHINE-pc-mingw32 ;; *:MSYS*:*) GUESS=$UNAME_MACHINE-pc-msys ;; i*:PW*:*) GUESS=$UNAME_MACHINE-pc-pw32 ;; *:SerenityOS:*:*) GUESS=$UNAME_MACHINE-pc-serenity ;; *:Interix*:*) case $UNAME_MACHINE in x86) GUESS=i586-pc-interix$UNAME_RELEASE ;; authenticamd | genuineintel | EM64T) GUESS=x86_64-unknown-interix$UNAME_RELEASE ;; IA64) GUESS=ia64-unknown-interix$UNAME_RELEASE ;; esac ;; i*:UWIN*:*) GUESS=$UNAME_MACHINE-pc-uwin ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) GUESS=x86_64-pc-cygwin ;; prep*:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=powerpcle-unknown-solaris2$SUN_REL ;; *:GNU:*:*) # the GNU system GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL ;; *:GNU/*:*:*) # other systems with GNU libc and userland GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC ;; x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) GUESS="$UNAME_MACHINE-pc-managarm-mlibc" ;; *:[Mm]anagarm:*:*) GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" ;; *:Minix:*:*) GUESS=$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) set_cc_for_build CPU=$UNAME_MACHINE LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then ABI=64 sed 's/^ //' << EOF > "$dummy.c" #ifdef __ARM_EABI__ #ifdef __ARM_PCS_VFP ABI=eabihf #else ABI=eabi #endif #endif EOF cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` eval "$cc_set_abi" case $ABI in eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; esac fi GUESS=$CPU-unknown-linux-$LIBCABI ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi ;; avr32*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; cris:Linux:*:*) GUESS=$UNAME_MACHINE-axis-linux-$LIBC ;; crisv32:Linux:*:*) GUESS=$UNAME_MACHINE-axis-linux-$LIBC ;; e2k:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; frv:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; hexagon:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; i*86:Linux:*:*) GUESS=$UNAME_MACHINE-pc-linux-$LIBC ;; ia64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; k1om:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; kvx:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; kvx:cos:*:*) GUESS=$UNAME_MACHINE-unknown-cos ;; kvx:mbr:*:*) GUESS=$UNAME_MACHINE-unknown-mbr ;; loongarch32:Linux:*:* | loongarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m32r*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m68*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=0 test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef mips #undef mipsel #undef mips64 #undef mips64el #if ${IS_GLIBC} && defined(_ABI64) LIBCABI=gnuabi64 #else #if ${IS_GLIBC} && defined(_ABIN32) LIBCABI=gnuabin32 #else LIBCABI=${LIBC} #endif #endif #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa64r6 #else #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa32r6 #else #if defined(__mips64) CPU=mips64 #else CPU=mips #endif #endif #endif #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) MIPS_ENDIAN= #else MIPS_ENDIAN= #endif #endif EOF cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` eval "$cc_set_vars" test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; openrisc*:Linux:*:*) GUESS=or1k-unknown-linux-$LIBC ;; or32:Linux:*:* | or1k*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; padre:Linux:*:*) GUESS=sparc-unknown-linux-$LIBC ;; parisc64:Linux:*:* | hppa64:Linux:*:*) GUESS=hppa64-unknown-linux-$LIBC ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; *) GUESS=hppa-unknown-linux-$LIBC ;; esac ;; ppc64:Linux:*:*) GUESS=powerpc64-unknown-linux-$LIBC ;; ppc:Linux:*:*) GUESS=powerpc-unknown-linux-$LIBC ;; ppc64le:Linux:*:*) GUESS=powerpc64le-unknown-linux-$LIBC ;; ppcle:Linux:*:*) GUESS=powerpcle-unknown-linux-$LIBC ;; riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; s390:Linux:*:* | s390x:Linux:*:*) GUESS=$UNAME_MACHINE-ibm-linux-$LIBC ;; sh64*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; sh*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; sparc:Linux:*:* | sparc64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; tile*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; vax:Linux:*:*) GUESS=$UNAME_MACHINE-dec-linux-$LIBC ;; x86_64:Linux:*:*) set_cc_for_build CPU=$UNAME_MACHINE LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then ABI=64 sed 's/^ //' << EOF > "$dummy.c" #ifdef __i386__ ABI=x86 #else #ifdef __ILP32__ ABI=x32 #endif #endif EOF cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` eval "$cc_set_abi" case $ABI in x86) CPU=i686 ;; x32) LIBCABI=${LIBC}x32 ;; esac fi GUESS=$CPU-pc-linux-$LIBCABI ;; xtensa*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. GUESS=i386-sequent-sysv4 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION ;; i*86:OS/2:*:*) # If we were able to find 'uname', then EMX Unix compatibility # is probably installed. GUESS=$UNAME_MACHINE-pc-os2-emx ;; i*86:XTS-300:*:STOP) GUESS=$UNAME_MACHINE-unknown-stop ;; i*86:atheos:*:*) GUESS=$UNAME_MACHINE-unknown-atheos ;; i*86:syllable:*:*) GUESS=$UNAME_MACHINE-pc-syllable ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) GUESS=i386-unknown-lynxos$UNAME_RELEASE ;; i*86:*DOS:*:*) GUESS=$UNAME_MACHINE-pc-msdosdjgpp ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else GUESS=$UNAME_MACHINE-pc-sysv32 fi ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. GUESS=i586-pc-msdosdjgpp ;; Intel:Mach:3*:*) GUESS=i386-pc-mach3 ;; paragon:*:*:*) GUESS=i860-intel-osf1 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi ;; mini*:CTIX:SYS*5:*) # "miniframe" GUESS=m68010-convergent-sysv ;; mc68k:UNIX:SYSTEM5:3.51m) GUESS=m68k-convergent-sysv ;; M680?0:D-NIX:5.3:*) GUESS=m68k-diab-dnix ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) GUESS=m68k-unknown-lynxos$UNAME_RELEASE ;; mc68030:UNIX_System_V:4.*:*) GUESS=m68k-atari-sysv4 ;; TSUNAMI:LynxOS:2.*:*) GUESS=sparc-unknown-lynxos$UNAME_RELEASE ;; rs6000:LynxOS:2.*:*) GUESS=rs6000-unknown-lynxos$UNAME_RELEASE ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) GUESS=powerpc-unknown-lynxos$UNAME_RELEASE ;; SM[BE]S:UNIX_SV:*:*) GUESS=mips-dde-sysv$UNAME_RELEASE ;; RM*:ReliantUNIX-*:*:*) GUESS=mips-sni-sysv4 ;; RM*:SINIX-*:*:*) GUESS=mips-sni-sysv4 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` GUESS=$UNAME_MACHINE-sni-sysv4 else GUESS=ns32k-sni-sysv fi ;; PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says GUESS=i586-unisys-sysv4 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm GUESS=hppa1.1-stratus-sysv4 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. GUESS=i860-stratus-sysv4 ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. GUESS=$UNAME_MACHINE-stratus-vos ;; *:VOS:*:*) # From Paul.Green@stratus.com. GUESS=hppa1.1-stratus-vos ;; mc68*:A/UX:*:*) GUESS=m68k-apple-aux$UNAME_RELEASE ;; news*:NEWS-OS:6*:*) GUESS=mips-sony-newsos6 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if test -d /usr/nec; then GUESS=mips-nec-sysv$UNAME_RELEASE else GUESS=mips-unknown-sysv$UNAME_RELEASE fi ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. GUESS=powerpc-be-beos ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. GUESS=powerpc-apple-beos ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. GUESS=i586-pc-beos ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. GUESS=i586-pc-haiku ;; ppc:Haiku:*:*) # Haiku running on Apple PowerPC GUESS=powerpc-apple-haiku ;; *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) GUESS=$UNAME_MACHINE-unknown-haiku ;; SX-4:SUPER-UX:*:*) GUESS=sx4-nec-superux$UNAME_RELEASE ;; SX-5:SUPER-UX:*:*) GUESS=sx5-nec-superux$UNAME_RELEASE ;; SX-6:SUPER-UX:*:*) GUESS=sx6-nec-superux$UNAME_RELEASE ;; SX-7:SUPER-UX:*:*) GUESS=sx7-nec-superux$UNAME_RELEASE ;; SX-8:SUPER-UX:*:*) GUESS=sx8-nec-superux$UNAME_RELEASE ;; SX-8R:SUPER-UX:*:*) GUESS=sx8r-nec-superux$UNAME_RELEASE ;; SX-ACE:SUPER-UX:*:*) GUESS=sxace-nec-superux$UNAME_RELEASE ;; Power*:Rhapsody:*:*) GUESS=powerpc-apple-rhapsody$UNAME_RELEASE ;; *:Rhapsody:*:*) GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE ;; arm64:Darwin:*:*) GUESS=aarch64-apple-darwin$UNAME_RELEASE ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac if command -v xcode-select > /dev/null 2> /dev/null && \ ! xcode-select --print-path > /dev/null 2> /dev/null ; then # Avoid executing cc if there is no toolchain installed as # cc will be a stub that puts up a graphical alert # prompting the user to install developer tools. CC_FOR_BUILD=no_compiler_found else set_cc_for_build fi if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_PPC >/dev/null then UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then # uname -m returns i386 or x86_64 UNAME_PROCESSOR=$UNAME_MACHINE fi GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE ;; *:QNX:*:4*) GUESS=i386-pc-qnx ;; NEO-*:NONSTOP_KERNEL:*:*) GUESS=neo-tandem-nsk$UNAME_RELEASE ;; NSE-*:NONSTOP_KERNEL:*:*) GUESS=nse-tandem-nsk$UNAME_RELEASE ;; NSR-*:NONSTOP_KERNEL:*:*) GUESS=nsr-tandem-nsk$UNAME_RELEASE ;; NSV-*:NONSTOP_KERNEL:*:*) GUESS=nsv-tandem-nsk$UNAME_RELEASE ;; NSX-*:NONSTOP_KERNEL:*:*) GUESS=nsx-tandem-nsk$UNAME_RELEASE ;; *:NonStop-UX:*:*) GUESS=mips-compaq-nonstopux ;; BS2000:POSIX*:*:*) GUESS=bs2000-siemens-sysv ;; DS/*:UNIX_System_V:*:*) GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "${cputype-}" = 386; then UNAME_MACHINE=i386 elif test "x${cputype-}" != x; then UNAME_MACHINE=$cputype fi GUESS=$UNAME_MACHINE-unknown-plan9 ;; *:TOPS-10:*:*) GUESS=pdp10-unknown-tops10 ;; *:TENEX:*:*) GUESS=pdp10-unknown-tenex ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) GUESS=pdp10-dec-tops20 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) GUESS=pdp10-xkl-tops20 ;; *:TOPS-20:*:*) GUESS=pdp10-unknown-tops20 ;; *:ITS:*:*) GUESS=pdp10-unknown-its ;; SEI:*:*:SEIUX) GUESS=mips-sei-seiux$UNAME_RELEASE ;; *:DragonFly:*:*) DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case $UNAME_MACHINE in A*) GUESS=alpha-dec-vms ;; I*) GUESS=ia64-dec-vms ;; V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) GUESS=i386-pc-xenix ;; i*86:skyos:*:*) SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL ;; i*86:rdos:*:*) GUESS=$UNAME_MACHINE-pc-rdos ;; i*86:Fiwix:*:*) GUESS=$UNAME_MACHINE-pc-fiwix ;; *:AROS:*:*) GUESS=$UNAME_MACHINE-unknown-aros ;; x86_64:VMkernel:*:*) GUESS=$UNAME_MACHINE-unknown-esx ;; amd64:Isilon\ OneFS:*:*) GUESS=x86_64-unknown-onefs ;; *:Unleashed:*:*) GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE ;; *:Ironclad:*:*) GUESS=$UNAME_MACHINE-unknown-ironclad ;; esac # Do we have a guess based on uname results? if test "x$GUESS" != x; then echo "$GUESS" exit fi # No uname command or uname output not recognized. set_cc_for_build cat > "$dummy.c" < #include #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #include #if defined(_SIZE_T_) || defined(SIGLOST) #include #endif #endif #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) #if !defined (ultrix) #include #if defined (BSD) #if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); #else #if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); #else printf ("vax-dec-bsd\n"); exit (0); #endif #endif #else printf ("vax-dec-bsd\n"); exit (0); #endif #else #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname un; uname (&un); printf ("vax-dec-ultrix%s\n", un.release); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname *un; uname (&un); printf ("mips-dec-ultrix%s\n", un.release); exit (0); #else printf ("mips-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } echo "$0: unable to guess system type" >&2 case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 <&2 </dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = "$UNAME_MACHINE" UNAME_RELEASE = "$UNAME_RELEASE" UNAME_SYSTEM = "$UNAME_SYSTEM" UNAME_VERSION = "$UNAME_VERSION" EOF fi exit 1 # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: cdk-perl-20240606/typemap0000644000000000000000000000122606634015407013566 0ustar rootrootWINDOW * T_PTROBJ CDKARRAY * T_PTROBJ CDKSCREEN * T_PTROBJ CDKLABEL * T_PTROBJ CDKDIALOG * T_PTROBJ CDKENTRY * T_PTROBJ CDKSCROLL * T_PTROBJ CDKSCALE * T_PTROBJ CDKHISTOGRAM * T_PTROBJ CDKMENU * T_PTROBJ CDKMENTRY * T_PTROBJ CDKMATRIX * T_PTROBJ CDKMARQUEE * T_PTROBJ CDKSELECTION * T_PTROBJ CDKVIEWER * T_PTROBJ CDKGRAPH * T_PTROBJ CDKRADIO * T_PTROBJ CDKTEMPLATE * T_PTROBJ CDKSWINDOW * T_PTROBJ CDKITEMLIST * T_PTROBJ CDKFSELECT * T_PTROBJ CDKSLIDER * T_PTROBJ CDKALPHALIST * T_PTROBJ CDKCALENDAR * T_PTROBJ CDKBUTTONBOX * T_PTROBJ chtype T_IV boolean T_IV EObjectType T_IV EDisplayType T_IV EHistogramDisplayType T_IV INPUT cdk-perl-20240606/package/0000755000000000000000000000000014630415510013550 5ustar rootrootcdk-perl-20240606/package/freebsd/0000755000000000000000000000000014630415236015167 5ustar rootrootcdk-perl-20240606/package/freebsd/Makefile0000644000000000000000000000123114630415236016624 0ustar rootroot# Created by: Chia-liang Kao # $FreeBSD: devel/p5-Cdk/Makefile 315974 2013-04-17 15:33:37Z miwi $ PORTNAME= Cdk PORTVERSION= 5.0.20240606 PORTREVISION= 1 CATEGORIES= devel perl5 MASTER_SITES= ftp://ftp.invisible-island.net/cdk/ PKGNAMEPREFIX= p5- DISTNAME= cdk-perl-20130816 EXTRACT_SUFX= .tgz MAINTAINER= ports@FreeBSD.org COMMENT= Perl5 module for Curses Development Kit LIB_DEPENDS= cdk.5:${PORTSDIR}/devel/cdk GNU_CONFIGURE= yes CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" LIBS="-L${LOCALBASE}/lib" #PERL_CONFIGURE= no # #post-patch: # ${REINPLACE_CMD} 's,%%LOCALBASE%%,${LOCALBASE},g' ${WRKSRC}/Makefile.PL .include cdk-perl-20240606/package/freebsd/pkg-descr0000644000000000000000000000005212000275050016751 0ustar rootrootPerl interface to Curses Development Kit. cdk-perl-20240606/package/freebsd/distinfo0000644000000000000000000000021012171600261016712 0ustar rootrootSHA256 (cdk-perl-20130717.tgz) = 889cc9df343afccaab8cc246c757d43d16bf05edb54954e8aa7d00b27143d928 SIZE (cdk-perl-20130717.tgz) = 159587 cdk-perl-20240606/package/freebsd/pkg-plist0000644000000000000000000000245212000275050017012 0ustar rootroot%%SITE_PERL%%/%%PERL_ARCH%%/Cdk.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Alphalist.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Buttonbox.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Calendar.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Debug.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Diag.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Dialog.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Entry.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Fselect.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Graph.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Histogram.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Itemlist.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Marquee.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Matrix.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Menu.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Mentry.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Label.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Radio.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Scale.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Scroll.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Selection.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Slider.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Swindow.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Template.pm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk/Viewer.pm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Cdk/.packlist %%SITE_PERL%%/%%PERL_ARCH%%/auto/Cdk/Cdk.so %%SITE_PERL%%/%%PERL_ARCH%%/auto/Cdk/Cdk.bs %%SITE_PERL%%/%%PERL_ARCH%%/auto/Cdk/autosplit.ix @dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Cdk @dirrm %%SITE_PERL%%/%%PERL_ARCH%%/Cdk cdk-perl-20240606/package/debian/0000755000000000000000000000000014630415510014772 5ustar rootrootcdk-perl-20240606/package/debian/copyright0000644000000000000000000000515014630415510016726 0ustar rootrootFormat-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196 Upstream-Maintainer: Thomas Dickey Upstream-Source: https://invisible-island.net/cdk/ Upstream-Name: Cdk Files: * Copyright: 1999-2023,2024 Thomas Dickey Copyright: 1995-1999, Mike Glover License: MIT-X11 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, distribute with modifications, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name(s) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization. Files: debian/* Copyright: 2000, Raphael Bossek 2001, 2002, Stephen Zander 2005, Matej Vela 2007, Jeremiah Foster 2008, 2009, gregor herrmann 2008, Damyan Ivanov License: Artistic | GPL-1+ License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. On Debian GNU/Linux systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic' License: GPL-1+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL' cdk-perl-20240606/package/debian/libcdk-perl.lintian-overrides0000644000000000000000000000022512630641474022551 0ustar rootroot# no, we want it this way, since the fulldemos scripts expect it libcdk-perl: nested-examples-directory usr/share/doc/libcdk-perl/examples/examples/ cdk-perl-20240606/package/debian/compat0000644000000000000000000000000314324110757016176 0ustar rootroot12 cdk-perl-20240606/package/debian/rules0000755000000000000000000000036314156745711016070 0ustar rootroot#!/usr/bin/make -f # export DH_VERBOSE=1 %: dh $@ --without autoreconf override_dh_auto_configure: dh_auto_configure -- --with-screen=ncursesw6 override_dh_auto_test: # no tests override_dh_compress: dh_compress -Xexamples -Xcopyright cdk-perl-20240606/package/debian/clean0000644000000000000000000000004512630641474016006 0ustar rootrootMakefile.PL config.log config.status cdk-perl-20240606/package/debian/control0000644000000000000000000000231613432330207016375 0ustar rootrootSource: libcdk-perl Section: perl Priority: optional Maintainer: Debian Perl Group Uploaders: Jeremiah Foster , Damyan Ivanov , gregor herrmann , Dominic Hargreaves Standards-Version: 3.9.2 Homepage: https://invisible-island.net/cdk/ Vcs-Git: git://git.debian.org/pkg-perl/packages/libcdk-perl.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libcdk-perl.git Build-Depends: debhelper (>= 7.0.50), libcdk5, libcdk5-dev, libncurses5-dev (>= 5.3), perl (>= 5.8) Package: libcdk-perl Architecture: any Depends: ${misc:Depends}, ${perl:Depends}, ${shlibs:Depends}, libperl4-corelibs-perl | perl (<< 5.12.3-7), libcdk5, libncurses5 (>= 5.3) Description: Perl interface for a curses widget library CDK stands for "Curses Development Kit". CDK sits on top of the curses library and provides 22 ready to use widgets for rapid application development of text-based interfaces. CDK delivers many of the common widget types required for a robust interface. Widgets can be combined to create complex widgets if needed. . This package provides a Perl interface for the CDK library. cdk-perl-20240606/package/debian/source/0000755000000000000000000000000012170233133016266 5ustar rootrootcdk-perl-20240606/package/debian/source/format0000644000000000000000000000001512170233133017475 0ustar rootroot3.0 (native) cdk-perl-20240606/package/debian/libcdk-perl.examples0000644000000000000000000000003011733447020020715 0ustar rootrootdemos examples fulldemo cdk-perl-20240606/package/debian/README.source0000644000000000000000000000036311657507064017167 0ustar rootrootThis package uses quilt to manage all modifications to the upstream source. Changes are stored in the source package as diffs in debian/patches and applied during the build. See /usr/share/doc/quilt/README.source for a detailed explanation. cdk-perl-20240606/package/debian/watch0000644000000000000000000000016313432330220016014 0ustar rootrootversion=3 opts=uversionmangle=s/20031210/4.9.10/ \ ftp://ftp.invisible-island.net/cdk/ cdk-perl-(.*)\.tgz debian cdk-perl-20240606/package/debian/changelog0000644000000000000000000001632314630415236016656 0ustar rootrootlibcdk-perl (5.0.20240606) unstable; urgency=low * maintenance updates -- Thomas E. Dickey Thu, 06 Jun 2024 16:22:54 -0400 libcdk-perl (5.0.20230205) unstable; urgency=low * maintenance updates -- Thomas E. Dickey Sun, 05 Feb 2023 09:43:40 -0500 libcdk-perl (5.0.20221025) unstable; urgency=low * maintenance updates -- Thomas E. Dickey Tue, 25 Oct 2022 18:31:25 -0400 libcdk-perl (5.0.20221022) unstable; urgency=low * maintenance updates -- Thomas E. Dickey Mon, 24 Oct 2022 19:30:05 -0400 libcdk-perl (5.0.20221020) unstable; urgency=low * maintenance updates -- Thomas E. Dickey Wed, 19 Oct 2022 20:09:15 -0400 libcdk-perl (5.0.20211216) unstable; urgency=low * maintenance updates -- Thomas E. Dickey Wed, 15 Dec 2021 20:23:56 -0500 libcdk-perl (5.0.20210109) unstable; urgency=low * maintenance updates -- Thomas E. Dickey Sat, 09 Jan 2021 14:48:03 -0500 libcdk-perl (5.0.20200923) unstable; urgency=low * maintenance updates -- Thomas E. Dickey Wed, 23 Sep 2020 17:00:13 -0400 libcdk-perl (5.0.20191231) unstable; urgency=low * maintenance updates -- Thomas E. Dickey Tue, 31 Dec 2019 16:09:56 -0500 libcdk-perl (5.0.20190225) unstable; urgency=low * maintenance updates -- Thomas E. Dickey Sun, 24 Feb 2019 19:26:04 -0500 libcdk-perl (5.0.20190220) unstable; urgency=low * maintenance updates -- Thomas E. Dickey Sun, 17 Feb 2019 13:11:44 -0500 libcdk-perl (5.0.20150928) unstable; urgency=low * maintenance updates -- Thomas E. Dickey Mon, 28 Sep 2015 21:04:25 -0400 libcdk-perl (5.0.20141106) unstable; urgency=low * maintenance updates -- Thomas E. Dickey Thu, 06 Nov 2014 20:18:56 -0500 libcdk-perl (20130816) unstable; urgency=low * build-fix for perl 5.18 (patch by Nico Tyni, Debian #719578) -- Thomas E. Dickey Fri, 16 Aug 2013 18:20:08 -0400 libcdk-perl (20130717) unstable; urgency=low * fix for calendar functions -- Thomas E. Dickey Mon, 15 Jul 2013 21:06:53 -0400 libcdk-perl (20130714) unstable; urgency=low * improvements for packaging -- Thomas E. Dickey Sat, 13 Jul 2013 07:12:32 -0400 libcdk-perl (20120324) unstable; urgency=low * Add package scripts, make them work with Debian 5/6. -- Thomas E. Dickey Sun, 18 Mar 2012 14:25:35 -0400 libcdk-perl (4.9.10-5) unstable; urgency=low [ Ansgar Burchardt ] * debian/control: Convert Vcs-* fields to Git. [ Dominic Hargreaves ] * Add Depends on libperl4-corelibs-perl (will fix lintian warning perl-module-uses-perl4-libs-without-dep once #648532 has been fixed) * Update Standards-Version (no changes) * Switch to dpkg-source 3.0 (quilt) format, restoring the application of patches lost in 4.9.10-4 -- Dominic Hargreaves Sat, 12 Nov 2011 16:43:21 +0000 libcdk-perl (4.9.10-4) unstable; urgency=low * Move changes to upstream code under debian/patches; add quilt framework. * Add debian/README.source to document quilt usage, as required by Debian Policy since 3.8.0. * debian/control: Changed: Switched Vcs-Browser field to ViewSVN (source stanza). * debian/control: Added: ${misc:Depends} to Depends: field. * New patch cdkdemo_help.patch to change default path for help system in cdkdemo; thanks to Rafael Laboissiere for the bug report (closes: #519820). * Don't install README anymore. * Switch to debhelper 7, adjust debian/{rules,compat,control}. * Set Standards-Version to 3.8.2 (no further changes). * Add /me to Uploaders. * debian/copyright: switch to new format. -- gregor herrmann Sun, 09 Aug 2009 16:36:30 +0200 libcdk-perl (4.9.10-3) unstable; urgency=low [ gregor herrmann ] * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser field (source stanza); Homepage field (source stanza). Removed: Homepage pseudo-field (Description); XS-Vcs-Svn fields. * debian/rules: delete /usr/share/perl5 only if it exists. [ Damyan Ivanov ] * Standards-Version: 3.7.3 (no changes) * debhelper compatibility level 6 * debian/rules: + make it like the current dh-make-perl templates * add myself to Uploaders -- Damyan Ivanov Mon, 21 Jan 2008 11:41:29 +0200 libcdk-perl (4.9.10-2) unstable; urgency=low * Adopted orphaned package for Debian Perl Group (Closes: #279778) * Added myself to Uploaders * Do not ignore $(MAKE) clean errors in debian/rules * Corrected Homepage in debian/control * Removed emtpy /usr/share/perl5 * Fixed debian/watch * Bumped debhelper version in debian/compat to 5 * Changed >> to >= in Build-Depends * Updated Standards-Version to 3.7.2 from 3.6.2 (no changes) -- Jeremiah Foster Tue, 14 Aug 2007 12:39:04 +0000 libcdk-perl (4.9.10-1) unstable; urgency=low * QA upload. * Package is orphaned (see #279778); set maintainer to Debian QA Group. * New upstream release. - Links against libcdk5 rather than libcdk4. - Fixes the matrix widget. Closes: #179540. * Cdk/Viewer.pm: Fix copy-paste error that prevented bind() from working. Thanks to Mathew White for the patch. Closes: #312733. * Change section to perl in accordance with the override file. * Update description. Closes: #205877. * debian/copyright: - Include original copyright and license. Closes: #236488. - Update upstream URL. * debian/rules: Leave examples uncompressed. * debian/watch: Add. * Conforms to Standards version 3.6.2. -- Matej Vela Mon, 31 Oct 2005 13:09:31 +0100 libcdk-perl (4.9.7-6) unstable; urgency=low * Redo the hppa specific inclusion of -ffunction-sections as $Config::Config{archname} has changed. -- Stephen Zander Tue, 5 Nov 2002 01:37:34 -0800 libcdk-perl (4.9.7-5) unstable; urgency=low * Rebuild for perl 5.8; adjust Build-Depends appropriately -- Stephen Zander Tue, 3 Sep 2002 07:32:33 -0700 libcdk-perl (4.9.7-4) unstable; urgency=low * Add -ffunction-sections for hppa architecture, Closes: #134027 -- Stephen Zander Fri, 17 May 2002 16:23:35 -0700 libcdk-perl (4.9.7-3) unstable; urgency=high * Fix Section: override. * Set urgency=high to ensure package moves to testing more quickly -- Stephen Zander Fri, 28 Dec 2001 12:43:36 -0800 libcdk-perl (4.9.7-2) unstable; urgency=low * New maintainer, Closes: #123489 * Updated for policy 3.5.6 and the new perl packaging policy, Closes: #80683, #95406 * Builds cleanly on sparc & hppa, Closes: #89292, #104886 * No longer build libcdk-perl-examples, Closes: #118225 -- Stephen Zander Fri, 28 Dec 2001 09:57:48 -0800 libcdk-perl (4.9.7-1) unstable; urgency=low * New upstream version. -- Raphael Bossek Sat, 15 Jan 2000 12:51:09 +0100 cdk-perl-20240606/package/cdk-perl.spec0000644000000000000000000000616414630415236016141 0ustar rootroot# $Id: cdk-perl.spec,v 1.41 2024/06/06 20:22:54 tom Exp $, $Date: 2024/06/06 20:22:54 $ # # Conditional build: # _without_tests - do not perform "make test" # Summary: Perl extensions for CDK Summary(pl): Rozszerzenie Perla dla CDK Name: cdk-perl Version: 5.0 Release: 20240606 License: MIT-X11 Group: Development/Languages/Perl Source0: ftp://ftp.invisible-island.net/cdk/cdk-perl-%{release}.tgz %description This is the Perl5 extension to the Cdk library written by Mike Glover. All the copyright notices from the Cdk C distribution also apply to the extension. %description -l pl To jest rozszerzenie Perla do biblioteki Cdk. Wszystkie copyrighty z dystrybucji Cdk dotyczą także tego rozszerzenia. %prep %define debug_package %{nil} %global os_MAGEIA %(test "%{_host_vendor}" = "mageia" && echo 1 || echo 0) %global os_REDHAT %(test "%{_host_vendor}" = "redhat" && echo 1 || echo 0) %global os_SUSE %(test "%{_host_vendor}" = "suse" && echo 1 || echo 0) %if %{os_MAGEIA} %global perl_arch %{_libdir}/perl5/vendor_perl %global perl_lib %{_datadir}/perl5/vendor_perl %endif %if %{os_REDHAT} %global perl_arch %{_libdir}/perl5/vendor_perl %global perl_lib %{_datadir}/perl5/vendor_perl %endif %if %{os_SUSE} %global perl_arch %perl_vendorarch %global perl_lib %perl_vendorlib %endif %define doc_dir %{_defaultdocdir}/%{name}-%{version} %define full_dir %{doc_dir}/fulldemo %define demos_dir %{doc_dir}/demos %define examples_dir %{doc_dir}/examples %define fullhelp_dir %{doc_dir}/fulldemo/help %setup -q -n cdk-perl-%{release} %build : "_host_vendor %{_host_vendor}" : "perl_lib %{perl_lib}" : "perl_arch %{perl_arch}" ./configure --libdir=%{perl_arch} --datadir=%{perl_lib} --with-screen=ncursesw %{__make} %{!?_without_tests:%{__make} test} %install rm -rf %{buildroot} install -d %{buildroot}%{perl_lib} %{__make} pure_vendor_install \ BUILDDIR=%{buildroot} \ DESTDIR=%{buildroot} chmod -R u+w %{buildroot} install -d %{buildroot}%{doc_dir} install -m 644 CHANGES %{buildroot}%{doc_dir} install -m 644 COPYING %{buildroot}%{doc_dir} install -m 644 README %{buildroot}%{doc_dir} install -d %{buildroot}%{full_dir} install fulldemo/cdkdemo %{buildroot}%{full_dir} install -d %{buildroot}%{fullhelp_dir} install -m 644 fulldemo/help/* %{buildroot}%{fullhelp_dir} install -d %{buildroot}%{demos_dir} install demos/* %{buildroot}%{demos_dir} install -d %{buildroot}%{examples_dir} install examples/* %{buildroot}%{examples_dir} %clean rm -rf %{buildroot} %files #{perl_lib}/* %{perl_arch}/* %{doc_dir}/* %exclude %dir %{perl_arch}/auto/ %dir %changelog * Tue Oct 25 2022 Thomas Dickey - repair rpm spec-file * Thu Oct 20 2022 Thomas Dickey - update license * Thu Dec 16 2021 Thomas Dickey - revised to work without macros.perl, broken by Red Hat. * Fri Feb 22 2019 Thomas Dickey - convert to UTF-8, port to OpenSUSE, Mageia - add fulldemo * Sun Jul 14 2013 Thomas Dickey - adapted from spec-file from pld.org dated 2002/09/28 cdk-perl-20240606/VERSION0000644000000000000000000000002314630415236013225 0ustar rootroot0:0:0 5.0 20240606 cdk-perl-20240606/Cdk.xs0000644000000000000000000040770314156743473013264 0ustar rootroot/* * $Author: tom $ * $Date: 2021/12/16 23:09:47 $ * $Revision: 1.37 $ */ #include #include #include #define CDK_PERL_EXT #ifdef HAVE_CDK_CDK_H #include #else #include #endif #if (PERL_REVISION == 5) && (PERL_VERSION >= 10 && PERL_VERSION <= 28) #undef dNOOP #define dNOOP struct Perl___notused_struct #endif /* Prior to perl5.005, the PL_ prefix wasn't used for things such as PL_rs. Define the PL_ macros that we use if necessary. */ #include /* This is perl's patchlevel.h */ #if PATCHLEVEL < 5 #define PL_na na #define PL_sv_undef sv_undef #endif static char * checkChtypeKey(chtype key); static chtype sv2chtype(SV *sv); static int sv2dtype(SV * sv); static int sv2int(SV *sv); CDKSCREEN * GCDKSCREEN = (CDKSCREEN *)NULL; WINDOW * GCWINDOW = (WINDOW *)NULL; /* this would be a function, except the menu widget relies on a fixed array */ #define MAKE_MENU_MATRIX(START,INPUT,NEWARRAY,ARRAYSIZE,ARRAYLEN) \ do { \ AV *array = (AV *)SvRV((INPUT)); \ int x, y; \ \ (ARRAYLEN) = (int)av_len (array); \ \ for (x = 0; x <= (ARRAYLEN); x++) \ { \ SV *name = *av_fetch(array,x,FALSE); \ AV *subArray = (AV *)SvRV(name); \ int subLen = (int)av_len (subArray); \ (ARRAYSIZE)[x+(START)] = subLen + 1; \ \ for (y=0; y <= subLen; y++) \ { \ SV *sv = *av_fetch(subArray,y,FALSE); \ (NEWARRAY)[x+(START)][y+(START)] = copyChar((char *)SvPV(sv,PL_na)); \ } \ } \ (ARRAYLEN)++; \ } while (0) static void make_int_array(int start, SV* input, int **dest, int *destlen) { AV *src = (AV *)SvRV(input); int length = (int)av_len(src) + 1; int x; if ((*dest = (int *)calloc((size_t) length + 2, sizeof(int *))) == 0) { croak("make_int_array(%d)", length + 2); } for (x=0; x < length; x++) { SV *foo = *av_fetch(src, x, FALSE); (*dest)[x + start] = sv2int (foo); } *destlen = length; } #define MAKE_INT_ARRAY(START, INPUT, DEST, LEN) \ make_int_array(START, INPUT, &DEST, &LEN) static void make_dtype_array(int start, SV *input, int **dest, int *destlen) { AV *src = (AV *)SvRV(input); int length = (int)av_len(src) + 1; int x; if ((*dest = (int *)calloc((size_t) length + 2, sizeof(int *))) == 0) { croak("make_dtype_array(%d)", length + 2); } for (x=0; x < length; x++) { SV *foo = *av_fetch(src, x, FALSE); (*dest)[x + start] = sv2dtype (foo); } *destlen = length; } #define MAKE_DTYPE_ARRAY(START, INPUT, DEST, LEN) \ make_dtype_array(START, INPUT, &DEST, &LEN) static void make_chtype_array(int start, SV *input, chtype **dest, int *destlen) { AV *src = (AV *)SvRV(input); int length = (int)av_len(src) + 1; int x; if ((*dest = (chtype *)calloc((size_t) length + 2, sizeof(chtype *))) == 0) { croak("make_chtype_array(%d)", length + 2); } for (x=0; x < length; x++) { SV *foo = *av_fetch(src, x, FALSE); (*dest)[x + start] = sv2chtype (foo); } *destlen = length; } #define MAKE_CHTYPE_ARRAY(START, INPUT, DEST, LEN) \ make_chtype_array(START, INPUT, &DEST, &LEN) static void make_char_array(int start, SV *input, char ***dest, int *destlen) { AV *src = (AV *)SvRV(input); int length = (int)av_len(src) + 1; int x; if ((*dest = (char **)calloc((size_t) length + 2, sizeof(char *))) == 0) { croak("make_char_array(%d)", length + 2); } for (x=0; x < length; x++) { SV *foo = *av_fetch(src, x, FALSE); (*dest)[x + start] = copyChar((char *)SvPV(foo,PL_na)); } *destlen = length; } #define MAKE_CHAR_ARRAY(START, INPUT, DEST, LEN) \ make_char_array(START, INPUT, &DEST, &LEN) static void make_title(SV * input, char **dest) { char *data; if (SvROK(input) && SvTYPE(SvRV(input)) == SVt_PVAV) { AV *src = (AV *)SvRV(input); int len = (int)av_len(src) + 1; int x; int length = 2; for (x=0; x < len; x++) { SV *foo = *av_fetch(src, x, FALSE); data = (char *)SvPV(foo,PL_na); length += (int)strlen(data) + 1; } *dest = malloc((size_t)length); if (*dest == 0) croak("make_title"); **dest = '\0'; for (x=0; x < len; x++) { SV *foo = *av_fetch(src, x, FALSE); data = (char *)SvPV(foo,PL_na); if (x != 0) strcat(*dest, "\n"); strcat(*dest, data); } } else { data = (char *)SvPV(input,PL_na); *dest = malloc(strlen(data) + 1); if (*dest == 0) croak("make_title"); strcpy (*dest, data); } } #define MAKE_TITLE(INPUT, DEST) \ make_title(INPUT, &DEST) /* * The callback callback to run Perl callback routines. Are you confused??? */ static int PerlBindCB (EObjectType cdktype, void *object, void *data, chtype input) { dSP ; SV *foo = (SV*)data; int returnValueCount; char *chtypeKey, temp[10]; ENTER; SAVETMPS; PUSHMARK (sp); (void) cdktype; (void) object; /* Check which key input is... */ chtypeKey = checkChtypeKey (input); if (chtypeKey == (char *)NULL) { sprintf (temp, "%c", (char)input); XPUSHs (sv_2mortal(newSVpv(temp, 1))); } else { XPUSHs (sv_2mortal(newSVpv(chtypeKey, strlen(chtypeKey)))); } PUTBACK ; /* Call the perl subroutine. */ returnValueCount = perl_call_sv (foo, G_SCALAR); SPAGAIN; /* Check the number of values returned from this function. */ if (returnValueCount == 0) { /* They didn't return anything, let them continue. */ PUTBACK; FREETMPS; LEAVE; return 1; } /* They returned something, lets find out what it is. */ (void) POPi; PUTBACK; FREETMPS; LEAVE; return 1; } /* * The callback callback to run Perl callback routines. Are you confused??? */ static int PerlProcessCB (EObjectType cdktype, void *object, void *data, chtype input) { dSP ; SV *foo = (SV*)data; int returnValueCount, returnValue; char *chtypeKey, temp[10]; ENTER; SAVETMPS; PUSHMARK (sp); (void) cdktype; (void) object; /* Check which key input is... */ chtypeKey = checkChtypeKey (input); if (chtypeKey == (char *)NULL) { sprintf (temp, "%c", (char)input); XPUSHs (sv_2mortal(newSVpv(temp, 1))); } else { XPUSHs (sv_2mortal(newSVpv(chtypeKey, strlen(chtypeKey)))); } PUTBACK ; /* Call the perl subroutine. */ returnValueCount = perl_call_sv (foo, G_SCALAR); SPAGAIN; /* Check the number of values returned from this function. */ if (returnValueCount == 0) { /* They didn't return anything, let them continue. */ PUTBACK; FREETMPS; LEAVE; return 1; } /* They returned something, lets find out what it is. */ returnValue = POPi; PUTBACK; FREETMPS; LEAVE; return returnValue; } static void checkCdkInit(void) { if (GCDKSCREEN == (CDKSCREEN *)NULL) { croak ("Cdk has not been initialized.\n"); } } static char * checkChtypeKey(chtype key) { char *result = 0; if (key == KEY_UP) result = "KEY_UP"; else if (key == KEY_DOWN) result = "KEY_DOWN"; else if (key == KEY_LEFT) result = "KEY_LEFT"; else if (key == KEY_RIGHT) result = "KEY_RIGHT"; else if (key == KEY_NPAGE) result = "KEY_NPAGE"; else if (key == KEY_PPAGE) result = "KEY_PPAGE"; else if (key == KEY_END) result = "KEY_END"; else if (key == KEY_HOME) result = "KEY_HOME"; else if (key == KEY_BACKSPACE) result = "KEY_BACKSPACE"; else if (key == DELETE) result = "KEY_DELETE"; else if (key == KEY_ESC) result = "KEY_ESC"; return result; } static int sv2integer(SV *sv, int invalid) { char *from = SvPV(sv,PL_na); char mark; int result; if (sscanf(from, "%d%c", &result, &mark) != 1) { result = invalid; } return result; } static chtype sv2chtype(SV *sv) { bool found = FALSE; chtype result = 0; if (SvPOK(sv)) { char *name = SvPV(sv,PL_na); chtype *fillerChtype; int c1, c2; found = TRUE; if (strEQ(name, "ACS_BTEE")) result = ACS_BTEE; else if (strEQ(name, "ACS_HLINE")) result = ACS_HLINE; else if (strEQ(name, "ACS_LLCORNER")) result = ACS_LLCORNER; else if (strEQ(name, "ACS_LRCORNER")) result = ACS_LRCORNER; else if (strEQ(name, "ACS_LTEE")) result = ACS_LTEE; else if (strEQ(name, "ACS_PLUS")) result = ACS_PLUS; else if (strEQ(name, "ACS_RTEE")) result = ACS_RTEE; else if (strEQ(name, "ACS_TTEE")) result = ACS_TTEE; else if (strEQ(name, "ACS_ULCORNER")) result = ACS_ULCORNER; else if (strEQ(name, "ACS_URCORNER")) result = ACS_URCORNER; else if (strEQ(name, "ACS_VLINE")) result = ACS_VLINE; else if (strEQ(name, "A_ALTCHARSET")) result = A_ALTCHARSET; else if (strEQ(name, "A_ATTRIBUTES")) result = A_ATTRIBUTES; else if (strEQ(name, "A_BLINK")) result = A_BLINK; else if (strEQ(name, "A_BOLD")) result = A_BOLD; else if (strEQ(name, "A_CHARTEXT")) result = A_CHARTEXT; else if (strEQ(name, "A_COLOR")) result = A_COLOR; else if (strEQ(name, "A_DIM")) result = A_DIM; else if (strEQ(name, "A_INVIS")) result = A_INVIS; else if (strEQ(name, "A_NORMAL")) result = A_NORMAL; else if (strEQ(name, "A_PROTECT")) result = A_PROTECT; else if (strEQ(name, "A_REVERSE")) result = A_REVERSE; else if (strEQ(name, "A_STANDOUT")) result = A_STANDOUT; else if (strEQ(name, "A_UNDERLINE")) result = A_UNDERLINE; else if (strEQ(name, "CDK_COPY")) result = CDK_COPY; else if (strEQ(name, "CDK_CUT")) result = CDK_CUT; else if (strEQ(name, "CDK_ERASE")) result = CDK_ERASE; else if (strEQ(name, "CDK_PASTE")) result = CDK_PASTE; else if (strEQ(name, "CDK_REFRESH")) result = CDK_REFRESH; #ifdef COLOR else if (strEQ(name, "COLOR_BLACK")) result = COLOR_BLACK; else if (strEQ(name, "COLOR_BLUE")) result = COLOR_BLUE; else if (strEQ(name, "COLOR_CYAN")) result = COLOR_CYAN; else if (strEQ(name, "COLOR_GREEN")) result = COLOR_GREEN; else if (strEQ(name, "COLOR_MAGENTA")) result = COLOR_MAGENTA; else if (strEQ(name, "COLOR_RED")) result = COLOR_RED; else if (strEQ(name, "COLOR_WHITE")) result = COLOR_WHITE; else if (strEQ(name, "COLOR_YELLOW")) result = COLOR_YELLOW; #endif else if (strEQ(name, "DELETE")) result = DELETE; else if (strEQ(name, "KEY_A1")) result = KEY_A1; else if (strEQ(name, "KEY_A3")) result = KEY_A3; else if (strEQ(name, "KEY_B2")) result = KEY_B2; else if (strEQ(name, "KEY_BACKSPACE")) result = KEY_BACKSPACE; else if (strEQ(name, "KEY_BEG")) result = KEY_BEG; else if (strEQ(name, "KEY_BREAK")) result = KEY_BREAK; else if (strEQ(name, "KEY_BTAB")) result = KEY_BTAB; else if (strEQ(name, "KEY_C1")) result = KEY_C1; else if (strEQ(name, "KEY_C3")) result = KEY_C3; else if (strEQ(name, "KEY_CANCEL")) result = KEY_CANCEL; else if (strEQ(name, "KEY_CATAB")) result = KEY_CATAB; else if (strEQ(name, "KEY_CLEAR")) result = KEY_CLEAR; else if (strEQ(name, "KEY_CLOSE")) result = KEY_CLOSE; else if (strEQ(name, "KEY_COMMAND")) result = KEY_COMMAND; else if (strEQ(name, "KEY_COPY")) result = KEY_COPY; else if (strEQ(name, "KEY_CREATE")) result = KEY_CREATE; else if (strEQ(name, "KEY_CTAB")) result = KEY_CTAB; else if (strEQ(name, "KEY_DC")) result = KEY_DC; else if (strEQ(name, "KEY_DL")) result = KEY_DL; else if (strEQ(name, "KEY_DOWN")) result = KEY_DOWN; else if (strEQ(name, "KEY_EIC")) result = KEY_EIC; else if (strEQ(name, "KEY_END")) result = KEY_END; else if (strEQ(name, "KEY_ENTER")) result = KEY_ENTER; else if (strEQ(name, "KEY_EOL")) result = KEY_EOL; else if (strEQ(name, "KEY_EOS")) result = KEY_EOS; else if (strEQ(name, "KEY_ESC")) result = KEY_ESC; else if (strEQ(name, "KEY_EXIT")) result = KEY_EXIT; else if (strEQ(name, "KEY_F0")) result = KEY_F0; else if (strEQ(name, "KEY_F1")) result = KEY_F1; else if (strEQ(name, "KEY_F10")) result = KEY_F10; else if (strEQ(name, "KEY_F11")) result = KEY_F11; else if (strEQ(name, "KEY_F12")) result = KEY_F12; else if (strEQ(name, "KEY_F2")) result = KEY_F2; else if (strEQ(name, "KEY_F3")) result = KEY_F3; else if (strEQ(name, "KEY_F4")) result = KEY_F4; else if (strEQ(name, "KEY_F5")) result = KEY_F5; else if (strEQ(name, "KEY_F6")) result = KEY_F6; else if (strEQ(name, "KEY_F7")) result = KEY_F7; else if (strEQ(name, "KEY_FIND")) result = KEY_FIND; else if (strEQ(name, "KEY_HELP")) result = KEY_HELP; else if (strEQ(name, "KEY_HOME")) result = KEY_HOME; else if (strEQ(name, "KEY_IC")) result = KEY_IC; else if (strEQ(name, "KEY_IL")) result = KEY_IL; else if (strEQ(name, "KEY_LEFT")) result = KEY_LEFT; else if (strEQ(name, "KEY_LL")) result = KEY_LL; else if (strEQ(name, "KEY_MARK")) result = KEY_MARK; else if (strEQ(name, "KEY_MAX")) result = KEY_MAX; else if (strEQ(name, "KEY_MESSAGE")) result = KEY_MESSAGE; else if (strEQ(name, "KEY_MIN")) result = KEY_MIN; else if (strEQ(name, "KEY_MOVE")) result = KEY_MOVE; else if (strEQ(name, "KEY_NPAGE")) result = KEY_NPAGE; else if (strEQ(name, "KEY_OPEN")) result = KEY_OPEN; else if (strEQ(name, "KEY_OPTIONS")) result = KEY_OPTIONS; else if (strEQ(name, "KEY_PPAGE")) result = KEY_PPAGE; else if (strEQ(name, "KEY_PREVIOUS")) result = KEY_PREVIOUS; else if (strEQ(name, "KEY_PRINT")) result = KEY_PRINT; else if (strEQ(name, "KEY_REDO")) result = KEY_REDO; else if (strEQ(name, "KEY_REFERENCE")) result = KEY_REFERENCE; else if (strEQ(name, "KEY_REFRESH")) result = KEY_REFRESH; else if (strEQ(name, "KEY_REPLACE")) result = KEY_REPLACE; else if (strEQ(name, "KEY_RESET")) result = KEY_RESET; else if (strEQ(name, "KEY_RESTART")) result = KEY_RESTART; else if (strEQ(name, "KEY_RESUME")) result = KEY_RESUME; else if (strEQ(name, "KEY_RETURN")) result = KEY_RETURN; else if (strEQ(name, "KEY_RIGHT")) result = KEY_RIGHT; else if (strEQ(name, "KEY_SAVE")) result = KEY_SAVE; else if (strEQ(name, "KEY_SBEG")) result = KEY_SBEG; else if (strEQ(name, "KEY_SCANCEL")) result = KEY_SCANCEL; else if (strEQ(name, "KEY_SCOMMAND")) result = KEY_SCOMMAND; else if (strEQ(name, "KEY_SCOPY")) result = KEY_SCOPY; else if (strEQ(name, "KEY_SCREATE")) result = KEY_SCREATE; else if (strEQ(name, "KEY_SDC")) result = KEY_SDC; else if (strEQ(name, "KEY_SDL")) result = KEY_SDL; else if (strEQ(name, "KEY_SELECT")) result = KEY_SELECT; else if (strEQ(name, "KEY_SEND")) result = KEY_SEND; else if (strEQ(name, "KEY_SEOL")) result = KEY_SEOL; else if (strEQ(name, "KEY_SEXIT")) result = KEY_SEXIT; else if (strEQ(name, "KEY_SF")) result = KEY_SF; else if (strEQ(name, "KEY_SFIND")) result = KEY_SFIND; else if (strEQ(name, "KEY_SHELP")) result = KEY_SHELP; else if (strEQ(name, "KEY_SHOME")) result = KEY_SHOME; else if (strEQ(name, "KEY_SIC")) result = KEY_SIC; else if (strEQ(name, "KEY_SLEFT")) result = KEY_SLEFT; else if (strEQ(name, "KEY_SMESSAGE")) result = KEY_SMESSAGE; else if (strEQ(name, "KEY_SMOVE")) result = KEY_SMOVE; else if (strEQ(name, "KEY_SNEXT")) result = KEY_SNEXT; else if (strEQ(name, "KEY_SOPTIONS")) result = KEY_SOPTIONS; else if (strEQ(name, "KEY_SPREVIOUS")) result = KEY_SPREVIOUS; else if (strEQ(name, "KEY_SPRINT")) result = KEY_SPRINT; else if (strEQ(name, "KEY_SR")) result = KEY_SR; else if (strEQ(name, "KEY_SREDO")) result = KEY_SREDO; else if (strEQ(name, "KEY_SREPLACE")) result = KEY_SREPLACE; else if (strEQ(name, "KEY_SRESET")) result = KEY_SRESET; else if (strEQ(name, "KEY_SRIGHT")) result = KEY_SRIGHT; else if (strEQ(name, "KEY_SRSUME")) result = KEY_SRSUME; else if (strEQ(name, "KEY_SSAVE")) result = KEY_SSAVE; else if (strEQ(name, "KEY_SSUSPEND")) result = KEY_SSUSPEND; else if (strEQ(name, "KEY_STAB")) result = KEY_STAB; else if (strEQ(name, "KEY_SUNDO")) result = KEY_SUNDO; else if (strEQ(name, "KEY_SUSPEND")) result = KEY_SUSPEND; else if (strEQ(name, "KEY_TAB")) result = KEY_TAB; else if (strEQ(name, "KEY_UNDO")) result = KEY_UNDO; else if (strEQ(name, "KEY_UP")) result = KEY_UP; else if (strEQ(name, "SPACE")) result = SPACE; else if (strEQ(name, "TAB")) result = TAB; /* Else they used a format of to specify a chtype. */ else if ((fillerChtype = char2Chtype (name, &c1, &c2)) != 0) { result = fillerChtype[0]; freeChtype (fillerChtype); } else found = FALSE; } if (!found) { result = (chtype)sv2integer(sv, 0); } return result; } static int sv2dtype(SV * sv) { bool found = FALSE; int result = vINVALID; if (SvPOK(sv)) { char *name = SvPV(sv,PL_na); found = TRUE; if (strEQ (name, "CHAR")) result = vCHAR; else if (strEQ (name, "HCHAR")) result = vHCHAR; else if (strEQ (name, "INT")) result = vINT; else if (strEQ (name, "HINT")) result = vHINT; else if (strEQ (name, "MIXED")) result = vMIXED; else if (strEQ (name, "HMIXED")) result = vHMIXED; else if (strEQ (name, "UCHAR")) result = vUCHAR; else if (strEQ (name, "LCHAR")) result = vLCHAR; else if (strEQ (name, "UHCHAR")) result = vUHCHAR; else if (strEQ (name, "LHCHAR")) result = vLHCHAR; else if (strEQ (name, "UMIXED")) result = vUMIXED; else if (strEQ (name, "LMIXED")) result = vLMIXED; else if (strEQ (name, "UHMIXED")) result = vUHMIXED; else if (strEQ (name, "LHMIXED")) result = vLHMIXED; else if (strEQ (name, "VIEWONLY")) result = vVIEWONLY; else if (strEQ (name, "NONE")) result = vNONE; else if (strEQ (name, "PERCENT")) result = vPERCENT; else if (strEQ (name, "REAL")) result = vREAL; else if (strEQ (name, "PLOT")) result = vPLOT; else if (strEQ (name, "LINE")) result = vLINE; else found = FALSE; } if (!found) { result = sv2integer(sv, vINVALID); } return result; } static int sv2int(SV *sv) { bool found = FALSE; int result = 0; if (SvPOK(sv)) { char *name = SvPV(sv,PL_na); found = TRUE; if (strEQ(name, "BOTTOM")) result = BOTTOM; else if (strEQ(name, "CENTER")) result = CENTER; else if (strEQ(name, "COL")) result = COL; else if (strEQ(name, "FALSE")) result = FALSE; else if (strEQ(name, "FULL")) result = FULL; else if (strEQ(name, "HORIZONTAL")) result = HORIZONTAL; else if (strEQ(name, "LEFT")) result = LEFT; else if (strEQ(name, "NONE")) result = NONE; else if (strEQ(name, "NONUMBERS")) result = NONUMBERS; else if (strEQ(name, "NUMBERS")) result = NUMBERS; else if (strEQ(name, "RIGHT")) result = RIGHT; else if (strEQ(name, "ROW")) result = ROW; else if (strEQ(name, "TRUE")) result = TRUE; else if (strEQ(name, "TOP")) result = TOP; else if (strEQ(name, "VERTICAL")) result = VERTICAL; else found = FALSE; } if (!found) { result = sv2integer(sv, 0); } return result; } #if 0 static char * sv2CharPtr(SV *inp) { char *name = (char *)SvPV(inp,PL_na); return (name); } static int not_here(char *s) { croak("%s not implemented on this architecture", s); return -1; } #endif static double constant(char *name, int arg) { (void)arg; errno = 0; switch (*name) { case 'A': break; case 'B': break; case 'C': break; case 'D': break; case 'E': break; case 'F': break; case 'G': break; case 'H': break; case 'I': break; case 'J': break; case 'K': break; case 'L': break; case 'M': break; case 'N': break; case 'O': break; case 'P': break; case 'Q': break; case 'R': break; case 'S': break; case 'T': break; case 'U': break; case 'V': break; case 'W': break; case 'X': break; case 'Y': break; case 'Z': break; } errno = EINVAL; return 0; #if 0 not_there: errno = ENOENT; return 0; #endif } MODULE = Cdk PACKAGE = Cdk const char * getVersion() CODE: { RETVAL = CDKVersion(); } OUTPUT: RETVAL double constant(name,arg) char * name int arg void Beep() CODE: { Beep(); } CDKSCREEN * init() CODE: { GCWINDOW = initscr(); GCDKSCREEN = initCDKScreen (GCWINDOW); /* Start the colors. */ initCDKColor(); RETVAL = GCDKSCREEN; } OUTPUT: RETVAL long getColor(pair) int pair CODE: { (void) targ; RETVAL = COLOR_PAIR(pair); } OUTPUT: RETVAL void end() CODE: { /* Kill the main screen. */ destroyCDKScreen (GCDKSCREEN); /* Remove the curses window. */ delwin (GCWINDOW); /* Shut down curses. */ endCDK(); kill (0, 2); } CDKSCREEN * getCdkScreen() CODE: { RETVAL = GCDKSCREEN; } OUTPUT: RETVAL void getCdkScreenDim() PPCODE: { int myY, myX; getmaxyx(GCDKSCREEN->window, myY, myX); XPUSHs (sv_2mortal(newSViv(myY))); XPUSHs (sv_2mortal(newSViv(myX))); } WINDOW * getCdkWindow() CODE: { RETVAL = GCDKSCREEN->window; } OUTPUT: RETVAL void refreshCdkScreen() CODE: { refreshCDKScreen (GCDKSCREEN); } void eraseCdkScreen() CODE: { eraseCDKScreen (GCDKSCREEN); } void destroyCdkScreen() CODE: { destroyCDKScreen(GCDKSCREEN); } void DrawMesg(window,mesg,attrib=A_NORMAL,xpos=CENTER,ypos=CENTER,align=HORIZONTAL) WINDOW * window char * mesg chtype attrib = sv2chtype ($arg); int xpos = sv2int ($arg); int ypos = sv2int ($arg); int align = sv2int ($arg); CODE: { int mesgLen = (int) strlen (mesg); writeCharAttrib (window, xpos, ypos, mesg, attrib, align, 0, mesgLen); } chtype getch() void raw() void noraw() PROTOTYPES: DISABLE MODULE = Cdk PACKAGE = Cdk::Label CDKLABEL * New(mesg,xPos=CENTER,yPos=CENTER,Box=TRUE,shadow=FALSE) SV * mesg int xPos = sv2int ($arg); int yPos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKLABEL * widget = (CDKLABEL *)NULL; char ** message; int messageLines; checkCdkInit(); RETVAL = 0; MAKE_CHAR_ARRAY (0, mesg, message, messageLines); widget = newCDKLabel (GCDKSCREEN, xPos, yPos, (CDK_CONST char **)message, messageLines, Box, shadow); free (message); /* Check the return value. */ if (widget == (CDKLABEL *)NULL) { croak ("Cdk::Label Could not create widget. Is the window too small?\n"); } else { RETVAL = widget; } } OUTPUT: RETVAL void SetMessage(object,mesg) CDKLABEL * object SV * mesg CODE: { char ** message; int messageLines; MAKE_CHAR_ARRAY (0, mesg, message, messageLines); setCDKLabelMessage (object, (CDK_CONST char **)message, messageLines); free (message); } void SetBox(object,Box=TRUE) CDKLABEL * object int Box = sv2int ($arg); CODE: { setCDKLabelBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKLABEL * object chtype character = sv2chtype ($arg); CODE: { setCDKLabelULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKLABEL * object chtype character = sv2chtype ($arg); CODE: { setCDKLabelURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKLABEL * object chtype character = sv2chtype ($arg); CODE: { setCDKLabelLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKLABEL * object chtype character = sv2chtype ($arg); CODE: { setCDKLabelLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKLABEL * object chtype character = sv2chtype ($arg); CODE: { setCDKLabelVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKLABEL * object chtype character = sv2chtype ($arg); CODE: { setCDKLabelHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKLABEL * object chtype character = sv2chtype ($arg); CODE: { setCDKLabelBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKLABEL * object char * color CODE: { setCDKLabelBackgroundColor (object,color); } void Draw(object,Box=TRUE) CDKLABEL * object int Box = sv2int ($arg); CODE: { drawCDKLabel (object, Box); } void Erase(object) CDKLABEL * object CODE: { eraseCDKLabel(object); } char Wait(object, key=0) CDKLABEL * object chtype key = sv2chtype ($arg); CODE: { RETVAL = waitCDKLabel (object, (char) key); } OUTPUT: RETVAL void Register(object) CDKLABEL * object CODE: { registerCDKObject (GCDKSCREEN, vLABEL, object); } void Unregister(object) CDKLABEL * object CODE: { unregisterCDKObject (vLABEL, object); } void Raise(object) CDKLABEL * object CODE: { raiseCDKObject (vLABEL, object); } void Lower(object) CDKLABEL * object CODE: { lowerCDKObject (vLABEL, object); } WINDOW * GetWindow(object) CDKLABEL * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Dialog CDKDIALOG * New(message,buttons,xPos=CENTER,yPos=CENTER,highlight=A_REVERSE,separator=TRUE,Box=TRUE,shadow=FALSE) SV * message SV * buttons int xPos = sv2int ($arg); int yPos = sv2int ($arg); chtype highlight = sv2chtype ($arg); int separator = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKDIALOG * dialogWidget = (CDKDIALOG *)NULL; char ** Message; char ** Buttons; int buttonCount; int rowCount; checkCdkInit(); RETVAL = 0; MAKE_CHAR_ARRAY (0, message, Message, rowCount); MAKE_CHAR_ARRAY (0, buttons, Buttons, buttonCount); dialogWidget = newCDKDialog (GCDKSCREEN,xPos,yPos, (CDK_CONST char **)Message, rowCount, (CDK_CONST char **)Buttons, buttonCount, highlight, separator, Box,shadow); free (Message); free (Buttons); /* Check the return type. */ if (dialogWidget == (CDKDIALOG *)NULL) { croak ("Cdk::Dialog Could not create widget. Is the window too small?\n"); } else { RETVAL = dialogWidget; } } OUTPUT: RETVAL int Activate(object,...) CDKDIALOG * object CODE: { chtype * Keys; int arrayLen; int value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKDialog (object, Keys); free (Keys); } else { value = activateCDKDialog (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL int Inject(object,key) CDKDIALOG * object chtype key = sv2chtype ($arg); CODE: { int selection = injectCDKDialog (object,key); if (selection == -1) { XSRETURN_UNDEF; } RETVAL = selection; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKDIALOG * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vDIALOG, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKDIALOG * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKDialogPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKDIALOG * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKDialogPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKDIALOG * object int Box = sv2int ($arg); CODE: { drawCDKDialog (object,Box); } void Erase(object) CDKDIALOG * object CODE: { eraseCDKDialog (object); } void SetHighlight(object,highlight=A_REVERSE) CDKDIALOG * object chtype highlight = sv2chtype ($arg); CODE: { setCDKDialogHighlight (object,highlight); } void SetSeparator(object,separator=TRUE) CDKDIALOG * object int separator CODE: { setCDKDialogSeparator (object,separator); } void SetBox(object,Box=TRUE) CDKDIALOG * object int Box = sv2int ($arg); CODE: { setCDKDialogBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKDIALOG * object chtype character = sv2chtype ($arg); CODE: { setCDKDialogULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKDIALOG * object chtype character = sv2chtype ($arg); CODE: { setCDKDialogURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKDIALOG * object chtype character = sv2chtype ($arg); CODE: { setCDKDialogLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKDIALOG * object chtype character = sv2chtype ($arg); CODE: { setCDKDialogLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKDIALOG * object chtype character = sv2chtype ($arg); CODE: { setCDKDialogVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKDIALOG * object chtype character = sv2chtype ($arg); CODE: { setCDKDialogHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKDIALOG * object chtype character = sv2chtype ($arg); CODE: { setCDKDialogBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKDIALOG * object char * color CODE: { setCDKDialogBackgroundColor (object,color); } void Register(object) CDKDIALOG * object CODE: { registerCDKObject (GCDKSCREEN, vDIALOG, object); } void Unregister(object) CDKDIALOG * object CODE: { unregisterCDKObject (vDIALOG, object); } void Raise(object) CDKDIALOG * object CODE: { raiseCDKObject (vDIALOG, object); } void Lower(object) CDKDIALOG * object CODE: { lowerCDKObject (vDIALOG, object); } WINDOW * GetWindow(object) CDKDIALOG * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Scroll CDKSCROLL * New (title,mesg,height,width,xPos=CENTER,yPos=CENTER,sPos=RIGHT,numbers=TRUE,highlight=A_REVERSE,Box=TRUE,shadow=FALSE) SV * title SV * mesg int height int width int xPos = sv2int ($arg); int yPos = sv2int ($arg); int sPos = sv2int ($arg); int numbers = sv2int ($arg); chtype highlight = sv2chtype ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKSCROLL * scrollWidget = 0; char ** Message; char * Title; int mesglen; checkCdkInit(); RETVAL = 0; MAKE_CHAR_ARRAY(0, mesg, Message, mesglen); MAKE_TITLE (title,Title); scrollWidget = newCDKScroll (GCDKSCREEN, xPos, yPos, sPos, height, width, Title, (CDK_CONST char **)Message, mesglen, numbers, highlight, Box, shadow); free (Message); free (Title); /* Check the return type. */ if (scrollWidget == (CDKSCROLL *)NULL) { croak ("Cdk::Scroll Could not create widget. Is the window too small?\n"); } else { RETVAL = scrollWidget; } } OUTPUT: RETVAL int Activate(object,...) CDKSCROLL * object CODE: { chtype * Keys; int arrayLen; int value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKScroll (object, Keys); free (Keys); } else { value = activateCDKScroll (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL int Inject(object,key) CDKSCROLL * object chtype key = sv2chtype ($arg); CODE: { int selection = injectCDKScroll (object,key); if (selection == -1) { XSRETURN_UNDEF; } RETVAL = selection; } OUTPUT: RETVAL void Add(object,line) CDKSCROLL * object char * line CODE: { addCDKScrollItem (object,line); } void Delete(object,position) CDKSCROLL * object int position = sv2int ($arg); CODE: { deleteCDKScrollItem (object,position); } void Bind(object,key,functionRef) CDKSCROLL * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vSCROLL, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKSCROLL * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKScrollPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKSCROLL * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKScrollPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKSCROLL * object int Box = sv2int ($arg); CODE: { drawCDKScroll (object,Box); } void Erase(object) CDKSCROLL * object CODE: { eraseCDKScroll(object); } void Info(object) CDKSCROLL * object PPCODE: { int currentItem = object->currentItem; int size = object->listSize; XPUSHs (sv_2mortal (newSViv(size))); XPUSHs (sv_2mortal (newSViv(currentItem))); } void SetItems(object,cItems,numbers=FALSE) CDKSCROLL * object SV * cItems int numbers = sv2int ($arg); CODE: { char ** Items; int itemLength; MAKE_CHAR_ARRAY(0, cItems, Items, itemLength); setCDKScrollItems (object, (CDK_CONST char **)Items, itemLength, numbers); free (Items); } void SetHighlight(object,highlight) CDKSCROLL * object chtype highlight = sv2chtype ($arg); CODE: { setCDKScrollHighlight (object,highlight); } void SetBox(object,Box=TRUE) CDKSCROLL * object int Box = sv2int ($arg); CODE: { setCDKScrollBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKSCROLL * object chtype character = sv2chtype ($arg); CODE: { setCDKScrollULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKSCROLL * object chtype character = sv2chtype ($arg); CODE: { setCDKScrollURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKSCROLL * object chtype character = sv2chtype ($arg); CODE: { setCDKScrollLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKSCROLL * object chtype character = sv2chtype ($arg); CODE: { setCDKScrollLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKSCROLL * object chtype character = sv2chtype ($arg); CODE: { setCDKScrollVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKSCROLL * object chtype character = sv2chtype ($arg); CODE: { setCDKScrollHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKSCROLL * object chtype character = sv2chtype ($arg); CODE: { setCDKScrollBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKSCROLL * object char * color CODE: { setCDKScrollBackgroundColor (object,color); } void Register(object) CDKSCROLL * object CODE: { registerCDKObject (GCDKSCREEN, vSCROLL, object); } void Unregister(object) CDKSCROLL * object CODE: { unregisterCDKObject (vSCROLL, object); } void Raise(object) CDKSCROLL * object CODE: { raiseCDKObject (vSCROLL, object); } void Lower(object) CDKSCROLL * object CODE: { lowerCDKObject (vSCROLL, object); } WINDOW * GetWindow(object) CDKSCROLL * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Scale CDKSCALE * New(title,label,start,low,high,inc,fastinc,fieldwidth,xPos=CENTER,yPos=CENTER,fieldattr=A_NORMAL,Box=TRUE,shadow=FALSE) SV * title char * label int start int low int high int inc int fastinc int fieldwidth int xPos = sv2int ($arg); int yPos = sv2int ($arg); chtype fieldattr = sv2chtype ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKSCALE * scaleWidget = (CDKSCALE *)NULL; char * Title; checkCdkInit(); RETVAL = 0; MAKE_TITLE (title,Title); scaleWidget = newCDKScale (GCDKSCREEN,xPos,yPos, Title,label, fieldattr,fieldwidth, start,low,high,inc,fastinc, Box,shadow); free (Title); /* Check the return type. */ if (scaleWidget == (CDKSCALE *)NULL) { croak ("Cdk::Scale Could not create widget. Is the window too small?\n"); } else { RETVAL = scaleWidget; } } OUTPUT: RETVAL int Activate(object,...) CDKSCALE * object CODE: { chtype * Keys; int arrayLen; int value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKScale (object, Keys); free (Keys); } else { value = activateCDKScale (object, NULL); } if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL int Inject(object,key) CDKSCALE * object chtype key = sv2chtype ($arg); CODE: { int value = injectCDKScale (object,key); if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKSCALE * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vSCALE, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKSCALE * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKScalePreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKSCALE * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKScalePostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKSCALE * object int Box = sv2int ($arg); CODE: { drawCDKScale (object,Box); } void Erase(object) CDKSCALE * object CODE: { eraseCDKScale(object); } void SetValue(object,value) CDKSCALE * object int value CODE: { setCDKScaleValue (object,value); } void SetLowHigh(object,low,high) CDKSCALE * object int low int high CODE: { setCDKScaleLowHigh (object,low,high); } void SetBox(object,Box=TRUE) CDKSCALE * object int Box = sv2int ($arg); CODE: { setCDKScaleBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKSCALE * object chtype character = sv2chtype ($arg); CODE: { setCDKScaleULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKSCALE * object chtype character = sv2chtype ($arg); CODE: { setCDKScaleURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKSCALE * object chtype character = sv2chtype ($arg); CODE: { setCDKScaleLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKSCALE * object chtype character = sv2chtype ($arg); CODE: { setCDKScaleLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKSCALE * object chtype character = sv2chtype ($arg); CODE: { setCDKScaleVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKSCALE * object chtype character = sv2chtype ($arg); CODE: { setCDKScaleHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKSCALE * object chtype character = sv2chtype ($arg); CODE: { setCDKScaleBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKSCALE * object char * color CODE: { setCDKScaleBackgroundColor (object,color); } void Register(object) CDKSCALE * object CODE: { registerCDKObject (GCDKSCREEN, vSCALE, object); } void Unregister(object) CDKSCALE * object CODE: { unregisterCDKObject (vSCALE, object); } void Raise(object) CDKSCALE * object CODE: { raiseCDKObject (vSCALE, object); } void Lower(object) CDKSCALE * object CODE: { lowerCDKObject (vSCALE, object); } WINDOW * GetWindow(object) CDKSCALE * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Histogram CDKHISTOGRAM * New(title,height,width,orient=HORIZONTAL,xPos=CENTER,yPos=CENTER,Box=TRUE,shadow=FALSE) SV * title int height int width int orient = sv2int ($arg); int xPos = sv2int ($arg); int yPos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKHISTOGRAM * histWidget = (CDKHISTOGRAM *)NULL; char * Title; checkCdkInit(); RETVAL = 0; MAKE_TITLE (title,Title); histWidget = newCDKHistogram (GCDKSCREEN,xPos,yPos,height,width,orient,Title,Box,shadow); free (Title); /* Check the return type. */ if (histWidget == (CDKHISTOGRAM *)NULL) { croak ("Cdk::Histogram Could not create widget. Is the window too small?\n"); } else { RETVAL = histWidget; } } OUTPUT: RETVAL void SetDisplayType(object,value="vPERCENT") CDKHISTOGRAM * object char * value CODE: { EHistogramDisplayType displayType = vPERCENT; /* Set the stats type. */ if (strEQ (value, "PERCENT")) displayType = vPERCENT; if (strEQ (value, "FRACTION")) displayType = vFRACTION; if (strEQ (value, "REAL")) displayType = vREAL; if (strEQ (value, "NONE")) displayType = vNONE; setCDKHistogramDisplayType (object,displayType); } void SetValue(object,value,low,high) CDKHISTOGRAM * object int value int low int high CODE: { setCDKHistogramValue (object,value,low,high); } void SetFillerChar(object,value) CDKHISTOGRAM * object chtype value = sv2chtype ($arg); CODE: { setCDKHistogramFillerChar (object,value); } void SetStatsPos(object,value) CDKHISTOGRAM * object int value = sv2int ($arg); CODE: { setCDKHistogramStatsPos (object,value); } void SetStatsAttr(object,value) CDKHISTOGRAM * object chtype value = sv2chtype ($arg); CODE: { setCDKHistogramStatsAttr (object,value); } void SetBox(object,Box=TRUE) CDKHISTOGRAM * object int Box = sv2int ($arg); CODE: { setCDKHistogramBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKHISTOGRAM * object chtype character = sv2chtype ($arg); CODE: { setCDKHistogramULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKHISTOGRAM * object chtype character = sv2chtype ($arg); CODE: { setCDKHistogramURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKHISTOGRAM * object chtype character = sv2chtype ($arg); CODE: { setCDKHistogramLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKHISTOGRAM * object chtype character = sv2chtype ($arg); CODE: { setCDKHistogramLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKHISTOGRAM * object chtype character = sv2chtype ($arg); CODE: { setCDKHistogramVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKHISTOGRAM * object chtype character = sv2chtype ($arg); CODE: { setCDKHistogramHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKHISTOGRAM * object chtype character = sv2chtype ($arg); CODE: { setCDKHistogramBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKHISTOGRAM * object char * color CODE: { setCDKHistogramBackgroundColor (object,color); } void Draw(object,Box=TRUE) CDKHISTOGRAM * object int Box = sv2int ($arg); CODE: { drawCDKHistogram (object,Box); } void Erase(object) CDKHISTOGRAM * object CODE: { eraseCDKHistogram (object); } void Register(object) CDKHISTOGRAM * object CODE: { registerCDKObject (GCDKSCREEN, vHISTOGRAM, object); } void Unregister(object) CDKHISTOGRAM * object CODE: { unregisterCDKObject (vHISTOGRAM, object); } void Raise(object) CDKHISTOGRAM * object CODE: { raiseCDKObject (vHISTOGRAM, object); } void Lower(object) CDKHISTOGRAM * object CODE: { lowerCDKObject (vHISTOGRAM, object); } WINDOW * GetWindow(object) CDKHISTOGRAM * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Menu CDKMENU * New(menulist, menuloc, titleattr=A_REVERSE, subtitleattr=A_REVERSE, menuPos=TOP) SV * menulist SV * menuloc chtype titleattr = sv2chtype ($arg); chtype subtitleattr = sv2chtype ($arg); int menuPos = sv2int ($arg); CODE: { const char * menuList[MAX_MENU_ITEMS][MAX_SUB_ITEMS]; int subSize[MAX_SUB_ITEMS]; int * menuLoc; int menulen; int loclen; checkCdkInit(); RETVAL = 0; MAKE_MENU_MATRIX(0, menulist, menuList, subSize, menulen); MAKE_INT_ARRAY (0, menuloc, menuLoc, loclen); if (menulen != loclen) { croak ("Cdk::Menu The menu list and menu location arrays are not the same size."); } RETVAL = newCDKMenu (GCDKSCREEN, menuList, menulen, subSize, menuLoc, menuPos, titleattr, subtitleattr); free (menuLoc); } OUTPUT: RETVAL int Activate(object,...) CDKMENU * object CODE: { chtype * Keys; int arrayLen; int value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKMenu (object, Keys); free (Keys); } else { value = activateCDKMenu (object, (void *)0); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL int Inject(object,key) CDKMENU * object chtype key = sv2chtype ($arg); CODE: { int selection = injectCDKMenu (object,key); if (selection == -1) { XSRETURN_UNDEF; } RETVAL = selection; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKMENU * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vMENU, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKMENU * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKMenuPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKMENU * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKMenuPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object, Box) CDKMENU * object int Box = sv2int ($arg); CODE: { drawCDKMenu (object, Box); } void Erase(object) CDKMENU * object CODE: { eraseCDKMenu (object); } void SetCurrentItem(object,menuitem,submenuitem) CDKMENU * object int menuitem int submenuitem CODE: { setCDKMenuCurrentItem(object,menuitem,submenuitem); } void SetTitleHighlight(object,value) CDKMENU * object chtype value CODE: { setCDKMenuTitleHighlight (object,value); } void SetSubTitleHighlight(object,value) CDKMENU * object chtype value CODE: { setCDKMenuSubTitleHighlight (object,value); } void SetBackgroundColor(object,value) CDKMENU * object char * value CODE: { setCDKMenuBackgroundColor (object,value); } void Register(object) CDKMENU * object CODE: { registerCDKObject (GCDKSCREEN, vMENU, object); } void Unregister(object) CDKMENU * object CODE: { unregisterCDKObject (vMENU, object); } void Raise(object) CDKMENU * object CODE: { raiseCDKObject (vMENU, object); } void Lower(object) CDKMENU * object CODE: { lowerCDKObject (vMENU, object); } MODULE = Cdk PACKAGE = Cdk::Entry CDKENTRY * New(title,label,min,max,fieldWidth,filler=".",disptype=vMIXED,xPos=CENTER,yPos=CENTER,fieldattr=A_NORMAL,Box=TRUE,shadow=FALSE) SV * title char * label int min int max int fieldWidth chtype filler = sv2chtype ($arg); int disptype = sv2dtype ($arg); int xPos = sv2int ($arg); int yPos = sv2int ($arg); chtype fieldattr = sv2chtype ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKENTRY * entryWidget = (CDKENTRY *)NULL; char * Title; checkCdkInit(); RETVAL = 0; MAKE_TITLE (title,Title); entryWidget = newCDKEntry (GCDKSCREEN,xPos,yPos, Title,label, fieldattr,filler,(EDisplayType) disptype, fieldWidth,min,max, Box,shadow); free (Title); /* Check the return type. */ if (entryWidget == (CDKENTRY *)NULL) { croak ("Cdk::Entry Could not create widget. Is the window too small?\n"); } else { RETVAL = entryWidget; } } OUTPUT: RETVAL char * Activate(object,...) CDKENTRY * object CODE: { chtype * Keys; int arrayLen; char * value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKEntry (object, Keys); free (Keys); } else { value = activateCDKEntry (object, NULL); } if (object->exitType != vNORMAL) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL char * Inject(object,key) CDKENTRY * object chtype key = sv2chtype ($arg); CODE: { char *value = injectCDKEntry (object,key); if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKENTRY * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv(functionRef); bindCDKObject (vENTRY, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKENTRY * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKEntryPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKENTRY * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKEntryPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKENTRY * object int Box = sv2int ($arg); CODE: { drawCDKEntry (object, Box); } void Erase(object) CDKENTRY * object CODE: { eraseCDKEntry (object); } void SetValue(object,value) CDKENTRY * object char * value CODE: { setCDKEntryValue (object, value); } void SetMin(object,value) CDKENTRY * object int value CODE: { setCDKEntryMin (object, value); } void SetMax(object,value) CDKENTRY * object int value CODE: { setCDKEntryMax (object, value); } void SetFillerChar(object,value) CDKENTRY * object chtype value = sv2chtype ($arg); CODE: { setCDKEntryFillerChar (object, value); } void SetHiddenChar(object,value) CDKENTRY * object chtype value = sv2chtype ($arg); CODE: { setCDKEntryHiddenChar (object, value); } void SetBox(object,Box=TRUE) CDKENTRY * object int Box = sv2int ($arg); CODE: { setCDKEntryBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKEntryULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKEntryURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKEntryLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKEntryLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKEntryVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKEntryHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKEntryBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKENTRY * object char * color CODE: { setCDKEntryBackgroundColor (object,color); } char * Get(object) CDKENTRY * object CODE: { RETVAL = getCDKEntryValue (object); } OUTPUT: RETVAL void Clean(object) CDKENTRY * object CODE: { cleanCDKEntry (object); } void Register(object) CDKENTRY * object CODE: { registerCDKObject (GCDKSCREEN, vENTRY, object); } void Unregister(object) CDKENTRY * object CODE: { unregisterCDKObject (vENTRY, object); } void Raise(object) CDKENTRY * object CODE: { raiseCDKObject (vENTRY, object); } void Lower(object) CDKENTRY * object CODE: { lowerCDKObject (vENTRY, object); } WINDOW * GetWindow(object) CDKENTRY * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Mentry CDKMENTRY * New(title,label,min,physical,logical,fieldWidth,disptype=vMIXED,filler=".",xPos=CENTER,yPos=CENTER,fieldattr=A_NORMAL,Box=TRUE,shadow=FALSE) SV * title char * label int min int physical int logical int fieldWidth int disptype = sv2dtype ($arg); chtype filler = sv2chtype ($arg); int xPos = sv2int ($arg); int yPos = sv2int ($arg); chtype fieldattr = sv2chtype ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKMENTRY * mentryWidget = (CDKMENTRY *)NULL; char * Title; checkCdkInit(); RETVAL = 0; MAKE_TITLE (title,Title); mentryWidget = newCDKMentry (GCDKSCREEN,xPos,yPos, Title,label, fieldattr,filler, (EDisplayType) disptype,fieldWidth, physical,logical,min, Box,shadow); free (Title); /* Check the return type. */ if (mentryWidget == (CDKMENTRY *)NULL) { croak ("Cdk::Mentry Could not create widget. Is the window too small?\n"); } else { RETVAL = mentryWidget; } } OUTPUT: RETVAL char * Activate(object,...) CDKMENTRY * object CODE: { chtype * Keys; int arrayLen; char * value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKMentry (object, Keys); free (Keys); } else { value = activateCDKMentry (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL char * Inject(object,key) CDKMENTRY * object chtype key = sv2chtype ($arg); CODE: { char *value = injectCDKMentry (object,key); if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKMENTRY * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vMENTRY, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKMENTRY * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKMentryPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKMENTRY * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKMentryPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKMENTRY * object int Box = sv2int ($arg); CODE: { drawCDKMentry (object,Box); } void Erase(object) CDKMENTRY * object CODE: { eraseCDKMentry (object); } void SetValue(object,value) CDKMENTRY * object char * value CODE: { setCDKMentryValue (object,value); } void SetMin(object,value) CDKMENTRY * object int value CODE: { int min = value; if (value < 0) { min = object->min; } setCDKMentryMin (object,min); } void SetFillerChar(object,value) CDKMENTRY * object chtype value = sv2chtype ($arg); CODE: { setCDKMentryFillerChar (object,value); } void SetBox(object,Box=TRUE) CDKMENTRY * object int Box = sv2int ($arg); CODE: { setCDKMentryBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKMENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKMentryULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKMENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKMentryURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKMENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKMentryLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKMENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKMentryLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKMENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKMentryVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKMENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKMentryHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKMENTRY * object chtype character = sv2chtype ($arg); CODE: { setCDKMentryBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKMENTRY * object char * color CODE: { setCDKMentryBackgroundColor (object,color); } char * Get(object) CDKMENTRY * object CODE: { RETVAL = object->info; } OUTPUT: RETVAL void Clean(object) CDKMENTRY * object CODE: { cleanCDKMentry (object); } void Register(object) CDKMENTRY * object CODE: { registerCDKObject (GCDKSCREEN, vMENTRY, object); } void Unregister(object) CDKMENTRY * object CODE: { unregisterCDKObject (vMENTRY, object); } void Raise(object) CDKMENTRY * object CODE: { raiseCDKObject (vMENTRY, object); } void Lower(object) CDKMENTRY * object CODE: { lowerCDKObject (vMENTRY, object); } WINDOW * GetWindow(object) CDKMENTRY * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Matrix CDKMATRIX * New(title,rowtitles,coltitles,colwidths,coltypes,vrows,vcols,xPos=CENTER,yPos=CENTER,rowspace=1,colspace=1,filler=".",dominant=NONE,boxMatrix=FALSE,boxCell=TRUE,shadow=FALSE) SV * title SV * rowtitles SV * coltitles SV * colwidths SV * coltypes int vrows int vcols int xPos = sv2int ($arg); int yPos = sv2int ($arg); int rowspace int colspace chtype filler = sv2chtype ($arg); int dominant = sv2int ($arg); int boxMatrix = sv2int ($arg); int boxCell = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKMATRIX * matrixWidget = (CDKMATRIX *)NULL; char ** colTitles; char ** rowTitles; char * Title; int * colWidths; int * colTypes; int rows, cols, widths, dtype; checkCdkInit(); RETVAL = 0; /* Make the arrays. */ MAKE_CHAR_ARRAY (1, rowtitles, rowTitles, rows); MAKE_CHAR_ARRAY (1, coltitles, colTitles, cols); MAKE_INT_ARRAY (1, colwidths, colWidths, widths); MAKE_DTYPE_ARRAY (1, coltypes, colTypes, dtype); MAKE_TITLE (title,Title); /* Now check them... */ if (cols != widths) { croak ("Cdk::Matrix The col title array size is not the same as the widths array size."); } if (cols != dtype) { croak ("Cdk::Matrix The col title array size is not the same as the column value array size."); } if (vrows > rows || vcols > cols) { croak ("Cdk::Matrix The virtual matrix size is larger then the physical size."); } /* OK, everything is ok. Lets make the matrix. */ matrixWidget = newCDKMatrix (GCDKSCREEN, xPos, yPos, rows, cols, vrows, vcols, Title, (CDK_CONST char **)rowTitles, (CDK_CONST char **)colTitles, colWidths, colTypes, rowspace, colspace, filler, dominant, boxMatrix, boxCell, shadow); /* Check the return type. */ if (matrixWidget == (CDKMATRIX *)NULL) { croak ("Cdk::Matrix Could not create widget. Is the window too small?\n"); } else { RETVAL = matrixWidget; } free (colTitles); free (rowTitles); free (colWidths); free (colTypes); free (Title); } OUTPUT: RETVAL void Activate(object,...) CDKMATRIX * object PPCODE: { AV * cellInfo = newAV(); chtype * Keys; int x, y, arrayLen; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); (void) activateCDKMatrix (object, Keys); free (Keys); } else { (void) activateCDKMatrix (object, NULL); } /* Check the exit status. */ if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } /* Take the info from the matrix and make an array out of it. */ for (x=1; x <= object->rows; x++) { AV * av = newAV(); for (y=1; y <= object->cols; y++) { char *data = object->info[CELL_INDEX(object,x,y)]; av_push (av, newSVpv (data, strlen (data))); } av_push (cellInfo, newRV((SV *)av)); } /* Push the values on the return stack. */ XPUSHs (sv_2mortal(newSViv(object->rows))); XPUSHs (sv_2mortal(newSViv(object->cols))); XPUSHs (sv_2mortal(newRV((SV*)cellInfo))); } int Inject(object,key) CDKMATRIX * object chtype key = sv2chtype ($arg); CODE: { int selection = injectCDKMatrix (object,key); if (selection == -1) { XSRETURN_UNDEF; } RETVAL = selection; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKMATRIX * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vMATRIX, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKMATRIX * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKMatrixPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKMATRIX * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKMatrixPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void GetDim(object) CDKMATRIX * object PPCODE: { XPUSHs (sv_2mortal(newSViv(object->rows))); XPUSHs (sv_2mortal(newSViv(object->cols))); } void Draw(object,Box=TRUE) CDKMATRIX * object int Box = sv2int ($arg); CODE: { drawCDKMatrix (object,Box); } void Erase(object) CDKMATRIX * object CODE: { eraseCDKMatrix (object); } void Set(object,info) CDKMATRIX * object SV * info CODE: { char ** Info; int * subSize; int matrixlen; int width = 1; AV *array = (AV *)SvRV(info); int x, y; matrixlen = (int)av_len (array) + 1; subSize = (int *)calloc((size_t)matrixlen + 2, sizeof(int)); if (subSize != 0) { for (x = 1; x <= matrixlen; x++) { SV *name = *av_fetch(array, x - 1, FALSE); AV *subArray = (AV *)SvRV(name); int subLen = (int)av_len (subArray) + 1; width = MAXIMUM(width, subLen); } Info = (char **)calloc((size_t)((width + 1) * (matrixlen + 1)), sizeof(char *)); if (Info != 0) { for (x = 1; x <= matrixlen; x++) { SV *name = *av_fetch(array, x - 1, FALSE); AV *subArray = (AV *)SvRV(name); int subLen = (int)av_len (subArray) + 1; subSize[x] = subLen; for (y=1; y <= subLen; y++) { SV *sv = *av_fetch(subArray, y - 1, FALSE); Info[x * (matrixlen + 1) + y] = copyChar((char *)SvPV(sv,PL_na)); } } setCDKMatrixCells (object, (CDK_CONST char **)Info, matrixlen, width, subSize); free (Info); } free (subSize); } } void SetCell(object,row,col,value) CDKMATRIX * object int row int col char * value CODE: { setCDKMatrixCell (object,row,col,value); } char * GetCell(object,row,col) CDKMATRIX * object int row int col CODE: { RETVAL = getCDKMatrixCell (object,row,col); } OUTPUT: RETVAL int GetRow(object) CDKMATRIX * object CODE: { RETVAL = getCDKMatrixRow (object); } OUTPUT: RETVAL int GetCol(object) CDKMATRIX * object CODE: { RETVAL = getCDKMatrixCol (object); } OUTPUT: RETVAL void SetBoxAttribute(object,Box=TRUE) CDKMATRIX * object int Box = sv2int ($arg); CODE: { setCDKMatrixBoxAttribute (object, (chtype)Box); } void SetULChar(object,character=ACS_ULCORNER) CDKMATRIX * object chtype character = sv2chtype ($arg); CODE: { setCDKMatrixULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKMATRIX * object chtype character = sv2chtype ($arg); CODE: { setCDKMatrixURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKMATRIX * object chtype character = sv2chtype ($arg); CODE: { setCDKMatrixLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKMATRIX * object chtype character = sv2chtype ($arg); CODE: { setCDKMatrixLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKMATRIX * object chtype character = sv2chtype ($arg); CODE: { setCDKMatrixVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKMATRIX * object chtype character = sv2chtype ($arg); CODE: { setCDKMatrixHorizontalChar (object,character); } void SetBackgroundColor(object,color) CDKMATRIX * object char * color CODE: { setCDKMatrixBackgroundColor (object,color); } void Clean(object) CDKMATRIX * object CODE: { cleanCDKMatrix (object); } void Raise(object) CDKMATRIX * object CODE: { raiseCDKObject (vMATRIX, object); } void Lower(object) CDKMATRIX * object CODE: { lowerCDKObject (vMATRIX, object); } WINDOW * GetWindow(object) CDKMATRIX * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL void Register(object) CDKMATRIX * object CODE: { registerCDKObject (GCDKSCREEN, vMATRIX, object); } void Unregister(object) CDKMATRIX * object CODE: { unregisterCDKObject (vMATRIX, object); } MODULE = Cdk PACKAGE = Cdk::Marquee CDKMARQUEE * New(width,xPos=CENTER,yPos=CENTER,Box=TRUE,shadow=FALSE) int width int xPos = sv2int ($arg); int yPos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKMARQUEE * marqueeWidget = (CDKMARQUEE *)NULL; checkCdkInit(); RETVAL = 0; marqueeWidget = newCDKMarquee (GCDKSCREEN,xPos,yPos,width,Box,shadow); /* Check the return type. */ if (marqueeWidget == (CDKMARQUEE *)NULL) { croak ("Cdk::Marquee Could not create widget. Is the window too small?\n"); } else { RETVAL = marqueeWidget; } } OUTPUT: RETVAL int Activate(object,message,delay,repeat,Box=TRUE) CDKMARQUEE * object char * message int delay int repeat int Box = sv2int ($arg); CODE: { RETVAL = activateCDKMarquee (object,message,delay,repeat,Box); } OUTPUT: RETVAL void Deactivate(object) CDKMARQUEE * object CODE: { deactivateCDKMarquee (object); } void SetBoxAttribute(object,Box=TRUE) CDKMARQUEE * object int Box = sv2int ($arg); CODE: { setCDKMarqueeBoxAttribute (object, (chtype)Box); } void SetULChar(object,character=ACS_ULCORNER) CDKMARQUEE * object chtype character = sv2chtype ($arg); CODE: { setCDKMarqueeULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKMARQUEE * object chtype character = sv2chtype ($arg); CODE: { setCDKMarqueeURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKMARQUEE * object chtype character = sv2chtype ($arg); CODE: { setCDKMarqueeLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKMARQUEE * object chtype character = sv2chtype ($arg); CODE: { setCDKMarqueeLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKMARQUEE * object chtype character = sv2chtype ($arg); CODE: { setCDKMarqueeVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKMARQUEE * object chtype character = sv2chtype ($arg); CODE: { setCDKMarqueeHorizontalChar (object,character); } void SetBackgroundColor(object,color) CDKMARQUEE * object char * color CODE: { setCDKMarqueeBackgroundColor (object,color); } void Bind(object,key,functionRef) CDKMARQUEE * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vMARQUEE, object, key, PerlBindCB, function); } void Draw(object,Box=TRUE) CDKMARQUEE * object int Box = sv2int ($arg); CODE: { drawCDKMarquee (object,Box); } void Erase(object) CDKMARQUEE * object CODE: { eraseCDKMarquee (object); } void Register(object) CDKMARQUEE * object CODE: { registerCDKObject (GCDKSCREEN, vMARQUEE, object); } void Unregister(object) CDKMARQUEE * object CODE: { unregisterCDKObject (vMARQUEE, object); } void Raise(object) CDKMARQUEE * object CODE: { raiseCDKObject (vMARQUEE, object); } void Lower(object) CDKMARQUEE * object CODE: { lowerCDKObject (vMARQUEE, object); } WINDOW * GetWindow(object) CDKMARQUEE * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Selection CDKSELECTION * New(title,list,choices,height,width,xPos=CENTER,yPos=CENTER,sPos=RIGHT,highlight=A_REVERSE,Box=TRUE,shadow=FALSE) SV * title SV * list SV * choices int height int width int xPos = sv2int ($arg); int yPos = sv2int ($arg); int sPos = sv2int ($arg); chtype highlight = sv2chtype ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKSELECTION * selectionWidget = (CDKSELECTION *)NULL; char ** List; char ** Choices; char * Title; int listSize, choiceSize; checkCdkInit(); RETVAL = 0; MAKE_CHAR_ARRAY(0, list, List, listSize); MAKE_CHAR_ARRAY(0, choices, Choices, choiceSize); MAKE_TITLE (title,Title); selectionWidget = newCDKSelection (GCDKSCREEN, xPos, yPos, sPos, height, width, Title, (CDK_CONST char **)List, listSize, (CDK_CONST char **)Choices, choiceSize, highlight, Box, shadow); free (List); free (Choices); free (Title); /* Check the return type. */ if (selectionWidget == (CDKSELECTION *)NULL) { croak ("Cdk::Selection Could not create widget. Is the window too small?\n"); } else { RETVAL = selectionWidget; } } OUTPUT: RETVAL void Activate(object,...) CDKSELECTION * object PPCODE: { chtype * Keys; int arrayLen; int x; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); (void) activateCDKSelection (object, Keys); free (Keys); } else { (void) activateCDKSelection (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } /* Push the values on the return stack. */ for (x=0; x < object->listSize ; x++) { XPUSHs (sv_2mortal(newSViv(object->selections[x]))); } } int Inject(object,key) CDKSELECTION * object chtype key = sv2chtype ($arg); CODE: { int selection = injectCDKSelection (object,key); if (selection == -1) { XSRETURN_UNDEF; } RETVAL = selection; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKSELECTION * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vSELECTION, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKSELECTION * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKSelectionPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKSELECTION * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKSelectionPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKSELECTION * object int Box = sv2int ($arg); CODE: { drawCDKSelection (object,Box); } void Erase(object) CDKSELECTION * object CODE: { eraseCDKSelection (object); } void SetHighlight(object,highlight) CDKSELECTION * object chtype highlight = sv2chtype ($arg); CODE: { setCDKSelectionHighlight (object,highlight); } void SetChoices(object,choices) CDKSELECTION * object SV * choices CODE: { int * defaultChoices; int choiceLength; MAKE_INT_ARRAY (0, choices, defaultChoices, choiceLength); setCDKSelectionChoices (object,defaultChoices); free (defaultChoices); } void SetChoice(object,choice,cIndex) CDKSELECTION * object int choice int cIndex CODE: { setCDKSelectionChoice (object,cIndex,choice); } void SetModes(object,modes) CDKSELECTION * object SV * modes CODE: { int * Modes; int modeLength; MAKE_INT_ARRAY (0, modes, Modes, modeLength); setCDKSelectionModes (object,Modes); free (Modes); } void SetMode(object,mode,cIndex) CDKSELECTION * object int mode int cIndex CODE: { setCDKSelectionMode (object,cIndex,mode); } void SetBox(object,Box=TRUE) CDKSELECTION * object int Box = sv2int ($arg); CODE: { setCDKSelectionBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKSELECTION * object chtype character = sv2chtype ($arg); CODE: { setCDKSelectionULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKSELECTION * object chtype character = sv2chtype ($arg); CODE: { setCDKSelectionURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKSELECTION * object chtype character = sv2chtype ($arg); CODE: { setCDKSelectionLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKSELECTION * object chtype character = sv2chtype ($arg); CODE: { setCDKSelectionLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKSELECTION * object chtype character = sv2chtype ($arg); CODE: { setCDKSelectionVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKSELECTION * object chtype character = sv2chtype ($arg); CODE: { setCDKSelectionHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKSELECTION * object chtype character = sv2chtype ($arg); CODE: { setCDKSelectionBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKSELECTION * object char * color CODE: { setCDKSelectionBackgroundColor (object,color); } void Register(object) CDKSELECTION * object CODE: { registerCDKObject (GCDKSCREEN, vSELECTION, object); } void Unregister(object) CDKSELECTION * object CODE: { unregisterCDKObject (vSELECTION, object); } void Raise(object) CDKSELECTION * object CODE: { raiseCDKObject (vSELECTION, object); } void Lower(object) CDKSELECTION * object CODE: { lowerCDKObject (vSELECTION, object); } WINDOW * GetWindow(object) CDKSELECTION * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Viewer CDKVIEWER * New(buttons,height,width,buttonHighlight=A_REVERSE,xpos=CENTER,ypos=CENTER,Box=TRUE,shadow=FALSE) SV * buttons int height int width chtype buttonHighlight = sv2chtype ($arg); int xpos = sv2int ($arg); int ypos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKVIEWER * viewerWidget = (CDKVIEWER *)NULL; char ** Buttons; int buttonCount; checkCdkInit(); RETVAL = 0; MAKE_CHAR_ARRAY (0, buttons, Buttons, buttonCount); viewerWidget = newCDKViewer (GCDKSCREEN, xpos, ypos, height, width, (CDK_CONST char **)Buttons, buttonCount, buttonHighlight, Box, shadow); free (Buttons); /* Check the return type. */ if (viewerWidget == (CDKVIEWER *)NULL) { croak ("Cdk::Viewer Could not create widget. Is the window too small?\n"); } else { RETVAL = viewerWidget; } } OUTPUT: RETVAL int Activate(object) CDKVIEWER * object CODE: { int value = activateCDKViewer (object, (chtype *)NULL); if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL void SetInfo(object,info,interpret=TRUE) CDKVIEWER * object SV * info int interpret = sv2int ($arg); CODE: { char ** Info; int infolen; MAKE_CHAR_ARRAY(0, info, Info, infolen); setCDKViewerInfo (object, (CDK_CONST char **)Info, infolen, interpret); free (Info); } void SetTitle(object,value) CDKVIEWER * object char * value CODE: { setCDKViewerTitle (object,value); } void SetHighlight(object,value) CDKVIEWER * object chtype value CODE: { setCDKViewerHighlight (object,value); } void SetInfoLine(object,value) CDKVIEWER * object int value CODE: { setCDKViewerInfoLine (object,value); } void SetBox(object,Box=TRUE) CDKVIEWER * object int Box = sv2int ($arg); CODE: { setCDKViewerBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKVIEWER * object chtype character = sv2chtype ($arg); CODE: { setCDKViewerULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKVIEWER * object chtype character = sv2chtype ($arg); CODE: { setCDKViewerURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKVIEWER * object chtype character = sv2chtype ($arg); CODE: { setCDKViewerLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKVIEWER * object chtype character = sv2chtype ($arg); CODE: { setCDKViewerLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKVIEWER * object chtype character = sv2chtype ($arg); CODE: { setCDKViewerVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKVIEWER * object chtype character = sv2chtype ($arg); CODE: { setCDKViewerHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKVIEWER * object chtype character = sv2chtype ($arg); CODE: { setCDKViewerBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKVIEWER * object char * color CODE: { setCDKViewerBackgroundColor (object,color); } void Bind(object,key,functionRef) CDKVIEWER * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vVIEWER, object, key, PerlBindCB, function); } void Draw(object,Box=TRUE) CDKVIEWER * object int Box = sv2int ($arg); CODE: { drawCDKViewer (object,Box); } void Erase(object) CDKVIEWER * object CODE: { eraseCDKViewer (object); } void Register(object) CDKVIEWER * object CODE: { registerCDKObject (GCDKSCREEN, vVIEWER, object); } void Unregister(object) CDKVIEWER * object CODE: { unregisterCDKObject (vVIEWER, object); } void Raise(object) CDKVIEWER * object CODE: { raiseCDKObject (vVIEWER, object); } void Lower(object) CDKVIEWER * object CODE: { lowerCDKObject (vVIEWER, object); } WINDOW * GetWindow(object) CDKVIEWER * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Graph CDKGRAPH * New(title,xtitle,ytitle,height,width,xpos=CENTER,ypos=CENTER) SV * title char * xtitle char * ytitle int height int width int xpos = sv2int ($arg); int ypos = sv2int ($arg); CODE: { CDKGRAPH * graphWidget = (CDKGRAPH *)NULL; char * Title; checkCdkInit(); RETVAL = 0; MAKE_TITLE (title,Title); graphWidget = newCDKGraph (GCDKSCREEN,xpos,ypos,height,width,Title,xtitle,ytitle); free (Title); /* Check the return type. */ if (graphWidget == (CDKGRAPH *)NULL) { croak ("Cdk::Graph Could not create widget. Is the window too small?\n"); } else { RETVAL = graphWidget; } } OUTPUT: RETVAL int SetValues(object,values,startAtZero=TRUE) CDKGRAPH * object SV * values int startAtZero = sv2int ($arg); CODE: { int * Values; int valueCount; MAKE_INT_ARRAY (0, values, Values, valueCount); RETVAL = setCDKGraphValues (object,Values,valueCount,startAtZero); free (Values); } OUTPUT: RETVAL void SetCharacters(object,value) CDKGRAPH * object char * value CODE: { setCDKGraphCharacters (object,value); } void SetDisplayType(object,value) CDKGRAPH * object char * value CODE: { EGraphDisplayType displayType = vLINE; if (strEQ (value, "PLOT")) { displayType = vPLOT; } setCDKGraphDisplayType (object,displayType); } void SetBox(object,Box=FALSE) CDKGRAPH * object int Box = sv2int ($arg); CODE: { setCDKGraphBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKGRAPH * object chtype character = sv2chtype ($arg); CODE: { setCDKGraphULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKGRAPH * object chtype character = sv2chtype ($arg); CODE: { setCDKGraphURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKGRAPH * object chtype character = sv2chtype ($arg); CODE: { setCDKGraphLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKGRAPH * object chtype character = sv2chtype ($arg); CODE: { setCDKGraphLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKGRAPH * object chtype character = sv2chtype ($arg); CODE: { setCDKGraphVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKGRAPH * object chtype character = sv2chtype ($arg); CODE: { setCDKGraphHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKGRAPH * object chtype character = sv2chtype ($arg); CODE: { setCDKGraphBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKGRAPH * object char * color CODE: { setCDKGraphBackgroundColor (object,color); } void Draw(object,Box=FALSE) CDKGRAPH * object int Box = sv2int ($arg); CODE: { drawCDKGraph (object,Box); } void Erase(object) CDKGRAPH * object CODE: { eraseCDKGraph (object); } void Register(object) CDKGRAPH * object CODE: { registerCDKObject (GCDKSCREEN, vGRAPH, object); } void Unregister(object) CDKGRAPH * object CODE: { unregisterCDKObject (vGRAPH, object); } void Raise(object) CDKGRAPH * object CODE: { raiseCDKObject (vGRAPH, object); } void Lower(object) CDKGRAPH * object CODE: { lowerCDKObject (vGRAPH, object); } WINDOW * GetWindow(object) CDKGRAPH * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Radio CDKRADIO * New(title,list,height,width,xPos=CENTER,yPos=CENTER,sPos=RIGHT,choice="X",defaultItem=0,highlight=A_REVERSE,Box=TRUE,shadow=FALSE) SV * title SV * list int height int width int xPos = sv2int ($arg); int yPos = sv2int ($arg); int sPos = sv2int ($arg); chtype choice = sv2chtype ($arg); int defaultItem chtype highlight = sv2chtype ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKRADIO * radioWidget = (CDKRADIO *)NULL; char ** List; char * Title; int listlen; MAKE_CHAR_ARRAY(0, list, List, listlen); MAKE_TITLE (title,Title); radioWidget = newCDKRadio (GCDKSCREEN, xPos, yPos, sPos, height, width, Title, (CDK_CONST char **)List, listlen, choice, defaultItem, highlight, Box, shadow); free (List); free (Title); /* Check the return type. */ if (radioWidget == (CDKRADIO *)NULL) { croak ("Cdk::Radio Could not create widget. Is the window too small?\n"); } else { RETVAL = radioWidget; } } OUTPUT: RETVAL int Activate(object,...) CDKRADIO * object CODE: { chtype * Keys; int arrayLen; int value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKRadio (object, Keys); free (Keys); } else { value = activateCDKRadio (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL int Inject(object,key) CDKRADIO * object chtype key = sv2chtype ($arg); CODE: { int selection = injectCDKRadio (object,key); if (selection == -1) { XSRETURN_UNDEF; } RETVAL = selection; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKRADIO * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vRADIO, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKRADIO * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKRadioPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKRADIO * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKRadioPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKRADIO * object int Box = sv2int ($arg); CODE: { drawCDKRadio (object,Box); } void Erase(object) CDKRADIO * object CODE: { eraseCDKRadio (object); } void SetHighlight(object,highlight) CDKRADIO * object chtype highlight = sv2chtype ($arg); CODE: { setCDKRadioHighlight (object,highlight); } void SetChoiceCharacter(object,value) CDKRADIO * object chtype value = sv2chtype ($arg); CODE: { setCDKRadioChoiceCharacter (object,value); } void SetLeftBrace(object,value) CDKRADIO * object chtype value = sv2chtype ($arg); CODE: { setCDKRadioLeftBrace (object,value); } void SetRightBrace(object,value) CDKRADIO * object chtype value = sv2chtype ($arg); CODE: { setCDKRadioRightBrace (object,value); } void SetBox(object,Box=TRUE) CDKRADIO * object int Box = sv2int ($arg); CODE: { setCDKRadioBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKRADIO * object chtype character = sv2chtype ($arg); CODE: { setCDKRadioULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKRADIO * object chtype character = sv2chtype ($arg); CODE: { setCDKRadioURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKRADIO * object chtype character = sv2chtype ($arg); CODE: { setCDKRadioLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKRADIO * object chtype character = sv2chtype ($arg); CODE: { setCDKRadioLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKRADIO * object chtype character = sv2chtype ($arg); CODE: { setCDKRadioVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKRADIO * object chtype character = sv2chtype ($arg); CODE: { setCDKRadioHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKRADIO * object chtype character = sv2chtype ($arg); CODE: { setCDKRadioBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKRADIO * object char * color CODE: { setCDKRadioBackgroundColor (object,color); } void Register(object) CDKRADIO * object CODE: { registerCDKObject (GCDKSCREEN, vRADIO, object); } void Unregister(object) CDKRADIO * object CODE: { unregisterCDKObject (vRADIO, object); } void Raise(object) CDKRADIO * object CODE: { raiseCDKObject (vRADIO, object); } void Lower(object) CDKRADIO * object CODE: { lowerCDKObject (vRADIO, object); } WINDOW * GetWindow(object) CDKRADIO * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Template CDKTEMPLATE * New(title,label,plate,cOverlay,xpos=CENTER,ypos=CENTER,Box=TRUE,shadow=FALSE) SV * title char * label char * plate char * cOverlay int xpos = sv2int ($arg); int ypos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKTEMPLATE * templateWidget = (CDKTEMPLATE *)NULL; char * Title; checkCdkInit(); RETVAL = 0; MAKE_TITLE (title,Title); templateWidget = newCDKTemplate (GCDKSCREEN,xpos,ypos, Title,label, plate,cOverlay, Box,shadow); free (Title); /* Check the return type. */ if (templateWidget == (CDKTEMPLATE *)NULL) { croak ("Cdk::Template Could not create widget. Is the window too small?\n"); } else { RETVAL = templateWidget; } } OUTPUT: RETVAL char * Activate(object,...) CDKTEMPLATE * object CODE: { chtype * Keys; int arrayLen; char *value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKTemplate (object, Keys); free (Keys); } else { value = activateCDKTemplate (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL char * Inject(object,key) CDKTEMPLATE * object chtype key = sv2chtype ($arg); CODE: { char *value = injectCDKTemplate (object,key); if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKTEMPLATE * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vTEMPLATE, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKTEMPLATE * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKTemplatePreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKTEMPLATE * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKTemplatePostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL char * Mix(object) CDKTEMPLATE * object CODE: { RETVAL = mixCDKTemplate (object); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKTEMPLATE * object int Box = sv2int ($arg); CODE: { drawCDKTemplate (object, Box); } void Erase(object) CDKTEMPLATE * object CODE: { eraseCDKTemplate (object); } void SetValue(object,value) CDKTEMPLATE * object char * value CODE: { setCDKTemplateValue (object,value); } void SetMin(object,value) CDKTEMPLATE * object int value CODE: { setCDKTemplateMin (object,value); } void SetBox(object,Box=TRUE) CDKTEMPLATE * object int Box = sv2int ($arg); CODE: { setCDKTemplateBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKTEMPLATE * object chtype character = sv2chtype ($arg); CODE: { setCDKTemplateULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKTEMPLATE * object chtype character = sv2chtype ($arg); CODE: { setCDKTemplateURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKTEMPLATE * object chtype character = sv2chtype ($arg); CODE: { setCDKTemplateLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKTEMPLATE * object chtype character = sv2chtype ($arg); CODE: { setCDKTemplateLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKTEMPLATE * object chtype character = sv2chtype ($arg); CODE: { setCDKTemplateVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKTEMPLATE * object chtype character = sv2chtype ($arg); CODE: { setCDKTemplateHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKTEMPLATE * object chtype character = sv2chtype ($arg); CODE: { setCDKTemplateBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKTEMPLATE * object char * color CODE: { setCDKTemplateBackgroundColor (object,color); } char * Get(object) CDKTEMPLATE * object CODE: { RETVAL = object->info; } OUTPUT: RETVAL void Clean(object) CDKTEMPLATE * object CODE: { cleanCDKTemplate (object); } void Register(object) CDKTEMPLATE * object CODE: { registerCDKObject (GCDKSCREEN, vTEMPLATE, object); } void Unregister(object) CDKTEMPLATE * object CODE: { unregisterCDKObject (vTEMPLATE, object); } void Raise(object) CDKTEMPLATE * object CODE: { raiseCDKObject (vTEMPLATE, object); } void Lower(object) CDKTEMPLATE * object CODE: { lowerCDKObject (vTEMPLATE, object); } WINDOW * GetWindow(object) CDKTEMPLATE * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Swindow CDKSWINDOW * New(title,savelines,height,width,xpos=CENTER,ypos=CENTER,Box=TRUE,shadow=FALSE) SV * title int savelines int height int width int xpos = sv2int ($arg); int ypos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKSWINDOW * swindowWidget = (CDKSWINDOW *)NULL; char * Title; MAKE_TITLE (title,Title); swindowWidget = newCDKSwindow (GCDKSCREEN,xpos,ypos, height,width, Title,savelines, Box,shadow); free (Title); /* Check the return type. */ if (swindowWidget == (CDKSWINDOW *)NULL) { croak ("Cdk::Swindow Could not create widget. Is the window too small?\n"); } else { RETVAL = swindowWidget; } } OUTPUT: RETVAL void Activate(object,...) CDKSWINDOW * object CODE: { chtype * Keys; int arrayLen; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); activateCDKSwindow (object, Keys); free (Keys); } else { activateCDKSwindow (object, NULL); } } int Inject(object,key) CDKSWINDOW * object chtype key = sv2chtype ($arg); CODE: { int selection = injectCDKSwindow (object,key); if (selection == -1) { XSRETURN_UNDEF; } RETVAL = selection; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKSWINDOW * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vSWINDOW, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKSWINDOW * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKSwindowPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKSWINDOW * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKSwindowPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void SetContents(object,info) CDKSWINDOW * object SV * info CODE: { char ** Loginfo; int infolen; MAKE_CHAR_ARRAY(0, info, Loginfo, infolen); setCDKSwindowContents (object, (CDK_CONST char **)Loginfo, infolen); free (Loginfo); } void SetBox(object,Box=TRUE) CDKSWINDOW * object int Box = sv2int ($arg); CODE: { setCDKSwindowBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKSWINDOW * object chtype character = sv2chtype ($arg); CODE: { setCDKSwindowULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKSWINDOW * object chtype character = sv2chtype ($arg); CODE: { setCDKSwindowURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKSWINDOW * object chtype character = sv2chtype ($arg); CODE: { setCDKSwindowLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKSWINDOW * object chtype character = sv2chtype ($arg); CODE: { setCDKSwindowLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKSWINDOW * object chtype character = sv2chtype ($arg); CODE: { setCDKSwindowVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKSWINDOW * object chtype character = sv2chtype ($arg); CODE: { setCDKSwindowHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKSWINDOW * object chtype character = sv2chtype ($arg); CODE: { setCDKSwindowBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKSWINDOW * object char * color CODE: { setCDKSwindowBackgroundColor (object,color); } void Addline(object,info,insertpos) CDKSWINDOW * object char * info int insertpos = sv2int ($arg); CODE: { addCDKSwindow (object, info, insertpos); } void Trim(object,start,finish) CDKSWINDOW * object int start = sv2int ($arg); int finish = sv2int ($arg); CODE: { trimCDKSwindow (object, start, finish); } int Exec(object,command,insertPos=BOTTOM) CDKSWINDOW * object char * command int insertPos = sv2int ($arg); CODE: { RETVAL = execCDKSwindow (object, command, insertPos); } OUTPUT: RETVAL void Get(object) CDKSWINDOW * object PPCODE: { int x; char *temp; /* Push each item onto the stack. */ for (x=0; x < object->listSize ; x++) { /* We need to convert from chtype to char */ temp = chtype2Char (object->list[x]); /* Push it on the stack. */ XPUSHs (sv_2mortal(newSVpv(temp, strlen(temp)))); freeChar (temp); } } void Save(object) CDKSWINDOW * object CODE: { saveCDKSwindowInformation (object); } void Load(object) CDKSWINDOW * object CODE: { loadCDKSwindowInformation (object); } int Dump(object,filename) CDKSWINDOW * object char * filename CODE: { RETVAL = dumpCDKSwindow (object, filename); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKSWINDOW * object int Box = sv2int ($arg); CODE: { drawCDKSwindow (object, Box); } void Erase(object) CDKSWINDOW * object CODE: { eraseCDKSwindow (object); } void Clean(object) CDKSWINDOW * object CODE: { cleanCDKSwindow (object); } void Register(object) CDKSWINDOW * object CODE: { registerCDKObject (GCDKSCREEN, vSWINDOW, object); } void Unregister(object) CDKSWINDOW * object CODE: { unregisterCDKObject (vSWINDOW, object); } void Raise(object) CDKSWINDOW * object CODE: { raiseCDKObject (vSWINDOW, object); } void Lower(object) CDKSWINDOW * object CODE: { lowerCDKObject (vSWINDOW, object); } WINDOW * GetWindow(object) CDKSWINDOW * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Itemlist CDKITEMLIST * New(title,label,itemlist,defaultItem=0,xpos=CENTER,ypos=CENTER,Box=TRUE,shadow=FALSE) SV * title char * label SV * itemlist int defaultItem int xpos = sv2int ($arg); int ypos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKITEMLIST * itemlistWidget = (CDKITEMLIST *)NULL; char * Title; char ** Itemlist; int itemLength; checkCdkInit(); RETVAL = 0; MAKE_CHAR_ARRAY (0, itemlist, Itemlist, itemLength); MAKE_TITLE (title,Title); itemlistWidget = newCDKItemlist (GCDKSCREEN, xpos, ypos, Title, label, (CDK_CONST char **)Itemlist, itemLength, defaultItem, Box, shadow); free (Itemlist); free (Title); /* Check the return type. */ if (itemlistWidget == (CDKITEMLIST *)NULL) { croak ("Cdk::Itemlist Could not create widget. Is the window too small?\n"); } else { RETVAL = itemlistWidget; } } OUTPUT: RETVAL int Activate(object,...) CDKITEMLIST * object CODE: { chtype * Keys; int arrayLen; int value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKItemlist (object, Keys); free (Keys); } else { value = activateCDKItemlist (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL int Inject(object,key) CDKITEMLIST * object chtype key = sv2chtype ($arg); CODE: { int selection = injectCDKItemlist (object,key); if (selection == -1) { XSRETURN_UNDEF; } RETVAL = selection; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKITEMLIST * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vITEMLIST, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKITEMLIST * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKItemlistPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKITEMLIST * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKItemlistPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void SetValues(object,values) CDKITEMLIST * object SV * values CODE: { char ** Values; int valueLength; MAKE_CHAR_ARRAY(0, values, Values, valueLength); setCDKItemlistValues (object, (CDK_CONST char **)Values, valueLength, object->defaultItem); free (Values); } void SetDefaultItem(object,value) CDKITEMLIST * object int value CODE: { setCDKItemlistDefaultItem (object,value); } void SetCurrentItem(object,value) CDKITEMLIST * object int value CODE: { setCDKItemlistCurrentItem (object,value); } void SetBox(object,Box=TRUE) CDKITEMLIST * object int Box = sv2int ($arg); CODE: { setCDKItemlistBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKITEMLIST * object chtype character = sv2chtype ($arg); CODE: { setCDKItemlistULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKITEMLIST * object chtype character = sv2chtype ($arg); CODE: { setCDKItemlistURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKITEMLIST * object chtype character = sv2chtype ($arg); CODE: { setCDKItemlistLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKITEMLIST * object chtype character = sv2chtype ($arg); CODE: { setCDKItemlistLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKITEMLIST * object chtype character = sv2chtype ($arg); CODE: { setCDKItemlistVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKITEMLIST * object chtype character = sv2chtype ($arg); CODE: { setCDKItemlistHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKITEMLIST * object chtype character = sv2chtype ($arg); CODE: { setCDKItemlistBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKITEMLIST * object char * color CODE: { setCDKItemlistBackgroundColor (object,color); } char * Get(object) CDKITEMLIST * object CODE: { RETVAL = chtype2Char (object->item[object->currentItem]); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKITEMLIST * object int Box = sv2int ($arg); CODE: { drawCDKItemlist (object,Box); } void Erase(object) CDKITEMLIST * object CODE: { eraseCDKItemlist (object); } void Register(object) CDKITEMLIST * object CODE: { registerCDKObject (GCDKSCREEN,vITEMLIST,object); } void Unregister(object) CDKITEMLIST * object CODE: { unregisterCDKObject (vITEMLIST, object); } void Raise(object) CDKITEMLIST * object CODE: { raiseCDKObject (vITEMLIST, object); } void Lower(object) CDKITEMLIST * object CODE: { lowerCDKObject (vITEMLIST, object); } WINDOW * GetWindow(object) CDKITEMLIST * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Fselect CDKFSELECT * New(title,label,height,width,dAttrib="",fAttrib="",lAttrib="",sAttrib="",highlight="",fieldAttribute=A_NORMAL,filler=".",xPos=CENTER,yPos=CENTER,Box=TRUE,shadow=FALSE) SV * title char * label int height int width char * dAttrib char * fAttrib char * lAttrib char * sAttrib chtype highlight = sv2chtype ($arg); chtype fieldAttribute = sv2chtype ($arg); chtype filler = sv2chtype ($arg); int xPos = sv2int ($arg); int yPos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKFSELECT * fselectWidget = (CDKFSELECT *)NULL; char * Title; checkCdkInit(); RETVAL = 0; MAKE_TITLE (title,Title); fselectWidget = newCDKFselect (GCDKSCREEN,xPos,yPos, height,width, Title,label, fieldAttribute,filler,highlight, dAttrib,fAttrib,lAttrib,sAttrib, Box,shadow); free (Title); /* Check the return type. */ if (fselectWidget == (CDKFSELECT *)NULL) { croak ("Cdk::Fselect Could not create widget. Is the window too small?\n"); } else { RETVAL = fselectWidget; } } OUTPUT: RETVAL char * Activate(object,...) CDKFSELECT * object CODE: { chtype * Keys; int arrayLen; char *value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKFselect (object, Keys); free (Keys); } else { value = activateCDKFselect (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL char * Inject(object,key) CDKFSELECT * object chtype key = sv2chtype ($arg); CODE: { char *value = injectCDKFselect (object,key); if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL void SetDirectory(object,value) CDKFSELECT * object char * value CODE: { setCDKFselectDirectory (object,value); } void SetFillerChar(object,value) CDKFSELECT * object chtype value CODE: { setCDKFselectFillerChar (object,value); } void SetHighlight(object,value) CDKFSELECT * object chtype value CODE: { setCDKFselectHighlight (object,value); } void SetDirAttribute(object,value) CDKFSELECT * object char * value CODE: { setCDKFselectDirAttribute (object,value); } void SetLinkAttribute(object,value) CDKFSELECT * object char * value CODE: { setCDKFselectLinkAttribute (object,value); } void SetFileAttribute(object,value) CDKFSELECT * object char * value CODE: { setCDKFselectFileAttribute (object,value); } void SetSocketkAttribute(object,value) CDKFSELECT * object char * value CODE: { setCDKFselectSocketAttribute (object,value); } void SetBox(object,Box=TRUE) CDKFSELECT * object int Box = sv2int ($arg); CODE: { setCDKFselectBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKFSELECT * object chtype character = sv2chtype ($arg); CODE: { setCDKFselectULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKFSELECT * object chtype character = sv2chtype ($arg); CODE: { setCDKFselectURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKFSELECT * object chtype character = sv2chtype ($arg); CODE: { setCDKFselectLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKFSELECT * object chtype character = sv2chtype ($arg); CODE: { setCDKFselectLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKFSELECT * object chtype character = sv2chtype ($arg); CODE: { setCDKFselectVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKFSELECT * object chtype character = sv2chtype ($arg); CODE: { setCDKFselectHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKFSELECT * object chtype character = sv2chtype ($arg); CODE: { setCDKFselectBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKFSELECT * object char * color CODE: { setCDKFselectBackgroundColor (object,color); } void Bind(object,key,functionRef) CDKFSELECT * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vFSELECT, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKFSELECT * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKFselectPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKFSELECT * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKFselectPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKFSELECT * object int Box = sv2int ($arg); CODE: { drawCDKFselect (object,Box); } void Erase(object) CDKFSELECT * object CODE: { eraseCDKFselect (object); } void Register(object) CDKFSELECT * object CODE: { registerCDKObject (GCDKSCREEN,vFSELECT,object); } void Unregister(object) CDKFSELECT * object CODE: { unregisterCDKObject (vFSELECT, object); } void Raise(object) CDKFSELECT * object CODE: { raiseCDKObject (vFSELECT, object); } void Lower(object) CDKFSELECT * object CODE: { lowerCDKObject (vFSELECT, object); } WINDOW * GetWindow(object) CDKFSELECT * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Slider CDKSLIDER * New(title,label,start,low,high,inc,fastInc,fieldWidth,xPos,yPos,filler,Box,shadow) SV * title char * label int start int low int high int inc int fastInc int fieldWidth int xPos = sv2int ($arg); int yPos = sv2int ($arg); chtype filler = sv2chtype ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKSLIDER * sliderWidget = (CDKSLIDER *)NULL; char * Title; checkCdkInit(); RETVAL = 0; MAKE_TITLE (title,Title); sliderWidget = newCDKSlider (GCDKSCREEN, xPos,yPos, Title, label, filler,fieldWidth, start,low,high, inc,fastInc, Box,shadow); free (Title); /* Check the return type. */ if (sliderWidget == (CDKSLIDER *)NULL) { croak ("Cdk::Slider Could not create widget. Is the window too small?\n"); } else { RETVAL = sliderWidget; } } OUTPUT: RETVAL int Activate(object,...) CDKSLIDER * object CODE: { chtype * Keys; int arrayLen; int value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKSlider (object, Keys); free (Keys); } else { value = activateCDKSlider (object, (chtype *)NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL int Inject(object,key) CDKSLIDER * object chtype key = sv2chtype ($arg); CODE: { int value = injectCDKSlider (object,key); if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL void SetValue(object,value) CDKSLIDER* object int value CODE: { setCDKSliderValue (object,value); } void SetLowHigh(object,low,high) CDKSLIDER * object int low int high CODE: { setCDKSliderLowHigh (object,low,high); } void SetBox(object,Box=TRUE) CDKSLIDER * object int Box = sv2int ($arg); CODE: { setCDKSliderBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKSLIDER * object chtype character = sv2chtype ($arg); CODE: { setCDKSliderULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKSLIDER * object chtype character = sv2chtype ($arg); CODE: { setCDKSliderURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKSLIDER * object chtype character = sv2chtype ($arg); CODE: { setCDKSliderLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKSLIDER * object chtype character = sv2chtype ($arg); CODE: { setCDKSliderLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKSLIDER * object chtype character = sv2chtype ($arg); CODE: { setCDKSliderVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKSLIDER * object chtype character = sv2chtype ($arg); CODE: { setCDKSliderHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKSLIDER * object chtype character = sv2chtype ($arg); CODE: { setCDKSliderBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKSLIDER * object char * color CODE: { setCDKSliderBackgroundColor (object,color); } void Bind(object,key,functionRef) CDKSLIDER * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vSLIDER, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKSLIDER * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKSliderPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKSLIDER * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKSliderPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKSLIDER * object int Box = sv2int ($arg); CODE: { drawCDKSlider (object,Box); } void Erase(object) CDKSLIDER * object CODE: { eraseCDKSlider (object); } void Register(object) CDKSLIDER * object CODE: { registerCDKObject (GCDKSCREEN,vSLIDER,object); } void Unregister(object) CDKSLIDER * object CODE: { unregisterCDKObject (vSLIDER, object); } void Raise(object) CDKSLIDER * object CODE: { raiseCDKObject (vSLIDER, object); } void Lower(object) CDKSLIDER * object CODE: { lowerCDKObject (vSLIDER, object); } WINDOW * GetWindow(object) CDKSLIDER * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Alphalist CDKALPHALIST * New(title,label,list,height,width,xPos,yPos,highlight,filler,Box,shadow) SV * title char * label SV * list int height int width chtype highlight = sv2chtype ($arg); chtype filler = sv2chtype ($arg); int xPos = sv2int ($arg); int yPos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKALPHALIST * alphalistWidget = (CDKALPHALIST *)NULL; char ** List; char * Title; int listSize; checkCdkInit(); RETVAL = 0; MAKE_CHAR_ARRAY(0, list, List, listSize); MAKE_TITLE (title,Title); alphalistWidget = newCDKAlphalist (GCDKSCREEN, xPos, yPos, height, width, Title, label, (CDK_CONST char **)List, listSize, filler, highlight, Box, shadow); free (List); free (Title); /* Check the return type. */ if (alphalistWidget == (CDKALPHALIST *)NULL) { croak ("Cdk::Alphalist Could not create widget. Is the window too small?\n"); } else { RETVAL = alphalistWidget; } } OUTPUT: RETVAL void Activate(object,...) CDKALPHALIST * object PPCODE: { SV *sv = (SV *)&PL_sv_undef; chtype * Keys; int arrayLen; char *value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKAlphalist (object, Keys); free (Keys); } else { value = activateCDKAlphalist (object, NULL); } if (object->exitType == vNORMAL) { sv = newSVpv (value, strlen (value)); } XPUSHs (sv); } char * Inject(object,key) CDKALPHALIST * object chtype key = sv2chtype ($arg); CODE: { char *value = injectCDKAlphalist (object,key); if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL void SetContents(object,list) CDKALPHALIST* object SV * list CODE: { char ** List; int listSize; MAKE_CHAR_ARRAY(0, list, List, listSize); setCDKAlphalistContents (object, (CDK_CONST char **) List, listSize); free (List); } void SetFillerChar(object,filler) CDKALPHALIST* object chtype filler = sv2chtype ($arg); CODE: { setCDKAlphalistFillerChar (object,filler); } void SetHighlight(object,highlight) CDKALPHALIST* object chtype highlight = sv2chtype ($arg); CODE: { setCDKAlphalistHighlight (object,highlight); } void SetBox(object,Box=TRUE) CDKALPHALIST * object int Box = sv2int ($arg); CODE: { setCDKAlphalistBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKALPHALIST * object chtype character = sv2chtype ($arg); CODE: { setCDKAlphalistULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKALPHALIST * object chtype character = sv2chtype ($arg); CODE: { setCDKAlphalistURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKALPHALIST * object chtype character = sv2chtype ($arg); CODE: { setCDKAlphalistLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKALPHALIST * object chtype character = sv2chtype ($arg); CODE: { setCDKAlphalistLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKALPHALIST * object chtype character = sv2chtype ($arg); CODE: { setCDKAlphalistVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKALPHALIST * object chtype character = sv2chtype ($arg); CODE: { setCDKAlphalistHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKALPHALIST * object chtype character = sv2chtype ($arg); CODE: { setCDKAlphalistBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKALPHALIST * object char * color CODE: { setCDKAlphalistBackgroundColor (object,color); } char * Get(object) CDKALPHALIST * object CODE: { RETVAL = object->entryField->info; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKALPHALIST * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vALPHALIST, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKALPHALIST * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKAlphalistPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKALPHALIST * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKAlphalistPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKALPHALIST * object int Box = sv2int ($arg); CODE: { drawCDKAlphalist (object,Box); } void Erase(object) CDKALPHALIST * object CODE: { eraseCDKAlphalist (object); } void Register(object) CDKALPHALIST * object CODE: { registerCDKObject (GCDKSCREEN,vALPHALIST,object); } void Unregister(object) CDKALPHALIST * object CODE: { unregisterCDKObject (vALPHALIST, object); } void Raise(object) CDKALPHALIST * object CODE: { raiseCDKObject (vALPHALIST, object); } void Lower(object) CDKALPHALIST * object CODE: { lowerCDKObject (vALPHALIST, object); } WINDOW * GetWindow(object) CDKALPHALIST * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Calendar CDKCALENDAR * New(title,day,month,year,dayAttrib,monthAttrib,yearAttrib,highlight,xPos=CENTER,yPos=CENTER,Box=TRUE,shadow=FALSE) SV * title int day int month int year chtype dayAttrib = sv2chtype ($arg); chtype monthAttrib = sv2chtype ($arg); chtype yearAttrib = sv2chtype ($arg); chtype highlight = sv2chtype ($arg); int xPos = sv2int ($arg); int yPos = sv2int ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKCALENDAR * calendarWidget = (CDKCALENDAR *)NULL; char * Title; checkCdkInit(); RETVAL = 0; MAKE_TITLE (title,Title); calendarWidget = newCDKCalendar (GCDKSCREEN,xPos,yPos,Title, day,month,year, dayAttrib,monthAttrib,yearAttrib, highlight,Box,shadow); free (Title); /* Check the return type. */ if (calendarWidget == (CDKCALENDAR *)NULL) { croak ("Cdk::Calendar Could not create widget. Is the window too small?\n"); } else { RETVAL = calendarWidget; } } OUTPUT: RETVAL void Activate(object,...) CDKCALENDAR * object PPCODE: { chtype * Keys; int arrayLen; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); activateCDKCalendar (object, Keys); free (Keys); } else { activateCDKCalendar (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } XPUSHs (sv_2mortal(newSViv(object->day))); XPUSHs (sv_2mortal(newSViv(object->month))); XPUSHs (sv_2mortal(newSViv(object->year))); } void Inject(object,key) CDKCALENDAR * object chtype key = sv2chtype ($arg); PPCODE: { (void) injectCDKCalendar (object,key); if (object->exitType == vESCAPE_HIT || object->exitType == vEARLY_EXIT) { XSRETURN_UNDEF; } XPUSHs (sv_2mortal(newSViv(object->day))); XPUSHs (sv_2mortal(newSViv(object->month))); XPUSHs (sv_2mortal(newSViv(object->year))); } void SetDate(object,day,month,year) CDKCALENDAR * object int day int month int year CODE: { setCDKCalendarDate (object,day,month,year); } void GetDate(object) CDKCALENDAR * object PPCODE: { XPUSHs (sv_2mortal(newSViv(object->day))); XPUSHs (sv_2mortal(newSViv(object->month))); XPUSHs (sv_2mortal(newSViv(object->year))); } void SetMarker(object,day,month,year,marker) CDKCALENDAR * object int day int month int year chtype marker = sv2chtype ($arg); CODE: { setCDKCalendarMarker (object,day,month,year,marker); } void RemoveMarker(object,day,month,year) CDKCALENDAR * object int day int month int year CODE: { removeCDKCalendarMarker (object,day,month,year); } void SetDayAttribute(object,attribute) CDKCALENDAR * object chtype attribute = sv2chtype ($arg); CODE: { setCDKCalendarDayAttribute (object, attribute); } void Bind(object,key,functionRef) CDKCALENDAR * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vCALENDAR, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKCALENDAR * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKCalendarPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKCALENDAR * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKCalendarPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKCALENDAR * object int Box = sv2int ($arg); CODE: { drawCDKCalendar (object,Box); } void Erase(object) CDKCALENDAR * object CODE: { eraseCDKCalendar(object); } void Set(object,year,month,day,yearAttrib,monthAttrib,dayAttrib,highlight,Box) CDKCALENDAR * object int day int month int year chtype dayAttrib = sv2chtype ($arg); chtype monthAttrib = sv2chtype ($arg); chtype yearAttrib = sv2chtype ($arg); chtype highlight = sv2chtype ($arg); int Box = sv2int ($arg); CODE: { setCDKCalendar (object,day,month,year,yearAttrib,monthAttrib,dayAttrib,highlight,Box); } void Register(object) CDKCALENDAR * object CODE: { registerCDKObject (GCDKSCREEN, vCALENDAR, object); } void Unregister(object) CDKCALENDAR * object CODE: { unregisterCDKObject (vCALENDAR, object); } void Raise(object) CDKCALENDAR * object CODE: { raiseCDKObject (vCALENDAR, object); } void Lower(object) CDKCALENDAR * object CODE: { lowerCDKObject (vCALENDAR, object); } WINDOW * GetWindow(object) CDKCALENDAR * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = Cdk::Buttonbox CDKBUTTONBOX * New(title,buttons,rows,cols,height,width,xPos=CENTER,yPos=CENTER,highlight=A_REVERSE,Box=TRUE,shadow=FALSE) SV * title SV * buttons int rows int cols int height int width int xPos = sv2int ($arg); int yPos = sv2int ($arg); chtype highlight = sv2chtype ($arg); int Box = sv2int ($arg); int shadow = sv2int ($arg); CODE: { CDKBUTTONBOX * widget = (CDKBUTTONBOX *)NULL; char ** Buttons; char * Title; int buttonCount; checkCdkInit(); RETVAL = 0; MAKE_CHAR_ARRAY (0, buttons, Buttons, buttonCount); MAKE_TITLE (title,Title); widget = newCDKButtonbox (GCDKSCREEN, xPos, yPos, height, width, Title, rows, cols, (CDK_CONST char **)Buttons, buttonCount, highlight, Box, shadow); free (Buttons); free (Title); /* Check the return type. */ if (widget == (CDKBUTTONBOX *)NULL) { croak ("Cdk::Buttonbox Could not create widget. Is the window too small?\n"); } else { RETVAL = widget; } } OUTPUT: RETVAL int Activate(object,...) CDKBUTTONBOX * object CODE: { chtype * Keys; int arrayLen; int value; if (items > 1) { MAKE_CHTYPE_ARRAY(0, ST(1), Keys, arrayLen); value = activateCDKButtonbox (object, Keys); free (Keys); } else { value = activateCDKButtonbox (object, NULL); } if (object->exitType == vEARLY_EXIT || object->exitType == vESCAPE_HIT) { XSRETURN_UNDEF; } RETVAL = value; } OUTPUT: RETVAL int Inject(object,key) CDKBUTTONBOX * object chtype key = sv2chtype ($arg); CODE: { int selection = injectCDKButtonbox (object,key); if (selection == -1) { XSRETURN_UNDEF; } RETVAL = selection; } OUTPUT: RETVAL void Bind(object,key,functionRef) CDKBUTTONBOX * object chtype key = sv2chtype ($arg); SV * functionRef CODE: { SV *function = newSVsv (functionRef); bindCDKObject (vBUTTONBOX, object, key, PerlBindCB, function); } int PreProcess(object,functionRef) CDKBUTTONBOX * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKButtonboxPreProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL int PostProcess(object,functionRef) CDKBUTTONBOX * object SV * functionRef CODE: { SV *function = newSVsv (functionRef); RETVAL = 0; setCDKButtonboxPostProcess (object, PerlProcessCB, function); } OUTPUT: RETVAL void Draw(object,Box=TRUE) CDKBUTTONBOX * object int Box = sv2int ($arg); CODE: { drawCDKButtonbox (object,Box); } void Erase(object) CDKBUTTONBOX * object CODE: { eraseCDKButtonbox (object); } void SetHighlight(object,highlight=A_REVERSE) CDKBUTTONBOX * object chtype highlight = sv2chtype ($arg); CODE: { setCDKButtonboxHighlight (object,highlight); } void SetBox(object,Box=TRUE) CDKBUTTONBOX * object int Box = sv2int ($arg); CODE: { setCDKButtonboxBox (object,Box); } void SetULChar(object,character=ACS_ULCORNER) CDKBUTTONBOX * object chtype character = sv2chtype ($arg); CODE: { setCDKButtonboxULChar (object,character); } void SetURChar(object,character=ACS_URCORNER) CDKBUTTONBOX * object chtype character = sv2chtype ($arg); CODE: { setCDKButtonboxURChar (object,character); } void SetLLChar(object,character=ACS_LLCORNER) CDKBUTTONBOX * object chtype character = sv2chtype ($arg); CODE: { setCDKButtonboxLLChar (object,character); } void SetLRChar(object,character=ACS_LRCORNER) CDKBUTTONBOX * object chtype character = sv2chtype ($arg); CODE: { setCDKButtonboxLRChar (object,character); } void SetVerticalChar(object,character=ACS_VLINE) CDKBUTTONBOX * object chtype character = sv2chtype ($arg); CODE: { setCDKButtonboxVerticalChar (object,character); } void SetHorizontalChar(object,character=ACS_HLINE) CDKBUTTONBOX * object chtype character = sv2chtype ($arg); CODE: { setCDKButtonboxHorizontalChar (object,character); } void SetBoxAttribute(object,character=ACS_HLINE) CDKBUTTONBOX * object chtype character = sv2chtype ($arg); CODE: { setCDKButtonboxBoxAttribute (object,character); } void SetBackgroundColor(object,color) CDKBUTTONBOX * object char * color CODE: { setCDKButtonboxBackgroundColor (object,color); } void Register(object) CDKBUTTONBOX * object CODE: { registerCDKObject (GCDKSCREEN, vBUTTONBOX, object); } void Unregister(object) CDKBUTTONBOX * object CODE: { unregisterCDKObject (vBUTTONBOX, object); } void Raise(object) CDKBUTTONBOX * object CODE: { raiseCDKObject (vBUTTONBOX, object); } void Lower(object) CDKBUTTONBOX * object CODE: { lowerCDKObject (vBUTTONBOX, object); } WINDOW * GetWindow(object) CDKBUTTONBOX * object CODE: { RETVAL = object->win; } OUTPUT: RETVAL MODULE = Cdk PACKAGE = CDKLABELPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKLABEL * object CODE: { destroyCDKLabel (object); } MODULE = Cdk PACKAGE = CDKBUTTONBOXPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKBUTTONBOX * object CODE: { destroyCDKButtonbox (object); } MODULE = Cdk PACKAGE = CDKDIALOGPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKDIALOG * object CODE: { destroyCDKDialog (object); } MODULE = Cdk PACKAGE = CDKENTRYPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKENTRY * object CODE: { destroyCDKEntry (object); } MODULE = Cdk PACKAGE = CDKSCROLLPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKSCROLL * object CODE: { destroyCDKScroll (object); } MODULE = Cdk PACKAGE = CDKSCALEPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKSCALE * object CODE: { destroyCDKScale (object); } MODULE = Cdk PACKAGE = CDKHISTOGRAMPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKHISTOGRAM * object CODE: { destroyCDKHistogram (object); } MODULE = Cdk PACKAGE = CDKMENUPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKMENU * object CODE: { destroyCDKMenu (object); } MODULE = Cdk PACKAGE = CDKMENTRYPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKMENTRY * object CODE: { destroyCDKMentry (object); } MODULE = Cdk PACKAGE = CDKMATRIXPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKMATRIX * object CODE: { destroyCDKMatrix (object); } MODULE = Cdk PACKAGE = CDKMARQUEEPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKMARQUEE * object CODE: { destroyCDKMarquee (object); } MODULE = Cdk PACKAGE = CDKSELECTIONPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKSELECTION * object CODE: { destroyCDKSelection (object); } MODULE = Cdk PACKAGE = CDKVIEWERPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKVIEWER * object CODE: { destroyCDKViewer (object); } MODULE = Cdk PACKAGE = CDKGRAPHPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKGRAPH * object CODE: { destroyCDKGraph (object); } MODULE = Cdk PACKAGE = CDKRADIOPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKRADIO * object CODE: { destroyCDKRadio (object); } MODULE = Cdk PACKAGE = CDKTEMPLATEPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKTEMPLATE * object CODE: { destroyCDKTemplate (object); } MODULE = Cdk PACKAGE = CDKSWINDOWPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKSWINDOW * object CODE: { destroyCDKSwindow (object); } MODULE = Cdk PACKAGE = CDKITEMLISTPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKITEMLIST * object CODE: { destroyCDKItemlist (object); } MODULE = Cdk PACKAGE = CDKFSELECTPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKFSELECT * object CODE: { destroyCDKFselect (object); } MODULE = Cdk PACKAGE = CDKSLIDERPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKSLIDER * object CODE: { destroyCDKSlider (object); } MODULE = Cdk PACKAGE = CDKALPHALISTPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKALPHALIST * object CODE: { destroyCDKAlphalist (object); } MODULE = Cdk PACKAGE = CDKCALENDARPtr PREFIX = cdk_ void cdk_DESTROY(object) CDKCALENDAR * object CODE: { destroyCDKCalendar (object); } cdk-perl-20240606/examples/0000755000000000000000000000000013432342177014002 5ustar rootrootcdk-perl-20240606/examples/postProcess0000755000000000000000000000413112170626214016246 0ustar rootroot#!/usr/bin/perl -w # $Id: postProcess,v 1.4 2013/07/14 22:56:12 tom Exp $ # # Purpose: # To demonstrate the postProcess method. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Set up the scrolling list. my @commandItems = ( "Add Account ", "Delete Account ", "Account Information ", "Change Account Password ", "Change Account Shell ", "Change Account Directory", "Quit " ); my @commandInfo = ( "Adds a new account to the system.", "Deletes an exiting account from the system.", "Provides information about a given account.", "Changes a given account's current password.", "Changes a given account's login shell.", "Changes a given account's login directory.", "Exits this interface." ); my @initMessage = ("******************************************************"); # Create the title. my $title = new Cdk::Label( 'Message' => ["Unix System Admin Interface."], 'Ypos' => "TOP", 'Xpos' => "LEFT" ); # Create the scrolling list object. my $scroll = new Cdk::Scroll( 'Title' => "Pick An Option", 'Highlight' => "", 'Height' => 10, 'Width' => 35, 'Numbers' => "TRUE", 'List' => \@commandItems ); # Set the post-process for the scrolling list. $scroll->postProcess( 'Function' => sub { setInfoLabelCB(); } ); # Create the scrolling list item label. my $infoLabel = new Cdk::Label( 'Message' => \@initMessage, 'Xpos' => 1, 'Ypos' => 3 ); # Set the contents of the info label. $infoLabel->set( 'Message' => ["$commandInfo[0]"] ); $infoLabel->draw(); # Draw the screen. $title->draw(); $infoLabel->draw(); # Do this forever. for ( ; ; ) { # Activate the scrolling list. my $item = $scroll->activate(); } # Exit Cdk. Cdk::end(); # # # sub setInfoLabelCB { # Get the current itrm from the scrolling list. my ( $size, $currentItem ) = $scroll->info(); # Set the info in the label. $infoLabel->set( 'Message' => ["$commandInfo[$currentItem]"] ); $infoLabel->draw(); return 1; } cdk-perl-20240606/examples/preProcess0000755000000000000000000000217112170625141016047 0ustar rootroot#!/usr/bin/perl -w # $Id: preProcess,v 1.3 2013/07/14 22:46:57 tom Exp $ # # Purpose: # To demonstrate the preProcess method. use strict; # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # Create a new entry object. my $title = [ "", "Type in anything but the dreaded letter 'G'!", "" ]; my $entry = new Cdk::Entry( 'Label' => "Type Anything: ", 'Title' => $title, 'Width' => 20, 'Min' => 0, 'Max' => 256 ); # Set up the pre and post processing. $entry->preProcess( 'Function' => sub { preProcessCB( @_, $entry ); } ); # Activate the object. my $info = $entry->activate(); # Check the results. if ( !defined $info ) { popupLabel( ["You hit escape, nothing returned."] ); } else { popupLabel( ["You typed in ($info)"] ); } # Exit Cdk. Cdk::end(); # # This example will set the pre process function so it # will not accept the letter g. # sub preProcessCB { my ( $input, $entry ) = @_; # Check the letter. if ( uc $input eq "G" ) { Cdk::Beep(); popupLabel( ["I Told You NOT To Do That"] ); $entry->draw(); return 0; } return 1; } cdk-perl-20240606/examples/calendar0000755000000000000000000000052312170626014015472 0ustar rootroot#!/usr/bin/perl -w # $Id: calendar,v 1.3 2013/07/14 22:54:04 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Calendar Widget use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Create the celendar object. my $calendar = new Cdk::Calendar(); # Activate the object. my $ret = $calendar->activate(); # Exit Cdk. Cdk::end(); cdk-perl-20240606/examples/selection0000755000000000000000000000171313432342177015717 0ustar rootroot#!/usr/bin/perl -w # $Id: selection,v 1.4 2019/02/17 20:30:55 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Selection Widget. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Set up the selection list. my @listItems = ( "Item 1", "Item 2", "Item 3", "Item 4", "Item 5", "Item 6", "Item 7", "Item 8", "Item 9" ); my @choices = ( "Yes", "No", "Maybe" ); # Create the selection list object. my $selection = new Cdk::Selection( 'Title' => "Selection List", 'List' => \@listItems, 'Choices' => \@choices, 'Height' => 10, 'Width' => 20 ); # Activate the object. my @info = $selection->activate(); # Check the results. if ( !@info ) { popupLabel( ["Escape hit. No menu item selected."] ); } else { my @list = ("Items Selected"); for ( my $x = 0 ; $x < $#info ; $x++ ) { push( @list, "$listItems[$x]" ) if $info[$x] == 0; } popupLabel( \@list ); } # Exit Cdk. Cdk::end(); cdk-perl-20240606/examples/itemlist0000755000000000000000000000163212170623701015555 0ustar rootroot#!/usr/bin/perl -w # $Id: itemlist,v 1.4 2013/07/14 22:35:45 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Itemlist Widget. use strict; # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # Create a list of the months of the year. my @months = ( "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ); # Create an itemlist widget. my $itemlist = new Cdk::Itemlist( 'List' => \@months, 'Label' => "Month >>", 'Title' => ["Pick A Month"] ); # Activate the object. my $choice = $itemlist->activate(); # Check the results if ( !defined $choice ) { popupLabel( ["Escape hit. No item selected."] ); } else { popupLabel( ["You selected ($months[$choice])"] ); } # Exit Cdk. Cdk::end(); cdk-perl-20240606/examples/alphalist0000755000000000000000000000141212170626107015703 0ustar rootroot#!/usr/bin/perl -w # $Id: alphalist,v 1.3 2013/07/14 22:55:03 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Alphalist Widget. use strict; # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # Get the contents of the current directory. my @info = qx (ls); chomp @info; # Create a new alphalist object. my $alphalist = new Cdk::Alphalist( 'Label' => "Type Anything:", 'Filler' => "_", 'Height' => 20, 'Width' => 60, 'List' => \@info ); $alphalist->set( 'BoxAttribute' => "" ); # Activate the object. my $info = $alphalist->activate(); # Check the results... if ( !defined $info ) { popupLabel( ["You hit escape to exit the widget."] ); } else { popupLabel( ["You selected ($info)"] ); } # Exit Cdk. Cdk::end(); cdk-perl-20240606/examples/scroll0000755000000000000000000000170412170624770015230 0ustar rootroot#!/usr/bin/perl -w # $Id: scroll,v 1.3 2013/07/14 22:45:12 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Scroll Widget use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Set up the scrolling list. my @listItems = ( "Item 1", "Item 2", "Item 3", "Item 4", "Item 5", "Item 6", "Item 7", "Item 8", "Item 9" ); # Create the scrolling list object. my $scroll = new Cdk::Scroll( 'Title' => "Scroll Title", 'Height' => -10, 'Width' => -10, 'Numbers' => "TRUE", 'Spos' => "RIGHT", 'List' => \@listItems ); $scroll->add( 'Item' => "HELLO" ); # Activate the scrolling list. my $itemPicked = $scroll->activate(); # Check the results. if ( !defined $itemPicked ) { popupLabel( ["Escape hit. No menu item selected."] ); } elsif ( $itemPicked > $#listItems ) { popupLabel( ["Hello there!"] ); } else { popupLabel( ["You selected $listItems[$itemPicked]"] ); } # Exit Cdk. Cdk::end(); cdk-perl-20240606/examples/bind0000755000000000000000000000302012170622743014635 0ustar rootroot#!/usr/bin/perl -w # $Id: bind,v 1.4 2013/07/14 22:27:47 tom Exp $ # # Purpose: # To demonstrate the character binding features of the # Perl5/Cdk extension. # use strict; # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # This callback fills the entry field with a filename. sub callback { my $entryObj = shift @_; # Generate a list of files in the current directory. my @files = <*>; my $filelist = new Cdk::Scroll( 'Title' => "Pick A File", 'Height' => 10, 'Width' => 20, 'List' => \@files ); # Activate the scrolling list. my $itemPicked = $filelist->activate(); undef $filelist; # Set the filename. $entryObj->set( 'Min' => 0, 'Max' => 255, 'Value' => $files[$itemPicked] ); # Redraw the entry field. $entryObj->draw(); return 1; } # Create a new entry object. my $title = [ "", "Type in a filename or", "Press tab to get a list.", "" ]; my $filename = new Cdk::Entry( 'Label' => "Filename: ", 'Title' => $title, 'Width' => 20, 'Min' => 0, 'Max' => 256 ); # Create a key binding. my @mesg = ( "Hi Mike", "How Are You?" ); $filename->bind( 'Key' => "KEY_TAB", 'Function' => sub { main::callback($filename); } ); # Activate the object. my $file = $filename->activate(); # Check the results. if ( !defined $file ) { popupLabel( ["Escape hit, no filename entered."] ); } else { popupLabel( ["You typed in the filename ($file)"] ); } # Exit Cdk. Cdk::end(); cdk-perl-20240606/examples/buttonbox0000755000000000000000000000141012170626050015741 0ustar rootroot#!/usr/bin/perl -w # $Id: buttonbox,v 1.3 2013/07/14 22:54:32 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Buttonbox Widget. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Create the buttonbox buttons. my @buttons = ( "Button 0", "Button 1", "Button 2", "Button 3" ); # Create the buttonbox object. my $buttonbox = new Cdk::Buttonbox( 'Buttons' => \@buttons, 'Height' => 1, 'Width' => 50, 'Cols' => 4, 'Rows' => 1 ); # Activate the object. my $button = $buttonbox->activate(); # Check the results. if ( !defined $button ) { popupLabel( ["Escape hit. No button selected."] ); } else { popupLabel( ["You selected button $button"] ); } # Exit Cdk. Cdk::end(); cdk-perl-20240606/examples/template0000755000000000000000000000137512170624170015543 0ustar rootroot#!/usr/bin/perl -w # $Id: template,v 1.3 2013/07/14 22:38:48 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Template Widget. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Create the template object. my $template = new Cdk::Template( 'Label' => 'Type in a date:', 'Plate' => '## ## ####', 'Overlay' => 'DD-MM-YYYY' ); # Activate the widget. my $date = $template->activate(); # Get the mixed date back. my $mixedDate = $template->mix(); # Check the results. if ( !defined $date ) { popupLabel( ["Escape hit. No information to return."] ); } else { popupLabel( [ "With Overlay Mixing : $mixedDate", "Without Overlay Mixing: $date" ] ); } # Exit Cdk. Cdk::end(); cdk-perl-20240606/examples/entry0000755000000000000000000000111712170625753015073 0ustar rootroot#!/usr/bin/perl -w # $Id: entry,v 1.3 2013/07/14 22:53:31 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Entry Widget. use strict; # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # Create a new entry object. my $entry = new Cdk::Entry( 'Label' => "Type Anything: ", 'Width' => 20, 'Min' => 0, 'Max' => 256 ); # Activate the object. my $info = $entry->activate(); # Check the results. if ( !defined $info ) { popupLabel( ["You hit escape, nothing returned."] ); } else { popupLabel( ["You typed in ($info)"] ); } # Exit Cdk. Cdk::end(); cdk-perl-20240606/examples/marquee0000755000000000000000000000100312170613763015361 0ustar rootroot#!/usr/bin/perl -w # $Id: marquee,v 1.3 2013/07/14 21:28:19 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Marquee Widget. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Create the message to scroll. my $message = "Hello there!!! How are you today? "; # Create the marquee object. my $marquee = new Cdk::Marquee( 'Width' => 20 ); # Activate the marquee object. $marquee->activate( 'Message' => $message, 'Delay' => 3, 'Repeat' => 3 ); # Exit Cdk. Cdk::end(); cdk-perl-20240606/examples/scale0000755000000000000000000000117412170625073015017 0ustar rootroot#!/usr/bin/perl -w # $Id: scale,v 1.3 2013/07/14 22:46:19 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Scale Widget use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Create the scale object. my $scale = new Cdk::Scale( 'Label' => "Pick A Number: ", 'Low' => 1, 'High' => 10 ); # Activate the object. my $number = $scale->activate(); # Check the results. if ( !defined $number ) { popupLabel( ["Escape hit. No number selected."] ); } else { popupLabel( ["You selected $number"] ); } # Exit Cdk. Cdk::end(); # Print out the info. print "\n\n\n"; print "Number Chosen: $number\n"; cdk-perl-20240606/examples/histogram0000755000000000000000000000145412170622647015732 0ustar rootroot#!/usr/bin/perl -w # $Id: histogram,v 1.4 2013/07/14 22:26:47 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Histogram Widget. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); my $x; # # Create the histogram. # my $histogram = new Cdk::Histogram( 'Title' => "Dum De Dummmm", 'Height' => 3, 'Width' => 0, 'Orient' => "HORIZONTAL" ); # # Set some properties of the histogram. # $histogram->set( 'StatsType' => "PERCENT", 'StatsPos' => "CENTER", 'FillerChar' => "." ); # Set the values. for ( $x = 1 ; $x <= 100 ; $x += 2 ) { # Set the values of the histogram. $histogram->set( 'Value' => $x, 'Low' => 1, 'High' => 100 ); # Draw the histogram. $histogram->draw(); sleep(1); } # Exit Cdk. Cdk::end(); cdk-perl-20240606/examples/radio0000755000000000000000000000152012170623535015022 0ustar rootroot#!/usr/bin/perl -w # $Id: radio,v 1.4 2013/07/14 22:34:05 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Radio Widget. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Set up the radio list. my @radioList = ( "Item 1", "Item 2", "Item 3", "Item 4", "Item 5", "Item 6", "Item 7", "Item 8", "Item 9", "Item 10", "Item 11", "Item 12" ); # Create the radio list object. my $radioWidget = new Cdk::Radio( 'Title' => ["Radio List"], 'List' => \@radioList, 'Height' => 10, 'Width' => 20 ); # Activate the radio object. $radioWidget->set( 'Choice' => "#" ); my $choice = $radioWidget->activate(); # Check the results. if ( !defined $choice ) { popupLabel( ["Escape hit. No item selected."] ); } else { popupLabel( ["You selected $radioList[$choice]."] ); } # Exit Cdk. Cdk::end(); cdk-perl-20240606/examples/matrix0000755000000000000000000000344712170625347015245 0ustar rootroot#!/usr/bin/perl -w # $Id: matrix,v 1.3 2013/07/14 22:49:11 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Matrix Widget use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Set up the matrix field attibutes. my @rowtitles = ( "Course 1", "Course 2", "Course 3", "Course 4", "Course 5" ); my @coltitles = ( "Course", "Lec 1", "Lec 2", "Lec 3", "Flag" ); my @colwidths = ( 7, 5, 5, 5, 1 ); my @coltypes = ( "UMIXED", "UMIXED", "UMIXED", "UMIXED", "UMIXED" ); my $title = [ "Course Selection Matrix", "", "<#HL(30)>" ]; my $x; # Create the matrix object. my $matrix = new Cdk::Matrix( 'Title' => $title, 'RowTitles' => \@rowtitles, 'ColTitles' => \@coltitles, 'ColWidths' => \@colwidths, 'ColTypes' => \@coltypes, 'Vrows' => 3, 'Vcols' => $#coltitles + 1, 'BoxCell' => "TRUE", 'BoxMatrix' => "TRUE" ); # Using this array, we will load up the matrix. my @matrixValues = ( [ "PSY340Y", "L0101", "L0201", "", "" ], [ "PSY340H", "L0101", "L0201", "", "" ], [ "PSY440Y", "L0101", "L0201", "", "" ], [ "PSY201Y", "L0101", "L0201", "", "" ] ); # Load up the matrix. $matrix->set( 'Values' => \@matrixValues ); # Draw the matrix. $matrix->draw(); # Activate the matrix. my ( $rows, $cols, $info ) = $matrix->activate(); # Check the results. if ( !defined $rows ) { popupLabel( ["Escape hit. No information in the matrix."] ); } else { my @info = ("Rows: $rows Cols: $cols"); for ( $x = 0 ; $x < $rows ; $x++ ) { my $row = ""; for ( my $y = 0 ; $y < $cols ; $y++ ) { $row .= "($x,$y) = $info->[$x][$y], "; } chomp $row; chomp $row; push( @info, $row ); } popupLabel( \@info ); } # Exit Cdk. Cdk::end(); cdk-perl-20240606/examples/label0000755000000000000000000000103712170625422015003 0ustar rootroot#!/usr/bin/perl -w # $Id: label,v 1.3 2013/07/14 22:49:54 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Label Widget. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Set up the label rows. my @mesg = ( "This is a test of the Perl Cdk extension.", "", "", "Written by...", "Mike Glover" ); # Create the label object. my $title = new Cdk::Label( 'Message' => \@mesg ); # Draw the label. $title->set( 'BoxAttribute' => "" ); $title->draw(); $title->wait(); # Exit Cdk. Cdk::end(); cdk-perl-20240606/examples/viewer0000755000000000000000000000231112170624103015214 0ustar rootroot#!/usr/bin/perl -w # $Id: viewer,v 1.3 2013/07/14 22:37:55 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Viewer Widget. use strict; # # Initialize Cdk. # use Cdk; use Getopt::Long; Cdk::init(); our ( $opt_f, $opt_h, $opt_w ); # Get the screen dimensions. my ( $rows, $cols ) = Cdk::getCdkScreenDim(); # Parse the command line options. my $ret = GetOptions( 'f|file:s', 'h|height:i', 'w|width:i' ); my $height = $opt_h || $rows - 2; my $width = $opt_w || $cols; my $filename = $opt_f; # Activate the object. if ( !defined $filename ) { # Create a file selector widget to get the filename. my $fselect = new Cdk::Fselect( 'Label' => "Filename:", 'Height' => $height, 'Width' => $width ); # Get the filename. $filename = $fselect->activate(); } # Open the file and load it up. my @info = qx (cat $filename); chomp @info; # Create the viewer object. my $viewer = new Cdk::Viewer( 'Buttons' => ["<>"], 'Height' => $height, 'Width' => $width ); # Set the contents of the viewer. $viewer->set( 'Title' => "File: $filename", 'Info' => \@info ); # Activate the viewer. my $selection = $viewer->activate(); # End Cdk. Cdk::end(); cdk-perl-20240606/examples/swindow0000755000000000000000000000114112170623474015417 0ustar rootroot#!/usr/bin/perl -w # $Id: swindow,v 1.4 2013/07/14 22:33:32 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Scrolling Window Widget. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Create the scrolling window. my $swindow = new Cdk::Swindow( 'Title' => "Scrolling Window", 'Lines' => 200, 'Height' => 20, 'Width' => -4 ); # Open this file and read myself in. my @info = qx (cat $0); chomp @info; my $line; $swindow->draw(); # Line by line, add the info. foreach $line (@info) { $swindow->addline( 'Info' => $line ); sleep 1; } # Exit Cdk. Cdk::end(); cdk-perl-20240606/examples/dialog0000755000000000000000000000246012170623773015173 0ustar rootroot#!/usr/bin/perl -w # $Id: dialog,v 1.4 2013/07/14 22:36:43 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Dialog Widget. use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Create the dialog buttons. my @buttons = ( "Button 0", "Button 1", "Button 2", "Button 3" ); # Create the dialog message. my @mesg = ( "This should be centered", "This should be on the left.", "This should be on the right." ); # Create the dialog object. my $dialog = new Cdk::Dialog( 'Message' => \@mesg, 'Buttons' => \@buttons, 'Xpos' => "CENTER", 'Ypos' => "CENTER", 'Highlight' => "A_REVERSE" ); # Create a key binding. $dialog->bind( 'Key' => '?', 'Function' => sub { main::callback(); } ); # Activate the object. my $button = $dialog->activate(); # Check the results. if ( !defined $button ) { popupLabel( ["Escape hit. No button selected."] ); } else { popupLabel( ["You selected button $button"] ); } # Exit Cdk. Cdk::end(); # # This is the callback function to the dialog widget. # sub callback { my $label = new Cdk::Label( 'Message' => [ "This is the", "callback to the", "dialog widget." ] ); $label->draw(); $label->wait(); return 1; } cdk-perl-20240606/examples/menu0000755000000000000000000000156012170625207014672 0ustar rootroot#!/usr/bin/perl -w # $Id: menu,v 1.3 2013/07/14 22:47:35 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Menu Widget use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Create the menu list items. my @fMenu = ( "File", "Save", "Open", "Delete", "Exit" ); my @eMenu = ( "Edit", "Cut", "Copy", "Delete", "Paste" ); my @hMenu = ( "Help", "Help", "About..." ); my @menulist = ( \@fMenu, \@eMenu, \@hMenu ); my @menuloc = ( "LEFT", "LEFT", "RIGHT" ); # Create the menu object. my $menu = new Cdk::Menu( 'Menulist' => \@menulist, 'Menuloc' => \@menuloc ); # Activate the object. my ( $menuItem, $submenuItem ) = $menu->activate(); # Check the results. if ( !defined $menuItem ) { popupLabel( ["Escape hit. No menu item selected."] ); } else { popupLabel( ["Item Selected $menulist[$menuItem]->[$submenuItem]"] ); } # End Cdk. Cdk::end(); cdk-perl-20240606/examples/fselect0000755000000000000000000000126212170625464015357 0ustar rootroot#!/usr/bin/perl -w # $Id: fselect,v 1.3 2013/07/14 22:50:28 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk file selector widget. use strict; # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # Create the file selector. my $fselect = new Cdk::Fselect( 'Label' => "Filename:", 'Filler' => "_", 'Height' => 0, 'Width' => 0 ); # Activate the object. $fselect->set( 'ULChar' => "#" ); my $filename = $fselect->activate(); # Check the results. if ( !defined $filename ) { popupLabel( ["You hit escape. No file selected."] ); } else { popupLabel( [ "You selected the following file", "($filename)" ] ); } # Exit Cdk. Cdk::end(); cdk-perl-20240606/examples/mentry0000755000000000000000000000121312170625264015242 0ustar rootroot#!/usr/bin/perl -w # $Id: mentry,v 1.3 2013/07/14 22:48:20 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Mentry Widget use strict; # # Load in the Cdk Extension. # use Cdk; # # Initialize Cdk. # Cdk::init(); # Create the multi-line entry object. my $mentry = new Cdk::Mentry( 'Label' => "Filename: ", 'Width' => 20, 'Prows' => 5, 'Lrows' => 10 ); # Activate the object. my $filename = $mentry->activate(); # Check the results. if ( !defined $filename ) { popupLabel( ["Escape hit. No information returned."] ); } else { popupLabel( [ "You typed in", "$filename" ] ); } # Shut down Cdk. Cdk::end(); cdk-perl-20240606/examples/slider0000755000000000000000000000115112170622401015175 0ustar rootroot#!/usr/bin/perl -w # $Id: slider,v 1.4 2013/07/14 22:24:01 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Slider Widget use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Create the slider object. my $slider = new Cdk::Slider( 'Label' => "Pick A Number: ", 'Filler' => "*", 'Low' => 1, 'High' => 10, 'Width' => 50 ); # Activate the object. my $number = $slider->activate(); # Check the results. if ( !defined $number ) { popupLabel( ["Escape hit. No menu item selected."] ); } else { popupLabel( ["You chose $number"] ); } # Exit Cdk. Cdk::end(); cdk-perl-20240606/examples/graph0000755000000000000000000000134012170626141015021 0ustar rootroot#!/usr/bin/perl -w # $Id: graph,v 1.3 2013/07/14 22:55:29 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Graph Widget. use strict; # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # Create the graph values. my @values = qw (50 0 25 66 41 42 30 49 27); my $chars = "123456789"; # Create the graph object. my $graph = new Cdk::Graph( 'Title' => "Total Breakins", 'Xtitle' => "Count", 'Ytitle' => 'Time Period', 'Height' => -4, 'Width' => -4 ); # Load the object up. $graph->set( 'Values' => \@values, 'GraphChars' => $chars, 'Box' => "FALSE" ); # Draw the graph. $graph->draw(); # Wait until the user hits a key. getc(STDIN); # End Cdk. Cdk::end(); cdk-perl-20240606/fulldemo/0000755000000000000000000000000013432577240013774 5ustar rootrootcdk-perl-20240606/fulldemo/help/0000755000000000000000000000000011733457055014727 5ustar rootrootcdk-perl-20240606/fulldemo/help/itemlist.help0000644000000000000000000002670211733451054017433 0ustar rootrootPurpose The Cdk Itemlist widget allows the user to select a value from a list. This widget is very much like a 1 line scrolling list. Construction Options A itemlist widget is defined using the following syntax. The variable $itemlistObject contains the reference to the itemlist object. $itemlistObject = new Cdk::Itemlist ( options ); The options are defined in the following table. Option Default Value Type Purpose Label Required Scalar The label of the itemlist field. List Required Array Ref The list of items to choose from. Default 0 Scalar The default choice. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Lpos Left Scalar This is the position of the label in the window. Box True Scalar This boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a itemlist widget. $returnValue = $itemlistObject->activate (); The variable $returnValue contains a scalar value which represents the integer value of the corresponding item from the list. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $itemlistObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following demonstrates how to call the set method from the itemlist field. $itemlistObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose List Required Arry Ref The list of items to choose from. Default 0 Scalar The default choice. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $itemlistObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $itemlistObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $itemlistObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $itemlistObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $itemlistObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $itemlistObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $itemlistObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $itemlistObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $itemlistObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $itemlistObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $itemlistObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $itemlistObject->getwin(); Default Key Bindings Key Action Up Arrow Displays the next item in the list. Right Arrow Displays the next item in the list. Space Displays the next item in the list. + Displays the next item in the list. n Displays the next item in the list. Down Arrow Displays the previous item in the list. Left Arrow Displays the previous item in the list. - Displays the previous item in the list. p Displays the previous item in the list. d Sets the list to the default choice. D Sets the list to the default choice. 0 Sets the list to the first choice in the list. $ Sets the list to the last choice in the list. Return Returns the current information in the field and exits the widget. Tab Returns the current information in the field and exits the widget. CTRL-N Returns the current information in the field and exits the widget. CTRL-R Refreshes the screen. Tips & Tricks None. Physical Restrictions Restriction Value Maximum number of items. 500 Example Use Of The Widget #!/usr/local/bin/perl # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # Create a new itemlist object. @list = qw (January Feburary March April May June July August September November December); $month = new Cdk::Itemlist ( 'Label' => "Pick a month: ", 'List' => \@list); # Activate the object. $choice = $month->activate(); # Exit Cdk. Cdk::end(); # Print out the results. print "\n\n\n\n"; print "You selected: <$choice>\n"; <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/template.help0000644000000000000000000002775311733451011017414 0ustar rootrootPurpose The template widget allows the programmer to present a user with an entry field which has a strict format requirement. This widget is best used to retrieve date fields or phone numbers, both of which have a specific format. Construction Options A template widget is defined using the following syntax. The variable $templateObject contains a reference to the template object. $templateObject = new Cdk::Template ( options ); The options are defined in the following table. Option Default Value Type Purpose Label Required Scalar This is the label of the widget. Plate Required Scalar This is the format plate for the entry field. The accepted characters for the plate are listed below. Overlay Required Scalar This is the default background of the template field. For a date field it could be DD/MM/YYYY Lpos Center Scalar This is the position of the label in the widget. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This boolean states whether the dialog box will have a shadow on the box. The Plate option takes a specific format to state which type of character will be accepted at each location. The following table lists the characters and what they mean. Character Meaning # Accepts numeric values only. (0-9) A Alphabetic characters only. (a-zA-Z) C Alphabetic characters only. This will force the character to upper case. c Alphabetic characters only. This will force the character to lower case. X Mixed upper case characters. x Mixed lower case characters. Anything else. Used as plate information. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a template widget. $returnValue = $templateObject->activate (); The variable $returnValue is the string value of what was typed in the field. It does not have the overlay characters mixed in with it. This means that if a date field were used and the plate looked like ##/##/#### and the overlay looked like DD-MM-YYYY and the date June 1 1968 were typed in, then the resultant value would be 01061968 To mix the field value and the overlay, call the mix method. Calling the mix method on the above example would result in 01-06-1968 inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $templateObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $templateObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Value Required Scalar Sets the value of the field. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $templateObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $templateObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $templateObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $templateObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $templateObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $templateObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $templateObject->erase (); mix This method returns a mixed value of the template field value and the overlay. The following example demonstrates how to call the mix method. $mixedValue = $templateObject(); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $templateObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $templateObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $templateObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $templateObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $templateObject->getwin(); Default Key Bindings Key Action Delete Deletes the last character in the field. Backspace Deletes the last character in the field. Return Leaves the widget and returns the field value. Tab Leaves the widget and returns the field value. CTRL-N Leaves the widget and returns the field value. CTRL-R Refreshes the screen. Tips & Tricks None. Physical Restrictions None. Example Use Of The Widget #!/usr/local/bin/perl # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # Create the template object. $template = new Cdk::Template ( 'Label' => 'Type in a date:', 'Plate' => '## ## ####', 'Overlay' => 'DD-MM-YYYY'); # Activate the widget. $date = $template->activate(); $mixedDate = $template->mix(); # Exit Cdk. Cdk::end(); # Print out the info. print "\n\n\n"; print "Without Overlay Mixing: $date\n"; print "With Overlay Mixing : $mixedDate\n"; <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/fselect.help0000644000000000000000000003135411733450560017226 0ustar rootrootPurpose The Cdk file selector widget allows the user to select a valid file using a full screen interface. Construction Options The file selector widget is defined using the following syntax. The variable $fselectObject contains the reference to the entry object. $fselectObject = new Cdk::Fselect ( options ); The options are defined in the following table. Option Default Value Type Purpose Label Required Scalar The label of the widget. Height Required Scalar The height of the widget. Width Required Scalar The width of the widget. Dattrib Normal Scalar The display attributes of a directory inside the scroll region. Fattrib Normal Scalar The display attributes of a file inside the scroll region. Lattrib Normal Scalar The display attributes of a link inside the scroll region. Sattrib Normal Scalar The display attributes of a socket inside the scroll region. Highlight Reverse Scalar The highlight attribute of the scrolling list. Fieldattr Normal Scalar The attribute of the characters typed in. Filler . Scalar The default field character. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a entry widget. $returnValue = $fselectObject->activate (); The variable $returnValue contains a scalar value of what was typed into the entry field. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $fselectObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following demonstrates how to call the set method from the entry field. $fselectObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Directory Required Scalar The directory to display. Dattrib Normal Scalar The display attributes of a directory inside the scroll region. Fattrib Normal Scalar The display attributes of a file inside the scroll region. Lattrib Normal Scalar The display attributes of a link inside the scroll region. Sattrib Normal Scalar The display attributes of a socket inside the scroll region. Highlight Reverse Scalar The highlight attribute of the scrolling list. Fieldattr Normal Scalar The attribute of the characters typed in. Filler . Scalar The default field character. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $fselectObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $fselectObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $fselectObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $fselectObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $fselectObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $fselectObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $fselectObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $fselectObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $fselectObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $fselectObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $fselectObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $fselectObject->getwin(); Default Key Bindings Since this widget is 'driven' by the entry field the default key bindings of that widget apply. There are others which have been applied, they are listed below. Key Action Return If the file is a directory, then the file selector will change directories. Otherwise the widget will return the full pathname of the selected file. TAB Displays intformation about the currnetly highlighted file. Key Up Scrolls the list one item backward. Page Up Scrolls the list one page backward. CTRL-B Scrolls the list one page backward. Key Down Scrolls the list one line forward. Page Down Scrolls the list one page forward. CTRL-F Scrolls the list one page forward. Escape Exits the widget and returns undef. Tips & Tricks None. Physical Restrictions Same as the scrolling list. Example Use Of The Widget <#HL(70)> Document Created: December, 1995 Document Revised: March, 1996 Document Revised: June, 1996 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/matrix.help0000644000000000000000000003002311733450607017077 0ustar rootrootPurpose The matrix widget allows a programmer to create and use a complex matrix. The matrix allows the user to enter in information in each cell and have all of the information returned. Construction Options A matrix widget is defined using the following syntax. The variable $matrixObject contains the reference to the matrix object. $matrixObject = new Cdk::Matrix ( options ); The options are defined in the following table. Option Default Value Type Purpose Rowtitles Required Array Ref The row titles. Coltitles Required Array Ref The column titles. Colwidths Required Array Ref The column widths. Coltypes Required Array Ref The display types of the columns. (see display help for more information) Vrows Required Scalar The number of rows seen on the screen. Vcols Required Scalar The number of columns seen on the screen. Rowspace 1 Scalar The amount of space between the rows. Colspace 1 Scalar The amount of space between the columns. Filler . Scalar The default cell fill character. Fillattr Normal Scalar The attribute of the default fill character. Dominant None Scalar The dominant row. This applies to when colors are applied to rows and columns. If there is a conflict, one takes precedence over the other. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Boxcell True Scalar This states that the individual cells are to be boxed. Boxmatrix False Scalar This states that the whole matrix is to be boxed. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a matrix widget. $listReference = $matrixObject->activate (); The variable $listReference contains a reference to a list of lists which contains the information within the matrix. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $matrixObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $matrixObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Values Required Array Ref This is a reference to an array of new values to be stored in the matrix. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $matrixObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $matrixObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $matrixObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $matrixObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $matrixObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $matrixObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $matrixObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $matrixObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $matrixObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $matrixObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $matrixObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $matrixObject->getwin(); Default Key Bindings Key Action Backspace Deletes the last character in the current cell. Delete Deletes the last character in the current cell. Right Arrow Moves the to the next cell on the right. Return Moves the to the next cell on the right. Left Arrow Moves the to the next cell on the left. Up Arrow Moves the to the next cell one row up. Down Arrow Moves the to the next cell one row down. Next Page Moves to the next screen of cells. CTRL-F Moves to the next screen of cells. Prev Page Moves to the previous screen of cells. CTRL-B Moves to the previous screen of cells. CTRL-G Jumps to a specific cell. CTRL-P Pastes the contents of the paste buffer in the current cell. CTRL-T Copies the contents of the current cell in the paste buffer. CTRL-E Erases the complete cell. CTRL-K Cuts the contents of the current cell and stores it in the paste buffer. CTRL-R Refreshes the screen. Tab Moves the to the next cell on the right. Escape Exits the Tips & Tricks You can have more than one column of row titles by setting certain columns to ViewOnly. This makes it appear like there are actually 2 matrices in one. Physical Restrictions Restriction Value Maximum Number of Rows 1000 Maximum Number of Columns 1000 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/dialog.help0000644000000000000000000002714711733450471017046 0ustar rootrootPurpose The Cdk Dialog widget allows the user to pick from a number of options using buttons provided. The dialog box presents a message, and a list of options using the buttons. Construction Options A dialog widget is defined using the following syntax. The variable $dialogObject contains the reference to the dialog object. $dialogObject = new Cdk::Dialog ( options ); The options are defined in the following table. Option Default Value Type Purpose Mesg Required List Ref This is the message which is displayed in the dialog box. Buttons Required List Ref This is a list of the button labels. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Highlight Reverse Scalar The highlight attribute of the currently selected button. Separator True Scalar This Boolean value states whether a separator will be drawn between the message and the buttons. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a dialog widget. $returnValue = $dialogObject->activate (); The variable $returnValue contains an integer value representing which button was actually selected. The value starts at zero and goes up. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $dialogObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $dialogObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Highlight Required Scalar Changes the current highlight attribute. Separator Required Scalar Changes the current value for the separator flag. Box True Scalar Changes the current value for the box flag. draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $dialogObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $dialogObject->erase (); bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $dialogObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $dialogObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $alphalistObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $dialogObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $alphalistObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $dialogObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $dialogObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $dialogObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $dialogObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $dialogObject->getwin(); Default Key Bindings Key Action Left Arrow Highlights the button to the left of the currently highlighted button. Right Arrow Highlights the button to the right of the currently highlighted button. Space Highlights the button to the right of the currently highlighted button. Return Exits the widget and returns a value representing the selected button. The range of the value is from 0 to the number of buttons -1. Tab Exits the widget and returns a value representing the selected button. The range of the value is from 0 to the number of buttons -1. Escape Exits the dialog widget and returns undef. CTRL-R Refreshes the screen. Tips & Tricks If you pass the dialog with no message and no separator, the dialog box appears be a tool bar. Physical Restrictions Restriction Value Maximum message rows. 50 Maximum dialog buttons. 25 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: January, 1996 Document Revised: June, 1996 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/mentry.help0000644000000000000000000002715511733451011017113 0ustar rootrootPurpose The mentry widget is a multiple line entry field. This allows the programmer to put widgets in the scripts which have long or lengthy fields. This is very appropriate for a description field. Construction Options A mentry widget is defined using the following syntax. The variable $mentryObject contains a reference to the mentry object. $mentryObject = new Cdk::Mentry ( options ); The options are defined in the following table. Option Default Value Type Purpose Label Required Scalar This is the label to the widget. Width Required Scalar This is the field width. Prows Required Scalar This specifies the number of physical rows to the widget. Lrows Required Scalar This specifies the number of logical rows to the widget. Min 0 Scalar The minimum number of characters that need to be entered. Dtype Mixed Scalar This is the display type of the entry field. (see display help for more information) Filler . Scalar This is the default character in the field. Fillattr Normal Scalar This sets the attributes of the filler character. Lpos Left Scalar This is the position of the label. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a mentry widget. $returnValue = $mentryObject->activate (); The variable $returnValue will contain the value typed into the entry field. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $mentryObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $mentryObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Value Required Scalar Sets the value in the entry field. Min Same as set value Scalar Sets the minimum number of characters which need to be entered. Box True Scalar Changes the Boolean value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $mentryObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $mentryObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $mentryObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $mentryObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $mentryObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $mentryObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $mentryObject->erase (); clean This method cleans the information from the entry field. The following example demonstrates how to call the clean method. $mentryObject->clean(); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $mentryObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $mentryObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $mentryObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $mentryObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $mentryObject->getwin(); Default Key Bindings Key Action Left Arrow Moves the cursor left one character. Right Arrow Moves the cursor right one character. Down Arrow Moves the cursor up down row. Up Arrow Moves the cursor up one row. Backspace Deletes the character to the left of the cursor. Delete Deletes the character to the left of the cursor. Return Exits the widget and returns the contents of the field. Tab Exits the widget and returns the contents of the field. Escape Exits the widget and returns undef. CTRL-R Refreshes the screen. Tips & Tricks The label can be put on the left, right, top or bottom of the field, allowing for a more dynamic placement of the label itself. Setting the Dtype variable to a hidden type creates an entry field suitable for a password. Physical Restrictions Restriction Value Maximum number of rows 1000 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/selection.help0000644000000000000000000002676411733451011017567 0ustar rootrootPurpose The selection widget allows the user to add a selection list in their script. Construction Options A selection widget is defined using the following syntax. The variable $selectionObject contains a reference to the selection object. $selectionObject = new Cdk::Radio ( options ); The options are defined in the following table. Option Default Value Type Purpose Title Required Scalar The title of the selection list. List Required Array Ref The list of items in the list. Choices Required Array Ref The list of choices for each item in the list. Height Required Scalar The height of the selection list. Width Required Scalar The width of the selection list. Highlight Reverse Scalar The attribute of the currently highlighted item. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a selection widget. $returnValue = $selectionObject->activate (); The variable $returnValue will contain a integer value representing the number of the chosen item. The numbers start at zero and go up. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $selectionObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $selectionObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Defaults Required Array Ref A list of values stating which items are to be given which value. Highlight Required Scalar The attribute of the currently highlighted item. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $selectionObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $selectionObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $selectionObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $selectionObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $selectionObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $selectionObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $selectionObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $selectionObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $selectionObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $selectionObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $selectionObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $selectionObject->getwin(); Default Key Bindings Key Action Space Cycles the selection for the current item, to the next selection. Up Arrow Moves the cursor to one item up. Down Arrow Moves the cursor to one item down. Right Arrow Scrolls the whole list one character to the right. Left Arrow Scrolls the whole list one character to the left. Previous Page Moves the complete list one screen backwards. CTRL-B Moves the complete list one screen backwards Next Page Moves the complete list one screen forwards. CTRL-F Moves the complete list one screen forwards. g Moves to the top of the list. 1 Moves to the top of the list. G Moves to the bottom of the list. $ Scrolls complete list as far left as possible. | Scrolls complete list as far right as possible. Return Exits the widget and returns the current selection. Tab Exits the widget and returns the current selection. Escape Exits the widget and returns undef. CTRL-R Refreshes the screen. Tips & Tricks Calling the set method with the Defaults parameter will set the values of the selection list before activation. Physical Restrictions Restriction Value Maximum number of items. 500 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/scale.help0000644000000000000000000002767311733451011016671 0ustar rootrootPurpose The scale widget is a widget which allows a user to select an integer value. The scale widget forces the user to choose a value between a predetermined high and low, which eliminates the need to check if the person has typed in a valid value. Construction Options A scale widget is defined using the following syntax. The variable $scaleObject contains a reference to the scale object. $scaleObject = new Cdk::Scale ( options ); The options are defined in the following table. Option Default Value Type Purpose Label Required Scalar The label to the scale widget. Low Required Scalar The low value of the scale widget. High Required Scalar The high value of the scale widget. Width Width of High Scalar The width of the field. Inc 1 Scalar The increment value. Fastinc 5 Scalar The accelerated increment value. Start Low Value Scalar The starting value. Fattrib Normal Scalar The attribute of the field value. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a scale widget. $returnValue = $scaleObject->activate (); The variable $returnValue is the value of the field when the widget exits. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $scaleObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $scaleObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Low Required Scalar Sets the low value of the widget. High Required Scalar Sets the high value of the widget. Value Required Scalar Sets the current value of the widget. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $scaleObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $scaleObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $scaleObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $scaleObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $scaleObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $scaleObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $scaleObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $scaleObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $scaleObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $scaleObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $scaleObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $scaleObject->getwin(); Default Key Bindings Key Action Left Arrow Decrements the current value by the standard value. Down Arrow Decrements the current value by the standard value. d Decrements the current value by the standard value. - Decrements the current value by the standard value. Right Arrow Increments the current value by the standard value. Up Arrow Increments the current value by the standard value. u Increments the current value by the standard value. + Increments the current value by the standard value. Prev Page Decrements the current value by the accelerated value. U Decrements the current value by the accelerated value. CTRL-B Decrements the current value by the accelerated value. Next Page Increments the current value by the accelerated value. D Increments the current value by the accelerated value. CTRL-F Increments the current value by the accelerated value. Home Sets the field value to the low value. g Sets the field value to the low value. 0 Sets the field value to the low value. End Sets the field value to the high value. G Sets the field value to the high value. $ Sets the field value to the high value. Return Exits the widget and returns the field value. Tab Exits the widget and returns the field value. Escape Exits the widget and returns undef. CTRL-R Refreshes the screen. Tips & Tricks None. Physical Restrictions None. Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/postprocess.help0000644000000000000000000000412511733451011020151 0ustar rootrootThe postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $alphalistObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $widget->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> The following code segment demonstrates how to use the post-process method. <#HL(70)> Document Created: July, 1996 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/marquee.help0000644000000000000000000000763106634015407017242 0ustar rootrootPurpose The marquee widget creates a scrolling marquee on the screen. This helps to emphasize a point or draw attention to something. Construction Options A marquee widget is defined using the following syntax. The variable $marqueeObject contains the reference to the marquee object. $marqueeObject = new Cdk::Marquee ( options ); The options are defined in the following table. Option Default Value Type Purpose Width Required Scalar This is the actual width of the marquee window. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a marquee widget. $marqueeObject->activate ( options ); The options are defined in the following table. Option Default Value Type Purpose Mesg Required Scalar This is the message to display in the marquee. Delay Required Scalar This is a value telling the marquee how long to wait before moving the message. Repeat Required Scalar This states how many times the message will scroll across the marquee. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $marqueeObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $marqueeObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $marqueeObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $marqueeObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $marqueeObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $marqueeObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $marqueeObject->getwin(); Tips & Tricks None. Physical Restrictions None. Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 cdk-perl-20240606/fulldemo/help/preprocess.help0000644000000000000000000000441511733451011017754 0ustar rootrootThe preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $alphalistObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $widget->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The following code segment demonstrates this principle. <#HL(70)> Document Created: July, 1996 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/debug.help0000644000000000000000000000243706634015407016670 0ustar rootrootThe Cdk Perl5 extension has a somewhat powerful diagnostics element associated with it. It really needs it because of the behavior of Cdk. Cdk was written using curses; and one of the behaviors set when using Cdk is that noecho is turned on. This means that whenever a character is printed to the screen using print or printf they won't show up. This means another method of diagnostics must be provided. Cdk::Diag Module: The Cdk::Diag module currently only has one method: Log. It writes to the log file if diagnostics has been turned on. If diagnostics has been turned on, the performance of the Cdk Perl script will take a severe performance hit, depending on how many diagnostics are turned on. Turning on the Diagnostics: To turn the diagnostics on, there is an environment variable called CDKDIAG which needs to be set. This currently only really supports one value: ALL. There is work being done right now so diagnostics can be turned on by method name, class name, required values only, default values only, methods called.... Diagnostic File: The default diagnostic filename is cdkdiag.log but can be changed by setting the environment variable CDKLOGFILE. <#HL(70)> Document Created: June, 1995 cdk-perl-20240606/fulldemo/help/charfile.help0000644000000000000000000000342211733457055017357 0ustar rootroot Cdk has the ability to add in special drawing characters into basic text using format commands. The characters and their respective format commands are listed in the following table. Table of Cdk's Drawing Characters <#UL><#HL(18)><#TT><#HL(5)><#TT><#HL(7)><#UR> <#VL>Description <#VL>Code <#VL>Display<#VL> <#VL>Horizontal Line <#VL>\<\#HL><#VL> <#HL> <#VL> <#VL>Vertical Line <#VL>\<\#VL><#VL> <#VL> <#VL> <#VL>Upper Left Corner <#VL>\<\#UL><#VL> <#UL> <#VL> <#VL>Upper Right Corner<#VL>\<\#UR><#VL> <#UR> <#VL> <#VL>Lower Left Corner <#VL>\<\#LL><#VL> <#LL> <#VL> <#VL>Lower Right Corner<#VL>\<\#LR><#VL> <#LR> <#VL> <#VL>Left Tee <#VL>\<\#LT><#VL> <#LT> <#VL> <#VL>Right Tee <#VL>\<\#RT><#VL> <#RT> <#VL> <#VL>Bottom Tee <#VL>\<\#BT><#VL> <#BT> <#VL> <#VL>Top Tee <#VL>\<\#TT><#VL> <#TT> <#VL> <#VL>Plus <#VL>\<\#PL><#VL> <#PL> <#VL> <#VL>Plus/Minus <#VL>\<\#PM><#VL> <#PM> <#VL> <#VL>Degree <#VL>\<\#DG><#VL> <#DG> <#VL> <#VL>Checker Board <#VL>\<\#CB><#VL> <#CB> <#VL> <#VL>Diamond <#VL>\<\#DI><#VL> <#DI> <#VL> <#VL>Bullet <#VL>\<\#BU><#VL> <#BU> <#VL> <#LL><#HL(18)><#BT><#HL(5)><#BT><#HL(7)><#LR> If you want more than one special character to appear, an optional numeric repeat argument can be used. For example, if you wanted to draw 70 horizontal line characters in a row, typing in \<\#HL> 70 times is excessive. To do this use a numeric repeat value like \<\#HL(70)>. This tells Cdk to draw the horizontal line character 70 times. This is how the line below is drawn. <#HL(70)> Document Created: January, 1996 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/swindow.help0000644000000000000000000003055111733451011017261 0ustar rootrootPurpose A scrolling window widget allows the programmer to display a scrolling message window. This widget allows a programmer to add current messages to the window. This type of widget is best used for a log file. Construction Options A swindow widget is defined using the following syntax. The variable $swindowObject contains a reference to the swindow object. $swindowObject = new Cdk::Swindow ( options ); The options are defined in the following table. Option Default Value Type Purpose Title Required Scalar The title of the scrolling window. Lines Required Scalar The number of lines to keep. Height Required Scalar The height of the scrolling window. Width Required Scalar The width of the scrolling window. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a swindow widget. $swindowObject->activate (); inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $swindowObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $swindowObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Info Required Array Ref Sets the contents of the window. Lines Required Scalar Sets the number of lines to keep. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $swindowObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $swindowObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $swindowObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $swindowObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $swindowObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $swindowObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. addline This method adds a line to the scrolling window. The following example demonstrates how to call the addline method. $swindowObject->addline ( options ); The options are defined in the following table. Option Default Value Type Purpose Info Required Scalar The information to add to the window. Position Bottom Scalar The location where the information is to be added. trim This method trims the information maintained by the srolling window. The following example demonstrates how to call the trim method. $swindowObject->trim ( options ); The options are defined in the following table. Option Default Value Type Purpose Start Required Scalar This is the first line to trim from. Finish Required Scalar This is the last line to trim from. get This method returns the information currently in the srolling window. The following example demonstrates how to call the get method. @information = $swindowObject->get (); erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $swindowObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $swindowObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $swindowObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $swindowObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $swindowObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $swindowObject->getwin(); Default Key Bindings Key Action Up Arrow Scrolls the window up by one line. Down Arrow Scrolls the window down by one line. Right Arrow Scrolls the window right by one line. Left Arrow Scrolls the window left by one line. Prev Page Displays the previous page. CTRL-B Displays the previous page. B Displays the previous page. b Displays the previous page. Next Page Displays the next page. CTRL-F Displays the next page. Space Displays the next page. F Displays the next page. f Displays the next page. Home Moves to the far left of the window. | Moves to the far left of the window. End Moves to the far right of the window. $ Moves to the far right of the window. g Moves to the top of the window. 1 Moves to the top of the window. G Moves to the bottom of the window. L Moves halfway to the bottom of the scrolling window. l Moves halfway to the top of the scrolling window. Return Exits the scrolling window. Tab Exits the scrolling window. CTRL-R Refreshes the screen. Tips & Tricks None. Physical Restrictions Restriction Value Maximum number of lines. 300 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: June, 1995 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/concepts.help0000644000000000000000000000340706634015407017416 0ustar rootroot There are a few concepts that have to be understood before effecitively writing applications using the Perl5 Cdk extension. This document will try to clear the air on any 'funny' behavior you may experience using Cdk. Screens Cdk uses a concept of a screen. When a widget is created it automagically registers itself with the screen. When it dies it automagically removes itself from the screen. If at any time you refresh the screen, and a widget appears that you don't want, it means it is still registered. Stricter Variable Localization If you want a widget to remove itself from the screen, you can use the Perl command undef to destroy the widget object by hand. The easiest method to do this is to use strict variable localization. (ie: only have the widget variables exist as long as you need them to) Widget Mapping Widget mapping is performed by the Cdk function Cdk::refreshCdkScreen(). This function remaps all the widgets it knows about. This almost eradicates the need to call the object methods draw and erase. These are included to remain as consistent and flexible as the C version. Character Input To get character input yourself, the function Cdk::getch() was added. Though it is not meant to replace the standard method of getting characters in Perl, it can be used still. The main reason why I included this was to be consistent with Curses. Raw Mode You can put the terminal into raw mode by calling Cdk::raw(). This allows you to interrupt special control characters like c, d and z. To get out of raw mode call Cdk::noraw(). This will restore the terminal back. <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 cdk-perl-20240606/fulldemo/help/scroll.help0000644000000000000000000002650611733451011017072 0ustar rootrootPurpose The scroll widget allows the user to add a scrolling list in their script. Construction Options A scroll widget is defined using the following syntax. The variable $scrollObject contains a reference to the scroll object. $scrollObject = new Cdk::Radio ( options ); The options are defined in the following table. Option Default Value Type Purpose Title Required Scalar The title of the scroll list. List Required Array Ref The list of items in the list. Height Required Scalar The height of the scroll list. Width Required Scalar The width of the scroll list. Numbers False Scalar Adds numbers to the items in the list. Highlight Reverse Scalar The attribute of the currently highlighted item. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a scroll widget. $returnValue = $scrollObject->activate (); The variable $returnValue will contain a integer value representing the number of the chosen item. The numbers start at zero and go up. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $scrollObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $scrollObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Highlight Required Scalar The attribute of the currently highlighted item. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $scrollObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $scrollObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $scrollObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $scrollObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $scrollObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $scrollObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $scrollObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $scrollObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $scrollObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $scrollObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $scrollObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $scrollObject->getwin(); Default Key Bindings Key Action Up Arrow Moves the cursor to one item up. Down Arrow Moves the cursor to one item down. Right Arrow Scrolls the whole list one character to the right. Left Arrow Scrolls the whole list one character to the left. Previous Page Moves the complete list one screen backwards. CTRL-B Moves the complete list one screen backwards Next Page Moves the complete list one screen forwards. CTRL-F Moves the complete list one screen forwards. g Moves to the top of the list. 1 Moves to the top of the list. G Moves to the bottom of the list. $ Scrolls complete list as far left as possible. | Scrolls complete list as far right as possible. Return Exits the widget and returns the current selection. Tab Exits the widget and returns the current selection. Escape Exits the widget and returns undef. CTRL-R Refreshes the screen. Tips & Tricks You can make the scrolling list look like a menu list by turning on the numbers option and creating the window the size of the list. This works best if the list isn't too long so the whole list can be shown. Physical Restrictions Restriction Value Maximum number of items. 500 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/radio.help0000644000000000000000000002674611733451011016700 0ustar rootrootPurpose The radio widget allows the programmer to create a radio list. The radio widget acts very similar to the scrolling list. In fact the radio list is a scrolling list, just with the extra feature of a visual selection. Construction Options A radio widget is defined using the following syntax. The variable $radioObject contains a reference to the radio object. $radioObject = new Cdk::Radio ( options ); The options are defined in the following table. Option Default Value Type Purpose Title Required Scalar The title of the radio list. List Required Array Ref The list of items in the list. Height Required Scalar The height of the radio list. Width Required Scalar The width of the radio list. Choice X Scalar The choice character. Cattr Normal Scalar The attribute of the choice character. Default 0 Scalar The default item in the list. Highlight Reverse Scalar The attribute of the currently highlighted item. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a radio widget. $returnValue = $radioObject->activate (); The variable $returnValue will contain a integer value representing the number of the chosen item. The numbers start at zero and go up. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $radioObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $radioObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Highlight Required Scalar The attribute of the currently highlighted item. Choice Required Scalar The choice character. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $radioObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $radioObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $radioObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $radioObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $radioObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $radioObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $radioObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $radioObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $radioObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $radioObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $radioObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $radioObject->getwin(); Default Key Bindings Key Action Up Arrow Moves the cursor to one item up. Down Arrow Moves the cursor to one item down. Tab Moves the cursor to one item down. Right Arrow Scrolls the whole list one character to the right. Left Arrow Scrolls the whole list one character to the left. Previous Page Moves the complete list one screen backwards. CTRL-B Moves the complete list one screen backwards Next Page Moves the complete list one screen forwards. CTRL-F Moves the complete list one screen forwards. g Moves to the top of the list. 1 Moves to the top of the list. G Moves to the bottom of the list. $ Scrolls complete list as far left as possible. | Scrolls complete list as far right as possible. Space Selects the current item. Return Exits the widget and returns the current selection. CTRL-R Refreshes the screen. Tips & Tricks Setting the default value sets that value on when the radio list is activated. Physical Restrictions Restriction Value Maximum number of items. 500 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/binding.help0000644000000000000000000000116106634015407017205 0ustar rootrootAll interactive widgets have the ability to bind specific keys to specific functions. This allows programmers to customize the widgets to perform specific actions when a key is hit. The following example demonstrates how to call the bind function. $widget->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. Example Use Of The Bind Method <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 cdk-perl-20240606/fulldemo/help/slider.help0000644000000000000000000003015411733451011017050 0ustar rootrootPurpose The slider widget is a widget which allows a user to select an integer value. The slider widget forces the user to choose a value between a predetermined high and low, which eliminates the need to check if the person has typed in a valid value. The difference between this widget and the slider widget is this widget displays a bar which represents the current value. Construction Options A slider widget is defined using the following syntax. The variable $sliderObject contains a reference to the slider object. $sliderObject = new Cdk::Slider ( options ); The options are defined in the following table. Option Default Value Type Purpose Label Required Scalar The label to the slider widget. Low Required Scalar The low value of the slider widget. High Required Scalar The high value of the slider widget. Width Required Scalar The width of the field. Inc 1 Scalar The increment value. Fastinc 5 Scalar The accelerated increment value. Start Low Value Scalar The starting value. Filler Reverse Space Scalar The character which will be used for the scale. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Lpos Left Scalar This is the position of the label in the widget. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a slider widget. $returnValue = $sliderObject->activate (); The variable $returnValue is the value of the field when the widget exits. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $sliderObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $sliderObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Low Required Scalar Sets the low value of the widget. High Required Scalar Sets the high value of the widget. Value Required Scalar Sets the current value of the widget. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $sliderObject->bind ( options ); The options are defined in the following table. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $sliderObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $sliderObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $sliderObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $sliderObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $sliderObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $sliderObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $sliderObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $sliderObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $sliderObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $sliderObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $sliderObject->getwin(); Default Key Bindings Key Action Left Arrow Decrements the current value by the standard value. Down Arrow Decrements the current value by the standard value. d Decrements the current value by the standard value. - Decrements the current value by the standard value. Right Arrow Increments the current value by the standard value. Up Arrow Increments the current value by the standard value. u Increments the current value by the standard value. + Increments the current value by the standard value. Prev Page Decrements the current value by the accelerated value. U Decrements the current value by the accelerated value. CTRL-B Decrements the current value by the accelerated value. Next Page Increments the current value by the accelerated value. D Increments the current value by the accelerated value. CTRL-F Increments the current value by the accelerated value. Home Sets the field value to the low value. g Sets the field value to the low value. 0 Sets the field value to the low value. End Sets the field value to the high value. G Sets the field value to the high value. $ Sets the field value to the high value. Return Exits the widget and returns the field value. Tab Exits the widget and returns the field value. Escape Exits the widget and returns undef. CTRL-R Refreshes the screen. Tips & Tricks None. Physical Restrictions None. Example Use Of The Widget <#HL(70)> Document Created: June, 1996 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/special.help0000644000000000000000000000215411733456610017217 0ustar rootrootSpecial Display Keywords There are a number of special keywords which can be added into any string in Cdk which will highlight characters. Cdk has the ability to BOLD, UNDERLINE, Reverse, Blink, Standout, Dim, and many colors To turn on highlighting the format command \<\/XX> is used. To turn off formatting the command \<\!XX> is used. The following table lists all of the display attributes available through Cdk, and how to turn them on. <#UL><#HL(8)><#TT><#HL(11)><#UR> <#VL>Command <#VL> Attribute <#VL> <#VL>\<\/N> <#VL> Normal <#VL> <#VL>\<\/B> <#VL> Bold <#VL> <#VL>\<\/R> <#VL> Reverse <#VL> <#VL>\<\/U> <#VL> Underline <#VL> <#VL>\<\/K> <#VL> Blink <#VL> <#VL>\<\/S> <#VL> Standout <#VL> <#VL>\<\/D> <#VL> Dim <#VL> <#LL><#HL(8)><#BT><#HL(11)><#LR> <#HL(70)> Document Created: January, 1996 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/bugs.help0000644000000000000000000000042706634015407016537 0ustar rootrootKnown Bugs Currently there are no bugs that I know of. I'm sure once people start playing with this extension, bugs will be found. Happy hunting. :) (of course the documentation may be a wee bit out of date. :) ) <#HL(70)> Document Created: November, 1995 cdk-perl-20240606/fulldemo/help/viewer.help0000644000000000000000000002025211733450433017074 0ustar rootrootPurpose This widget provides a way to view any text file. The text file can contain Cdk display commands, or be a regular text file. Construction Options A viewer widget is defined using the following syntax. The variable $viewerObject contains a reference to the viewer object. $viewerObject = new Cdk::Viewer ( options ); The options are defined in the following table. Option Default Value Type Purpose Buttons Required Array Ref This is an array of the button labels. Height Required Scalar The height of the window. Width Required Scalar The width of the window. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a viewer widget. $returnValue = $viewerObject->activate ( options ); Option Default Value Type Purpose Title Required Scalar The title of the viewer widget. Info Required Array Ref The information contained inside the viewer. Highlight Reverse Scalar The attribute of the currently highlighted button. Interp True Scalar This is a Boolean flag specifying whether or not the file being read in should have the contents interpreted for the Cdk display codes. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. The variable $returnValue is the numeric value of the button chosen. The value starts at 0 and goes up. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $viewerObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $viewerObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Highlight Reverse Scalar The attribute of the currently highlighted button. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $viewerObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $viewerObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $viewerObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $viewerObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $viewerObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $viewerObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $viewerObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $viewerObject->getwin(); Default Key Bindings Key Action Tab Selects the next button. Up Arrow Moves the cursor to one line up. Down Arrow Moves the cursor to one line down. Tab Moves the cursor to one line down. Right Arrow Scrolls the view one character to the right. Left Arrow Scrolls the view list one character to the left. Previous Page Moves one screen backwards. CTRL-B Moves one screen backwards Next Page Moves one screen forwards. Space Moves one screen forwards. CTRL-F Moves one screen forwards. g Moves to the top of the viewer. 1 Moves to the top of the viewer. G Moves to the bottom of the viewer. End Scrolls complete viewer as far left as possible. $ Scrolls complete viewer as far left as possible. Home Scrolls complete viewer as far right as possible. | Scrolls complete viewer as far right as possible. L Moves halfway to the bottom of the viewer. l Moves halfway to the top of the viewer. ? Searches upwards for given text. / Searches downwards for given text. n Performs last search, in the same direction. : Jumps to a given line. i Displays information about the current file in viewer. s Displays information about the current file in viewer. Return Exits the widget and returns the current selection. Tab Exits the widget and returns the current selection. Escape Exits the widget and returns undef. CTRL-R Refreshes the screen. Tips & Tricks None. Physical Restrictions Restriction Value Maximum number of lines. 10000 Maximum number of buttons. 50 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/graph.help0000644000000000000000000001001706634015407016674 0ustar rootrootPurpose The graph widget allows the programmer to create X/Y graphs easily. Construction Options A graph widget is defined using the following syntax. The variable $graphObject contains the reference to the graph object. $graphObject = new Cdk::Graph ( options ); The options are defined in the following table. Option Default Value Type Purpose Title Required Scalar The title of the whole graph. Xtitle Required Scalar The title of the X axis. Ytitle Required Scalar The title of the Y axis. Height Required Scalar The height of the graph. Width Required Scalar The width of the graph. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Available Methods set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $graphObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Values Required List Ref This is the list of values to display. GraphChars List of Characters Scalar This is a scalar variable containing characters for each plot point. StartAtZero True Scalar This states whether the graph should start at zero or not. Plottype Line Scalar This is the type of graph to draw; line or plot. draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $graphObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $graphObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $graphObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $graphObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $graphObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $graphObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $graphObject->getwin(); Default Key Bindings None. Tips & Tricks None. Physical Restrictions Restriction Value Maximum number of values 10000 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: March, 1996 cdk-perl-20240606/fulldemo/help/alphalist.help0000644000000000000000000002627411733450034017563 0ustar rootrootPurpose The Cdk alphalist widget allows the user to select an item in a list. This widget allows the user to type in letters to refine and narrow the search. When a character is typed into the entry field, the scrolling list looks for the first word which matches the string in the entry field. You can continue to narrow the search by typing in more letters. Construction Options The alphalist widget is defined using the following syntax. The variable $alphalistObject contains the reference to the entry object. $alphalistObject = new Cdk::Alphalist ( options ); The options are defined in the following table. Option Default Value Type Purpose Label Required Scalar This is the label of the widget. List Required Array Ref This is the list of words to choose from. Height Required Scalar The height of the widget. Width Required Scalar The width of the widget. Highlight Reverse Scalar The highlight attribute of the scrolling list. Filler . Scalar The default field character. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a entry widget. $returnValue = $alphalistObject->activate (); The variable $returnValue contains a scalar value of what was typed into the entry field. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $alphalistObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following demonstrates how to call the set method from the entry field. $alphalistObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose List Required Array Ref This is the list of words to choose from. Highlight Reverse Scalar The highlight attribute of the scrolling list. Filler . Scalar The default field character. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $alphalistObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $alphalistObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $alphalistObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $alphalistObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $alphalistObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $alphalistObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $alphalistObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $alphalistObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $alphalistObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $alphalistObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $alphalistObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $alphalistObject->getwin(); Default Key Bindings Since this widget is 'driven' by the entry field, the default key bindings of the entry field apply to this widget. There are however extra bindings which have been applied. They are as follows: Key Action TAB Tries to complete the word in the entry field. Key Up Scrolls the list one item backward. Page Up Scrolls the list one page backward. CTRL-B Scrolls the list one page backward. Key Down Scrolls the list one line forward. Page Down Scrolls the list one page forward. CTRL-F Scrolls the list one page forward. Return Returns what is currently displayed in the entry field. Escape Exits the widget and returns undef. Tips & Tricks None. Physical Restrictions Same as the scrolling list. Example Use Of The Widget <#HL(70)> Document Created: June, 1996 Document Revised: July, 1996 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/menu.help0000644000000000000000000002060011733451011016525 0ustar rootrootPurpose The menu widget allows the programmer to create a pull-down menu widget. Complete with sub-menu items. Construction Options A menu widget is defined using the following syntax. The variable $menuObject contains a reference to the menu object. $menuObject = new Cdk::Menu ( options ); The options are defined in the following table. Option Default Value Type Purpose Menulist Required Array Ref This is the menu title list. Menuloc Required Array Ref This is the menu title location list. Tattrib Reverse Scalar This is the attribute of the currently highlighted menu title. SubTattrib Reverse Scalar This is the attribute of the currently highlighted menu item. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a menu widget. $returnValue = $menuObject->activate (); The variable $returnValue is an integer value which represents the selected item. The calculation of this value is determined as follows: (100 * Current Title ) + Current Subtitle To extract the correct menu item from this value use the following formula: $menuList = int ( $returnValue / 100 ); $menuItem = ($returnValue % 100 ); You can then dereference the string value from the array using the above two calculations. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $menuObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $menuObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $menuObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $menuObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $menuObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $menuObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $menuObject->draw (); erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $menuObject->erase (); Default Key Bindings Key Action Left Arrow Moves to the menu list on the left. Right Arrow Moves to the menu list on the right. Up Arrow Moves the cursor up one menu item. Down Arrow Moves the cursor up one menu item. Space Moves the cursor up down menu item. Return Selects the current menu item. Tab Moves to the menu list on the right. Escape Exits the widget and returns undef. CTRL-R Refreshes the screen. Tips & Tricks None. Physical Restrictions Restriction Value Max number of menu items. 30 Max number of sub-menu items. 98 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: June, 1996 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/histogram.help0000644000000000000000000001114606634015407017574 0ustar rootrootPurpose The histogram widget allows the programmer to create a histogram on the screen. The histogram can be aligned either horizontally or vertically. Construction Options A histogram widget is defined using the following syntax. The variable $histogramObject contains the reference to the histogram object. $histogramObject = new Cdk::histogram ( options ); The options are defined in the following table. Option Default Value Type Purpose Label Required Scalar The label which is attached to the histogram. Height Required Scalar The height of the histogram. Width Required Scalar The width of the histogram. Orient Required Scalar The orientation of the object. Lpos Left Scalar This is the position of the label in the histogram. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods set Sets or resets certain attributes or features of the widget. The following example demonstrates how to call the set method. $histogramObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Low Required Scalar The low value of the histogram. High Required Scalar The high value of the histogram. Value Required Scalar The current value of the histogram. Filler Space Scalar The fill character of the histogram. Fillattr Reverse Scalar The attribute of the fill character. Statspos Top Scalar The position of the statistics. Sattrib Bold Scalar The attribute of the statistics. Box True Scalar Draws the window with a box around it. draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $histogramObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $histogramObject->erase (); Tips & Tricks Try putting the statistics inside the histogram by setting the Statspos value to CENTER. raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $histogramObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $histogramObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $histogramObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $histogramObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $histogramObject->getwin(); Physical Restrictions None. Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 cdk-perl-20240606/fulldemo/help/entry.help0000644000000000000000000003026511733450514016741 0ustar rootrootPurpose The Cdk Entry widget allows the user to type in input within a widget. The entry field has a solid basis of editing features. Construction Options A entry widget is defined using the following syntax. The variable $entryObject contains the reference to the entry object. $entryObject = new Cdk::Entry ( options ); The options are defined in the following table. Option Default Value Type Purpose Label Required Scalar The label of the entry field. Max Required Scalar The maximum length of the value entered. Min 0 Scalar The minimum length of the value entered. Width Required Scalar The width of the field on the screen. Filler . Scalar The default field character. Dtype Mixed Scalar The display type. (See Display Help) Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Lpos Left Scalar This is the position of the label in the widget. Fieldattr Normal Scalar The attribute of the characters typed in. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a entry widget. $returnValue = $entryObject->activate (); The variable $returnValue contains a scalar value of what was typed into the entry field. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $entryObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> set Sets or resets certain attributes or features of the widget. The following demonstrates how to call the set method from the entry field. $entryObject->set ( options ); The options are defined in the following table. Option Default Value Type Purpose Value Required Scalar Sets the value of the entry field. Min Same as set value Scalar Sets the size of the minimum length of the information typed in. Max Same as set value Scalar Sets the size of the maximum length of the information typed in. Box True Scalar Changes the current value of the box flag. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $entryObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $entryObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $entryObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $entryObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $entryObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $entryObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $entryObject->erase (); clean This method cleans the information from inside the entry object. The following example demonstrates how to call the clean method. $entryObject->clean(); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $entryObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $entryObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $entryObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $entryObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $entryObject->getwin(); Default Key Bindings Key Action Left Arrow Moves the cursor one character to the left. Right Arrow Moves the cursor one character to the right. Delete Deletes the character to the left of the cursor. Backspace Deletes the character to the left of the cursor. Return Exits the widget and returns a scalar representing the informarion which was typed into the field. Tab Exits the widget and returns a scalar representing the informarion which was typed into the field. Escape Exits the widget and returns undef. CTRL-R Refreshes the screen. Tips & Tricks The label can be put on the left, right, top or bottom of the field, allowing for a more dynamic placement of the label itself. Setting the Dtype variable to a hidden type creates an entry field suitable for a password. Physical Restrictions None. Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 Document Revised: June, 1996 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/future.help0000644000000000000000000000103206634015407017102 0ustar rootrootThe future of Cdk has in it a number of additions. Here is a composite list of things to come: General Would like to have a captive shell, so commands can be spawned via Cdk. This would allow Cdk to run commands and trap the output. I am presently working on creating a tree widget. New Features/Widgets Possible Editor to place widgets... Full range of drawing routines. <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: June, 1996 cdk-perl-20240606/fulldemo/help/colors.help0000644000000000000000000001401311733456270017077 0ustar rootrootStarting Colors in Cdk When Cdk is initialized with the Cdk::init() function call, Cdk also initializes the color chart. This saves the programmer the trouble of doing this. When the color table is initialized, 64 color pairs are created. A color pair is a combination of foreground colors and background colors. Using Colors To turn on a color pair use the syntax \<\/XX> where XX is a numeric value from 0 to 64. To turn off a color pair use the syntax \<\!XX> where XX is a numeric value from 0 to 64. The following table lists all the color pairs defined. <#UL><#HL(5)><#TT><#HL(12)><#TT><#HL(12)><#UR> <#VL>Pair <#VL> Foreground <#VL> Background <#VL> <#VL> 0 <#VL> Default <#VL> Default <#VL> <#VL> 1 <#VL> White <#VL> White <#VL> <#VL> 2 <#VL> White <#VL> Red <#VL> <#VL> 3 <#VL> White <#VL> Green <#VL> <#VL> 4 <#VL> White <#VL> Yellow <#VL> <#VL> 5 <#VL> White <#VL> Blue <#VL> <#VL> 6 <#VL> White <#VL> Purple <#VL> <#VL> 7 <#VL> White <#VL> Cyan <#VL> <#VL> 8 <#VL> White <#VL> Black <#VL> <#VL> 9 <#VL> Red <#VL> White <#VL> <#VL> 10 <#VL> Red <#VL> Red <#VL> <#VL> 11 <#VL> Red <#VL> Green <#VL> <#VL> 12 <#VL> Red <#VL> Yellow <#VL> <#VL> 13 <#VL> Red <#VL> Blue <#VL> <#VL> 14 <#VL> Red <#VL> Purple <#VL> <#VL> 15 <#VL> Red <#VL> Cyan <#VL> <#VL> 16 <#VL> Red <#VL> Black <#VL> <#VL> 17 <#VL> Green <#VL> White <#VL> <#VL> 18 <#VL> Green <#VL> Red <#VL> <#VL> 19 <#VL> Green <#VL> Green <#VL> <#VL> 20 <#VL> Green <#VL> Yellow <#VL> <#VL> 21 <#VL> Green <#VL> Blue <#VL> <#VL> 22 <#VL> Green <#VL> Purple <#VL> <#VL> 23 <#VL> Green <#VL> Cyan <#VL> <#VL> 24 <#VL> Green <#VL> Black <#VL> <#VL> 25 <#VL> Yellow <#VL> White <#VL> <#VL> 26 <#VL> Yellow <#VL> Red <#VL> <#VL> 27 <#VL> Yellow <#VL> Green <#VL> <#VL> 28 <#VL> Yellow <#VL> Yellow <#VL> <#VL> 29 <#VL> Yellow <#VL> Blue <#VL> <#VL> 30 <#VL> Yellow <#VL> Purple <#VL> <#VL> 31 <#VL> Yellow <#VL> Cyan <#VL> <#VL> 32 <#VL> Yellow <#VL> Black <#VL> <#VL> 33 <#VL> Blue <#VL> White <#VL> <#VL> 34 <#VL> Blue <#VL> Red <#VL> <#VL> 35 <#VL> Blue <#VL> Green <#VL> <#VL> 36 <#VL> Blue <#VL> Yellow <#VL> <#VL> 37 <#VL> Blue <#VL> Blue <#VL> <#VL> 38 <#VL> Blue <#VL> Purple <#VL> <#VL> 39 <#VL> Blue <#VL> Cyan <#VL> <#VL> 40 <#VL> Blue <#VL> Black <#VL> <#VL> 41 <#VL> Purple <#VL> White <#VL> <#VL> 42 <#VL> Purple <#VL> Red <#VL> <#VL> 43 <#VL> Purple <#VL> Green <#VL> <#VL> 44 <#VL> Purple <#VL> Yellow <#VL> <#VL> 45 <#VL> Purple <#VL> Blue <#VL> <#VL> 46 <#VL> Purple <#VL> Purple <#VL> <#VL> 47 <#VL> Purple <#VL> Cyan <#VL> <#VL> 48 <#VL> Purple <#VL> Black <#VL> <#VL> 49 <#VL> Cyan <#VL> White <#VL> <#VL> 50 <#VL> Cyan <#VL> Red <#VL> <#VL> 51 <#VL> Cyan <#VL> Green <#VL> <#VL> 52 <#VL> Cyan <#VL> Yellow <#VL> <#VL> 53 <#VL> Cyan <#VL> Blue <#VL> <#VL> 54 <#VL> Cyan <#VL> Purple <#VL> <#VL> 55 <#VL> Cyan <#VL> Cyan <#VL> <#VL> 56 <#VL> Cyan <#VL> Black <#VL> <#VL> 57 <#VL> Black <#VL> White <#VL> <#VL> 58 <#VL> Black <#VL> Red <#VL> <#VL> 59 <#VL> Black <#VL> Green <#VL> <#VL> 60 <#VL> Black <#VL> Yellow <#VL> <#VL> 61 <#VL> Black <#VL> Blue <#VL> <#VL> 62 <#VL> Black <#VL> Purple <#VL> <#VL> 63 <#VL> Black <#VL> Cyan <#VL> <#VL> 64 <#VL> Black <#VL> Black <#VL> <#LL><#HL(5)><#BT><#HL(12)><#BT><#HL(12)><#LR> <#HL(70)> Document Created: November, 1995 Document Revised: January, 1996 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/calendar.help0000644000000000000000000002556211733451011017346 0ustar rootrootPurpose The Cdk calendar widget is a simple little widget which allows a user to play with a calendar. Construction Options The calendar widget is defined using the following syntax. The variable $calendarObject contains the reference to the entry object. $calendarObject = new Cdk::Calendar ( options ); The options are defined in the following table. Option Default Value Type Purpose Day The current day Scalar The day of the calendar. of the month. Month The current month Scalar The month of the calendar. Year The current year Scalar The year of the calendar. Dattrib Normal Scalar The attribute of the days. Mattrib Normal Scalar The attribute of the month name. Yattrib Normal Scalar The attribute of the year. Highlight Reverse Scalar The highlight attribute of the cursor. Filler . Scalar The default field character. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods activate Activation of an object means to make the object available for use. The following example demonstrates how to activate a entry widget. ($day, $month, $year) = $calendarObject->activate (); The variables $day, $month, $year is the date of the calendar when it exited. inject This function injects a single character into the widget. The following examples demonstrates how to call the inject method. $calendarObject->inject ( options ); The options are defined in the following table. Option Default Value Type Purpose Shadow Required Scalar The character to inject into the widget. If you are injecting a special character into the widget, then you can use a pre-defined value to represent the key. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> setDate Sets the current date of the calendar field. $calendarObject->setDate ( options ); The options are defined in the following table. Option Default Value Type Purpose Day Required Scalar The day of the calendar. Month Required Scalar The month of the calendar. Year Required Scalar The year of the calendar. bind The bind method binds keys to events. The binding is specific to the individual objects. The following example demonstrates how to call the bind method. $calendarObject->bind ( options ); The options are defined in the following table. Option Default Value Type Purpose Key Required Scalar This is the character to bind the event to. Function Required Scalar This is the name of the callback function. preProcess The preProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the preProcess method. $calendarObject->preProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a pre-process callback the following code segment demonstrates how to do it properly. $alphalistObject->preProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> If the pre-process function returns a value of 0 the key hit will not be injected into the widget. This allows the programmer to selectively pick which characters will or will not get injected into the widget. The postProcess function sets a process to be run before the key entered is processed. If this function returns a value of 0, then the key injected into the widget will not be processed; otherwise the character will be processed as normal. The following example demonstrates how to call the postProcess method. $calendarObject->postProcess ( options ); The options are defined in the following table. Option Default Value Type Purpose Function Required Scalar This is the name of the callback function. To create a post-process callback the following code segment demonstrates how to do it properly. $alphalistObject->postProcess ('Function' => sub { callback (@_); }); Notice that the array @_ is passed into the function called callback. This is done because when the callback process is called the key which was pressed is passed into the perl subroutine. Since we nest the call-back function inside an anonymous subroutine, we need to pass the array @_ to the call-back function. If the key given to the call-back function is a non alphanumeric key then a predefined value will be given to the function. The following table describes the values passed into the function. <#UL><#HL(12)><#TT><#HL(15)><#UR> <#VL>Key <#VL>Key Value <#VL> <#VL>Left Arrow <#VL>KEY_LEFT <#VL> <#VL>Right Arrow <#VL>KEY_RIGHT <#VL> <#VL>Up Arrow <#VL>KEY_UP <#VL> <#VL>Down Arrow <#VL>KEY_DOWN <#VL> <#VL>Delete <#VL>KEY_DELETE <#VL> <#VL>Backspace <#VL>KEY_BACKSPACE <#VL> <#VL>Page Up <#VL>KEY_PPAGE <#VL> <#VL>Page Down <#VL>KEY_NPAGE <#VL> <#VL>Home <#VL>KEY_HOME <#VL> <#VL>End <#VL>KEY_END <#VL> <#VL>Escape <#VL>KEY_ESC <#VL> <#LL><#HL(12)><#BT><#HL(15)><#LR> draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $calendarObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $calendarObject->erase (); raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $calendarObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $calendarObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $calendarObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $calendarObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $calendarObject->getwin(); Default Key Bindings Since this widget is 'driven' by the entry field, the default key bindings of the entry field apply to this widget. There are however extra bindings which have been applied. They are as follows: Key Action TAB Tries to complete the word in the entry field. Key Up Scrolls the list one item backward. Page Up Scrolls the list one page backward. CTRL-B Scrolls the list one page backward. Key Down Scrolls the list one line forward. Page Down Scrolls the list one page forward. CTRL-F Scrolls the list one page forward. Return Returns what is currently displayed in the entry field. Escape Exits the widget and returns undef. Tips & Tricks None. Physical Restrictions Same as the scrolling list. Example Use Of The Widget <#HL(70)> Document Created: June, 1996 Document Revised: July, 1996 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/general.help0000644000000000000000000001411211733356503017211 0ustar rootrootPreamble: From Glover's original text: The Cdk curses widget set was written by myself (Mike Glover). It started as a small pet project to test how compatible my new Linux box was to other flavours of Unix. As it turned out I discovered Ncurses, and played with that a whole lot. This constant playing with Ncurses created what is currently known as Cdk. Cdk has evolved many times since its first inception and has evolved to what you are currently looking at. One day I finally told myself that the C version was 'done'. I quickly looked in other directions for the Cdk widget set. One day I told myself: "Cdk would be really cool if it was interpreted instead of compiled! " Enter Mike's love of Perl. It finally dawned on me that I could extend Perl5 to include the Cdk widget set. So I started to play with Perl5. The more I played with Perl5, the more I really started to like the additions. I finally read the manual pages on how to extend Perl5 to include other libraries. As time passed I entrenched myself deeper into extending Perl5 to what I currently call the Cdk Perl5 extension. After about 2 months of work, Cdk was finally extended into Perl5. (crowd cheers...) Info: I'm sure the first question being asked is, 'What does Cdk stand for?'. In response I say : (fanfare please) Curses Development Kit There are currently 22 widgets available in Cdk, with more coming. What they are and what they do is in the following table. <#UL><#HL(14)><#TT><#HL(52)><#UR> <#VL> Widget Name <#VL>Purpose <#VL> <#VL>Alphalist <#VL>Provides a list of words which the user can select <#VL> <#VL> <#VL>from. Allows you to narrow the search by entering <#VL> <#VL> <#VL>a few initial characters of the words being <#VL> <#VL> <#VL>sought after to narrow the search. <#VL> <#VL>Buttonbox <#VL>Creates a widget with numerous buttons. <#VL> <#VL>Calendar <#VL>Creates a simple calendar widget. <#VL> <#VL>Dialog <#VL>Prompts the user with a message, and the user <#VL> <#VL> <#VL>can pick an answer from the buttons provided. <#VL> <#VL>Entry <#VL>Allows the user to enter information. <#VL> <#VL>File Selector <#VL>A file selector built from Cdk base widgets. <#VL> <#VL> <#VL>This example shows how to create more complicated <#VL> <#VL> <#VL>widgets using the Cdk widget library. <#VL> <#VL>Graph <#VL>Draws a graph. <#VL> <#VL>Histogram <#VL>Draws a histogram. <#VL> <#VL>Item List <#VL>Creates a pop up field which allows the user to <#VL> <#VL> <#VL>select one of several choices in a small field. Very<#VL> <#VL> <#VL>useful for things like days of the week or month <#VL> <#VL> <#VL>names. <#VL> <#VL>Label <#VL>Displays messages in a pop up box, or the label can <#VL> <#VL> <#VL>be considered part of the screen. <#VL> <#VL>Marquee <#VL>Displays a message in a scrolling marquee. <#VL> <#VL>Matrix <#VL>Creates a complex matrix with lots of options. <#VL> <#VL>Menu <#VL>Creates a pull-down menu interface. <#VL> <#VL>Multiple Line <#VL>A multiple line entry field. Very useful for long <#VL> <#VL>Entry Field <#VL>fields. (like a description field) <#VL> <#VL>Radio List <#VL>Creates a radio button list. <#VL> <#VL>Scale <#VL>Creates a numeric scale. Allows a user to pick a <#VL> <#VL> <#VL>numeric value and restrict them to a range of <#VL> <#VL> <#VL>values. <#VL> <#VL>Scrolling List<#VL>Creates a scrolling list/menu list. <#VL> <#VL>Scrolling <#VL>Creates a scrolling log file viewer. Can add <#VL> <#VL>Window <#VL>information into the window while its running. <#VL> <#VL> <#VL>A good widget for displaying the progress of <#VL> <#VL> <#VL>something. (akin to a console window) <#VL> <#VL>Selection List<#VL>Creates a multiple option selection list. <#VL> <#VL>Slider <#VL>Akin to the Scale widget but provides a visual <#VL> <#VL> <#VL>representation of the current numeric value. <#VL> <#VL>Template <#VL>Creates a entry field with character sensitive <#VL> <#VL> <#VL>positions. Used for pre-formatted fields like dates <#VL> <#VL> <#VL>and phone numbers. <#VL> <#VL>Viewer <#VL>Creates an information viewer. You are currently <#VL> <#VL> <#VL>using the viewer by the way. <#VL> <#LL><#HL(14)><#BT><#HL(52)><#LR> Each help subsection outlines certain features of each widget. They are broken up into the following sections: Purpose Construction Options Available Methods Key bindings Tips & Tricks Physical Restrictions Example Use Of The Widget The documentation supplied with the demo is more than enough information to get any user off the ground and flying with the Cdk Perl5 extension. Have fun. Just in case, there is a subdirectory named examples which provides individual examples of each Cdk widget. ttfn, Mike <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: January, 1996 Document Revised: June, 1996 Document Revised: April, 1997 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/display.help0000644000000000000000000000722211733456531017247 0ustar rootrootThere are a number of display types and position types that should be explained. These names can be used to both position the widget itself and the contents within the widget. Widget Positioning There are five pre-defined position names that help location either a widget or a widgets title, or any other element of a widget. They are listed in the table below. <#UL><#HL(8)><#TT><#HL(47)><#UR> <#VL>Name <#VL>Purpose <#VL> <#VL>TOP <#VL>Positions a widget to the top of the screen. <#VL> <#VL>BOTTOM <#VL>Positions a widget to the bottom of the screen.<#VL> <#VL>LEFT <#VL>Positions a widget to the left of the screen. <#VL> <#VL>RIGHT <#VL>Positions a widget to the right of the screen. <#VL> <#VL>CENTER <#VL>Positions a widget to the center of the screen.<#VL> <#LL><#HL(8)><#BT><#HL(47)><#LR> If the names are not used, then a numeric value can be used for location. Entry Field Display Types The entry fields, Matrix, Entry and Multiple Line Entry, can define the type of input defined. They are specified with the following pre-defined display type variables. <#UL><#HL(9)><#TT><#HL(40)><#UR> <#VL>Name <#VL>Result <#VL> <#VL>CHAR <#VL> Character only. <#VL> <#VL>HCHAR <#VL> Hidden Character Only. <#VL> <#VL>INT <#VL> Integer only. <#VL> <#VL>HINT <#VL> Hidden Integer Only. <#VL> <#VL>MIXED <#VL> Mixed Input. <#VL> <#VL>HMIXED <#VL> Hidden Mixed Input. <#VL> <#VL>UCHAR <#VL> Upper Case Character Input. <#VL> <#VL>LCHAR <#VL> Lower Case Character Input. <#VL> <#VL>UHCHAR <#VL> Upper Case Hidden Character Input. <#VL> <#VL>LHCHAR <#VL> Lower Case Hidden Character Input. <#VL> <#VL>UMIXED <#VL> Upper Case Mixed Input. <#VL> <#VL>LMIXED <#VL> Lower Case Mixed Input. <#VL> <#VL>UHMIXED <#VL> Upper Case Hidden Mixed Input. <#VL> <#VL>LHMIXED <#VL> Lower Case Hidden Mixed Input. <#VL> <#VL>VIEWONLY <#VL> View only field. (uneditable) <#VL> <#LL><#HL(9)><#BT><#HL(40)><#LR> NOTE When the above says Upper/Lower Case that means all the input auto-magically gets mapped to Upper/Lower case. When it says hidden it means the input is taken and stored; only a . is presented for each key hit. This is useful for password or hidden entries. Special Types Special types exist for certain widgets. Below is a list of the current widgets that have a special type, its name and description. <#UL<#HL(10)><#TT><#HL(11)><#TT><#HL(44)><#UR> <#VL>Widget <#VL>Type Name <#VL>Result <#VL> <#VL>Histogram <#VL>NONE <#VL>Turns off the statistics for the histogram. <#VL> <#VL> <#VL>PERCENT <#VL>Sets the statistics to a percentage. <#VL> <#VL> <#VL>REAL <#VL>Sets the statistics to the real value. <#VL> <#VL> <#VL>HORIZONTAL <#VL>Specifies a horizontal histogram. <#VL> <#VL> <#VL>VERTICAL <#VL>Specifies a vertical histogram. <#VL> <#VL>Graph <#VL>PLOT <#VL>Specifies the graph will draw a plot graph. <#VL> <#VL> <#VL>LINE <#VL>Specifies the graph will draw a line graph. <#VL> <#LL<#HL(10)><#BT><#HL(11)><#BT><#HL(44)><#LR> <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 2012 cdk-perl-20240606/fulldemo/help/label.help0000644000000000000000000000762306634015407016663 0ustar rootrootPurpose The label widget allows a programmer to create a message box. This message box can be part of the screen or a temporary pop up message box. Construction Options A label widget is defined using the following syntax. The variable $labelObject contains the reference to the label object. $labelObject = new Cdk::Label ( options ); The options are defined in the following table. Option Default Value Type Purpose Mesg Required Array Ref This is the contents of the message inside the window. Xpos Center Scalar This is the position of the window on the X axis. Ypos Center Scalar This is the position of the window on the Y axis. Box True Scalar This Boolean states whether the dialog box will have a box drawn around it. Shadow False Scalar This Boolean states whether the dialog box will have a shadow on the box. Available Methods draw This method draws the object on the screen. The following example demonstrates how to call the draw method. $labelObject->draw ( options ); The options are defined in the following table. Option Default Value Type Purpose Box True Scalar Draws the window with a box around it. erase This method removes the object from the screen. This does NOT destroy the object. The following example demonstrates how to call the erase method. $labelObject->erase (); wait This method freezes until a key has been hit. This allows the user to put a message inside the label telling the user to hit any key when ready. The following example demonstrates how to call the wait method. $labelObject->wait( options ); The options are defined in the following table. Option Default Value Type Purpose Key NULL Scalar Tells the object which key to hit to exit the object. raise The raise method raises the widget to the top of the screen. This means if there were any widgets obscuring part of the view, raising the object would bring the complete object into view. The following example demonstrates how to call the raise method. $labelObject->raise(); lower The lower method lowers the object so it doesn't obscure the view of any other objects. The following example demonstrates how to call the lower method. $labelObject->lower(); register The register method registers the object to the default screen. This does NOT have to be called since the objects are registered automatically. This method should be called if the unregister method was called. The following example demonstrates how to call the register method. $labelObject->register(); unregister The unregister method should be called when a widget, which is part of the default screen, needs to be taken away temporarily. This does not delete or free the object, it just unmaps it from any future screen refreshes. The object can be registered by calling the register method. The following example demonstrates how to call the unregister method. $labelObject->unregister(); getwin This method returns a pointer to the window of the object. Not much use for this yet. It will be useful in the future when the drawing methods are added. The following example demonstrates how to call the getwin method. $labelObject->getwin(); Tips & Tricks A title can be added to the label widget by using the formatting commands available with Cdk. Physical Restrictions Restriction Value Maximum Rows 300 Example Use Of The Widget <#HL(70)> Document Created: June, 1995 Document Revised: November, 1995 Document Revised: March, 1996 cdk-perl-20240606/fulldemo/cdkdemo0000755000000000000000000010267013432577240015336 0ustar rootroot#!/usr/bin/perl -w # $Id: cdkdemo,v 1.11 2019/02/18 18:51:12 tom Exp $ # # Purpose: # This script demonstrates the Cdk widget set and how to use them. # use strict; # for dirname() use File::Basename; # help find related files use FindBin qw($Bin); chdir "$Bin"; # # Use the Cdk module. # use Cdk; Cdk::init(); # Set up the label rows. my @titleMessage = ( "This is a CDK demo script", "It will demonstrate all of the", "widgets available with the", "Cdk Perl 5 extension." ); # Create the title. my $title = new Cdk::Label( 'Message' => \@titleMessage, 'Box' => "FALSE" ); # Set some global vars my $CONTINUE = "Press Any Key To Continue."; my $HOME = $ENV{'HOME'}; # Create the menu. my $currentLoc = 0; my @mLoc = ( "Switch to Pull-Up Menu ", "Switch to Pull-Down Menu" ); my @fMenu = ( "File", "Quit" ); my @iMenu = ( "Info", "Calendar ", "Date ", "Label ", "Scrolling Window", "Viewer " ); my @eMenu = ( "Entry", "Entry Field ", "Item List ", "Matrix ", "Multiple Line Entry Field", "Scale ", "Slider ", "Template " ); my @lMenu = ( "Lists", "Alpha List ", "Dialog ", "Radio List ", "Scrolling List", "Selection List" ); my @mMenu = ( "Misc", "Histogram ", "Graph ", "Marquee ", "Menu ", "$mLoc[$currentLoc]" ); my @hMenu = ( "Help", "General Help", "Widget Help ", "About... " ); # Create the pulldown menu menu lists. my @menulist = ( \@fMenu, \@iMenu, \@eMenu, \@lMenu, \@mMenu, \@hMenu ); # Set the location of the menus my @menuloc = ( "LEFT", "LEFT", "LEFT", "LEFT", "LEFT", "RIGHT" ); # Create the menu my $menu = new Cdk::Menu( 'Menulist' => \@menulist, 'Menuloc' => \@menuloc ); # Create the callback for the menu. $menu->bind( 'Key' => '?', 'Function' => sub { main::menuCallback($menu); } ); # Create the scrolling window. my $swindow = new Cdk::Swindow( 'Title' => "Menu Selection History", 'Lines' => 200, 'Height' => 6, 'Width' => 60, 'Ypos' => "BOTTOM" ); my $menuItemCount = 0; # Let the user play. for ( ; ; ) { # Redraw the screen. Cdk::refreshCdkScreen(); # Get the selection. my ( $submenu, $submenuItem ) = $menu->activate(); my $menuSelection = $menulist[$submenu]->[$submenuItem]; # I'm going to use the name, instead of the numeric value to # determine what was picked. But either way is acceptable. if ( $menuSelection =~ "Label" ) { my @mesg = ( "You just selected the Cdk label widget", "demo. The labels have many personalities", "To discover them all, use the help option", "and pick the Label item.", "", "$CONTINUE" ); labelDemo(@mesg); } elsif ( $menuSelection =~ "Calendar" ) { itemlistDemo(); } elsif ( $menuSelection =~ "Date" ) { my $date = qx (date); chomp $date; my @mesg = ( "The current time is:", "", "$date", "", "$CONTINUE" ); labelDemo(@mesg); } elsif ( $menuSelection =~ "Scrolling Window" ) { # Put a message inside the scrolling window. $swindow->addline( 'Info' => "This is the scrolling window. It's purpose" ); $swindow->addline( 'Info' => "is to act as an information window. It also" ); $swindow->addline( 'Info' => "has the ability to display colors" ); $swindow->addline( 'Info' => "and attributes." ); $swindow->addline( 'Info' => "Hit return, tab, or escape to exit this window." ); $swindow->activate(); } elsif ( $menuSelection =~ "Viewer" ) { viewerDemo(); } elsif ( $menuSelection =~ "Multiple Line Entry Field" ) { mentryDemo(); } elsif ( $menuSelection =~ "Entry Field" ) { entryDemo(); } elsif ( $menuSelection =~ "Item List" ) { itemlistDemo(); } elsif ( $menuSelection =~ "Template" ) { templateDemo(); } elsif ( $menuSelection =~ "Matrix" ) { matrixDemo(); } elsif ( $menuSelection =~ "$mLoc[$currentLoc]" ) { # We are going to switch the menu type. if ( $currentLoc == 0 ) { # Pull-Down to Pull-Up $currentLoc = 1; @mMenu = ( "Misc", "Histogram ", "Graph ", "Marquee ", "Menu ", "$mLoc[$currentLoc]" ); @menulist = ( \@fMenu, \@iMenu, \@eMenu, \@lMenu, \@mMenu, \@hMenu ); undef $menu; my $highlight = ""; $menu = new Cdk::Menu( 'Menulist' => \@menulist, 'Menuloc' => \@menuloc, 'Tattrib' => $highlight, 'Menupos' => "BOTTOM", 'SubTattrib' => $highlight ); } elsif ( $currentLoc == 1 ) { # Pull-Up to Pull-Down $currentLoc = 0; @mMenu = ( "Misc", "Histogram ", "Graph ", "Marquee ", "Menu ", "$mLoc[$currentLoc]" ); @menulist = ( \@fMenu, \@iMenu, \@eMenu, \@lMenu, \@mMenu, \@hMenu ); undef $menu; my $highlight = ""; $menu = new Cdk::Menu( 'Menulist' => \@menulist, 'Menuloc' => \@menuloc, 'Tattrib' => $highlight, 'Menupos' => "TOP", 'SubTattrib' => $highlight ); } } elsif ( $menuSelection =~ "Menu" ) { # Pop up a message stating what we got. my @mesg = ( "The Cdk Menu widget is what", "is driving this application.", "", "$CONTINUE" ); labelDemo(@mesg); } elsif ( $menuSelection =~ "Dialog" ) { dialogDemo(); } elsif ( $menuSelection =~ "Scrolling List" ) { scrollDemo(); } elsif ( $menuSelection =~ "Selection List" ) { selectionDemo(); } elsif ( $menuSelection =~ "Radio List" ) { radioDemo(); } elsif ( $menuSelection =~ "Histogram" ) { histogramDemo(); } elsif ( $menuSelection =~ "Graph" ) { graphDemo(); } elsif ( $menuSelection =~ "Scale" ) { scaleDemo(); } elsif ( $menuSelection =~ "Slider" ) { sliderDemo(); } elsif ( $menuSelection =~ "Marquee" ) { marqueeDemo(); } elsif ( $menuSelection =~ "Alpha List" ) { alphalistDemo(); } elsif ( $menuSelection =~ "General Help" ) { generalHelp(); } elsif ( $menuSelection =~ "Widget Help" ) { widgetHelp(); } elsif ( $menuSelection =~ "About..." ) { # Pop up a message about this script. my @mesg = ( "Cdk Perl 5 Extension", "Written by Mike Glover", "and Thomas E. Dickey", "", "Created : December, 1995", "Last Updated: February, 2019", "", $CONTINUE ); my $label = new Cdk::Label( 'Message' => \@mesg, 'Shadow' => "TRUE" ); $label->draw(); $label->wait(); } elsif ( $menuSelection =~ "Quit" ) { # Add a message to the scrolling window. $swindow->addline( 'Info' => "Goodbye..." ); sleep 2; # Exit. Cdk::end(); exit(1); } # Add the chosen item to the scrolling window. my $item = $menulist[$submenu]->[0] . "->" . $menuSelection; $swindow->addline( 'Info' => "$menuItemCount : $item" ); $menuItemCount++; } ############################################################################## # # This demonstrates the Cdk label widget. # sub labelDemo { my @mesg = @_; # Create the label. my $label = new Cdk::Label( 'Message' => \@mesg ); # Draw the label and wait. $label->draw(); $label->wait(); } ############################################################################## # # This demostrates the Cdk viewer widget. # sub viewerDemo { # Use the file selector widget to get a filename. my $fselect = new Cdk::Fselect( 'Label' => "Filename:", 'Height' => 20, 'Width' => 50, 'Dattrib' => "", 'Lattrib' => "", 'Fattrib' => "" ); my $fname = $fselect->activate(); $fselect->erase(); # Check if the person hit escape. if ( !defined $fname ) { return; } # Popup a file viewer. my $viewer = new Cdk::Viewer( 'Buttons' => ["OK"], 'Height' => 0, 'Width' => -2 ); # Load in the file. my @info = qx (cat $fname); chomp(@info); # Set the contents of the viewer. $viewer->set( 'Info' => \@info, 'Interpret' => "TRUE", 'Title' => "Viewing filename:$fname" ); # Activate the viewer. $viewer->activate(); } ############################################################################## # # This demonstrates the Cdk entry widget. # sub entryDemo { my $continue; my $entry = new Cdk::Entry( 'Label' => "Enter a new pause prompt: ", 'Max' => 125, 'Width' => 30 ); $continue = $entry->activate(); $entry->erase(); # Check if they hit escape. if ( !defined $continue ) { popupLabel( [ "Escape Hit", "Pause prompt not changed.", "", "$CONTINUE" ] ); return; } # Pop up a message stating what we got. $CONTINUE = $continue; my @mesg = ( "The new pause prompt is now set to", "what is below this message", "$CONTINUE" ); labelDemo(@mesg); } ############################################################################## # # This demonstrates the Cdk itemlist widget. # sub itemlistDemo { # Declare locals. my $row; # Create the list. my @months = ( "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ); # Get the current date info. my $info = qx (date +"%d,%m,%Y"); chomp $info; my ( $currentDay, $currentMonth, $currentYear ) = split( /,/, $info ); $currentMonth--; # Create n itemlist to get the month. my $monthList = new Cdk::Itemlist( 'Label' => 'Pick a month ', 'Default' => $currentMonth, 'List' => \@months ); # Get the month name. my $month = $monthList->activate(); undef $monthList; # Did they hit escape? return if !defined $month; $month++; # Create a scale to get the year. my $yearScale = new Cdk::Scale( 'Label' => 'Pick a year', 'Width' => 6, 'Low' => "1900", 'High' => "2200" ); # Set the limits of the years to select from. $yearScale->set( 'Low' => 1900, 'High' => '2200', 'Value' => "$currentYear" ); # Get the year. my $year = $yearScale->activate(); undef $yearScale; # Did they hit escape? return if !defined $year; # Get the day my $dayScale = new Cdk::Scale( 'Label' => 'Pick a day', 'Width' => 5, 'Low' => 1, 'High' => 31 ); # Set the limits of the days to select from. $dayScale->set( 'Low' => 1, 'High' => '31', 'Value' => "$currentDay" ); # Get the day. my $day = $dayScale->activate(); undef $dayScale; # Did they hit escape? return if !defined $day; # Create the calander. my $cal = new Cdk::Calendar( 'Day' => $day, 'Month' => $month, 'Year' => $year, 'Dattrib' => "", 'Mattrib' => "", 'Yattrib' => "" ); $cal->activate(); } ############################################################################## # # This demonstrates the Cdk Template widget. # sub templateDemo { # Create the template widget. my $birthday = new Cdk::Template( 'Label' => 'Enter your birthday: ', 'Plate' => '##/##/####', 'Overlay' => 'DD-MM-YYYY' ); # Get the birthday. my $bday = $birthday->activate(); # Did the user hit escape? return if !defined $bday; # Get the mixed value from the template. my $bday2 = $birthday->mix(); # Display the results. my @mesg = ( "Birthday without plate mixing: $bday", "Birthday with plate mixing: $bday2", "", "$CONTINUE" ); labelDemo(@mesg); } ############################################################################## # # This demonstrates the Cdk multiple line entry widget. # sub mentryDemo { # Create the mentry widget. my $mentry = new Cdk::Mentry( 'Label' => "Enter Anything:", 'Width' => 20, 'Lrows' => 10, 'Prows' => 5 ); # Activate the mentry widget. my $info = $mentry->activate(); # Did the user hit escape? return if !defined $info; # Display the results. my @mesg = ( "You just typed:", "$info", "", "$CONTINUE" ); labelDemo(@mesg); } ############################################################################## # # This demonstrates the Cdk matrix widget. # sub matrixDemo { my @colTitles = ( "Item Name", "Base Price", "% Markup" ); my @rowTitles = ( "Item 1", "Item 2", "Item 3" ); my @colWidths = ( 30, 10, 10 ); my @colTypes = ( "VIEWONLY", "VIEWONLY", "INT" ); my @matrixValues = ( [ "Flabberit", "10.99", "" ], [ "Whatzit", "102.99", "" ], [ "Albatross", "99.99", "" ] ); my ( @newlist, $x ); # Create the matrix widget. my $matrix = new Cdk::Matrix( 'Title' => [ "Flabberjabbit Sales", "" ], 'RowTitles' => \@rowTitles, 'ColTitles' => \@colTitles, 'ColWidths' => \@colWidths, 'ColTypes' => \@colTypes, 'Vrows' => 3, 'Vcols' => 3 ); # Set the values of the matrix. $matrix->set( 'Values' => \@matrixValues ); # Activate the matrix. my ( $rows, $cols, $info ) = $matrix->activate(); # Did the user hit escape? return if !defined $rows; # Take the information from the matrix and redisplay it. push( @newlist, "Name Base Percent Price" ); for ( $x = 0 ; $x < $rows ; $x++ ) { if ( $info->[$x][2] ne "" ) { my $name = $info->[$x][0]; my $base = $info->[$x][1]; my $perc = $info->[$x][2]; my $price = $base + ( $base * $perc ) / 100; push( @newlist, sprintf( "%-10s %4.2f %4.2f %4.2f", $name, $base, $perc, $price ) ); } } # Create the file viewer. my $viewer = new Cdk::Viewer( 'Buttons' => ["OK"], 'Height' => 8, 'Width' => 60 ); # Set the contents of the viewer. $viewer->set( 'Title' => "Adjusted Price List", 'Info' => \@newlist ); # Activate the viewer. $viewer->activate(); } ############################################################################## # # This demonstrates the Cdk Dialog widget. # sub dialogDemo { my @mesg = ( "Cheesy Unix Command Interface", "Select a command from the buttons." ); # Create the buutons for the dialog box. my @buttons = ( "date", "pwd", "whoami", "ls -l" ); # Create the dialog widget. my $dialog = new Cdk::Dialog( 'Message' => \@mesg, 'Buttons' => \@buttons ); # Activate the dialog box. my $pick = $dialog->activate(); $dialog->erase(); # Did the user hit escape? return if !defined $pick; # Check what we want to run. if ( $buttons[$pick] =~ "ls -l" ) { # Get the directory listing. my @info = qx (ls -l ${HOME}); chomp(@info); # Create the file viewer. my $viewer = new Cdk::Viewer( 'Buttons' => ["OK"], 'Height' => 15, 'Width' => 60 ); # Set the contents of the viewer. $viewer->set( 'Title' => "Listing $HOME", 'Info' => \@info ); $viewer->activate(); } else { # We want to run anything but ls -l my $result = qx ($buttons[$pick]); chomp $result; # Display the result. my @mesg = ( "The command $buttons[$pick] produced the following:", "$result", "$CONTINUE" ); labelDemo(@mesg); } } ############################################################################## # # This demonstrates the Cdk Scrolling widget. # sub scrollDemo { my ( $x, @items ); # Create an itemlist widget to determine if the user wants numbers or not. my $boolean = new Cdk::Itemlist( 'Label' => 'Do You Want Numbers?:', 'Default' => 0, 'List' => [ "No", "Yes" ] ); # Create a scale widget for the number of elements. my $size = new Cdk::Scale( 'Label' => 'How Many Items?', 'Width' => 5, 'Low' => 10, 'High' => 100 ); # Create an entry field for the title of the scrolling list. my $entry = new Cdk::Entry( 'Label' => 'Title: ', 'Max' => 100, 'Min' => 2, 'Width' => 20 ); # Get whether they want numbers or not. my $nums = $boolean->activate(); return if !defined $nums; # Get the number of elements. my $count = $size->activate(); # Get the title of the scrolling list. my $title = $entry->activate(); # Create the item list for ( $x = 1 ; $x <= $count ; $x++ ) { push( @items, "This is item #$x" ); } # Create the scrolling list. my $scrollDemo = new Cdk::Scroll( 'Title' => "$title", 'Highlight' => "", 'List' => \@items, 'Numbers' => $nums, 'Height' => 14, 'Width' => 20 ); # Activate the scrolling list. my $selection = $scrollDemo->activate(); return if !defined $selection; # Spit out the results. my @mesg = ( "You selected", "$items[$selection]", "$CONTINUE" ); labelDemo(@mesg); } ############################################################################## # # This demonstrates the Cdk Selection widget. # sub selectionDemo { my ( $x, @result ); # Create the list of commands to choose from. my @commands = ( "date", "whoami", "pwd", "hostname", "uname -a" ); # Create the selection scrolling list. my $select = new Cdk::Selection( 'Title' => "Select Commands", 'List' => \@commands, 'Choices' => [ "Yep", "Nope" ], 'Height' => 8, 'Width' => 20 ); # Activate the selection widget. my @info = $select->activate(); # Did the user hit escape? return if !@info; # Create the result message. @result = ( "Here are the results from the commands you selected:", "" ); for ( $x = 0 ; $x <= $#info ; $x++ ) { if ( $info[$x] eq 0 ) { my $tmp = qx ($commands[$x]); chomp $tmp; my $fmt = sprintf( "%10s...%-30s", $commands[$x], $tmp ); push( @result, $fmt ); } } push( @result, "" ); push( @result, "$CONTINUE" ); # Spit the results out. labelDemo(@result); } ############################################################################## # # This demonstrates the Cdk Radio widget. # sub radioDemo { # Create the radio list my @colors = ( "White", "Red", "Green", "Yellow", "Blue", "Purple", "Cyan" ); # Create the radio widget. my $radio = new Cdk::Radio( 'Title' => "Pick A Color", 'List' => \@colors, 'Highlight' => "A_REVERSE", 'Height' => 7, 'Width' => 10 ); # Activate the radio list. my $color = $radio->activate(); # Did the user hit escape? return if !defined $color; # Display the results. my @mesg = ( "You Selected", " $colors[$color]", "$CONTINUE" ); labelDemo(@mesg); } ############################################################################## # # This demonstrates the Cdk Histogram widget. # sub histogramDemo { my ($x); # Create the histogram label. my $histLabel = "Time In Seconds This Demo Has Run"; # Create the histogram widget. my $hist = new Cdk::Histogram( 'Title' => $histLabel, 'Orient' => "HORIZONTAL", 'Height' => 5, 'Width' => 0 ); # Take the current time - the start time of this script. my $diff = time - $^T; # Redraw the histogram every second. for ( $x = 0 ; $x < 5 ; $x++ ) { # Set the values of the histogram. $hist->set( 'Low' => 1, 'FillerChar' => " ", 'High' => $diff + 25, 'Value' => $diff + $x, 'Statstype' => "REAL", 'Statspos' => "CENTER" ); # Redraw the histogram. $hist->draw(); # Sleep for a sec. sleep(1); } } ############################################################################## # # This demonstrates the Cdk Marquee widget. # sub marqueeDemo { # Create an entry widget to get the user's message. my $entry = new Cdk::Entry( 'Label' => 'Enter a Message: ', 'Max' => 100, 'Min' => 2, 'Width' => 20 ); # Activate the widget to get the message. my $message = $entry->activate(); $entry->erase(); return if !defined $message; # Create the widget to get the number times to repeat the message. my $rvalue = new Cdk::Scale( 'Label' => 'Repeat Value:', 'Width' => 5, 'Low' => 1, 'High' => 20 ); # Get the repeat value from the user. my $repeat = $rvalue->activate(); $rvalue->erase(); # Create the widget to get the delay. my $dvalue = new Cdk::Scale( 'Label' => 'Delay Value:', 'Width' => 5, 'Low' => 1, 'High' => 20 ); # Get the delay value. my $delay = $dvalue->activate() * 10; $dvalue->erase(); # Create the widget to get the width of the marquee widget. my $mWidth = new Cdk::Scale( 'Label' => 'Marquee Width:', 'Width' => 5, 'Low' => length($message), 'High' => 50 ); # Get the width of the marquee widget. my $width = $mWidth->activate(); $mWidth->erase(); # Create the marquee widget. my $marquee = new Cdk::Marquee( 'Width' => $width ); # Activate the marquee widget. $marquee->activate( 'Message' => $message, 'Delay' => $delay, 'Repeat' => $repeat ); } ############################################################################## # # This demonstrates the Cdk Graph widget. # sub graphDemo { # Create the graph. my $graph = new Cdk::Graph( 'Title' => "Camel Count", 'Xtitle' => "Quantity", 'Ytitle' => "Months", 'Height' => -4, 'Width' => -20 ); # Set the graph values. my @numberList = qw (10 12 14 16 17 22 31); my $graphChars = "ooooooo"; $graph->set( 'Values' => \@numberList, 'DisplayType' => "PLOT", 'GraphChars' => $graphChars ); # Draw the graph. $graph->draw(); # Prompt the user. my @mesg = ( "When done looking at your Camels", "$CONTINUE" ); my $label = new Cdk::Label( 'Message' => \@mesg, 'Xpos' => "BOTTOM" ); $label->draw(); $label->wait(); } ############################################################################## # # This demonstrates the Cdk Scale widget. # sub scaleDemo { # Create the scale widget. my $scale = new Cdk::Scale( 'Label' => 'Pick a number:', 'Width' => 5, 'Low' => 10, 'High' => 100 ); # Activate the widget. my $num = $scale->activate(); # Display the results. my @mesg = ( "You chose $num.", "$CONTINUE" ); labelDemo(@mesg); } ############################################################################## # # This demonstrates the Cdk Slider widget. # sub sliderDemo { # Create the scale widget. my $slider = new Cdk::Slider( 'Label' => 'Pick a number:', 'Filler' => " ", 'Width' => 50, 'Low' => 10, 'High' => 100 ); # Activate the widget. my $num = $slider->activate(); undef $slider; # Display the results. my @mesg = ( "You chose $num.", "$CONTINUE" ); labelDemo(@mesg); } ############################################################################## # # This demonstrates the Cdk Alpha List widget. # sub alphalistDemo { my @acctList = (); my $tmp; # Reset the password entry pointer. setpwent(); # Get a list of all the accounts on this box. while ( $tmp = getpwent ) { push( @acctList, $tmp ); } # Create the scale widget. my $alpha = new Cdk::Alphalist( 'Label' => 'Select an account:', 'List' => \@acctList, 'Width' => 50, 'Height' => 10 ); # Activate the widget. my $acct = $alpha->activate(); $alpha->erase(); # Display the results. my @mesg = ( "You chose $acct.", "$CONTINUE" ); labelDemo(@mesg); } ############################################################################## # # This is the help menu option under help. # sub generalHelp { my $choice = 0; my $helpdir = $ENV{'CDKHELPDIR'} || dirname($0) . "/help"; # Define the names of the help files. my @helpFiles = ( "general.help", "concepts.help", "binding.help", "preprocess.help", "postprocess.help", "display.help", "special.help", "charfile.help", "colors.help", "debug.help", "future.help", "bugs.help" ); # Define the concepts. my @conceptList = ( "General Information About Cdk", "Cdk Concepts ", "Creating a key binding. ", "Creating a pre-process. ", "Creating a post-process. ", "Cdk Display Types ", "Special Display Attributes ", "Special Character Formats ", "Predefined Colors ", "Debugging Cdk Code ", "The Future of Cdk ", "Known Bugs ", "Exit Help " ); # Get the screen dimensions. my ( $rows, $cols ) = Cdk::getCdkScreenDim(); # Create the scrolling list ... my $helplist = new Cdk::Scroll( 'Title' => "Pick A Topic", 'Highlight' => "", 'List' => \@conceptList, 'Numbers' => "TRUE", 'Height' => $#conceptList + 4, 'Width' => 40 ); # Keep doing this until we are told to leave. for ( ; ; ) { # Redraw the screen. Cdk::refreshCdkScreen(); # Get the choice from the user. my $choice = $helplist->activate(); # Exit if we have to . return if !defined $choice; return if $choice == $#conceptList; # Create the help filename my $helpfile = "${helpdir}/$helpFiles[$choice]"; my $topic = "$conceptList[$choice]"; # Check if the file exists. if ( !-e $helpfile ) { my @error = ( "Can not seem to find the help file on the topic $topic", "Try setting the CDKHELPDIR environment variable", "or check if the help file '$helpfile' exists", "", "$CONTINUE" ); labelDemo(@error); } else { # Display the file. my @info = (); my $helpviewer = new Cdk::Viewer( 'Buttons' => ["OK"], 'Height' => $rows - 3, 'Width' => $cols - 2 ); chop( @info = `cat $helpfile` ); my $topic = "Help from $helpfile"; $helpviewer->set( 'Title' => "Help: $topic", 'Info' => \@info ); $helpviewer->activate(); } } } sub widgetHelp { my ( $helpfile, $topic, $helpviewer ); my $helpdir = $ENV{'CDKHELPDIR'} || "./help"; # Define the widget help files. my @helpFiles = ( "alphalist.help", "calendar.help", "dialog.help", "entry.help", "fselect.help", "graph.help", "histogram.help", "itemlist.help", "label.help", "marquee.help", "matrix.help", "menu.help", "mentry.help", "radio.help", "scale.help", "scroll.help", "swindow.help", "selection.help", "slider.help", "template.help", "viewer.help" ); # Define the widget help entries. my @widgetList = ( "Alphalist Widget ", "Calendar Widget ", "Dialog Widget ", "Entry Field Widget ", "File Selector Widget ", "Graph Widget ", "Histogram Widget ", "Item List Widget ", "Label Widget ", "Marquee Widget ", "Matrix Widget ", "Menu Widget ", "Multiple Line Entry Widget ", "Radio List Widget ", "Scale Widget ", "Scrolling List Widget ", "Scrolling Window Widget ", "Selection List Widget ", "Slider Widget ", "Template Widget ", "Viewer Widget ", "Exit Help " ); # Get the screen dimensions. my ( $rows, $cols ) = Cdk::getCdkScreenDim(); # Create the scrolling list ... my $helplist = new Cdk::Scroll( 'Title' => "Pick A Topic", 'Highlight' => "", 'List' => \@widgetList, 'Numbers' => "TRUE", 'Height' => $#widgetList + 4, 'Width' => 40 ); # Keep doing this until we are told to leave. for ( ; ; ) { # Redraw the screen. Cdk::refreshCdkScreen(); my $choice = $helplist->activate(); # Exit if we have to . return if !defined $choice; return if ( $choice == $#widgetList ); # Create the help filename $helpfile = "${helpdir}/$helpFiles[$choice]"; $topic = "$widgetList[$choice]"; # Does the help file exist? if ( !-e $helpfile ) { my @error = ( "Can not seem to find the help file on the topic $topic", "Try setting the CDKHELPDIR environment variable", "or check if the help file '$helpfile' exists", "", "$CONTINUE" ); labelDemo(@error); } else { # Display the file. my @info = (); my $helpviewer = new Cdk::Viewer( 'Buttons' => ["OK"], 'Height' => $rows - 3, 'Width' => $cols - 2 ); chop( @info = `cat $helpfile` ); $helpviewer->set( 'Title' => "Help: $topic", 'Info' => \@info ); $helpviewer->activate(); } } } # # This is the callback function for the menu. # sub menuCallback { my $menu = shift; # Call the help function. main::help(); # Refresh the screen. Cdk::refreshCdkScreen(); return 1; } cdk-perl-20240606/README0000644000000000000000000000231514630415465013047 0ustar rootroot-- $Id: README,v 1.13 2024/06/06 20:25:25 tom Exp $ Cdk Perl5 Extension, Thomas Dickey Copyright 1999-2023,2024 Mike Glover, Copyright 1995-1999 ------------------------------------------------------------------------------ This is the Perl5 extension to the Cdk library written by Mike Glover. See MANIFEST for a list of files provided with this extension. See COPYING for the licensing terms for this package. See https://invisible-island.net/cdk/ ftp://ftp.invisible-island.net/cdk/ for the current version of this package. How to build/install: --------------------- 1. Make sure that Cdk (the C library libcdk and its header files) are installed. For example /usr/local/include/cdk/cdk.h (and other files) /usr/local/lib/libcdk.a (and perhaps a shared-library) 2. Run the configure script; it should find the Cdk library and header files. 3. Run these commands make make install Testing the Cdk extension: -------------------------- There are several examples in the subdirectories of this package: demo contains a few simple application programs. examples contains scripts which demonstrate each widget separately. fulldemo combines all of the widgets into a menu-driven application. cdk-perl-20240606/CHANGES0000644000000000000000000001155314630441166013163 0ustar rootroot-- $Id: CHANGES,v 1.52 2024/06/06 23:12:54 tom Exp $ -------------------------------------------------------------------------------- Cdk Perl change-list Modifications copyright Thomas E. Dickey 2001-2023,2024 -------------------------------------------------------------------------------- 2024/06/06 + improve configure script checks, reducing warnings + update config.guess, config.sub 2023/02/05 + improve configure script checks, reducing warnings 2022/10/25 + update test-package scripts 2022/10/20 + relicense as MIT-X11 + fix shellcheck warnings in fixpath script. + updated configure script + update config.guess, config.sub 2021/12/16 + build-fixes for newer gcc -Wformat warnings. + updated configure script + update config.guess, config.sub 2021/01/09 + updated configure script + update config.guess, config.sub 2020/09/23 + configure by default using cdk5-config + updated configure script + update config.guess, config.sub 2019/12/31 + indent'd top-level Cdk.pm; the other perl scripts were already done + updated configure script + update config.guess, config.sub 2019/02/25 + add "check" target to makefile, for Arch Linux test-package. + modified configure script to check for curses library in the case where neither cdk/cdkw config-scripts are used. + ported rpm test-package to OpenSUSE and Mageia. 2019/02/20 + use definition of dNOOP from perl 5.28.0 to fix most of the needless compiler warnings. + build-fix for ncurses 6's opaque WINDOW's. + modify fulldemo to set its working directory to make the examples' relative paths work. + update configure-script workaround for test-builds fixing regression in the uninstall rule. + fix perl 5.20.2 deprecation warnings. + updated configure script macros: CF_ADD_CFLAGS, CF_CC_ENV_FLAGS, CF_GCC_WARNINGS, CF_GNU_SOURCE, CF_POSIX_C_SOURCE, CF_PROG_EXT, CF_TRY_XOPEN_SOURCE, CF_XOPEN_SOURCE + update config.guess, config.sub 2015/09/28 + updated configure script 2014/11/06 + build-fixes for dpkg/rpm/ports test-packages 2013/08/16 + build-fix for perl 5.18 (patch by Niko Tyni, Debian #719578) 2013/07/17 + adapt files from FreeBSD port for test-builds. + add fix for demos/rolodex from FreeBSD port. + fix handling of Calendar's return value for activate and getDate methods. 2013/07/14 + indent demos/examples using perltidy. + reviewed demos/examples, made minor fixes, including using "strict". + remove unused flush.pl from ButtonBox.pm and Dialog.pm; this is no longer available with Fedora. + adapt RPM spec-file from pld.org for test-builds. + fix build with Perl 5.18 (patch by Niko Tyni, Debian #708593). + modify configure script to add $(BUILDDIR) variable to makefile, to help with test-builds which do not rely on chroot, etc. + use 'key' parameter in _Cdk::Calendar_Inject() + use attrib parameter in DrawMesg() + fix compiler warnings + add configure options to enable compiler warnings 2012/03/24 + fix boxes in help-messages, which had top/bottom segments too short. + modified Debian package scripts to copy "examples" directory under package's "examples" directory since the fulldemo scripts expect this layout. + modified Debian package scripts to make exclusion from compressing examples work for Debian 5.0 + make default path for help system "dynamic" (report/patch from Debian #519820) + add Debian package script, for testing 2006/01/03 + completed demos/bday + correct a typo in Cdk::Viewer (report/patch from Debian #312733). 2003/12/10 + eliminate most of fixed array limits. + correct logic of sv2int(), etc., broken by 2002/07/28 changes. + alter matrix interface to use setCDKMatrixCells() rather than setCDKMatrix(), since the latter dumps core due to an addressing limitation - an 8Mb struct might be too large. + update to match struct-member changes in current CDK snapshot's CDKSWINDOW struct. + replace complex macros except MAKE_CHAR_MATRIX with functions, fix several illegal memory references reported by valgrind. 2002/07/28 + change version number to correspond with Exporter.pm documentation. + add a MANIFEST, drop 'FILES' since it is redundant. + drop BUGS and NOTES since they are obsolete. + add Cdk::getVersion() method. + add a null-pointer check in sv2chtype(), needed for return-value from char2Chtype(). Also changed this function to have a single return point. + add fixpaths script, to allow examples and demos to be run easily. Just run fixpaths, and it will adjust the path to 'perl' in the first line of each example-script. 2001/04/21 + correct include-path for cdk.h (reports by Pawel Gajda and Ron Poulton ) + correct missing Box parameter of drawCDKMenu (Pawel Gajda). 2001/01/07 + modify to work with perl 5.6.0 + fix several places where functions did not return value. + modify some scripts to show nonblank character, e.g., for slider. cdk-perl-20240606/MANIFEST0000644000000000000000000001632014156752274013326 0ustar rootrootMANIFEST this file CHANGES changelog for Perl/Cdk COPYING copyright notice COPYING.asc copyright notice signature Cdk.pm perl module for Cdk Cdk.xs perl interface to Cdk Makefile.PL.in perl makefile template README overview (read this first) VERSION version information for shared libraries aclocal.m4 macros for autoconf config.guess utility script config.sub utility script configure configure script configure.in configure-script template fixpaths script to fix pathnames of perl in perl-scripts install-sh utility script typemap mapping between Perl and C parameter types Cdk/Alphalist.pm Cdk::Alphalist package Cdk/Buttonbox.pm Cdk::Buttonbox package Cdk/Calendar.pm Cdk::Calendar package Cdk/Debug.pm Cdk::Debug package Cdk/Diag.pm Cdk::Diag package Cdk/Dialog.pm Cdk::Dialog package Cdk/Entry.pm Cdk::Entry package Cdk/Fselect.pm Cdk::Fselect package Cdk/Graph.pm Cdk::Graph package Cdk/Histogram.pm Cdk::Histogram package Cdk/Itemlist.pm Cdk::Itemlist package Cdk/Label.pm Cdk::Label package Cdk/Marquee.pm Cdk::Marquee package Cdk/Matrix.pm Cdk::Matrix package Cdk/Mentry.pm Cdk::Mentry package Cdk/Menu.pm Cdk::Menu package Cdk/Radio.pm Cdk::Radio package Cdk/Scale.pm Cdk::Scale package Cdk/Scroll.pm Cdk::Scroll package Cdk/Selection.pm Cdk::Selection package Cdk/Slider.pm Cdk::Slider package Cdk/Swindow.pm Cdk::Swindow package Cdk/Template.pm Cdk::Template package Cdk/Viewer.pm Cdk::Viewer package demos/async Demonstrates how to manipulate defined widgets asynchronously. demos/bday Demonstrates how to use the calendar widget. demos/perlbug Rips off Larry's utils/perlbug program. demos/pkgInfo Basic Solaris package install/remove program. demos/pwdInfo Basic password file browser. demos/rolodex Comprehensive personal rolodex. demos/workman A workman database editor examples/alphalist Demonstrates the alphalist widget. examples/bind Demonstrates how to use the bind function. examples/buttonbox Demonstrates the buttonbox widget. examples/calendar Demonstrates the calendar widget. examples/dialog Demonstrates the dialog widget. examples/entry Demonstrates the entry widget. examples/fselect Demonstrates the file selector widget. examples/graph Demonstrates the graph widget. examples/histogram Demonstrates the histogram widget. examples/itemlist Demonstrates the itemlist widget. examples/label Demonstrates the label widget. examples/marquee Demonstrates the marquee widget. examples/matrix Demonstrates the matrix widget. examples/mentry Demonstrates the mentry widget. examples/menu Demonstrates the menu widget. examples/postProcess Demonstrates how to use the post-process capabilities. examples/preProcess Demonstrates how to use the pre-process capabilities. examples/radio Demonstrates the radio-button widget. examples/scale Demonstrates the scale widget. examples/scroll Demonstrates the scroll widget. examples/selection Demonstrates the selection widget. examples/slider Demonstrates the slider widget. examples/swindow Demonstrates the scrolling window widget. examples/template Demonstrates the template widget. examples/viewer Demonstrates the viewer widget. fulldemo/cdkdemo combines all of the widgets via pulldown-menus fulldemo/help/alphalist.help description of alphalist-widget fulldemo/help/binding.help description of binding-widget fulldemo/help/bugs.help known bugs in Perl+Cdk fulldemo/help/calendar.help description of calendar-widget fulldemo/help/charfile.help using line-drawing graphics in Perl+Cdk fulldemo/help/colors.help how to use color in Perl+Cdk fulldemo/help/concepts.help concepts & terminology used in Perl+Cdk fulldemo/help/debug.help comments on debugging Perl+Cdk fulldemo/help/dialog.help description of dialog-widget fulldemo/help/display.help notes on display-options fulldemo/help/entry.help description of entry-widget fulldemo/help/fselect.help description of fselect-widget fulldemo/help/future.help wishlist/future development fulldemo/help/general.help general comments on Perl+Cdk fulldemo/help/graph.help description of graph-widget fulldemo/help/histogram.help description of histogram-widget fulldemo/help/itemlist.help description of itemlist-widget fulldemo/help/label.help description of label-widget fulldemo/help/marquee.help description of marquee-widget fulldemo/help/matrix.help description of matrix-widget fulldemo/help/mentry.help description of mentry-widget fulldemo/help/menu.help description of menu-widget fulldemo/help/postprocess.help description of postprocess-widget fulldemo/help/preprocess.help description of preprocess-widget fulldemo/help/radio.help description of radio-widget fulldemo/help/scale.help description of scale-widget fulldemo/help/scroll.help description of scroll-widget fulldemo/help/selection.help description of selection-widget fulldemo/help/slider.help description of slider-widget fulldemo/help/special.help special keywords used in Cdk's viewer fulldemo/help/swindow.help description of swindow-widget fulldemo/help/template.help description of template-widget fulldemo/help/viewer.help description of viewer-widget package/cdk-perl.spec spec file originally from PLD package/debian/README.source Debian build script package/debian/changelog Debian build script package/debian/clean Debian build script package/debian/compat Debian build script package/debian/control Debian build script package/debian/copyright Debian build script package/debian/libcdk-perl.examples Debian build script package/debian/libcdk-perl.lintian-overrides Debian build script package/debian/rules Debian build script package/debian/source/format Debian build script package/debian/watch Debian build script package/freebsd/Makefile FreeBSD port package/freebsd/distinfo FreeBSD port package/freebsd/pkg-descr FreeBSD port package/freebsd/pkg-plist FreeBSD port cdk-perl-20240606/config.sub0000755000000000000000000010775614543033627014170 0ustar rootroot#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale timestamp='2023-12-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. # The "shellcheck disable" line above the timestamp inhibits complaints # about features and limitations of the classic Bourne shell that were # superseded or lifted in POSIX. However, this script identifies a wide # variety of pre-POSIX systems that do not have POSIX shells at all, and # even some reasonably current systems (Solaris 10 as case-in-point) still # have a pre-POSIX /bin/sh. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) # First pass through any local machine types. echo "$1" exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Split fields of configuration type # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <&2 exit 1 ;; *-*-*-*) basic_machine=$field1-$field2 basic_os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \ | windows-* ) basic_machine=$field1 basic_os=$maybe_os ;; android-linux) basic_machine=$field1-unknown basic_os=linux-android ;; *) basic_machine=$field1-$field2 basic_os=$field3 ;; esac ;; *-*) # A lone config we happen to match not fitting any pattern case $field1-$field2 in decstation-3100) basic_machine=mips-dec basic_os= ;; *-*) # Second component is usually, but not always the OS case $field2 in # Prevent following clause from handling this valid os sun*os*) basic_machine=$field1 basic_os=$field2 ;; zephyr*) basic_machine=$field1-unknown basic_os=$field2 ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ | unicom* | ibm* | next | hp | isi* | apollo | altos* \ | convergent* | ncr* | news | 32* | 3600* | 3100* \ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ | ultra | tti* | harris | dolphin | highlevel | gould \ | cbm | ns | masscomp | apple | axis | knuth | cray \ | microblaze* | sim | cisco \ | oki | wec | wrs | winbond) basic_machine=$field1-$field2 basic_os= ;; *) basic_machine=$field1 basic_os=$field2 ;; esac ;; esac ;; *) # Convert single-component short-hands not valid as part of # multi-component configurations. case $field1 in 386bsd) basic_machine=i386-pc basic_os=bsd ;; a29khif) basic_machine=a29k-amd basic_os=udi ;; adobe68k) basic_machine=m68010-adobe basic_os=scout ;; alliant) basic_machine=fx80-alliant basic_os= ;; altos | altos3068) basic_machine=m68k-altos basic_os= ;; am29k) basic_machine=a29k-none basic_os=bsd ;; amdahl) basic_machine=580-amdahl basic_os=sysv ;; amiga) basic_machine=m68k-unknown basic_os= ;; amigaos | amigados) basic_machine=m68k-unknown basic_os=amigaos ;; amigaunix | amix) basic_machine=m68k-unknown basic_os=sysv4 ;; apollo68) basic_machine=m68k-apollo basic_os=sysv ;; apollo68bsd) basic_machine=m68k-apollo basic_os=bsd ;; aros) basic_machine=i386-pc basic_os=aros ;; aux) basic_machine=m68k-apple basic_os=aux ;; balance) basic_machine=ns32k-sequent basic_os=dynix ;; blackfin) basic_machine=bfin-unknown basic_os=linux ;; cegcc) basic_machine=arm-unknown basic_os=cegcc ;; convex-c1) basic_machine=c1-convex basic_os=bsd ;; convex-c2) basic_machine=c2-convex basic_os=bsd ;; convex-c32) basic_machine=c32-convex basic_os=bsd ;; convex-c34) basic_machine=c34-convex basic_os=bsd ;; convex-c38) basic_machine=c38-convex basic_os=bsd ;; cray) basic_machine=j90-cray basic_os=unicos ;; crds | unos) basic_machine=m68k-crds basic_os= ;; da30) basic_machine=m68k-da30 basic_os= ;; decstation | pmax | pmin | dec3100 | decstatn) basic_machine=mips-dec basic_os= ;; delta88) basic_machine=m88k-motorola basic_os=sysv3 ;; dicos) basic_machine=i686-pc basic_os=dicos ;; djgpp) basic_machine=i586-pc basic_os=msdosdjgpp ;; ebmon29k) basic_machine=a29k-amd basic_os=ebmon ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson basic_os=ose ;; gmicro) basic_machine=tron-gmicro basic_os=sysv ;; go32) basic_machine=i386-pc basic_os=go32 ;; h8300hms) basic_machine=h8300-hitachi basic_os=hms ;; h8300xray) basic_machine=h8300-hitachi basic_os=xray ;; h8500hms) basic_machine=h8500-hitachi basic_os=hms ;; harris) basic_machine=m88k-harris basic_os=sysv3 ;; hp300 | hp300hpux) basic_machine=m68k-hp basic_os=hpux ;; hp300bsd) basic_machine=m68k-hp basic_os=bsd ;; hppaosf) basic_machine=hppa1.1-hp basic_os=osf ;; hppro) basic_machine=hppa1.1-hp basic_os=proelf ;; i386mach) basic_machine=i386-mach basic_os=mach ;; isi68 | isi) basic_machine=m68k-isi basic_os=sysv ;; m68knommu) basic_machine=m68k-unknown basic_os=linux ;; magnum | m3230) basic_machine=mips-mips basic_os=sysv ;; merlin) basic_machine=ns32k-utek basic_os=sysv ;; mingw64) basic_machine=x86_64-pc basic_os=mingw64 ;; mingw32) basic_machine=i686-pc basic_os=mingw32 ;; mingw32ce) basic_machine=arm-unknown basic_os=mingw32ce ;; monitor) basic_machine=m68k-rom68k basic_os=coff ;; morphos) basic_machine=powerpc-unknown basic_os=morphos ;; moxiebox) basic_machine=moxie-unknown basic_os=moxiebox ;; msdos) basic_machine=i386-pc basic_os=msdos ;; msys) basic_machine=i686-pc basic_os=msys ;; mvs) basic_machine=i370-ibm basic_os=mvs ;; nacl) basic_machine=le32-unknown basic_os=nacl ;; ncr3000) basic_machine=i486-ncr basic_os=sysv4 ;; netbsd386) basic_machine=i386-pc basic_os=netbsd ;; netwinder) basic_machine=armv4l-rebel basic_os=linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony basic_os=newsos ;; news1000) basic_machine=m68030-sony basic_os=newsos ;; necv70) basic_machine=v70-nec basic_os=sysv ;; nh3000) basic_machine=m68k-harris basic_os=cxux ;; nh[45]000) basic_machine=m88k-harris basic_os=cxux ;; nindy960) basic_machine=i960-intel basic_os=nindy ;; mon960) basic_machine=i960-intel basic_os=mon960 ;; nonstopux) basic_machine=mips-compaq basic_os=nonstopux ;; os400) basic_machine=powerpc-ibm basic_os=os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson basic_os=ose ;; os68k) basic_machine=m68k-none basic_os=os68k ;; paragon) basic_machine=i860-intel basic_os=osf ;; parisc) basic_machine=hppa-unknown basic_os=linux ;; psp) basic_machine=mipsallegrexel-sony basic_os=psp ;; pw32) basic_machine=i586-unknown basic_os=pw32 ;; rdos | rdos64) basic_machine=x86_64-pc basic_os=rdos ;; rdos32) basic_machine=i386-pc basic_os=rdos ;; rom68k) basic_machine=m68k-rom68k basic_os=coff ;; sa29200) basic_machine=a29k-amd basic_os=udi ;; sei) basic_machine=mips-sei basic_os=seiux ;; sequent) basic_machine=i386-sequent basic_os= ;; sps7) basic_machine=m68k-bull basic_os=sysv2 ;; st2000) basic_machine=m68k-tandem basic_os= ;; stratus) basic_machine=i860-stratus basic_os=sysv4 ;; sun2) basic_machine=m68000-sun basic_os= ;; sun2os3) basic_machine=m68000-sun basic_os=sunos3 ;; sun2os4) basic_machine=m68000-sun basic_os=sunos4 ;; sun3) basic_machine=m68k-sun basic_os= ;; sun3os3) basic_machine=m68k-sun basic_os=sunos3 ;; sun3os4) basic_machine=m68k-sun basic_os=sunos4 ;; sun4) basic_machine=sparc-sun basic_os= ;; sun4os3) basic_machine=sparc-sun basic_os=sunos3 ;; sun4os4) basic_machine=sparc-sun basic_os=sunos4 ;; sun4sol2) basic_machine=sparc-sun basic_os=solaris2 ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun basic_os= ;; sv1) basic_machine=sv1-cray basic_os=unicos ;; symmetry) basic_machine=i386-sequent basic_os=dynix ;; t3e) basic_machine=alphaev5-cray basic_os=unicos ;; t90) basic_machine=t90-cray basic_os=unicos ;; toad1) basic_machine=pdp10-xkl basic_os=tops20 ;; tpf) basic_machine=s390x-ibm basic_os=tpf ;; udi29k) basic_machine=a29k-amd basic_os=udi ;; ultra3) basic_machine=a29k-nyu basic_os=sym1 ;; v810 | necv810) basic_machine=v810-nec basic_os=none ;; vaxv) basic_machine=vax-dec basic_os=sysv ;; vms) basic_machine=vax-dec basic_os=vms ;; vsta) basic_machine=i386-pc basic_os=vsta ;; vxworks960) basic_machine=i960-wrs basic_os=vxworks ;; vxworks68) basic_machine=m68k-wrs basic_os=vxworks ;; vxworks29k) basic_machine=a29k-wrs basic_os=vxworks ;; xbox) basic_machine=i686-pc basic_os=mingw32 ;; ymp) basic_machine=ymp-cray basic_os=unicos ;; *) basic_machine=$1 basic_os= ;; esac ;; esac # Decode 1-component or ad-hoc basic machines case $basic_machine in # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) cpu=hppa1.1 vendor=winbond ;; op50n) cpu=hppa1.1 vendor=oki ;; op60c) cpu=hppa1.1 vendor=oki ;; ibm*) cpu=i370 vendor=ibm ;; orion105) cpu=clipper vendor=highlevel ;; mac | mpw | mac-mpw) cpu=m68k vendor=apple ;; pmac | pmac-mpw) cpu=powerpc vendor=apple ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) cpu=m68000 vendor=att ;; 3b*) cpu=we32k vendor=att ;; bluegene*) cpu=powerpc vendor=ibm basic_os=cnk ;; decsystem10* | dec10*) cpu=pdp10 vendor=dec basic_os=tops10 ;; decsystem20* | dec20*) cpu=pdp10 vendor=dec basic_os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) cpu=m68k vendor=motorola ;; dpx2*) cpu=m68k vendor=bull basic_os=sysv3 ;; encore | umax | mmax) cpu=ns32k vendor=encore ;; elxsi) cpu=elxsi vendor=elxsi basic_os=${basic_os:-bsd} ;; fx2800) cpu=i860 vendor=alliant ;; genix) cpu=ns32k vendor=ns ;; h3050r* | hiux*) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) cpu=m68000 vendor=hp ;; hp9k3[2-9][0-9]) cpu=m68k vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) cpu=hppa1.1 vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; i*86v32) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv32 ;; i*86v4*) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv4 ;; i*86v) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv ;; i*86sol2) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=solaris2 ;; j90 | j90-cray) cpu=j90 vendor=cray basic_os=${basic_os:-unicos} ;; iris | iris4d) cpu=mips vendor=sgi case $basic_os in irix*) ;; *) basic_os=irix4 ;; esac ;; miniframe) cpu=m68000 vendor=convergent ;; *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) cpu=m68k vendor=atari basic_os=mint ;; news-3600 | risc-news) cpu=mips vendor=sony basic_os=newsos ;; next | m*-next) cpu=m68k vendor=next case $basic_os in openstep*) ;; nextstep*) ;; ns2*) basic_os=nextstep2 ;; *) basic_os=nextstep3 ;; esac ;; np1) cpu=np1 vendor=gould ;; op50n-* | op60c-*) cpu=hppa1.1 vendor=oki basic_os=proelf ;; pa-hitachi) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; pbd) cpu=sparc vendor=tti ;; pbb) cpu=m68k vendor=tti ;; pc532) cpu=ns32k vendor=pc532 ;; pn) cpu=pn vendor=gould ;; power) cpu=power vendor=ibm ;; ps2) cpu=i386 vendor=ibm ;; rm[46]00) cpu=mips vendor=siemens ;; rtpc | rtpc-*) cpu=romp vendor=ibm ;; sde) cpu=mipsisa32 vendor=sde basic_os=${basic_os:-elf} ;; simso-wrs) cpu=sparclite vendor=wrs basic_os=vxworks ;; tower | tower-32) cpu=m68k vendor=ncr ;; vpp*|vx|vx-*) cpu=f301 vendor=fujitsu ;; w65) cpu=w65 vendor=wdc ;; w89k-*) cpu=hppa1.1 vendor=winbond basic_os=proelf ;; none) cpu=none vendor=none ;; leon|leon[3-9]) cpu=sparc vendor=$basic_machine ;; leon-*|leon[3-9]-*) cpu=sparc vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; *-*) # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read cpu vendor <&2 exit 1 ;; esac ;; esac # Here we canonicalize certain aliases for manufacturers. case $vendor in digital*) vendor=dec ;; commodore*) vendor=cbm ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if test x"$basic_os" != x then # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just # set os. obj= case $basic_os in gnu/linux*) kernel=linux os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` ;; os2-emx) kernel=os2 os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` ;; nto-qnx*) kernel=nto os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` ;; *-*) # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read kernel os <&2 fi ;; *) echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 exit 1 ;; esac case $obj in aout* | coff* | elf* | pe*) ;; '') # empty is fine ;; *) echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 exit 1 ;; esac # Here we handle the constraint that a (synthetic) cpu and os are # valid only in combination with each other and nowhere else. case $cpu-$os in # The "javascript-unknown-ghcjs" triple is used by GHC; we # accept it here in order to tolerate that, but reject any # variations. javascript-ghcjs) ;; javascript-* | *-ghcjs) echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 exit 1 ;; esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. case $kernel-$os-$obj in linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ | linux-mlibc*- | linux-musl*- | linux-newlib*- \ | linux-relibc*- | linux-uclibc*- ) ;; uclinux-uclibc*- ) ;; managarm-mlibc*- | managarm-kernel*- ) ;; windows*-msvc*-) ;; -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ | -uclibc*- ) # These are just libc implementations, not actual OSes, and thus # require a kernel. echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 exit 1 ;; -kernel*- ) echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 exit 1 ;; *-kernel*- ) echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 exit 1 ;; *-msvc*- ) echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 exit 1 ;; kfreebsd*-gnu*- | kopensolaris*-gnu*-) ;; vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) ;; nto-qnx*-) ;; os2-emx-) ;; *-eabi*- | *-gnueabi*-) ;; none--*) # None (no kernel, i.e. freestanding / bare metal), # can be paired with an machine code file format ;; -*-) # Blank kernel with real OS is always fine. ;; --*) # Blank kernel and OS with real machine code file format is always fine. ;; *-*-*) echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 exit 1 ;; esac # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. case $vendor in unknown) case $cpu-$os in *-riscix*) vendor=acorn ;; *-sunos*) vendor=sun ;; *-cnk* | *-aix*) vendor=ibm ;; *-beos*) vendor=be ;; *-hpux*) vendor=hp ;; *-mpeix*) vendor=hp ;; *-hiux*) vendor=hitachi ;; *-unos*) vendor=crds ;; *-dgux*) vendor=dg ;; *-luna*) vendor=omron ;; *-genix*) vendor=ns ;; *-clix*) vendor=intergraph ;; *-mvs* | *-opened*) vendor=ibm ;; *-os400*) vendor=ibm ;; s390-* | s390x-*) vendor=ibm ;; *-ptx*) vendor=sequent ;; *-tpf*) vendor=ibm ;; *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; *-aux*) vendor=apple ;; *-hms*) vendor=hitachi ;; *-mpw* | *-macos*) vendor=apple ;; *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; *-vos*) vendor=stratus ;; esac ;; esac echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" exit # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: cdk-perl-20240606/install-sh0000755000000000000000000003577613761220263014206 0ustar rootroot#!/bin/sh # install - install a program, script, or datafile scriptversion=2020-11-14.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 # Create dirs (including intermediate dirs) using mode 755. # This is like GNU 'install' as of coreutils 8.32 (2020). mkdir_umask=22 backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -p pass -p to $cpprog. -s $stripprog installed files. -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG By default, rm is invoked with -f; when overridden with RMPROG, it's up to you to specify -f if you want it. If -S is not specified, no backups are attempted. Email bug reports to bug-automake@gnu.org. Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -p) cpprog="$cpprog -p";; -s) stripcmd=$stripprog;; -S) backupsuffix="$2" shift;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? # Don't chown directories that already exist. if test $dstdir_status = 0; then chowncmd="" fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dstbase=`basename "$src"` case $dst in */) dst=$dst$dstbase;; *) dst=$dst/$dstbase;; esac dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi case $dstdir in */) dstdirslash=$dstdir;; *) dstdirslash=$dstdir/;; esac obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false # The $RANDOM variable is not portable (e.g., dash). Use it # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap ' ret=$? rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null exit $ret ' 0 # Because "mkdir -p" follows existing symlinks and we likely work # directly in world-writeable /tmp, make sure that the '$tmpdir' # directory is successfully created first before we actually test # 'mkdir -p'. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=${dstdirslash}_inst.$$_ rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && { test -z "$stripcmd" || { # Create $dsttmp read-write so that cp doesn't create it read-only, # which would cause strip to fail. if test -z "$doit"; then : >"$dsttmp" # No need to fork-exec 'touch'. else $doit touch "$dsttmp" fi } } && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # If $backupsuffix is set, and the file being installed # already exists, attempt a backup. Don't worry if it fails, # e.g., if mv doesn't support -f. if test -n "$backupsuffix" && test -f "$dst"; then $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null fi # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: cdk-perl-20240606/Cdk.pm0000644000000000000000000001147214630415236013226 0ustar rootroot# $Id: Cdk.pm,v 1.28 2024/06/06 20:22:54 tom Exp $ package Cdk; use Exporter (); use DynaLoader (); use AutoLoader (); @ISA = qw(Exporter DynaLoader); # Force input buffering off. select(STDIN); $| = 1; # Set the version. $VERSION = "5.20240606"; # must be a floating-point number # Set the diag flag off. $DIAGFLAG = 0; # Items to export into callers' namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. @EXPORT = qw (VERSION checkDef checkReq popupLabel popupDialog); sub AUTOLOAD { # This AUTOLOAD is used to 'autoload' constants from the constant() # XS function. If a constant is not found then control is passed # to the AUTOLOAD in AutoLoader. my $constname; ( $constname = $AUTOLOAD ) =~ s/.*:://; my $val = constant( $constname, @_ ? $_[0] : 0 ); if ( $! != 0 ) { if ( $! =~ /Invalid/ ) { $AutoLoader::AUTOLOAD = $AUTOLOAD; goto &AutoLoader::AUTOLOAD; } else { die "Your vendor has not defined Cdk macro $constname"; } } eval "sub $AUTOLOAD { $val }"; goto &$AUTOLOAD; } bootstrap Cdk; # # This draws a string on the given/or not window. # sub drawMesg { my $type = shift; my %params = @_; my $name = "${type}::new"; my ( $mesg, $xpos, $ypos, $attrib, $window ); # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. $mesg = Cdk::checkReq( $name, "Message", $params{'Message'} ); $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, Cdk::CENTER() ); $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, Cdk::CENTER() ); $attrib = Cdk::checkDef( $name, "Attrib", $params{'Attrib'}, Cdk::A_NORMAL() ); $align = Cdk::checkDef( $name, "Align", $params{'Align'}, Cdk::HORIZONTAL() ); # If they passed an object, dereference its window and draw on it. if ( $params{'Object'} ) { $window = $params{'Object'}->getWindow(); } else { $window = Cdk::getCdkWindow(); } # Start drawing. Cdk::DrawMesg( $window, $mesg, $xpos, $ypos, $attrib, $align ); } # # This checks if a value has been given a value, if not, then it gives it one. # sub checkDef { my ( $type, $name, $value, $def ) = @_; # Check if it is defined. if ( !defined $value ) { Cdk::Diag::Log( "Diag", $type, "Default parameter $name being set to default value <$def>" ); return ($def); } else { Cdk::Diag::Log( "Diag", $type, "Default parameter $name being set to value <$def>" ); return ($value); } } # # This checks if a value has been given a value. If not it reports an error. # sub checkReq { my ( $type, $name, $value ) = @_; # Check if it is defined. if ( !defined $value ) { # Close the Cdk screen and shut down curses. Cdk::end(); # Report the error. Cdk::Diag::Log( "Error", $type, "Required parameter $name has no value." ); # Get out. exit(1); } else { # Report the info. Cdk::Diag::Log( "Diag", $type, "Required parameter $name being set to <$value>" ); return ($value); } } # # This pops up a label. # sub popupLabel { my $mesg = shift; my $popup = new Cdk::Label( "Message" => $mesg ); $popup->draw(); $popup->wait(); } # # This pops up a question on the screen. # sub popupDialog { my ( $mesg, $buttons ) = @_; my $popup = new Cdk::Dialog( 'Message' => $mesg, 'Buttons' => $buttons ); return $popup->activate(); } # # This function takes a scalar and returns a list with elements in the # list to the given width. # sub scalar2List { my ( $scalar, $elementLen ) = @_; my $tempLine = ""; my $lineLen = 0; my @info = (); my $x = 0; # Break the scalar into a list. $_ = $scalar; my @wordList = split; # Put each scalar back into an array of $elementLen length or more. for ( $x = 0 ; $x <= $#wordList ; $x++ ) { $lineLen += length( $wordList[$x] ); $tempLine .= "$wordList[$x] "; if ( $lineLen >= $elementLen ) { push( @info, $tempLine ); $tempLine = ""; $lineLen = 0; } } push( @info, $tempLine ); return @info; } # # Load the object modules. # use Cdk::Alphalist; use Cdk::Buttonbox; use Cdk::Calendar; use Cdk::Diag; use Cdk::Dialog; use Cdk::Entry; use Cdk::Fselect; use Cdk::Graph; use Cdk::Histogram; use Cdk::Itemlist; use Cdk::Label; use Cdk::Marquee; use Cdk::Matrix; use Cdk::Mentry; use Cdk::Menu; use Cdk::Radio; use Cdk::Scale; use Cdk::Scroll; use Cdk::Selection; use Cdk::Slider; use Cdk::Swindow; use Cdk::Template; use Cdk::Viewer; 1; __END__ cdk-perl-20240606/demos/0000755000000000000000000000000013432342135013265 5ustar rootrootcdk-perl-20240606/demos/pwdInfo0000755000000000000000000000355712171570657014646 0ustar rootroot#!/usr/bin/perl -w # $Id: pwdInfo,v 1.4 2013/07/17 19:34:07 tom Exp $ # # This reads the passwd file and creates an interface to browse the # information. # use strict; use Cdk; Cdk::init(); # # This function loads up the passwd file and returns a reference to the # data structure. # sub loadPasswd { my %passwd = (); my @logins = (); my ( $name, $passwd, $uid, $gid, $quota, $comment, $gcos, $dir, $shell ); # Start reading through the passwd file. while ( ( $name, $passwd, $uid, $gid, $quota, $comment, $gcos, $dir, $shell ) = getpwent ) { # Store the information. $passwd{$name} = "$uid$gid$comment$gcos$dir$shell"; push( @logins, $name ); } return ( \@logins, \%passwd ); } # Load up the passwd file. my ( $logins, $passwdObject ) = loadPasswd(); # Create a scrolling list of all the names. my $mainScroll = new Cdk::Scroll( 'Title' => 'Pick An Account', 'Numbers' => "TRUE", 'List' => $logins, 'Height' => 13, 'Width' => 45 ); # Do this forever. for ( ; ; ) { # Let the user select the login to view. my $selected = $mainScroll->activate(); # Did the user just hit escape? if ( !defined $selected ) { Cdk::end(); exit 0; } # Get the name and display the info. my $name = $logins->[$selected]; # Display the info. my ( $uid, $gid, $comment, $gcos, $dir, $shell ) = split( //, $passwdObject->{$name} ); my $info = [ "Account Name : $name", "UID/GID : ($uid/$gid)", "Comment : $comment", "GCOS Value : $gcos", "Home Directory : $dir", "Shell : $shell" ]; my $title = new Cdk::Label( 'Message' => $info ); # Draw the label. $title->draw( 'Box' => "TRUE" ); $title->wait(); undef $title; } cdk-perl-20240606/demos/perlbug0000755000000000000000000003041612171570656014671 0ustar rootroot#!/usr/bin/perl -w # $Id: perlbug,v 1.6 2013/07/17 19:34:06 tom Exp $ # # Purpose: # This 'rips' off Larry's perlbug from the utils directory. use strict; # Determine if the user has one of the mail modules. BEGIN { eval "use Mail::Send;"; $::HaveSend = ( $@ eq "" ); } use Config; use Sys::Hostname; use Getopt::Std; our ( $opt_a, $opt_c, $opt_f, $opt_h, $opt_r, $opt_s, $opt_v ); our $cc; # # Load in the Cdk Extension. # use Cdk; Cdk::init(); # Create global variables. my ($Version) = "1.00"; my $address = "perlbug\@perl.com"; # Check the command line arguments. getopts("c:a:f:r:s:vh"); # Did they ask for help? if ( defined $opt_h ) { my @help = ( "Perl Bug Reporting Facility Help Window.", "Usage: $0 [-c CC] [-a Admin Account]", " [-r Reply Account] [-s subject]", " [-f filename] [-v] [-h]", "", " The account to carbon copy to.", " The perl admin account.", " The account to reply to.", " The subject of the bug report.", " The file to read in as the bug report.", " Turns on verbose output for the bug report.", " Pops up this help window.", "", "Press Any Key To Continue." ); popupLabel( \@help ); } # Create a program information message. my @progInfo = ( "Perl Bug Reporting Facility", "Version $Version", "", "This program allows you to create a bug report which will be", "mailed to $address once the report has been filled out.", "", "Hit any key when you are ready to start." ); popupLabel( \@progInfo ); # Create the generic label. my @mesg = ( "******************************************************", "******************************************************", "******************************************************", "******************************************************" ); my $mainTitle = new Cdk::Label( 'Message' => \@mesg, 'Xpos' => "TOP" ); # Get the subject to the mail message. my $subject = $opt_s || getSubject($mainTitle); my $verbose = $opt_v; # Get the reply address. @mesg = ( "Return Email Address", "Enter your return e-mail address." ); my $defaultReplyAddress = getlogin() . "@" . hostname() . "."; my $replyAddress = $opt_r || getEmailAddress( $mainTitle, $defaultReplyAddress, @mesg ); # Get the perl admin address. @mesg = ( "Perl Admin Email Address", "Enter the email address of the perl admin." ); my $defaultAdminAddress = $::Config{perladmin}; my $adminAddress = $opt_a || getEmailAddress( $mainTitle, $defaultAdminAddress, @mesg ); # Create the bug report. my @report = createBugReport( $mainTitle, $subject, $opt_f ); # View the bug report. viewBugReport( $subject, $replyAddress, $adminAddress, $cc, @report ); exit; ############################################################################ # # This gets the subject to the bug report. # sub getSubject { my $mainTitle = shift; # Create the subject entry field. my $entry = new Cdk::Entry( 'Label' => "Subject: ", 'Width' => 35, 'Min' => 3, 'Max' => 256 ); # Set the main title info. @mesg = ( "Enter Subject", "Please provide a subject for the message. It", "should be as a concise description of the bug", "as is possible." ); $mainTitle->set( 'Message' => \@mesg ); $mainTitle->draw(); # Get the subject. while (1) { my $subject = $entry->activate(); last if defined $subject; # No subject, prompt them for one... popupLabel( [ "Error", "You must have a subject line for the mail message.", "", "Please try again." ] ); } return $subject; } ############################################################################ # # This gets an emial address. # sub getEmailAddress { my ( $mainTitle, $entryValue, @mesg ) = @_; my $info; # Set the main title info. $mainTitle->set( 'Message' => \@mesg ); # Create the entry field to get the email address. my $entry = new Cdk::Entry( 'Label' => "email Address: ", 'Min' => 3, 'Max' => 256, 'Width' => 35 ); # Put the user name in the entry field. $entry->set( 'Value' => "$entryValue" ); # Get the emial address while (1) { $info = $entry->activate(); last if defined $info; # No subject, prompt them for one... popupLabel( [ "Error", "You must provide an email address.", "", "Please Try again." ] ); } return $info; } ############################################################################ # # This gets the bug report from the user. # sub createBugReport { my ( $mainTitle, $subject, $filename ) = @_; my @bugReport = (); my @info = (); my $info; # If a filename has been speicifed, then we will use the contents of the # file for the bug report. if ( defined $filename && -e $filename ) { open( FILE, $filename ); my @tmp = ; chomp(@tmp); return @tmp; } # Create the title. my @mesg = ( "Bug Report", "Enter a description of the bug you are submitting." ); # Set the main title info. $mainTitle->set( 'Message' => \@mesg ); # Create the entry field to get the email address. my $entry = new Cdk::Mentry( 'Label' => "Description: ", 'Prows' => 8, 'Lrows' => 15, 'Width' => 50 ); # Get the bug report. while (1) { $info = $entry->activate(); last if defined $info; # No subject, prompt them for one... popupLabel( [ "Error", "You must provide a description of the bug.", "", "Please Try again." ] ); } # Split the string into a list. @info = Cdk::scalar2List( $info, 40 ); # Create the bug report. my $from = `whoami`; push( @bugReport, "This is a bug report for perl from $from generated with" ); push( @bugReport, "the help of the Cdk version of perlbug running under perl $]." ); push( @bugReport, "" ); push( @bugReport, "Subject: $subject" ); push( @bugReport, "" ); for ( my $x = 0 ; $x <= $#info ; $x++ ) { push( @bugReport, $info[$x] ); } push( @bugReport, "" ); push( @bugReport, "Site configuration information for perl $]:" ); if ( $::Config{cf_by} and $::Config{cf_time} ) { push( @bugReport, "Configured by $::Config{cf_by} at $::Config{cf_time}." ); } push( @bugReport, "" ); foreach ( split( /\n/, Config::myconfig ) ) { push( @bugReport, $_ ); } # Do they want a verbose bug report? if ($::opt_v) { push( @bugReport, "" ); push( @bugReport, "Complete configuration data for perl $]:" ); push( @bugReport, "" ); foreach ( sort keys %::Config ) { my $value = $::Config{$_}; $value =~ s/'/\\'/g; push( @bugReport, "$_='$value'" ); } } return @bugReport; } ############################################################################ # # This views the bug report. # sub viewBugReport { my ( $subject, $replyAddress, $adminAddress, @bugReport ) = @_; my @buttons = ("OK"); # Get the height and width of the screen. my ( $height, $width ) = Cdk::getCdkScreenDim(); $height -= 3; $width -= 3; # Create the file viewer. my $viewer = new Cdk::Viewer( 'Buttons' => \@buttons, 'Height' => $height, 'Width' => $width ); # Fill the viewer with the contents of the bug report. $viewer->set( 'Title' => "Bug Report", 'Highlight' => "", 'Info' => \@bugReport ); $viewer->activate(); # Ask them what they want to do with the bug report. my @mesg = ( "Now that the bug report has been created, you can", "send the bug report to $replyAddress and $adminAddress,", "or you can save the report to a file and send it later", "on your own, or you can quit without saving or sending", "the bug report." ); @buttons = ( "Send", "Save", "Cancel" ); my $choice = popupDialog( \@mesg, \@buttons ); # Redraw the viewer widget. $viewer->draw(); # Check what they want to do. if ( $choice == 0 ) { # Mail to bug report. sendBugReport( $subject, $replyAddress, $adminAddress, @bugReport ); } elsif ( $choice == 1 ) { # Save to a file. saveBugReport(@bugReport); } else { popupLabel( ["Send Bug Report Canceled."] ); } } # # This saves the bug report to a file. # sub saveBugReport { my @bugReport = @_; my $filename; # Get the filename to save to. my $entry = new Cdk::Entry( 'Label' => "Filename: ", 'Width' => 30, 'Min' => 2, 'Max' => 256 ); # Make sure we can write to the file. while (1) { # Get the filename. $filename = $entry->activate(); # Try to open the filename. last if open( FILE, ">$filename" ); popupLabel( [ "Error", "Can not save to the file $filename" ] ); } # Save the bug report to the file. foreach (@bugReport) { print FILE "$_\n"; } close(FILE); # Tell the user the file has been saved. popupLabel( [ "The bug report has been saved to $filename", "", "Press any key to continue." ] ); } # # This sends the bug report to the given addresses. # sub sendBugReport { my ( $subject, $replyAddress, $adminAddress, $cc, @bugReport ) = @_; my $address = "perlbug\@perl.com"; # Do we have the sendmail module? if ($::HaveSend) { # Create a mail object. my $mailMessage = new Mail::Send( 'Subject' => "$subject", 'To' => "$address" ); # Add a carbon copy, if we have one. $mailMessage->cc($cc) if $cc; # Add a from line. $mailMessage->add( "Reply-To" => $replyAddress ) if $replyAddress; # Open the mail message and write the contents. my $fh = $mailMessage->open; foreach (@bugReport) { print $fh "$_\n"; } # Close the mail message (aka send it.) $fh->close; # Popup a little message. popupLabel( ["The bug report has been sent."] ); return; } else { # No, Okay, let's try to use sendmail normally. (normally????) my $sendmail = ""; # Where oh where are you you today... foreach (qw(/usr/lib/sendmail /usr/sbin/sendmail /usr/ucblib/sendmail)) { $sendmail = $_, last if -e $_; } # Can we even send the bug report? if ( $sendmail eq "" ) { # We can't send the bug report, maybe we can save it to a file. my @mesg = ( "Hmmmm.", "I'm terribly sorry but I can't find sendmail and the package", "Mail::Send has not been installed, so I can't send your bug", "report. Since I can't send the bug report, would you like to", "save it to a file and send it yourself?" ); if ( popupDialog( \@mesg, [ "Yep", "Nope" ] ) == 0 ) { saveBugReport(@bugReport); } return; } # Send the message via sendmail. open( SENDMAIL, "|$sendmail -t" ); print SENDMAIL "To: $address\n"; print SENDMAIL "Subject: $subject\n"; print SENDMAIL "Cc: $cc\n" if $cc; print SENDMAIL "Reply-To: $replyAddress\n" if $replyAddress; print SENDMAIL "\n\n"; foreach (@bugReport) { print SENDMAIL "$_\n"; } close(SENDMAIL); # Popup a little message. popupLabel( ["The bug report has been sent."] ); } } cdk-perl-20240606/demos/workman0000755000000000000000000000613612170613375014704 0ustar rootroot#!/usr/bin/perl -w # $Id: workman,v 1.3 2013/07/14 21:24:13 tom Exp $ # # Initialize Cdk. # use strict; use Cdk; Cdk::init(); # Pop up the opening label. popupLabel( [ "Workman Database Editor.", "", "Written By Mike Glover" ] ); # Set a default name for the workman database. my $workmandb = $ENV{'HOME'} . "/.workmandb"; # Open up the database and read in the contents. my @cdList = readWorkmanDatabase($workmandb); # Let the user play with the given information. playWithWorkManDatabase(@cdList); # # This allows the user to manipulate the workman database. # sub playWithWorkManDatabase { } # # This reads in the current contents of the workman database. # sub readWorkmanDatabase { my $filename = shift; my @contents = (); my $count = 0; my $x = 0; # Return if we can't open the file. return if !( open( FILE, $filename ) ); # Slurp in the file. my @workmandb = ; chomp @workmandb; # Strip out the contents of the database. for ( $x = 0 ; $x < $#workmandb ; $x++ ) { # Remove comments and empty lines. next if $workmandb[$x] =~ /^#/; next if $workmandb[$x] =~ /^$/; # Is this a start of a CD listing. if ( $workmandb[$x] =~ /^tracks (\d*)/ ) { my $trackCount = $1; my $trackLine = $workmandb[ $x++ ]; my $cdName = $workmandb[ $x++ ]; my $artist = $workmandb[ $x++ ]; my @tracks = (); my $current = 0; # Get each track from the database. for ( $current = 0 ; $current < $trackCount ; $current++ ) { push( @tracks, $workmandb[ $x++ ] ); } $x--; # Create the database object and put it onto the stack. my $object = new WorkManData( $trackLine, $cdName, $artist, @tracks ); # Put it onto the stack. push( @contents, $object ); } } return @contents; } # # This writes out a workman database. # sub writeWorkManData { } ######################################### package WorkManData; # # This creates a new object. # sub new { my ( $type, $trackLine, $cdName, $artist, @tracks ) = @_; my @trackInfo = (); my @indexInfo = (); my $self = {}; # Split the trackline apart. my ( $junk, $trackCount, @index ) = split( /\s+/, $trackLine ); # Clean off the garbage from the track lines. for ( my $x = 0 ; $x <= $#tracks ; $x++ ) { # Strip out the track name. my $trackName = $1 if $tracks[$x] =~ /^track\s+(.*)/; # If there is no track name, then provide a default answer. if ( $trackName ne "" ) { push( @trackInfo, $trackName ); } else { push( @trackInfo, "No Track Name Given" ); } } # Store the info in the object. ( $self->{'Artist'} = $1 ) if $artist =~ /^artist\s+(.*)/; ( $self->{'CDName'} = $1 ) if $cdName =~ /^cdname\s+(.*)/; $self->{'Tracks'} = \@trackInfo; $self->{'Index'} = \@indexInfo; return bless $self; } cdk-perl-20240606/demos/pkgInfo0000755000000000000000000001600212171570657014622 0ustar rootroot#!/usr/bin/perl -w # $Id: pkgInfo,v 1.5 2013/07/17 19:34:07 tom Exp $ use strict; # # This script provides a user interface to packages on the system. # use Cdk; Cdk::init(); # Create a dialog box with options. my @dialogMessge = ( "Unix Package Interface", "Select an option." ); # Create the buutons for the dialog box. my @buttons = ( "", "", "", "" ); # Create the dialog widget. my $dialog = new Cdk::Dialog( 'Message' => \@dialogMessge, 'Buttons' => \@buttons ); # Do this forever. for ( ; ; ) { # Activate the dialog box. my $choice = $dialog->activate(); next if !defined $choice; # Check the answer. if ( $choice == 0 ) { addPackage(); } elsif ( $choice == 1 ) { removePackage(); } elsif ( $choice == 2 ) { packageInfo(); } elsif ( $choice == 3 ) { # Exit. Cdk::end(); exit; } } # # This function adds a package. # sub addPackage { my @packageList = (); my $x; # Set up the entry field. my $mesg = "Enter the source package directory:"; my $entry = new Cdk::Entry( 'Label' => $mesg, 'Max' => 512, 'Width' => 30 ); # Get the package directory. my $pkgDir = $entry->activate(); return if !defined $pkgDir; # Open the given directory. if ( !opendir( DIR, $pkgDir ) ) { # Couldn't open the directory. my @mesg = ( "Error", "Could not open the directory $pkgDir", "$!", "", "Press any key to continue." ); my $label = new Cdk::Label( 'Message' => \@mesg ); $label->draw(); $label->wait(); return; } # Get the directory listing of the given directory. my @contents = readdir(DIR); closedir(DIR); # Create a list of all of the directories under the given directory. foreach my $file (@contents) { next if $file =~ /^\./; push( @packageList, $file ) if ( -d "$pkgDir/$file" ); } # Create a selection list and display the known packages. my $select = new Cdk::Selection( 'Title' => "Add Which Packages?", 'List' => \@packageList, 'Choices' => [ "Yes ", "No" ], 'Height' => 20, 'Width' => 50 ); # Activate the packages. my @choiceList = $select->activate(); my @selectedPackages = (); return if !@choiceList; # Generate the names of the selected packages. for ( $x = 0 ; $x <= $#choiceList ; $x++ ) { if ( $choiceList[$x] == 1 ) { push( @selectedPackages, $packageList[$x] ); } } my $label = new Cdk::Label( 'Message' => \@selectedPackages ); $label->draw(); $label->wait(); } # # This function removes a package. # sub removePackage { # Get the packages to remove. my @packageNames = selectPackages("Select the packages to delete."); my @buttons = ( "", "", "" ); my $yesToAll = 0; # Now that we have the package names, ask for each one. foreach my $name (@packageNames) { # If they asked for all to be deleted, no need to ask if ( !$yesToAll ) { # Create the dialog message. my @mesg = ( "Are you sure you want", "to delete the package $name?" ); # Make sure they want to do it. my $dialog = new Cdk::Dialog( 'Message' => \@mesg, 'Buttons' => \@buttons ); # Activate it. my $answer = $dialog->activate(); # If the user hit escape, let the user know the package # was NOT deleted. if ( !defined $answer ) { popupLabel( [ "Escape Hit", "The package was Not deleted." ] ); next; } # Check the answer if ( $answer == 1 ) { # Delete the package popupLabel("pkgrm $name"); } else { # Set the yes to all flag. $yesToAll = 1; # Delete the package popupLabel("pkgrm $name"); } } else { # Delete the package popupLabel("pkgrm $name"); } } } # # This function provides information about packages. # sub packageInfo { # Get the package to view. my $packageName = selectPackage("Select a package to view."); # Get the information about the selected package. my @pinfo = qx (pkginfo -l $packageName); chomp @pinfo; # Create the information viewer. my $viewer = new Cdk::Viewer( 'Buttons' => ["OK"], 'Height' => -2, 'Width' => -4 ); # Activate the viewer. $viewer->set( 'Title' => "Package Name: $packageName", 'Info' => \@pinfo, 'Interp' => "FALSE" ); $viewer->activate(); } # # This function creates a scrolling list of all the packages on the system # and returns the name of the package selected. # sub selectPackage { my $title = shift; # Get a list of all the packages installed on the system. my @packageList = qx (pkginfo); my @packageNames = (); # Strip out the names of the packages. foreach my $PKG (@packageList) { my $pkgName = ( split( /\s+/, $PKG ) )[1]; push( @packageNames, $pkgName ); } # Create the scrolling list. my $packageList = new Cdk::Scroll( 'Title' => $title, 'List' => \@packageNames, 'Numbers' => "TRUE", 'Height' => 20, 'Width' => 50 ); # Return the selected name. my $choice = $packageList->activate(); return ( $packageNames[$choice] ); } # # This function creates a selection list of all the packages on the system # and returns the name of the package selected. # sub selectPackages { my $title = shift; my @options = qw (Keep Delete); my @selectedNames = (); # Get a list of all the packages installed on the system. my @packageList = qx (pkginfo); my @packageNames = (); my @selectedPackages = (); my $x = 0; # Strip out the names of the packages. foreach my $PKG (@packageList) { my $pkgName = ( split( /\s+/, $PKG ) )[1]; push( @packageNames, $pkgName ); } # Create the selection list. my $select = new Cdk::Selection( 'Title' => $title, 'List' => \@packageNames, 'Choices' => \@options, 'Height' => 20, 'Width' => 50 ); # Activate the selection list. my @list = $select->activate(); # Generate the names of the selected packages. for ( $x = 0 ; $x <= $#packageNames ; $x++ ) { if ( $list[$x] == 1 ) { push( @selectedPackages, $packageNames[$x] ); } } return (@selectedPackages); } cdk-perl-20240606/demos/bday0000755000000000000000000000513512171562222014136 0ustar rootroot#!/usr/bin/perl -w # $Id: bday,v 1.7 2013/07/17 18:38:10 tom Exp $ # # Purpose: # To demonstrate the Perl5 Cdk Calendar Widget use strict; # Set some global variables. my %birthdays = (); my %appointments = (); my %anniversay = (); # Initialize Cdk. use Cdk; Cdk::init(); # Create the calendar object. my $calendar = new Cdk::Calendar( 'Dattrib' => "", 'Mattrib' => "", 'Yattrib' => "", 'Highlight' => "" ); # Create the scrolling window. my $swindow = new Cdk::Swindow( 'Title' => "Date Information", 'Lines' => 300, 'Height' => 4, 'Width' => 50, 'Ypos' => "BOTTOM" ); # Set the key binding for the calendar widget. $calendar->bind( 'Key' => "m", 'Function' => sub { setMarkerCB($calendar); } ); # Set the post-process function for the calendar widget. $calendar->postProcess( 'Function' => sub { checkDatePP($calendar); } ); # Draw the scrolling window. $swindow->draw(); # Let the user play. for ( ; ; ) { # Activate the object. my ( $day, $month, $year ) = $calendar->activate(); last if not defined $day; last if not defined $month; last if not defined $year; my $msg = sprintf "day %2d, month %2d, year %4d", $day, $month, $year; $swindow->addline( 'Info' => $msg ); } # Exit Cdk. Cdk::end(); # # This checks if the current date has a marker set on it. # sub checkDatePP { my $calendar = shift; } # # This allows the user to create a marker. # sub setMarkerCB { my $calendar = shift; my @mesg = ("What type of a marker is it?"); my @buttons = ( "Birthday", "Anniversary", "Appointment" ); # Get the current date the marker is at. my ( $day, $month, $year ) = $calendar->getDate(); # Ask the user what type of marker to add. my $dialog = new Cdk::Dialog( 'Message' => \@mesg, 'Buttons' => \@buttons ); my $choice = $dialog->activate(); undef $dialog; # If they hit escape, tell them... if ( !defined $choice ) { popupLabel( ["Escape Hit. No marker set."] ); $calendar->draw(); return 1; } # Check the choice. if ( $choice == 0 ) { addBirthdayMarker( $day, $month, $year ); } elsif ( $choice == 1 ) { addAnniversaryMarker( $day, $month, $year ); } elsif ( $choice == 2 ) { addAppointmentMarker( $day, $month, $year ); } return 1; } # # # sub addBirthdayMarker { my ( $day, $month, $year ) = @_; } # # # sub addAnniversaryMarker { my ( $day, $month, $year ) = @_; } # # # sub addAppointmentMarker { my ( $day, $month, $year ) = @_; } cdk-perl-20240606/demos/rolodex0000755000000000000000000007306413432342135014701 0ustar rootroot#!/usr/bin/perl -w # $Id: rolodex,v 1.6 2019/02/17 20:30:21 tom Exp $ use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Declare global variables. our $GGroupInfoChanged = 0; our @GLineType = ( "Voice", "Cell", "Pager", "First FAX", "Second FAX", "Third FAX", "First Data Line", "Second Data Line", "Third Data Line" ); # Create the menu list items. our $fMenu = [ "File", "Open ", "Save ", "Save As", "Quit " ]; our $eMenu = [ "Groups", "New ", "Open ", "Delete" ]; our $pMenu = [ "Print", "Print Rolodex" ]; our $hMenu = [ "Help", "About Rolodex ", "Rolodex Statistics" ]; our $menulist = [ $fMenu, $eMenu, $pMenu, $hMenu ]; our $menuloc = [ "LEFT", "LEFT", "LEFT", "RIGHT" ]; # Create the menu object. our $menu = new Cdk::Menu( 'Menulist' => $menulist, 'Menuloc' => $menuloc ); $menu->activate(0); # Create the title. our @title = ( "Cdk/Perl5 Rolodex", "Written by Mike Glover" ); our $rolodexTitle = new Cdk::Label( 'Message' => \@title, 'Box' => "FALSE" ); $rolodexTitle->draw( "Box" => "FALSE" ); # Load up the RC file. our $filename = $ENV{"HOME"} . "/.rolorc"; our $dbmDir = $ENV{"HOME"} . "/.rolodex"; our %groupInfo = readRCFile($filename); our $groupCount = keys %groupInfo; # Pop up a message stating how many groups were loaded. if ( $groupCount == 0 ) { my $groupMessage = [ "Empty rolodex RC file. No groups loaded.", "Press any key to continue." ]; popupLabel($groupMessage); } elsif ( $groupCount == 1 ) { my $groupMessage = [ "There was 1 group loaded from the RC file.", "Press any key to continue." ]; popupLabel($groupMessage); } else { my $groupMessage = [ "There were $groupCount groups loaded from the RC file.", "Press any key to continue." ]; popupLabel($groupMessage); } # Start the main loop for ( ; ; ) { # Activate the object. my ( $menuItem, $submenuItem ) = $menu->activate(); # Make sure they didn't hit escape. next if !defined $menuItem; # Determine which menuitem was selected. if ( $menuItem == 0 ) { if ( $submenuItem == 1 ) { # Open a new RC file. my $fselect = new Cdk::Fselect( 'Label' => "Filename:", 'Height' => 20, 'Width' => 55 ); my $file = $fselect->activate(); undef $fselect; # Make sure they chose a file. if ( defined $file ) { my %tmpGroup = readRCFile($file); # Check the results. if ( !%tmpGroup ) { my $mesg = [ "There were too many errors in the file", "$file.", "Are you sure it is a rolodex RC file?" ]; popupLabel($mesg); } else { %groupInfo = %tmpGroup; } } } elsif ( $submenuItem == 2 ) { # Save the RC file. saveRCFile( $filename, %groupInfo ); } elsif ( $submenuItem == 3 ) { # Save As... my $entry = new Cdk::Entry( 'Label' => "Save As", 'Max' => 256, 'Width' => 20, 'Min' => 2, 'Filler' => "_" ); $filename = $entry->activate(); # Check if they supplied a value. if ( !defined $filename ) { my $mesg = [ "No name provided.", "Information not saved." ]; popupLabel($mesg); } else { saveRCFile( $filename, %groupInfo ); } undef $entry; } elsif ( $submenuItem == 4 ) { # Quit saveRCFile( $filename, %groupInfo ) if $GGroupInfoChanged == 1; exit; } } elsif ( $menuItem == 1 ) { if ( $submenuItem == 1 ) { my %tmp = addRolodexGroup(%groupInfo); %groupInfo = %tmp; } elsif ( $submenuItem == 2 ) { useRolodexGroup(%groupInfo); } elsif ( $submenuItem == 3 ) { my %tmp = deleteRolodexGroup(%groupInfo); %groupInfo = %tmp; } } elsif ( $menuItem == 2 ) { printRolodexGroups(%groupInfo); } elsif ( $menuItem == 3 ) { if ( $submenuItem == 1 ) { # About rolodex. my $roloInfo = [ "About Cdk/Perl5 Rolodex", "", "This demo was written to demonstrate the widgets", "available with the Cdk Perl5 extension. Not all of", "the Cdk widgets are used, but most of them have", "been. I hope this little demonstration helps give", "you an understanding of what the Cdk Perl5", "extension offers.", "Have fun with it.", "", "ttfn,", "Mike", "<#HL(30)>", "March 1996" ]; popupLabel($roloInfo); } elsif ( $submenuItem == 2 ) { # Rolodex statistics. my $groupCount = keys %groupInfo; my $roloInfo = [ "Rolodex Statistics", "Read Command Filename $filename", "Group Count $groupCount" ]; popupLabel($roloInfo); } } } # # This reads an RC file. # sub readRCFile { my $filename = shift; my %groupList = (); # Open the RC file. open( FILE, $filename ) || return ( 0, "" ); # Start ripping through the file. for my $row () { # Ingore comments and white space. next if ( $row =~ /^#/ ); next if ( $row =~ /^$/ ); chomp $row; # Split the line. my @tmp = split( //, $row ); # Check if the file is in the correct format. if ( $#tmp == 2 ) { $groupList{ $tmp[0] } = "$tmp[1]$tmp[2]"; } } return %groupList; } # # This saves the group information to a RC file. # sub saveRCFile { my ( $filename, %info ) = @_; my $date = qx (date); my $count = 0; # Open the file. if ( !open( FILE, ">$filename" ) ) { my $mesg = [ "Could not write RC file to", "$filename", "Try Save As option." ]; popupLabel($mesg); return; } # Attach the header to the file. print FILE "#\n"; print FILE "# This file was automatically created on $date"; print FILE "#\n"; # Start writing the info to the file. foreach my $name ( keys %info ) { print FILE "$name$info{$name}\n"; $count++; } # Close the file. close(FILE); # Pop up a little message. if ( $count == 1 ) { my $mesg = [ "There was 1 group saved to file", "$filename", "Press any key to continue." ]; popupLabel($mesg); } else { my $mesg = [ "There were $count groups saved to file", "$filename", "Press any key to continue." ]; popupLabel($mesg); } # Reset the global flag. $GGroupInfoChanged = 0; return; } # # This adds a new rolodex group to the current list of rolodex groups. # sub addRolodexGroup { my (%info) = @_; my $description; # Create the entry fields. my $name = new Cdk::Entry( 'Label' => " New Group Name", 'Width' => 20, 'Filler' => "_", 'Min' => 2, 'Max' => 256, 'Ypos' => 8 ); my $desc = new Cdk::Entry( 'Label' => "Group Description", 'Width' => 20, 'Filler' => "_", 'Min' => 2, 'Max' => 256, 'Ypos' => 11 ); # Get the group name. my $newName = $name->activate(); # Did they send in a name. if ( !defined $newName ) { my $mesg = [ "No name provided.", "Group not added." ]; popupLabel($mesg); return %info; } else { # Check if the group already exists. if ( defined $info{$newName} ) { my $mesg = ["Sorry the group ($newName) already exists."]; popupLabel($mesg); return %info; } } # Get the group description. while ( !defined $description ) { $description = $desc->activate(); # If there is no description given then tell them they need one. if ( !defined $description ) { popupLabel( ["The group has to have a description."] ); $name->draw(); } } # Create the DBM filename. my $dbm = "${dbmDir}/${newName}.phl"; # Add it to the groupList. $info{$newName} = "${description}${dbm}"; $GGroupInfoChanged = 1; return %info; } # # This allows a user to open and play with a rolodex group. # sub useRolodexGroup { my (%info) = @_; my @list = (); # Pick which group to open. my $name = pickRolodexGroup( "Open Rolodex Group", %info ); return if ( !defined $name ); # Read the group database. my $database = ( split( //, $info{$name} ) )[1]; my @rolodexData = readPhoneDataFile($database); # Create the list. for ( my $x = 0 ; $x <= $#rolodexData ; $x++ ) { my $name = $rolodexData[$x]->{'Name'}; my $type = $GLineType[ $rolodexData[$x]->{'Type'} ]; push( @list, "$name ($type)" ); } my $height = ( $#rolodexData > 5 ? 8 : $#rolodexData + 4 ); # Create the help window. my $helpMesg = [ "<#HL(30)", "Press ? to get detailed help.", "<#HL(30)>" ]; my $helpWindow = new Cdk::Label( 'Message' => $helpMesg, 'Box' => "FALSE", 'Xpos' => "BOTTOM" ); $helpWindow->draw( 'Box' => "FALSE" ); # If the list if empty, ask them if they want to add an entry. if ( $#list < 0 ) { my $mesg = [ "There were no entries in this group.", "Do you want to add a new listng?" ]; my $buttons = [ "<>", "<>" ]; # Go ahead and ask. if ( popupDialog( $mesg, $buttons ) == 0 ) { # Get the new record. my $newRecord = getNewPhoneRecord(); if ( defined $newRecord ) { my $name = $newRecord->{'Name'}; my $type = $GLineType[ $newRecord->{'Type'} ]; $rolodexData[0] = $newRecord; push( @list, "$name ($type)" ); } else { return; } } else { return; } } # Create the scrolling list. my $scroll = new Cdk::Scroll( 'Title' => "Listing of Group $name", 'Height' => $height, 'Width' => 50, 'Numbers' => "TRUE", 'List' => \@list ); # Create a key binding for the widget. $scroll->bind( 'Key' => '?', 'Function' => sub { rolodexHelpCB(); } ); $scroll->bind( 'Key' => 'i', 'Function' => sub { insertPhoneEntryCB( $scroll, \@rolodexData, \@list ); } ); $scroll->bind( 'Key' => 'd', 'Function' => sub { deletePhoneEntryCB( $scroll, \@rolodexData, \@list ); } ); # Do this until they hit escape. for ( ; ; ) { # Let the user play. my $selection = $scroll->activate(); last if !defined $selection; # Display the phone record. displayPhoneRecord( $rolodexData[$selection] ); } # Save the information into the file. if ( !open( FILE, ">$database" ) ) { my $mesg = [ "Can not save phone information to", "$database", "$!", "Press any key to continue." ]; popupLabel($mesg); } # Start writing. my $date = qx (date); print FILE "#\n"; print FILE "# This file was automatically generated on $date"; print FILE "#\n"; for ( my $x = 0 ; $x <= $#rolodexData ; $x++ ) { my $object = $rolodexData[$x]; print FILE "$object->{'Name'}$object->{'Type'}$object->{'Number'}$object->{'Address'}$object->{'City'}$object->{'Province'}$object->{'Postal Code'}$object->{'Description'}\n"; } close FILE; undef $scroll; } # # This deletes a rolodex group from the given list. # sub deleteRolodexGroup { my (%info) = @_; # Pick which group to delete. my $name = pickRolodexGroup( "Delete Which Rolodex Group?", %info ); if ( !defined $name ) { my $mesg = [ " Delete Canceled ", "No Group Deleted" ]; popupLabel($mesg); return; } # Confirm the delete my $mesg = [ "Confirm Delete", "Are you sure you want to delete the group", "$name?" ]; my $buttons = [ "<>", "<>" ]; if ( popupDialog( $mesg, $buttons ) == 1 ) { # Delete the group. my $dbm = ( split( //, $info{$name} ) )[1]; delete $info{$name}; unlink $dbm; $GGroupInfoChanged = 1; } return %info; } # # This allows the user to pick a rolodex group. # sub pickRolodexGroup { my ( $title, %info ) = @_; my @list = (); my $height = keys %info; my @items = sort keys %info; # Create the scrolling list item list. foreach my $item (@items) { push( @list, "$item" ); } # Determine the height of the scrolling list. if ( $height > 5 ) { $height = 5; } $height += 3; # Create the scrolling list. my $scroll = new Cdk::Scroll( 'Title' => "$title", 'Height' => $height, 'Width' => 50, 'List' => \@list ); my $item = $scroll->activate(); return $items[$item] if ( defined $item ); return; } # # This reads a phone data file and stores it in an object. # sub readPhoneDataFile { my ($database) = @_; my @phoneRecords = (); # Open the database. if ( !open( DB, $database ) ) { my $mesg = [ "Error", "Could not open the database", "$database", "$!", "", "Press any key to continue." ]; popupLabel($mesg); return; } # Start scanning through the file. foreach my $row () { next if $row =~ /^#/; next if $row =~ /^$/; chomp $row; # Split the row and create an object. my $object = new PhoneData($row); push( @phoneRecords, $object ); } return @phoneRecords; } # # This is a callback to the scrolling list. # sub rolodexHelpCB { my $mesg = [ "Rolodex Phone Editor", "i Inserts a new phone entry.", "d Deletes the currently selected phone entry.", "Escape Exits the scrolling list.", "? Pops up this help window." ]; popupLabel($mesg); return 1; } # # This displays a phone record. # sub displayPhoneRecord { my $record = shift; my $type = $GLineType[ $record->{'Type'} ]; my $mesg = ""; # Assemble the phone record details. if ( $type =~ /cell/i || $type =~ /pager/i ) { $mesg = [ "$type Phone Record", "Name $record->{'Name'}", "Phone Number$record->{'Number'}", "Comment $record->{'Description'}" ]; } else { $mesg = [ "$type Phone Record", "Name $record->{'Name'}", "Phone Number$record->{'Number'}", "Address $record->{'Address'}", "City $record->{'City'}", "Province $record->{'Province'}", "Postal Code $record->{'Postal Code'}", "Comment $record->{'Description'}" ]; } popupLabel($mesg); } # # This gets a new phone record. # sub getNewPhoneRecord { my @list = (); my ( $record, $type ); # Create a list. foreach my $item (@GLineType) { push( @list, "$item" ); } # Create the title label. my $mesg = ["Add New Phone Record"]; my $title = new Cdk::Label( 'Message' => $mesg, 'Box' => "FALSE", 'Xpos' => "TOP" ); $title->draw( 'Box' => "FALSE" ); # Ask the user what type of line it it. my $itemList = new Cdk::Itemlist( 'Label' => "What Type Of Line Is It?", 'List' => \@list ); while ( !defined $type ) { $type = $itemList->activate(); if ( !defined $type ) { popupLabel( ["Please specify a line type."] ); } } undef $itemList; # Given the type, ask certain questions. if ( $GLineType[$type] =~ /Cell/ || $GLineType[$type] =~ /Pager/ ) { $record = getSmallPhoneRecord($type); } else { $record = getLargePhoneRecord($type); } return $record; } # # This gets a small phone record. # sub getSmallPhoneRecord { my $type = shift; my $mesg = [ "Confirm New Phone Entry", "Do you want to add this phone number?" ]; my $buttons = [ "<>", "<>", "<>" ]; my ( $name, $unmixedPhone, $desc ); # Create the entry fields. my $nameEntry = new Cdk::Entry( 'Label' => "Name", 'Ypos' => 8, 'Width' => 20, 'Min' => 2, 'Max' => 256, 'Filler' => "_" ); my $phoneTemp = new Cdk::Template( 'Label' => "Number", 'Plate' => "(###) ###-####", 'Overlay' => "(___) ___-____", 'Ypos' => 11 ); my $descEntry = new Cdk::Entry( 'Label' => "Description", 'Ypos' => 14, 'Width' => 20, 'Min' => 2, 'Max' => 256, 'Filler' => "_" ); # Start the loop. for ( ; ; ) { # Draw the objects. $nameEntry->draw(); $phoneTemp->draw(); $descEntry->draw(); # Get the information. $name = $nameEntry->activate(); $unmixedPhone = $phoneTemp->activate(); $desc = $descEntry->activate(); # Make sure they want to add this number. my $answer = popupDialog( $mesg, $buttons ); last if $answer == 0; return if $answer == 1; } # Assemble the information and create the object. my $phone = $phoneTemp->mix(); my $temp = "$name$type$phone----$desc"; my $object = new PhoneData($temp); return $object; } # # This gets a large phone record. # sub getLargePhoneRecord { my $type = shift; my $mesg = [ "Confirm New Phone Entry", "Do you want to add this phone number?" ]; my $buttons = [ "<>", "<>", "<>" ]; my ( $name, $address, $city, $prov, $postal, $unmixedPhone, $desc ); # Create the widgets. my $nameEntry = new Cdk::Entry( 'Label' => "Name", 'Ypos' => 5, 'Xpos' => "LEFT", 'Min' => 2, 'Max' => 256, 'Filler' => "_", 'Width' => 20 ); my $addressEntry = new Cdk::Entry( 'Label' => "Address", 'Ypos' => 5, 'Xpos' => "RIGHT", 'Min' => 2, 'Max' => 256, 'Filler' => "_", 'Width' => 40 ); my $cityEntry = new Cdk::Entry( 'Label' => "City", 'Ypos' => 8, 'Xpos' => "LEFT", 'Min' => 2, 'Max' => 256, 'Filler' => "_", 'Width' => 20 ); my $provEntry = new Cdk::Entry( 'Label' => "Province", 'Ypos' => 8, 'Xpos' => 29, 'Min' => 2, 'Max' => 256, 'Filler' => "_", 'Width' => 15 ); my $postalEntry = new Cdk::Entry( 'Label' => "Postal Code", 'Ypos' => 8, 'Xpos' => "RIGHT", 'Min' => 2, 'Max' => 256, 'Filler' => "_", 'Width' => 10, 'Dtype' => "UMIXED" ); my $phoneTemp = new Cdk::Template( 'Label' => "Number", 'Ypos' => 11, 'Xpos' => "LEFT", 'Overlay' => "(___) ___-____", 'Plate' => "(###) ###-####" ); my $descEntry = new Cdk::Entry( 'Label' => "Description", 'Ypos' => 11, 'Xpos' => "RIGHT", 'Min' => 2, 'Max' => 256, 'Filler' => "_", 'Width' => 20 ); # Start the loop. for ( ; ; ) { # Draw the screen. $nameEntry->draw(); $addressEntry->draw(); $cityEntry->draw(); $provEntry->draw(); $postalEntry->draw(); $phoneTemp->draw(); $descEntry->draw(); # Get the information. $name = $nameEntry->activate(); $address = $addressEntry->activate(); $city = $cityEntry->activate(); $prov = $provEntry->activate(); $postal = $postalEntry->activate(); $unmixedPhone = $phoneTemp->activate(); $desc = $descEntry->activate(); # Make sure they want to add this number. my $answer = popupDialog( $mesg, $buttons ); last if $answer == 0; return if $answer == 1; } # Assemble the information and create the object. my $phone = $phoneTemp->mix(); my $temp = "$name$type$phone$address$city$prov$postal$desc"; my $object = new PhoneData($temp); return $object; } # # This inserts an entry into the phone scrolling list. # sub insertPhoneEntryCB { my ( $scroll, $data, $list ) = @_; my ( $size, $currentItem ) = $scroll->info(); my $itemName = $list->[$currentItem]; # Erase the scrolling list. $scroll->erase(); # Get a new phone record. my $newRecord = getNewPhoneRecord(); # Make sure there is a record to add. if ( !defined $newRecord ) { $scroll->draw(); return 1; } # Push the information onto the record array. push( @$data, $newRecord ); # Push the information onto the list array. my $name = $newRecord->{'Name'}; my $namedTyped = $GLineType[ $newRecord->{'Type'} ]; my $temp = "$name ($namedTyped)"; push( @$list, $temp ); # Add it to the scrolling list. $scroll->add( 'Item' => $temp ); $scroll->draw(); return 1; } # # This deletes an entry from a scrolling list. # sub deletePhoneEntryCB { my ( $scroll, $data, $list ) = @_; my ( $size, $currentItem ) = $scroll->info(); my $itemName = $list->[$currentItem]; my $buttons = [ "<>", "<>" ]; my $mesg = [ "Do you really want to delete the phone entry", "$itemName" ]; my @array = @$data; # Ask the user if they really want to delete this item. if ( popupDialog( $mesg, $buttons ) == 1 ) { # Nuke it. $scroll->delete( 'Position' => $currentItem ); # Remove it from the arrays. for ( my $x = $currentItem ; $x < $#array ; $x++ ) { $data->[$x] = $data->[ $x + 1 ]; $list->[$x] = $list->[ $x + 1 ]; } pop(@$data); pop(@$list); } $scroll->erase(); $scroll->draw(); return 1; } # # This prints out certain rolodex groups. # sub printRolodexGroups { my (%groupInfo) = @_; my $options = [ "Print to Printer ", "Print to File ", "Don't Print " ]; my $title = "Select Which Groups To Print"; my @list = (); my ( $height, $filename ); # Create the group list to print. foreach my $key ( sort keys %groupInfo ) { push( @list, $key ); } # Determine the height of the selection box. $height = ( $#list > 5 ? 8 : $#list + 4 ); # Create the selection list. my $select = new Cdk::Selection( 'Title' => $title, 'Height' => $height, 'Width' => 40, 'List' => \@list, 'Choices' => $options ); # Get the selections to print. my @answer = $select->activate(); undef $select; # check if the user canceled. if ( !@answer ) { my $mesg = ["Print Canceled"]; popupLabel($mesg); return; } # Start printing the groups. for ( my $x = 0 ; $x <= $#answer ; $x++ ) { my $groupName = $list[$x]; if ( $answer[$x] == 0 ) { # Create a label for a title. my $mesg = ["Printing Group [$groupName] to Printer"]; my $title = new Cdk::Label( 'Message' => $mesg, 'Box' => "FALSE", 'Xpos' => "TOP" ); $title->draw( 'Box' => "FALSE" ); # Print to Printer. my $printEntry = new Cdk::Entry( 'Label' => "Printer Name", 'Filler' => "_", 'Width' => 20, 'Min' => 2, 'Max' => 256 ); # Set the default value as the PRINTER ENV variable. if ( defined $ENV{'PRINTER'} ) { $printEntry->set( 'Value' => "$ENV{'PRINTER'}", 'Min' => 2, 'Max' => 256 ); } my $printer = $printEntry->activate(); printGroup( $groupName, %groupInfo, "/tmp/rolodex.$$" ); system("lpr /tmp/rolodex.$$"); unlink "/tmp/rolodex.$$"; } elsif ( $answer[$x] == 1 ) { # Create a label for a title. my $mesg = ["Printing Group [$groupName] to File"]; my $title = new Cdk::Label( 'Message' => $mesg, 'Box' => "FALSE", 'Xpos' => "TOP" ); $title->draw( 'Box' => "FALSE" ); # Print to file. my $fileEntry = new Cdk::Entry( 'Label' => "Filename", 'Filler' => "_", 'Width' => 20, 'Min' => 2, 'Max' => 256 ); # Make sure that a filename is given. while ( !defined $filename ) { $filename = $fileEntry->activate(); if ( !defined $filename ) { popupLabel( ["Please supply a filename."] ); } } # Print the group to a file. printGroup( $groupName, %groupInfo, $filename ); } } } our $fullName; our $number; our $address; our $city; our $province; our $postalCode; our $description; # # This opens a phone database file and prints it to the given filename. # sub printGroup { my ( $name, %groupInfo, $filename ) = @_; # Try to open the file. if ( !open( PHONE, ">$filename" ) ) { my $mesg = [ "Error", "Could not print the group $name to $filename.", "$!", "Press any key to continue." ]; popupLabel($mesg); return; } # Open the phone database file and read in the contents. my ( $desc, $dbm ) = split( //, $groupInfo{$name} ); my @rolodexData = readPhoneDataFile($dbm); select(PHONE); $| = 1; # Set variables for the report. foreach my $object (@rolodexData) { $fullName = $object->{'Name'}; $number = $object->{'Number'}; $address = $object->{'Address'}; $city = $object->{'City'}; $province = $object->{'Province'}; $postalCode = $object->{'Postal Code'}; $description = $object->{'Description'}; write; } close(PHONE); } ######################################### format PHONE= Name @<<<<<<<<<<<<<<<<<<<<<<<<<< Phone Number @<<<<<<<<<<<<<<<<<<<<<<<<<<< $fullName, $number Address @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< City @<<<<<<<<<<<<<<<<<<<<<<<<<<< $address, $city City @<<<<<<<<<<<<< Province @<<<<<<<<<<<<<<<<<< Postal Code @<<<<<<<<<<<<<<< $city, $province, $postalCode Description @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $description ----------------------------------------------------------------------------- . ######################################### package PhoneData; # # This creates a new object. # sub new { my $junk = shift; my $record = shift; my $self = {}; # Split the record apart. my ( $name, $type, $phone, $address, $city, $prov, $postal, $desc ) = split( //, $record ); # Store the info in the object. $self->{'Name'} = $name; $self->{'Type'} = $type; $self->{'Number'} = $phone; $self->{'Address'} = $address; $self->{'City'} = $city; $self->{'Province'} = $prov; $self->{'Postal Code'} = $postal; $self->{'Description'} = $desc; return bless $self; } # # This prints out the contents of an object. # sub display { my $self = shift; my %object = %$self; my @mesg = (); foreach my $key ( sort keys %object ) { push( @mesg, sprintf( "Key = %-10s Value = %-30s", $key, $object{$key} ) ); } main::popupLabel( \@mesg ); } sub print { my $object = shift; my %info = $object; foreach my $key ( sort keys %info ) { print "Key = $key Value = $info{$key}\n"; } } cdk-perl-20240606/demos/async0000755000000000000000000000377412171570656014355 0ustar rootroot#!/usr/bin/perl -w # $Id: async,v 1.4 2013/07/17 19:34:06 tom Exp $ # # This demo demonstrates how to use async functions with Cdk... # use strict; # # Initialize Cdk. # use Cdk; Cdk::init(); # Set the async function... $SIG{'ALRM'} = "littleWeeClock"; our @listItems; # Set up the scrolling list. setpwent(); while ( my $item = getpwent() ) { push( @listItems, $item ); } # Get the screen dimensions. my ( $rows, $cols ) = Cdk::getCdkScreenDim(); # Create the scrolling list object. my $scroll = new Cdk::Scroll( 'Title' => "Pick An Account", 'Height' => 10, 'Numbers' => "TRUE", 'Highlight' => "", 'Width' => 25, 'List' => \@listItems ); # Create the label... my $clock = new Cdk::Label( 'Message' => ["Current Time: HH:MM:SS"], 'Xpos' => "TOP" ); # Draw the scrolling window. $clock->draw(); # Set the alarm to go off. alarm(1); # Do this forever. for ( ; ; ) { # Activate the scrolling list. my $itemPicked = $scroll->activate(); # Do we need to exit... exit if !defined $itemPicked; # Get the password info. my ( $name, $passwd, $uid, $gid, $quota, $comment, $gcos, $dir, $shell ) = getpwnam( $listItems[$itemPicked] ); # Display it. my $info = [ "Account Name $name", "UID $uid", "GID $gid", "Directory $dir", "Shell $shell" ]; popupLabel($info); } # Exit Cdk. Cdk::end(); # # This is the async function. # sub littleWeeClock { # # Turn off the alarm # $SIG{'ALRM'} = "IGNORE"; alarm(0); # # Get the current time/date. # my ( $sec, $min, $hour ) = ( localtime(time) ); my $mesg = sprintf( "%02d:%02d:%02d", $hour, $min, $sec ); # # Add the line to the scrolling window. # $clock->set( 'Message' => ["Current Time: $mesg"] ); # # Reset the alarm. # $SIG{'ALRM'} = "littleWeeClock"; alarm(1); } cdk-perl-20240606/MANIFEST.SKIP0000644000000000000000000000016313433121656014060 0ustar rootroot^config\.log$ ^config\.status$ ^configure\.out$ ^LOGS/.*\.log$ ^Makefile\.PL$ ^MANIFEST\.SKIP$ ^.*\.log ^.*RCS/.*$ cdk-perl-20240606/COPYING.asc0000644000000000000000000000133114630415734013763 0ustar rootroot-----BEGIN PGP SIGNATURE----- Comment: See https://invisible-island.net/public/public.html for info iQGzBAABCgAdFiEEGYgtkt2kxADCLA1WzCr0RyFnvgMFAmZiG9gACgkQzCr0RyFn vgPakgwA8OqTHos4sdW2B9YgFA8vFVS+Gef/4ZyMG+bLNjNjmaMOownMQYnrqS56 Cxhq3cYP/yFUEuq5rCHzXHRqzQYuFnabnhC5ey+FGzhWK+Fqo10aKnokaJ/sqzck kK0XAfjElzY3Aa68S7YRs4iy5xPOJZrpn2TBT5nlW/Hi0qwylnIK4JiuMWXJf3T1 lYQxGFNZPwWONiOzx7/FyCT4GIXk1f3zsvt9NkVpBhrvzOgLlmYqnb8DDqfObRxR 8uiwIPfL3jytlzVxIDrcRMt+9OP0DIuM14Kf05/RdWkMERc5QW7m6LoIkCesmMSQ UavvWC2zl2RtM+lOohOGE0YUqA0mAO+pTATV+bGIoSfmw7Vn3qobGjri/mutsNtH MPDgM2zlieQVPRAa3vd2eWlV+QtKcdoi3rC4/eegQh+JD4d3U0c4OQOnnwtUceOD xlmIBhcmIZQZxZlLSzhdt5m09pklZXlK1gQG4YDu9TTbRwT+AtDCEJ43KhTZeG4a uU22M6gU =VRIZ -----END PGP SIGNATURE----- cdk-perl-20240606/Cdk/0000755000000000000000000000000012171562366012670 5ustar rootrootcdk-perl-20240606/Cdk/Selection.pm0000644000000000000000000001416412171561425015154 0ustar rootrootpackage Cdk::Selection; @ISA = qw (Cdk); # # This creates a new Selection object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $list = Cdk::checkReq( $name, "List", $params{'List'} ); my $choices = Cdk::checkReq( $name, "Choices", $params{'Choices'} ); my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $spos = Cdk::checkDef( $name, "Spos", $params{'Spos'}, "NONE" ); my $hlight = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "A_REVERSE" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Selection::New( $title, $params{'List'}, $params{'Choices'}, $height, $width, $xpos, $ypos, $spos, $hlight, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; my @choices = (); # Activate the object... if ( defined $params{'Input'} ) { @choices = Cdk::Selection::Activate( $self->{'Me'}, $params{'Input'} ); } else { @choices = Cdk::Selection::Activate( $self->{'Me'} ); } if ( !defined $choices[0] ) { return; } else { $self->{'Info'} = \@choices; return @choices; } } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Selection::Inject( $self->{'Me'}, $character ) ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Selection::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Selection::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Selection::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Highlight'} ) { Cdk::Selection::SetHighlight( $self->{'Me'}, $params{'Highlight'} ); } if ( defined $params{'Choices'} ) { Cdk::Selection::SetChoices( $self->{'Me'}, $params{'Choices'} ); } if ( defined $params{'Choice'} ) { Cdk::Selection::SetChoice( $self->{'Me'}, $params{'Choice'}, $params{'Index'} ); } if ( defined $params{'Modes'} ) { Cdk::Selection::SetModes( $self->{'Me'}, $params{'Modes'} ); } if ( defined $params{'Mode'} ) { Cdk::Selection::SetMode( $self->{'Me'}, $params{'Mode'}, $params{'Index'} ); } if ( defined $params{'ULChar'} ) { Cdk::Selection::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Selection::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Selection::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Selection::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Selection::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Selection::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Selection::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Selection::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Selection::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Selection::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Selection::Erase( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Selection::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Selection::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Selection::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Selection::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Selection::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20240606/Cdk/Buttonbox.pm0000644000000000000000000001304112171561421015200 0ustar rootrootpackage Cdk::Buttonbox; @ISA = qw (Cdk); # # This creates a new Buttonbox object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $buttons = Cdk::checkReq( $name, "Buttons", $params{'Buttons'} ); my $rows = Cdk::checkReq( $name, "Rows", $params{'Rows'} ); my $cols = Cdk::checkReq( $name, "Cols", $params{'Cols'} ); my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $hlight = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "A_REVERSE" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Buttonbox::New( $title, $params{'Buttons'}, $rows, $cols, $height, $width, $xpos, $ypos, $hlight, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Buttonbox::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Buttonbox::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Buttonbox::Inject( $self->{'Me'}, $character ) ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Highlight'} ) { Cdk::Buttonbox::SetHighlight( $self->{'Me'}, $params{'Highlight'} ); } if ( defined $params{'ULChar'} ) { Cdk::Buttonbox::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Buttonbox::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Buttonbox::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Buttonbox::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Buttonbox::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Buttonbox::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Buttonbox::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Buttonbox::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Buttonbox::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Buttonbox::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Buttonbox::Erase( $self->{'Me'} ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set up the parameters passed in. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); # Bind the key to the function Cdk::Buttonbox::Bind( $self->{'Me'}, $key, $function ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Buttonbox::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Buttonbox::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Buttonbox::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Buttonbox::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Buttonbox::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Buttonbox::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Buttonbox::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20240606/Cdk/Slider.pm0000644000000000000000000001323512171561425014447 0ustar rootrootpackage Cdk::Slider; # # This creates a new Slider object # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $low = Cdk::checkReq( $name, "Low", $params{'Low'} ); my $high = Cdk::checkReq( $name, "High", $params{'High'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $label = Cdk::checkDef( $name, "Label", $params{'Label'}, "" ); my $inc = Cdk::checkDef( $name, "Inc", $params{'Inc'}, 1 ); my $fastInc = Cdk::checkDef( $name, "Fastinc", $params{'Fastinc'}, 5 ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $start = Cdk::checkDef( $name, "Start", $params{'Start'}, $params{'Low'} ); my $filler = Cdk::checkDef( $name, "Filler", $params{'Filler'}, " " ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Slider::New( $title, $label, $start, $low, $high, $inc, $fastInc, $width, $xpos, $ypos, $filler, $box, $shadow ); bless $self; } # # This activates the object. # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Slider::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Slider::Activate( $self->{'Me'} ); } return $self->{'Info'}; } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return Cdk::Slider::Inject( $self->{'Me'}, $character ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Slider::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Slider::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Slider::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Slider::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Slider::Erase( $self->{'Me'} ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Value'} ) { Cdk::Slider::SetValue( $self->{'Me'}, $params{'Value'} ); } if ( defined $params{'Low'} ) { Cdk::Slider::SetLowHigh( $self->{'Me'}, $params{'Low'}, $params{'High'} ); } if ( defined $params{'ULChar'} ) { Cdk::Slider::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Slider::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Slider::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Slider::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Slider::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Slider::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Slider::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Slider::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Slider::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This function raises the object. # sub raise { my $self = shift; Cdk::Slider::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Slider::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Slider::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Slider::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Slider::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20240606/Cdk/Radio.pm0000644000000000000000000001357412171561424014270 0ustar rootrootpackage Cdk::Radio; @ISA = qw (Cdk); # # This creates a new Radio object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $list = Cdk::checkReq( $name, "List", $params{'List'} ); my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $spos = Cdk::checkDef( $name, "Spos", $params{'Spos'}, "NONE" ); my $choice = Cdk::checkDef( $name, "Choice", $params{'Choice'}, "X" ); my $default = Cdk::checkDef( $name, "Default", $params{'Default'}, 0 ); my $hlight = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "A_REVERSE" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Radio::New( $title, $params{'List'}, $height, $width, $xpos, $ypos, $spos, $choice, $default, $hlight, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Radio::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Radio::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Radio::Inject( $self->{'Me'}, $character ) ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Radio::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Radio::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Radio::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Highlight'} ) { Cdk::Radio::SetHighlight( $self->{'Me'}, $params{'Highlight'} ); } if ( defined $params{'Choice'} ) { Cdk::Radio::SetChoiceCharacter( $self->{'Me'}, $params{'Choice'} ); } if ( defined $params{'LeftBrace'} ) { Cdk::Radio::SetLeftBrace( $self->{'Me'}, $params{'LeftBrace'} ); } if ( defined $params{'RightBrace'} ) { Cdk::Radio::SetRightBrace( $self->{'Me'}, $params{'RightBrace'} ); } if ( defined $params{'ULChar'} ) { Cdk::Radio::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Radio::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Radio::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Radio::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Radio::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Radio::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Radio::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Radio::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Radio::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Radio::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Radio::Erase( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Radio::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Radio::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Radio::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Radio::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Radio::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20240606/Cdk/Mentry.pm0000644000000000000000000001265012171561424014502 0ustar rootrootpackage Cdk::Mentry; @ISA = qw (Cdk); # # This creates a new Mentry object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $fWidth = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $physical = Cdk::checkReq( $name, "Prows", $params{'Prows'} ); my $logical = Cdk::checkReq( $name, "Lrows", $params{'Lrows'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $label = Cdk::checkDef( $name, "Label", $params{'Label'}, "" ); my $min = Cdk::checkDef( $name, "Min", $params{'Min'}, 0 ); my $dispType = Cdk::checkDef( $name, "Dtype", $params{'Dtype'}, "MIXED" ); my $filler = Cdk::checkDef( $name, "Filler", $params{'Filler'}, "." ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Mentry::New( $title, $label, $min, $physical, $logical, $fWidth, $dispType, $filler, $xpos, $ypos, $fieldattr, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Mentry::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Mentry::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Mentry::Inject( $self->{'Me'}, $character ) ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Value'} ) { Cdk::Mentry::SetValue( $self->{'Me'}, $params{'Value'} ); } if ( defined $params{'Min'} ) { Cdk::Mentry::SetMin( $self->{'Me'}, $params{'Min'} ); } if ( defined $params{'FillerChar'} ) { Cdk::Mentry::SetFillerChar( $self->{'Me'}, $params{'FillerChar'} ); } if ( defined $params{'ULChar'} ) { Cdk::Mentry::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Mentry::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Mentry::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Mentry::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Mentry::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Mentry::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Mentry::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Mentry::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Mentry::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This function allows the user to get the current value from the widget. # sub get { my $self = shift; return ( Cdk::Mentry::Get( $self->{'Me'} ) ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Mentry::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Mentry::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Mentry::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Mentry::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Mentry::Erase( $self->{'Me'} ); } # # This cleans the information inside the object. # sub clean { my $self = shift; Cdk::Mentry::Clean( $self->{'Me'} ); } 1; cdk-perl-20240606/Cdk/Scroll.pm0000644000000000000000000001447612171561425014473 0ustar rootrootpackage Cdk::Scroll; @ISA = qw (Cdk); # # This creates a new Scroll object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $list = Cdk::checkReq( $name, "List", $params{'List'} ); my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $spos = Cdk::checkDef( $name, "Spos", $params{'Spos'}, "NONE" ); my $numbers = Cdk::checkDef( $name, "Numbers", $params{'Numbers'}, "FALSE" ); my $hlight = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "A_REVERSE" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Scroll::New( $title, $params{'List'}, $height, $width, $xpos, $ypos, $spos, $numbers, $hlight, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Scroll::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Scroll::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Scroll::Inject( $self->{'Me'}, $character ) ); } # # This adds a line to the scrolling list. # sub add { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::add"; # Set the values. my $item = Cdk::checkReq( $name, "Item", $params{'Item'} ); Cdk::Scroll::Add( $self->{'Me'}, $item ); } # # This deletes a line from the scrolling list. # sub delete { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::delete"; # Set the values. my $position = Cdk::checkReq( $name, "Position", $params{'Position'} ); Cdk::Scroll::Delete( $self->{'Me'}, $position ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Scroll::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Scroll::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Scroll::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Scroll::Draw( $self->{'Me'}, $box ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Items'} ) { Cdk::Scroll::SetItems( $self->{'Me'}, $params{'Items'} ); } if ( defined $params{'Highlight'} ) { Cdk::Scroll::SetHighlight( $self->{'Me'}, $params{'Highlight'} ); } if ( defined $params{'ULChar'} ) { Cdk::Scroll::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Scroll::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Scroll::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Scroll::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Scroll::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Scroll::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Scroll::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Scroll::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Scroll::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This erases the object. # sub erase { my $self = shift; Cdk::Scroll::Erase( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Scroll::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Scroll::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Scroll::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Scroll::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Scroll::GetWindow( $self->{'Me'} ); } # # This function returns the size of the scrolling list and the # currently highlighted item. # sub info { my $self = shift; return Cdk::Scroll::Info( $self->{'Me'} ); } 1; cdk-perl-20240606/Cdk/Scale.pm0000644000000000000000000001330112171561424014245 0ustar rootrootpackage Cdk::Scale; # # This creates a new Scale object # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; my $numWidth = length( $params{'High'} ) + 2; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $low = Cdk::checkReq( $name, "Low", $params{'Low'} ); my $high = Cdk::checkReq( $name, "High", $params{'High'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $label = Cdk::checkDef( $name, "Label", $params{'Label'}, "" ); my $width = Cdk::checkDef( $name, "Width", $params{'Width'}, $numWidth ); my $inc = Cdk::checkDef( $name, "Inc", $params{'Inc'}, 1 ); my $fastInc = Cdk::checkDef( $name, "Fastinc", $params{'Fastinc'}, 5 ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $start = Cdk::checkDef( $name, "Start", $params{'Start'}, $params{'Low'} ); my $fAttr = Cdk::checkDef( $name, "Fattrib", $params{'Fattrib'}, "A_NORMAL" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Scale::New( $title, $label, $start, $low, $high, $inc, $fastInc, $width, $xpos, $ypos, $fAttr, $box, $shadow ); bless $self; } # # This activates the object. # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Scale::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Scale::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Scale::Inject( $self->{'Me'}, $character ) ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Scale::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Scale::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Scale::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Scale::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Scale::Erase( $self->{'Me'} ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Value'} ) { Cdk::Scale::SetValue( $self->{'Me'}, $params{'Value'} ); } if ( defined $params{'Low'} ) { Cdk::Scale::SetLowHigh( $self->{'Me'}, $params{'Low'}, $params{'High'} ); } if ( defined $params{'ULChar'} ) { Cdk::Scale::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Scale::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Scale::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Scale::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Scale::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Scale::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Scale::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Scale::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Scale::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This function raises the object. # sub raise { my $self = shift; Cdk::Scale::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Scale::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Scale::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Scale::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Scale::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20240606/Cdk/Menu.pm0000644000000000000000000000766512171561424014142 0ustar rootrootpackage Cdk::Menu; @ISA = qw (Cdk); # # This creates a new Menu object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $menuList = Cdk::checkReq( $name, "Menulist", $params{'Menulist'} ); my $menuLoc = Cdk::checkReq( $name, "Menuloc", $params{'Menuloc'} ); my $menuPos = Cdk::checkDef( $name, "Menupos", $params{'Menupos'}, "TOP" ); my $titleAttr = Cdk::checkDef( $name, "Tattrib", $params{'Tattrib'}, "A_REVERSE" ); my $subTitleAttr = Cdk::checkDef( $name, "SubTattrib", $params{'SubTattrib'}, "A_REVERSE" ); # Create the thing. $self->{'Me'} = Cdk::Menu::New( $params{'Menulist'}, $params{'Menuloc'}, $titleAttr, $subTitleAttr, $menuPos ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; my $itemPicked; # Activatate the menu if ( defined $params{'Input'} ) { $itemPicked = Cdk::Menu::Activate( $self->{'Me'}, $params{'Input'} ); } else { $itemPicked = Cdk::Menu::Activate( $self->{'Me'} ); } return if !defined $itemPicked; $self->{'Info'} = $itemPicked; # Create the menu and submenu item values and return them. my $menuItem = int( $itemPicked / 100 ); my $submenuItem = ( $itemPicked % 100 ) + 1; # Return the two values. return ( ( $menuItem, $submenuItem, $itemPicked ) ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Menu::Inject( $self->{'Me'}, $character ) ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'CurrentItem'} ) { Cdk::Menu::SetCurrentItem( $self->{'Me'}, $params{'CurrentItem'} ); } if ( defined $params{'TitleHighlight'} ) { Cdk::Menu::SetTitleHighlight( $self->{'Me'}, $params{'TitleHighlight'} ); } if ( defined $params{'SubTitleHighlight'} ) { Cdk::Menu::SetSubTitleHighlight( $self->{'Me'}, $params{'SubTitleHighlight'} ); } if ( defined $params{'BGColor'} ) { Cdk::Menu::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Draw the object. Cdk::Menu::Draw( $self->{'Me'} ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Menu::Erase( $self->{'Me'} ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Menu::Bind( $self->{'Me'}, $params{'Key'}, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Menu::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Menu::PostProcess( $self->{'Me'}, $params{'Function'} ); } 1; cdk-perl-20240606/Cdk/Histogram.pm0000644000000000000000000001001412171561422015147 0ustar rootrootpackage Cdk::Histogram; @ISA = qw (Cdk); # # This creates a new Histogram object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $orient = Cdk::checkReq( $name, "Orient", $params{'Orient'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Histogram::New( $title, $height, $width, $orient, $xpos, $ypos, $box, $shadow ); bless $self; } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Value'} ) { Cdk::Histogram::SetValue( $self->{'Me'}, $params{'Low'}, $params{'High'}, $params{'Value'} ); } if ( defined $params{'DisplayType'} ) { Cdk::Histogram::SetDisplayType( $self->{'Me'}, $params{'DisplayType'} ); } if ( defined $params{'FillerChar'} ) { Cdk::Histogram::SetFillerChar( $self->{'Me'}, $params{'FillerChar'} ); } if ( defined $params{'StatsPos'} ) { Cdk::Histogram::SetStatsPos( $self->{'Me'}, $params{'StatsPos'} ); } if ( defined $params{'StatsAttr'} ) { Cdk::Histogram::SetStatsAttr( $self->{'Me'}, $params{'StatsAttr'} ); } if ( defined $params{'ULChar'} ) { Cdk::Histogram::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Histogram::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Histogram::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Histogram::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Histogram::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Histogram::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Histogram::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Histogram::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Histogram::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Histogram::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Histogram::Erase( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Histogram::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Histogram::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Histogram::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Histogram::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Histogram::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20240606/Cdk/Template.pm0000644000000000000000000001330212171561426014774 0ustar rootrootpackage Cdk::Template; @ISA = qw (Cdk); # # This creates a new Template object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $plate = Cdk::checkReq( $name, "Plate", $params{'Plate'} ); my $overlay = Cdk::checkReq( $name, "Overlay", $params{'Overlay'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $label = Cdk::checkDef( $name, "Label", $params{'Label'}, "" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Template::New( $title, $label, $plate, $overlay, $xpos, $ypos, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Template::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Template::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Template::Inject( $self->{'Me'}, $character ) ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Value'} ) { Cdk::Template::SetValue( $self->{'Me'}, $params{'Value'} ); } if ( defined $params{'Min'} ) { Cdk::Template::SetMin( $self->{'Me'}, $params{'Min'} ); } if ( defined $params{'ULChar'} ) { Cdk::Template::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Template::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Template::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Template::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Template::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Template::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Template::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Template::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Template::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This function allows the user to get the current value from the widget. # sub get { my $self = shift; return ( Cdk::Template::Get( $self->{'Me'} ) ); } # # This binds a given key to a given function. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Template::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Template::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Template::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set the values. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Template::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Template::Erase( $self->{'Me'} ); } # # This cleans the template info field. # sub clean { my $self = shift; Cdk::Template::Clean( $self->{'Me'} ); } # # This mixes the results with the overlay # sub mix { my $self = shift; Cdk::Template::Mix( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Template::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Template::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Template::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Template::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Template::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20240606/Cdk/Marquee.pm0000644000000000000000000000750212171561423014622 0ustar rootrootpackage Cdk::Marquee; @ISA = qw (Cdk); # # This creates a new Marquee object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Marquee::New( $width, $xpos, $ypos, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Set the values. my $message = Cdk::checkReq( $name, "Message", $params{'Message'} ); my $delay = Cdk::checkReq( $name, "Delay", $params{'Delay'} ); my $repeat = Cdk::checkReq( $name, "Repeat", $params{'Repeat'} ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Store the information in both the object and Perl's stack. $self->{'Info'} = Cdk::Marquee::Activate( $self->{'Me'}, $params{'Message'}, $delay, $repeat, $box ); return ( $self->{'Info'} ); } # # This turns off the marquee. # sub deactivate { my $self = shift; Cdk::Marquee::Deactivate( $self->{'Me'} ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'ULChar'} ) { Cdk::Marquee::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Marquee::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Marquee::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Marquee::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Marquee::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Marquee::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Marquee::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Marquee::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Marquee::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Marquee::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Marquee::Erase( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Marquee::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Marquee::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Marquee::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Marquee::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Marquee::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20240606/Cdk/Diag.pm0000644000000000000000000000263212171561421014064 0ustar rootrootpackage Cdk::Diag; @ISA = qw (Cdk); # # This creates a new Label object # sub getScreenRegList { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $mesg = Cdk::checkReq( $name, "Message", $params{'Message'} ); # Call the thing. Cdk::Diag::DumpScreenRegList($mesg); } # # This writes to the log file. # sub Log { my ( $mesgType, $widgetType, $mesg ) = @_; # If the environment flag CDKDIAG is not set then get out. return if ( !defined $ENV{'CDKDIAG'} ); # Set up the local vars. my $filename = $ENV{'CDKLOGFILE'} || "cdkdiag.log"; my $date = qx (date); chomp $date; my $diagType = uc $ENV{'CDKDIAG'}; # Only write the output if the diagnostics tell us to. if ( $diagType eq "ALL" || $diagType =~ uc $widgetType ) { # Open the file open( XXX, ">>$filename" ); select(XXX); $| = 1; print XXX "\n*** Diagnostic Start: Program=<$0> Time: <$date> ***\n" if !$DIAGFLAG; # Check the message type. print XXX "$mesgType - ($widgetType) $mesg\n" if ( $mesgType eq "Diag" ); print XXX "$mesgType - ($widgetType) $mesg\n" if ( $mesgType eq "Error" ); close(XXX); $DIAGFLAG = 1; } } 1; cdk-perl-20240606/Cdk/Debug.pm0000644000000000000000000000075612171561421014253 0ustar rootrootpackage Cdk::Debug; @ISA = qw (Cdk); # # This creates a new Label object # sub DumpScreenRegList { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $mesg = Cdk::checkReq( "($name) Missing 'Message' value.", $params{'Message'} ); # Call the thing. Cdk::Debug::DumpScreenRegList( $params{'Message'}, $mesg ); } 1; cdk-perl-20240606/Cdk/Dialog.pm0000644000000000000000000001255112171561421014420 0ustar rootrootpackage Cdk::Dialog; @ISA = qw (Cdk); # # This creates a new Dialog object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $mesg = Cdk::checkReq( $name, "Message", $params{'Message'} ); my $buttons = Cdk::checkReq( $name, "Buttons", $params{'Buttons'} ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $hlight = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "A_REVERSE" ); my $sep = Cdk::checkDef( $name, "Seperator", $params{'Seperator'}, "TRUE" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Dialog::New( $params{'Message'}, $params{'Buttons'}, $xpos, $ypos, $hlight, $sep, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Dialog::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Dialog::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Dialog::Inject( $self->{'Me'}, $character ) ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Highlight'} ) { Cdk::Dialog::SetHighlight( $self->{'Me'}, $params{'Highlight'} ); } if ( defined $params{'Separator'} ) { Cdk::Dialog::SetSeparator( $self->{'Me'}, $params{'Separator'} ); } if ( defined $params{'ULChar'} ) { Cdk::Dialog::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Dialog::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Dialog::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Dialog::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Dialog::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Dialog::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Dialog::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Dialog::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Dialog::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Dialog::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Dialog::Erase( $self->{'Me'} ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set up the parameters passed in. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); # Bind the key to the function Cdk::Dialog::Bind( $self->{'Me'}, $key, $function ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Dialog::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Dialog::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Dialog::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Dialog::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Dialog::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Dialog::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Dialog::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20240606/Cdk/Fselect.pm0000644000000000000000000001520712171561422014610 0ustar rootrootpackage Cdk::Fselect; @ISA = qw (Cdk); # # This creates a new file selector object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $label = Cdk::checkDef( $name, "Label", $params{'Label'}, "" ); my $dattrib = Cdk::checkDef( $name, "Dattrib", $params{'Dattrib'}, "" ); my $fattrib = Cdk::checkDef( $name, "Fattrib", $params{'Fattrib'}, "" ); my $lattrib = Cdk::checkDef( $name, "Lattrib", $params{'Lattrib'}, "" ); my $sattrib = Cdk::checkDef( $name, "Sattrib", $params{'Sattrib'}, "" ); my $hlight = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "A_REVERSE" ); my $filler = Cdk::checkDef( $name, "Filler", $params{'Filler'}, "." ); my $fAttr = Cdk::checkDef( $name, "Fieldattr", $params{'Fieldattr'}, "A_NORMAL" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Fselect::New( $title, $label, $height, $width, $dattrib, $fattrib, $lattrib, $sattrib, $hlight, $fAttr, $filler, $xpos, $ypos, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Fselect::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Fselect::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Directory'} ) { Cdk::Fselect::SetDirectory( $self->{'Me'}, $params{'Directory'} ); } if ( defined $params{'FillerChar'} ) { Cdk::Fselect::SetFillerChar( $self->{'Me'}, $params{'FillerChar'} ); } if ( defined $params{'Highlight'} ) { Cdk::Fselect::SetHighlight( $self->{'Me'}, $params{'Highlight'} ); } if ( defined $params{'DirAttribute'} ) { Cdk::Fselect::SetDirAttribute( $self->{'Me'}, $params{'DirAttribute'} ); } if ( defined $params{'LinkAttribute'} ) { Cdk::Fselect::SetLinkAttribute( $self->{'Me'}, $params{'LinkAttribute'} ); } if ( defined $params{'FileAttribute'} ) { Cdk::Fselect::SetFileAttribute( $self->{'Me'}, $params{'FileAttribute'} ); } if ( defined $params{'SocketAttribute'} ) { Cdk::Fselect::SetSocketAttribute( $self->{'Me'}, $params{'SocketAttribute'} ); } if ( defined $params{'ULChar'} ) { Cdk::Fselect::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Fselect::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Fselect::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Fselect::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Fselect::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Fselect::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Fselect::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Fselect::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Fselect::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This function allows the user to get the current value from the widget. # sub get { my $self = shift; return ( Cdk::Fselect::Get( $self->{'Me'} ) ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Fselect::Bind( $self->{'Me'}, $params{'Key'}, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Fselect::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Fselect::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set the values. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Fselect::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Fselect::Erase( $self->{'Me'} ); } # # This cleans the info inside the entry object. # sub clean { my $self = shift; Cdk::Fselect::Clean( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Fselect::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Fselect::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Fselect::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Fselect::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Fselect::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20240606/Cdk/Itemlist.pm0000644000000000000000000001337012171561423015015 0ustar rootrootpackage Cdk::Itemlist; @ISA = qw (Cdk); # # This creates a new Itemlist object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $info = Cdk::checkReq( $name, "List", $params{'List'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $label = Cdk::checkDef( $name, "Label", $params{'Label'}, "" ); my $default = Cdk::checkDef( $name, 'Default', $params{'Default'}, 0 ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Itemlist::New( $title, $label, $params{'List'}, $default, $xpos, $ypos, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Itemlist::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Itemlist::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Itemlist::Inject( $self->{'Me'}, $character ) ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Values'} ) { Cdk::Itemlist::SetValues( $self->{'Me'}, $params{'Values'} ); } if ( defined $params{'DefaultItem'} ) { Cdk::Itemlist::SetDefaultItem( $self->{'Me'}, $params{'DefaultItem'} ); } if ( defined $params{'CurrentItem'} ) { Cdk::Itemlist::SetCurrentItem( $self->{'Me'}, $params{'CurrentItem'} ); } if ( defined $params{'ULChar'} ) { Cdk::Itemlist::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Itemlist::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Itemlist::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Itemlist::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Itemlist::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Itemlist::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Itemlist::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Itemlist::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Itemlist::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This function allows the user to get the current value from the widget. # sub get { my $self = shift; return ( Cdk::Itemlist::Get( $self->{'Me'} ) ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Itemlist::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Itemlist::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Itemlist::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set the values. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Itemlist::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Itemlist::Erase( $self->{'Me'} ); } # # This cleans the info inside the entry object. # sub clean { my $self = shift; Cdk::Itemlist::Clean( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Itemlist::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Itemlist::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Itemlist::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Itemlist::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Itemlist::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20240606/Cdk/Viewer.pm0000644000000000000000000001072112171561426014464 0ustar rootrootpackage Cdk::Viewer; @ISA = qw (Cdk); # # This creates a new Viewer object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $buttons = Cdk::checkReq( $name, "Buttons", $params{'Buttons'} ); my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $hlight = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "A_REVERSE" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Viewer::New( $params{'Buttons'}, $height, $width, $hlight, $xpos, $ypos, $box, $shadow ); bless $self; } # # This activates the viewer. # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... $self->{'Info'} = Cdk::Viewer::Activate( $self->{'Me'} ); return ( $self->{'Info'} ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Info'} ) { my $interpret = $params{'Interpret'} || 1; Cdk::Viewer::SetInfo( $self->{'Me'}, $params{'Info'}, $interpret ); } if ( defined $params{'Title'} ) { Cdk::Viewer::SetTitle( $self->{'Me'}, $params{'Title'} ); } if ( defined $params{'Highlight'} ) { Cdk::Viewer::SetHighlight( $self->{'Me'}, $params{'Highlight'} ); } if ( defined $params{'InfoLine'} ) { Cdk::Viewer::SetInfoLine( $self->{'Me'}, $params{'InfoLine'} ); } if ( defined $params{'ULChar'} ) { Cdk::Viewer::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Viewer::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Viewer::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Viewer::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Viewer::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Viewer::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Viewer::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Viewer::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Viewer::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Viewer::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Viewer::Erase( $self->{'Me'} ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Viewer::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Viewer::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Viewer::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Viewer::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Viewer::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Viewer::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20240606/Cdk/Label.pm0000644000000000000000000000716512171561423014247 0ustar rootroot# $Id: Label.pm,v 1.3 2013/07/17 18:31:47 tom Exp $ package Cdk::Label; @ISA = qw (Cdk); # # This creates a new Label object # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $mesg = Cdk::checkReq( $name, "Message", $params{'Message'} ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Label::New( $params{'Message'}, $xpos, $ypos, $box, $shadow ); bless $self; } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Message'} ) { Cdk::Label::SetMessage( $self->{'Me'}, $params{'Message'} ); } if ( defined $params{'ULChar'} ) { Cdk::Label::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Label::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Label::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Label::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Label::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Label::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Label::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Label::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Label::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This draws the label object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Label::Draw( $self->{'Me'}, $box ); } # # This erases the object from the screen. # sub erase { my $self = shift; Cdk::Label::Erase( $self->{'Me'} ); } # # This gives the user the ability to wait until a key is hit. # sub wait { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::wait"; # Set up the parameters passed in. my $key = Cdk::checkDef( $name, "Key", $params{'Key'}, '' ); my $code = 0; if ( $key ne '' ) { $code = ord $key; } # Sit and wait. Cdk::Label::Wait( $self->{'Me'}, $code ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Label::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Label::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Label::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Label::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Label::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20240606/Cdk/Matrix.pm0000644000000000000000000001575212171561423014475 0ustar rootrootpackage Cdk::Matrix; @ISA = qw (Cdk); # # This creates a new Matrix object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $rowtitles = Cdk::checkReq( $name, "RowTitles", $params{'RowTitles'} ); my $coltitles = Cdk::checkReq( $name, "ColTitles", $params{'ColTitles'} ); my $colwidths = Cdk::checkReq( $name, "ColWidths", $params{'ColWidths'} ); my $coltypes = Cdk::checkReq( $name, "ColTypes", $params{'ColTypes'} ); my $vrows = Cdk::checkReq( $name, "Vrows", $params{'Vrows'} ); my $vcols = Cdk::checkReq( $name, "Vcols", $params{'Vcols'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $rowSpace = Cdk::checkDef( $name, "RowSpace", $params{'RowSpace'}, 1 ); my $colSpace = Cdk::checkDef( $name, "ColSpace", $params{'ColSpace'}, 1 ); my $filler = Cdk::checkDef( $name, "Filler", $params{'Filler'}, "." ); my $dominant = Cdk::checkDef( $name, "Dominant", $params{'Dominant'}, "NONE" ); my $box = Cdk::checkDef( $name, "BoxMatrix", $params{'BoxMatrix'}, "FALSE" ); my $boxCell = Cdk::checkDef( $name, "BoxCell", $params{'BoxCell'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Matrix::New( $title, $params{'RowTitles'}, $params{'ColTitles'}, $params{'ColWidths'}, $params{'ColTypes'}, $vrows, $vcols, $xpos, $ypos, $rowSpace, $colSpace, $filler, $dominant, $boxCell, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the matrix. return ( Cdk::Matrix::Activate( $self->{'Me'} ) ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Matrix::Inject( $self->{'Me'}, $character ) ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Values'} ) { Cdk::Matrix::Set( $self->{'Me'}, $params{'Values'} ); } if ( defined $params{'Cell'} ) { Cdk::Matrix::SetCell( $self->{'Me'}, $params{'Row'}, $params{'Col'}, $params{'Value'} ); } if ( defined $params{'ULChar'} ) { Cdk::Matrix::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Matrix::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Matrix::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Matrix::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Matrix::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Matrix::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Matrix::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Matrix::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Matrix::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # These get several parameters of the widget. # sub getCell { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::getCell"; Cdk::Matrix::GetCell( $self->{'Me'}, $params{'Row'}, $params{'Col'} ); } sub getCol { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::getCol"; Cdk::Matrix::GetCol( $self->{'Me'} ); } sub getRow { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::getRow"; Cdk::Matrix::GetRow( $self->{'Me'} ); } # # This allows the user to clean the matrices cell values. # sub clean { my $self = shift; my $name = "$self->{'Type'}::clean"; Cdk::Matrix::Clean( $self->{'Me'} ); } # # This allows the user to dump the matrices cell values. # sub dump { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::flush"; my $title = $params{'Title'} || "No Title"; # Call the function that does this. Cdk::Matrix::Dump( $self->{'Me'}, $title ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Matrix::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Matrix::Erase( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Matrix::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Matrix::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Matrix::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Matrix::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Matrix::GetWindow( $self->{'Me'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Matrix::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Matrix::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Matrix::Bind( $self->{'Me'}, $params{'Key'}, $params{'Function'} ); } 1; cdk-perl-20240606/Cdk/Graph.pm0000644000000000000000000000722412171561422014264 0ustar rootroot# $Id: Graph.pm,v 1.3 2013/07/17 18:31:46 tom Exp $ package Cdk::Graph; @ISA = qw (Cdk); # # This creates a new Graph object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $xtitle = Cdk::checkReq( $name, "Xtitle", $params{'Xtitle'} ); my $ytitle = Cdk::checkReq( $name, "ytitle", $params{'Ytitle'} ); my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); # Create the thing. $self->{'Me'} = Cdk::Graph::New( $title, $xtitle, $ytitle, $height, $width, $xpos, $ypos ); bless $self; } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Values'} ) { my $startAtZero = $params{'StartAtZero'} || 1; Cdk::Graph::SetValues( $self->{'Me'}, $params{'Values'}, $startAtZero ); } if ( defined $params{'GraphChars'} ) { Cdk::Graph::SetCharacters( $self->{'Me'}, $params{'GraphChars'} ); } if ( defined $params{'DisplayType'} ) { Cdk::Graph::SetDisplayType( $self->{'Me'}, $params{'DisplayType'} ); } if ( defined $params{'ULChar'} ) { Cdk::Graph::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Graph::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Graph::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Graph::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Graph::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Graph::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Graph::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Graph::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Graph::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "FALSE" ); # Draw the object. Cdk::Graph::Draw( $self->{'Me'}, $box ); return 1; } # # This erases the object. # sub erase { my $self = shift; Cdk::Graph::Erase( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Graph::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Graph::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Graph::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Graph::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Graph::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20240606/Cdk/Calendar.pm0000644000000000000000000001612212171562366014741 0ustar rootrootpackage Cdk::Calendar; # # This creates a new Calendar object # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Get today's date. my ( $today, $thisMonth, $thisYear ) = ( localtime(time) )[ 3, 4, 5 ]; $thisMonth++; $thisYear += 1900; # Set up the parameters passed in. my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $day = Cdk::checkDef( $name, "Day", $params{'Day'}, $today ); my $month = Cdk::checkDef( $name, "Month", $params{'Month'}, $thisMonth ); my $year = Cdk::checkDef( $name, "Year", $params{'Year'}, $thisYear ); my $dAttrib = Cdk::checkDef( $name, "Dattrib", $params{'Dattrib'}, "A_NORMAL" ); my $mAttrib = Cdk::checkDef( $name, "Mattrib", $params{'Mattrib'}, "A_NORMAL" ); my $yAttrib = Cdk::checkDef( $name, "Yattrib", $params{'Yattrib'}, "A_NORMAL" ); my $hlight = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "A_REVERSE" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Calendar::New( $title, $day, $month, $year, $dAttrib, $mAttrib, $yAttrib, $hlight, $xpos, $ypos, $box, $shadow ); bless $self; } # # This activates the object. # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; my @result; # Activate the object... if ( defined $params{'Input'} ) { @result = Cdk::Calendar::Activate( $self->{'Me'}, $params{'Input'} ); } else { @result = Cdk::Calendar::Activate( $self->{'Me'} ); } $self->{'Info'} = @result; return @result; } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Calendar::Inject( $self->{'Me'}, $character ) ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Calendar::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Calendar::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Calendar::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Calendar::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Calendar::Erase( $self->{'Me'} ); } # # This sets the object... # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # Get today's date. my ( $today, $thisMonth, $thisYear ) = ( localtime(time) )[ 3, 4, 5 ]; $thisMonth++; $thisYear += 1900; # Set up the parameters passed in. my $day = Cdk::checkDef( $name, "Day", $params{'Day'}, $today ); my $month = Cdk::checkDef( $name, "Month", $params{'Month'}, $thisMonth ); my $year = Cdk::checkDef( $name, "Year", $params{'Year'}, $thisYear ); my $dAttrib = Cdk::checkDef( $name, "Dattrib", $params{'Dattrib'}, "" ); my $mAttrib = Cdk::checkDef( $name, "Mattrib", $params{'Mattrib'}, "" ); my $yAttrib = Cdk::checkDef( $name, "Yattrib", $params{'Yattrib'}, "" ); my $highlight = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); Cdk::Calendar::Set( $self->{'Me'}, $day, $month, $year, $dAttrib, $mAttrib, $yAttrib, $box ); } # # This sets the calendar to a given date. # sub setDate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::setDate"; # Set up the parameters passed in. my $day = Cdk::checkDef( $name, "Day", $params{'Day'}, -1 ); my $month = Cdk::checkDef( $name, "Month", $params{'Month'}, -1 ); my $year = Cdk::checkDef( $name, "Year", $params{'Year'}, -1 ); Cdk::Calendar::SetDate( $self->{'Me'}, $day, $month, $year ); } # # This gets the current date on the given calendar. # sub getDate { my $self = shift; return Cdk::Calendar::GetDate( $self->{'Me'} ); } # # This sets a marker in the calendar widget. # sub setMarker { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::setMarker"; # Set up the parameters passed in. my $day = Cdk::checkReq( $name, "Day", $params{'Day'} ); my $month = Cdk::checkReq( $name, "Month", $params{'Month'} ); my $year = Cdk::checkReq( $name, "Year", $params{'Year'} ); my $marker = Cdk::checkDef( $name, "Marker", $params{'Marker'}, "A_REVERSE" ); Cdk::Calendar::SetMarker( $self->{'Me'}, $day, $month, $year, $marker ); } # # This removes a marker from the calendar widget. # sub removeMarker { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::removeMarker"; # Set up the parameters passed in. my $day = Cdk::checkReq( $name, "Day", $params{'Day'} ); my $month = Cdk::checkReq( $name, "Month", $params{'Month'} ); my $year = Cdk::checkReq( $name, "Year", $params{'Year'} ); Cdk::Calendar::RemoveMarker( $self->{'Me'}, $day, $month, $year ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Calendar::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Calendar::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Calendar::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Calendar::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Calendar::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20240606/Cdk/Alphalist.pm0000644000000000000000000001271112171561420015137 0ustar rootrootpackage Cdk::Alphalist; @ISA = qw (Cdk); # # This creates a new alphalist object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $list = Cdk::checkReq( $name, "List", $params{'List'} ); my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $label = Cdk::checkDef( $name, "Label", $params{'Label'}, "" ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $hBar = Cdk::checkDef( $name, "Highlight", $params{'Highlight'}, "A_REVERSE" ); my $filler = Cdk::checkDef( $name, "Filler", $params{'Filler'}, "." ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Alphalist::New( $title, $label, $params{'List'}, $height, $width, $xpos, $ypos, $hBar, $filler, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Alphalist::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Alphalist::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Contents'} ) { Cdk::Alphalist::SetContents( $self->{'Me'}, $params{'Contents'} ); } if ( defined $params{'FillerChar'} ) { Cdk::Alphalist::SetFillerChar( $self->{'Me'}, $params{'FillerChar'} ); } if ( defined $params{'Highlight'} ) { Cdk::Alphalist::SetHighlight( $self->{'Me'}, $params{'Highlight'} ); } if ( defined $params{'ULChar'} ) { Cdk::Alphalist::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Alphalist::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Alphalist::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Alphalist::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Alphalist::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Alphalist::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Alphalist::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Alphalist::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Alphalist::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Alphalist::Bind( $self->{'Me'}, $params{'Key'}, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Alphalist::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Alphalist::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set the values. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Alphalist::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Alphalist::Erase( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Alphalist::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Alphalist::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Alphalist::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Alphalist::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Alphalist::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20240606/Cdk/Entry.pm0000644000000000000000000001433612171561422014326 0ustar rootrootpackage Cdk::Entry; @ISA = qw (Cdk); # # This creates a new Entry object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $max = Cdk::checkReq( $name, "Max", $params{'Max'} ); my $fWidth = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $label = Cdk::checkDef( $name, "Label", $params{'Label'}, "" ); my $filler = Cdk::checkDef( $name, "Filler", $params{'Filler'}, "." ); my $min = Cdk::checkDef( $name, "Min", $params{'Min'}, 0 ); my $dispType = Cdk::checkDef( $name, "Dtype", $params{'Dtype'}, "MIXED" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $fAttr = Cdk::checkDef( $name, "Fattrib", $params{'Fattrib'}, "A_NORMAL" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Entry::New( $title, $params{'Label'}, $min, $max, $fWidth, $filler, $dispType, $xpos, $ypos, $fAttr, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Entry::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Entry::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Entry::Inject( $self->{'Me'}, $character ) ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Value'} ) { Cdk::Entry::SetValue( $self->{'Me'}, $params{'Value'} ); } if ( defined $params{'Min'} ) { Cdk::Entry::SetMin( $self->{'Me'}, $params{'Min'} ); } if ( defined $params{'Max'} ) { Cdk::Entry::SetMax( $self->{'Me'}, $params{'Max'} ); } if ( defined $params{'FillerChar'} ) { Cdk::Entry::SetFillerChar( $self->{'Me'}, $params{'FillerChar'} ); } if ( defined $params{'HiddenChar'} ) { Cdk::Entry::SetHiddenChar( $self->{'Me'}, $params{'HiddenChar'} ); } if ( defined $params{'ULChar'} ) { Cdk::Entry::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Entry::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Entry::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Entry::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Entry::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Entry::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Entry::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Entry::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Entry::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This function allows the user to get the current value from the widget. # sub get { my $self = shift; return ( Cdk::Entry::Get( $self->{'Me'} ) ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Entry::Bind( $self->{'Me'}, $params{'Key'}, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Entry::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Entry::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set the values. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Entry::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Entry::Erase( $self->{'Me'} ); } # # This cleans the info inside the entry object. # sub clean { my $self = shift; Cdk::Entry::Clean( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Entry::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Entry::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Entry::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Entry::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Entry::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20240606/Cdk/Swindow.pm0000644000000000000000000001672212171561425014663 0ustar rootrootpackage Cdk::Swindow; @ISA = qw (Cdk); # # This creates a new Swindow object. # sub new { my $type = shift; my %params = @_; my $self = {}; my $name = "${type}::new"; # Retain the type of the object. $self->{'Type'} = $type; # Set up the parameters passed in. my $lines = Cdk::checkReq( $name, "Lines", $params{'Lines'} ); my $height = Cdk::checkReq( $name, "Height", $params{'Height'} ); my $width = Cdk::checkReq( $name, "Width", $params{'Width'} ); my $title = Cdk::checkDef( $name, "Title", $params{'Title'}, "" ); my $xpos = Cdk::checkDef( $name, "Xpos", $params{'Xpos'}, "CENTER" ); my $ypos = Cdk::checkDef( $name, "Ypos", $params{'Ypos'}, "CENTER" ); my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); my $shadow = Cdk::checkDef( $name, "Shadow", $params{'Shadow'}, "FALSE" ); # Create the thing. $self->{'Me'} = Cdk::Swindow::New( $title, $lines, $height, $width, $xpos, $ypos, $box, $shadow ); bless $self; } # # This activates the object # sub activate { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::activate"; # Activate the object... if ( defined $params{'Input'} ) { $self->{'Info'} = Cdk::Swindow::Activate( $self->{'Me'}, $params{'Input'} ); } else { $self->{'Info'} = Cdk::Swindow::Activate( $self->{'Me'} ); } return ( $self->{'Info'} ); } # # This injects a character into the widget. # sub inject { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::inject"; # Set the values. my $character = Cdk::checkReq( $name, "Input", $params{'Input'} ); return ( Cdk::Swindow::Inject( $self->{'Me'}, $character ) ); } # # This allows us to bind a key to an action. # sub bind { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::bind"; # Set the values. my $key = Cdk::checkReq( $name, "Key", $params{'Key'} ); my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Swindow::Bind( $self->{'Me'}, $key, $params{'Function'} ); } # # This allows us to set a pre-process function. # sub preProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::preProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Swindow::PreProcess( $self->{'Me'}, $params{'Function'} ); } # # This allows us to set a post-process function. # sub postProcess { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::postProcess"; # Set the values. my $function = Cdk::checkReq( $name, "Function", $params{'Function'} ); Cdk::Swindow::PostProcess( $self->{'Me'}, $params{'Function'} ); } # # This sets several parameters of the widget. # sub set { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::set"; # # Check the parameters sent in. # if ( defined $params{'Contents'} ) { Cdk::Swindow::SetContents( $self->{'Me'}, $params{'Contents'} ); } if ( defined $params{'ULChar'} ) { Cdk::Swindow::SetULChar( $self->{'Me'}, $params{'ULChar'} ); } if ( defined $params{'URChar'} ) { Cdk::Swindow::SetURChar( $self->{'Me'}, $params{'URChar'} ); } if ( defined $params{'LLChar'} ) { Cdk::Swindow::SetLLChar( $self->{'Me'}, $params{'LLChar'} ); } if ( defined $params{'LRChar'} ) { Cdk::Swindow::SetLRChar( $self->{'Me'}, $params{'LRChar'} ); } if ( defined $params{'VChar'} ) { Cdk::Swindow::SetVerticalChar( $self->{'Me'}, $params{'VChar'} ); } if ( defined $params{'HChar'} ) { Cdk::Swindow::SetHorizontalChar( $self->{'Me'}, $params{'HChar'} ); } if ( defined $params{'BoxAttribute'} ) { Cdk::Swindow::SetBoxAttribute( $self->{'Me'}, $params{'BoxAttribute'} ); } if ( defined $params{'BGColor'} ) { Cdk::Swindow::SetBackgroundColor( $self->{'Me'}, $params{'BGColor'} ); } if ( defined $params{'Box'} ) { Cdk::Swindow::SetBox( $self->{'Me'}, $params{'Box'} ); } } # # This adds a line into the scrolling window. # sub addline { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::addline"; # Set up the parameters passed in. my $info = Cdk::checkReq( $name, "Info", $params{'Info'} ); my $position = Cdk::checkDef( $name, "Position", $params{'Position'}, "BOTTOM" ); Cdk::Swindow::Addline( $self->{'Me'}, $info, $position ); } # # This allows the user to spawn a command via a scrolling window. # sub exec { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::addline"; # Set up the parameters passed in. my $command = Cdk::checkReq( $name, "Command", $params{'Command'} ); my $position = Cdk::checkDef( $name, "Position", $params{'Position'}, "BOTTOM" ); return Cdk::Swindow::Exec( $self->{'Me'}, $command, $position ); } # # This trims the scrolling window. # sub trim { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::trim"; # Set up the parameters passed in. my $start = Cdk::checkReq( $name, "Start", $params{'Start'} ); my $finish = Cdk::checkReq( $name, "Finish", $params{'Finish'} ); Cdk::Swindow::Trim( $self->{'Me'}, $start, $finish ); } # # This cleans the info from the window. # sub clean { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::clean"; Cdk::Swindow::Clean( $self->{'Me'} ); } # # This saves the information in the swindow to a file. # sub save { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::save"; Cdk::Swindow::Save( $self->{'Me'} ); } # # This loads information into the swindow from a file. # sub load { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::load"; Cdk::Swindow::Load( $self->{'Me'} ); } # # This saves the information in the swindow to the given file. # sub dump { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::dump"; my $filename = Cdk::checkReq( $name, "Filename", $params{'Filename'} ); Cdk::Swindow::Dump( $self->{'Me'}, $filename ); } # # This returns the information from the scrolling window. # sub get { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::get"; return ( Cdk::Swindow::Get( $self->{'Me'} ) ); } # # This draws the object. # sub draw { my $self = shift; my %params = @_; my $name = "$self->{'Type'}::draw"; # Set up the parameters passed in. my $box = Cdk::checkDef( $name, "Box", $params{'Box'}, "TRUE" ); # Draw the object. Cdk::Swindow::Draw( $self->{'Me'}, $box ); } # # This erases the object. # sub erase { my $self = shift; Cdk::Swindow::Erase( $self->{'Me'} ); } # # This function raises the object. # sub raise { my $self = shift; Cdk::Swindow::Raise( $self->{'Me'} ); } # # This function lowers the object. # sub lower { my $self = shift; Cdk::Swindow::Lower( $self->{'Me'} ); } # # This function registers the object. # sub register { my $self = shift; Cdk::Swindow::Register( $self->{'Me'} ); } # # This function unregisters the object. # sub unregister { my $self = shift; Cdk::Swindow::Unregister( $self->{'Me'} ); } # # This function returns the pointer to the window. # sub getwin { my $self = shift; Cdk::Swindow::GetWindow( $self->{'Me'} ); } 1; cdk-perl-20240606/COPYING0000644000000000000000000000270214630415447013222 0ustar rootroot-- $Id: COPYING,v 1.12 2024/06/06 20:25:11 tom Exp $ ------------------------------------------------------------------------------- Copyright 1999-2023,2024 Thomas Dickey Copyright 1999, Mike Glover Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, distribute with modifications, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name(s) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization. cdk-perl-20240606/aclocal.m40000644000000000000000000031441114546506070014031 0ustar rootrootdnl $Id: aclocal.m4,v 1.16 2024/01/07 11:34:16 tom Exp $ dnl macros used for CDK-Perl configure script dnl --------------------------------------------------------------------------- dnl Copyright 2013-2023,2024 Thomas E. Dickey dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the "Software"), dnl to deal in the Software without restriction, including without limitation dnl the rights to use, copy, modify, merge, publish, distribute, distribute dnl with modifications, sublicense, and/or sell copies of the Software, and to dnl permit persons to whom the Software is furnished to do so, subject to the dnl following conditions: dnl dnl The above copyright notice and this permission notice shall be included in dnl all copies or substantial portions of the Software. dnl dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL dnl THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER dnl DEALINGS IN THE SOFTWARE. dnl dnl Except as contained in this notice, the name(s) of the above copyright dnl holders shall not be used in advertising or otherwise to promote the sale, dnl use or other dealings in this Software without prior written authorization. dnl dnl see dnl https://invisible-island.net/autoconf/ dnl --------------------------------------------------------------------------- dnl --------------------------------------------------------------------------- dnl CF_ACVERSION_CHECK version: 5 updated: 2014/06/04 19:11:49 dnl ------------------ dnl Conditionally generate script according to whether we're using a given autoconf. dnl dnl $1 = version to compare against dnl $2 = code to use if AC_ACVERSION is at least as high as $1. dnl $3 = code to use if AC_ACVERSION is older than $1. define([CF_ACVERSION_CHECK], [ ifdef([AC_ACVERSION], ,[ifdef([AC_AUTOCONF_VERSION],[m4_copy([AC_AUTOCONF_VERSION],[AC_ACVERSION])],[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])])dnl ifdef([m4_version_compare], [m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])], [CF_ACVERSION_COMPARE( AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl dnl --------------------------------------------------------------------------- dnl CF_ACVERSION_COMPARE version: 3 updated: 2012/10/03 18:39:53 dnl -------------------- dnl CF_ACVERSION_COMPARE(MAJOR1, MINOR1, TERNARY1, dnl MAJOR2, MINOR2, TERNARY2, dnl PRINTABLE2, not FOUND, FOUND) define([CF_ACVERSION_COMPARE], [ifelse(builtin([eval], [$2 < $5]), 1, [ifelse([$8], , ,[$8])], [ifelse([$9], , ,[$9])])])dnl dnl --------------------------------------------------------------------------- dnl CF_ADD_CFLAGS version: 15 updated: 2020/12/31 10:54:15 dnl ------------- dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS dnl $1 = flags to add dnl $2 = if given makes this macro verbose. dnl dnl Put any preprocessor definitions that use quoted strings in $EXTRA_CPPFLAGS, dnl to simplify use of $CPPFLAGS in compiler checks, etc., that are easily dnl confused by the quotes (which require backslashes to keep them usable). AC_DEFUN([CF_ADD_CFLAGS], [ cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $1 do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then CF_APPEND_TEXT(cf_new_extra_cppflags,$cf_add_cflags) continue elif test "${cf_tst_cflags}" = "\"'" ; then CF_APPEND_TEXT(cf_new_extra_cppflags,$cf_add_cflags) continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,$cf_tst_cppflags) ;; esac CF_APPEND_TEXT(cf_new_cppflags,$cf_add_cflags) ;; esac ;; (*) CF_APPEND_TEXT(cf_new_cflags,$cf_add_cflags) ;; esac ;; (yes) CF_APPEND_TEXT(cf_new_extra_cppflags,$cf_add_cflags) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[[^"]]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then ifelse([$2],,,[CF_VERBOSE(add to \$CFLAGS $cf_new_cflags)]) CF_APPEND_TEXT(CFLAGS,$cf_new_cflags) fi if test -n "$cf_new_cppflags" ; then ifelse([$2],,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)]) CF_APPEND_TEXT(CPPFLAGS,$cf_new_cppflags) fi if test -n "$cf_new_extra_cppflags" ; then ifelse([$2],,,[CF_VERBOSE(add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags)]) CF_APPEND_TEXT(EXTRA_CPPFLAGS,$cf_new_extra_cppflags) fi AC_SUBST(EXTRA_CPPFLAGS) ])dnl dnl --------------------------------------------------------------------------- dnl CF_ADD_INCDIR version: 17 updated: 2021/09/04 06:35:04 dnl ------------- dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it is dnl redundant. We don't normally need to add -I/usr/local/include for gcc, dnl but old versions (and some misinstalled ones) need that. To make things dnl worse, gcc 3.x may give error messages if -I/usr/local/include is added to dnl the include-path). AC_DEFUN([CF_ADD_INCDIR], [ if test -n "$1" ; then for cf_add_incdir in $1 do while test "$cf_add_incdir" != /usr/include do if test -d "$cf_add_incdir" then cf_have_incdir=no if test -n "$CFLAGS$CPPFLAGS" ; then # a loop is needed to ensure we can add subdirs of existing dirs for cf_test_incdir in $CFLAGS $CPPFLAGS ; do if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then cf_have_incdir=yes; break fi done fi if test "$cf_have_incdir" = no ; then if test "$cf_add_incdir" = /usr/local/include ; then if test "$GCC" = yes then cf_save_CPPFLAGS=$CPPFLAGS CF_APPEND_TEXT(CPPFLAGS,-I$cf_add_incdir) AC_TRY_COMPILE([#include ], [printf("Hello")], [], [cf_have_incdir=yes]) CPPFLAGS=$cf_save_CPPFLAGS fi fi fi if test "$cf_have_incdir" = no ; then CF_VERBOSE(adding $cf_add_incdir to include-path) ifelse([$2],,CPPFLAGS,[$2])="$ifelse([$2],,CPPFLAGS,[$2]) -I$cf_add_incdir" cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'` test "$cf_top_incdir" = "$cf_add_incdir" && break cf_add_incdir="$cf_top_incdir" else break fi else break fi done done fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_ADD_LIB version: 2 updated: 2010/06/02 05:03:05 dnl ---------- dnl Add a library, used to enforce consistency. dnl dnl $1 = library to add, without the "-l" dnl $2 = variable to update (default $LIBS) AC_DEFUN([CF_ADD_LIB],[CF_ADD_LIBS(-l$1,ifelse($2,,LIBS,[$2]))])dnl dnl --------------------------------------------------------------------------- dnl CF_ADD_LIBDIR version: 11 updated: 2020/12/31 20:19:42 dnl ------------- dnl Adds to the library-path dnl dnl Some machines have trouble with multiple -L options. dnl dnl $1 is the (list of) directory(s) to add dnl $2 is the optional name of the variable to update (default LDFLAGS) dnl AC_DEFUN([CF_ADD_LIBDIR], [ if test -n "$1" ; then for cf_add_libdir in $1 do if test "$cf_add_libdir" = /usr/lib ; then : elif test -d "$cf_add_libdir" then cf_have_libdir=no if test -n "$LDFLAGS$LIBS" ; then # a loop is needed to ensure we can add subdirs of existing dirs for cf_test_libdir in $LDFLAGS $LIBS ; do if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then cf_have_libdir=yes; break fi done fi if test "$cf_have_libdir" = no ; then CF_VERBOSE(adding $cf_add_libdir to library-path) ifelse([$2],,LDFLAGS,[$2])="-L$cf_add_libdir $ifelse([$2],,LDFLAGS,[$2])" fi fi done fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_ADD_LIBS version: 3 updated: 2019/11/02 16:47:33 dnl ----------- dnl Add one or more libraries, used to enforce consistency. Libraries are dnl prepended to an existing list, since their dependencies are assumed to dnl already exist in the list. dnl dnl $1 = libraries to add, with the "-l", etc. dnl $2 = variable to update (default $LIBS) AC_DEFUN([CF_ADD_LIBS],[ cf_add_libs="[$]ifelse($2,,LIBS,[$2])" # reverse order cf_add_0lib= for cf_add_1lib in $1; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done ifelse($2,,LIBS,[$2])="$cf_add_libs" ])dnl dnl --------------------------------------------------------------------------- dnl CF_ADD_LIB_AFTER version: 3 updated: 2013/07/09 21:27:22 dnl ---------------- dnl Add a given library after another, e.g., following the one it satisfies a dnl dependency for. dnl dnl $1 = the first library dnl $2 = its dependency AC_DEFUN([CF_ADD_LIB_AFTER],[ CF_VERBOSE(...before $LIBS) LIBS=`echo "$LIBS" | sed -e "s/[[ ]][[ ]]*/ /g" -e "s%$1 %$1 $2 %" -e 's% % %g'` CF_VERBOSE(...after $LIBS) ])dnl dnl --------------------------------------------------------------------------- dnl CF_ADD_SUBDIR_PATH version: 5 updated: 2020/12/31 20:19:42 dnl ------------------ dnl Append to a search-list for a nonstandard header/lib-file dnl $1 = the variable to return as result dnl $2 = the package name dnl $3 = the subdirectory, e.g., bin, include or lib dnl $4 = the directory under which we will test for subdirectories dnl $5 = a directory that we do not want $4 to match AC_DEFUN([CF_ADD_SUBDIR_PATH], [ test "x$4" != "x$5" && \ test -d "$4" && \ ifelse([$5],NONE,,[{ test -z "$5" || test "x$5" = xNONE || test "x$4" != "x$5"; } &&]) { test -n "$verbose" && echo " ... testing for $3-directories under $4" test -d "$4/$3" && $1="[$]$1 $4/$3" test -d "$4/$3/$2" && $1="[$]$1 $4/$3/$2" test -d "$4/$3/$2/$3" && $1="[$]$1 $4/$3/$2/$3" test -d "$4/$2/$3" && $1="[$]$1 $4/$2/$3" test -d "$4/$2/$3/$2" && $1="[$]$1 $4/$2/$3/$2" } ])dnl dnl --------------------------------------------------------------------------- dnl CF_APPEND_CFLAGS version: 3 updated: 2021/09/05 17:25:40 dnl ---------------- dnl Use CF_ADD_CFLAGS after first checking for potential redefinitions. dnl $1 = flags to add dnl $2 = if given makes this macro verbose. define([CF_APPEND_CFLAGS], [ for cf_add_cflags in $1 do case "x$cf_add_cflags" in (x-[[DU]]*) CF_REMOVE_CFLAGS($cf_add_cflags,CFLAGS,[$2]) CF_REMOVE_CFLAGS($cf_add_cflags,CPPFLAGS,[$2]) ;; esac CF_ADD_CFLAGS([$cf_add_cflags],[$2]) done ])dnl dnl --------------------------------------------------------------------------- dnl CF_APPEND_TEXT version: 1 updated: 2017/02/25 18:58:55 dnl -------------- dnl use this macro for appending text without introducing an extra blank at dnl the beginning define([CF_APPEND_TEXT], [ test -n "[$]$1" && $1="[$]$1 " $1="[$]{$1}$2" ])dnl dnl --------------------------------------------------------------------------- dnl CF_ARG_ENABLE version: 3 updated: 1999/03/30 17:24:31 dnl ------------- dnl Allow user to enable a normally-off option. AC_DEFUN([CF_ARG_ENABLE], [CF_ARG_OPTION($1,[$2],[$3],[$4],no)])dnl dnl --------------------------------------------------------------------------- dnl CF_ARG_OPTION version: 5 updated: 2015/05/10 19:52:14 dnl ------------- dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus dnl values. dnl dnl Parameters: dnl $1 = option name dnl $2 = help-string dnl $3 = action to perform if option is not default dnl $4 = action if perform if option is default dnl $5 = default option value (either 'yes' or 'no') AC_DEFUN([CF_ARG_OPTION], [AC_ARG_ENABLE([$1],[$2],[test "$enableval" != ifelse([$5],no,yes,no) && enableval=ifelse([$5],no,no,yes) if test "$enableval" != "$5" ; then ifelse([$3],,[ :]dnl ,[ $3]) ifelse([$4],,,[ else $4]) fi],[enableval=$5 ifelse([$4],,,[ $4 ])dnl ])])dnl dnl --------------------------------------------------------------------------- dnl CF_C11_NORETURN version: 4 updated: 2023/02/18 17:41:25 dnl --------------- AC_DEFUN([CF_C11_NORETURN], [ AC_MSG_CHECKING(if you want to use C11 _Noreturn feature) CF_ARG_ENABLE(stdnoreturn, [ --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics], [enable_stdnoreturn=yes], [enable_stdnoreturn=no]) AC_MSG_RESULT($enable_stdnoreturn) if test $enable_stdnoreturn = yes; then AC_CACHE_CHECK([for C11 _Noreturn feature], cf_cv_c11_noreturn, [AC_TRY_COMPILE([ $ac_includes_default #include static _Noreturn void giveup(void) { exit(0); } ], [if (feof(stdin)) giveup()], cf_cv_c11_noreturn=yes, cf_cv_c11_noreturn=no) ]) else cf_cv_c11_noreturn=no, fi if test "$cf_cv_c11_noreturn" = yes; then AC_DEFINE(HAVE_STDNORETURN_H, 1,[Define if header is available and working]) AC_DEFINE_UNQUOTED(STDC_NORETURN,_Noreturn,[Define if C11 _Noreturn keyword is supported]) HAVE_STDNORETURN_H=1 else HAVE_STDNORETURN_H=0 fi AC_SUBST(HAVE_STDNORETURN_H) AC_SUBST(STDC_NORETURN) ])dnl dnl --------------------------------------------------------------------------- dnl CF_CC_ENV_FLAGS version: 11 updated: 2023/02/20 11:15:46 dnl --------------- dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content dnl into CC. This will not help with broken scripts that wrap the compiler dnl with options, but eliminates a more common category of user confusion. dnl dnl In particular, it addresses the problem of being able to run the C dnl preprocessor in a consistent manner. dnl dnl Caveat: this also disallows blanks in the pathname for the compiler, but dnl the nuisance of having inconsistent settings for compiler and preprocessor dnl outweighs that limitation. AC_DEFUN([CF_CC_ENV_FLAGS], [ # This should have been defined by AC_PROG_CC : "${CC:=cc}" AC_MSG_CHECKING(\$CFLAGS variable) case "x$CFLAGS" in (*-[[IUD]]*) AC_MSG_RESULT(broken) AC_MSG_WARN(your environment uses the CFLAGS variable to hold CPPFLAGS options) cf_flags="$CFLAGS" CFLAGS= for cf_arg in $cf_flags do CF_ADD_CFLAGS($cf_arg) done ;; (*) AC_MSG_RESULT(ok) ;; esac AC_MSG_CHECKING(\$CC variable) case "$CC" in (*[[\ \ ]]-*) AC_MSG_RESULT(broken) AC_MSG_WARN(your environment uses the CC variable to hold CFLAGS/CPPFLAGS options) # humor him... cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'` cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"` CC="$cf_prog" for cf_arg in $cf_flags do case "x$cf_arg" in (x-[[IUDfgOW]]*) CF_ADD_CFLAGS($cf_arg) ;; (*) CC="$CC $cf_arg" ;; esac done CF_VERBOSE(resulting CC: '$CC') CF_VERBOSE(resulting CFLAGS: '$CFLAGS') CF_VERBOSE(resulting CPPFLAGS: '$CPPFLAGS') ;; (*) AC_MSG_RESULT(ok) ;; esac ])dnl dnl --------------------------------------------------------------------------- dnl CF_CHECK_CACHE version: 13 updated: 2020/12/31 10:54:15 dnl -------------- dnl Check if we're accidentally using a cache from a different machine. dnl Derive the system name, as a check for reusing the autoconf cache. dnl dnl If we've packaged config.guess and config.sub, run that (since it does a dnl better job than uname). Normally we'll use AC_CANONICAL_HOST, but allow dnl an extra parameter that we may override, e.g., for AC_CANONICAL_SYSTEM dnl which is useful in cross-compiles. dnl dnl Note: we would use $ac_config_sub, but that is one of the places where dnl autoconf 2.5x broke compatibility with autoconf 2.13 AC_DEFUN([CF_CHECK_CACHE], [ if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then ifelse([$1],,[AC_CANONICAL_HOST],[$1]) system_name="$host_os" else system_name="`(uname -s -r) 2>/dev/null`" if test -z "$system_name" ; then system_name="`(hostname) 2>/dev/null`" fi fi test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name",[Define to the system name.]) AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"]) test -z "$system_name" && system_name="$cf_cv_system_name" test -n "$cf_cv_system_name" && AC_MSG_RESULT(Configuring for $cf_cv_system_name) if test ".$system_name" != ".$cf_cv_system_name" ; then AC_MSG_RESULT(Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)) AC_MSG_ERROR("Please remove config.cache and try again.") fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_CHECK_CFLAGS version: 4 updated: 2021/01/02 19:22:58 dnl --------------- dnl Conditionally add to $CFLAGS and $CPPFLAGS values which are derived from dnl a build-configuration such as imake. These have the pitfall that they dnl often contain compiler-specific options which we cannot use, mixed with dnl preprocessor options that we usually can. AC_DEFUN([CF_CHECK_CFLAGS], [ CF_VERBOSE(checking additions to CFLAGS) cf_check_cflags="$CFLAGS" cf_check_cppflags="$CPPFLAGS" CF_ADD_CFLAGS($1,yes) if test "x$cf_check_cflags" != "x$CFLAGS" ; then AC_TRY_LINK([#include ],[printf("Hello world");],, [CF_VERBOSE(test-compile failed. Undoing change to \$CFLAGS) if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then CF_VERBOSE(but keeping change to \$CPPFLAGS) fi CFLAGS="$cf_check_cflags"]) fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_CLANG_COMPILER version: 9 updated: 2023/02/18 17:41:25 dnl ----------------- dnl Check if the given compiler is really clang. clang's C driver defines dnl __GNUC__ (fooling the configure script into setting $GCC to yes) but does dnl not ignore some gcc options. dnl dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from dnl the wrappers for gcc and g++ warnings. dnl dnl $1 = GCC (default) or GXX dnl $2 = CLANG_COMPILER (default) dnl $3 = CFLAGS (default) or CXXFLAGS AC_DEFUN([CF_CLANG_COMPILER],[ ifelse([$2],,CLANG_COMPILER,[$2])=no if test "$ifelse([$1],,[$1],GCC)" = yes ; then AC_MSG_CHECKING(if this is really Clang ifelse([$1],GXX,C++,C) compiler) cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])" AC_TRY_COMPILE([],[ #ifdef __clang__ #else #error __clang__ is not defined #endif ],[ifelse([$2],,CLANG_COMPILER,[$2])=yes ],[]) ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS" AC_MSG_RESULT($ifelse([$2],,CLANG_COMPILER,[$2])) fi CLANG_VERSION=none if test "x$ifelse([$2],,CLANG_COMPILER,[$2])" = "xyes" ; then case "$CC" in (c[[1-9]][[0-9]]|*/c[[1-9]][[0-9]]) AC_MSG_WARN(replacing broken compiler alias $CC) CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`" CC=clang ;; esac AC_MSG_CHECKING(version of $CC) CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[[^)]]*) //' -e 's/^.*(Debian[[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`" test -z "$CLANG_VERSION" && CLANG_VERSION=unknown AC_MSG_RESULT($CLANG_VERSION) for cf_clang_opt in \ -Qunused-arguments \ -Wno-error=implicit-function-declaration do AC_MSG_CHECKING(if option $cf_clang_opt works) cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $cf_clang_opt" AC_TRY_LINK([ #include ],[ printf("hello!\\n");],[ cf_clang_optok=yes],[ cf_clang_optok=no]) AC_MSG_RESULT($cf_clang_optok) CFLAGS="$cf_save_CFLAGS" if test "$cf_clang_optok" = yes; then CF_VERBOSE(adding option $cf_clang_opt) CF_APPEND_TEXT(CFLAGS,$cf_clang_opt) fi done fi ]) dnl --------------------------------------------------------------------------- dnl CF_CONST_X_STRING version: 8 updated: 2023/12/01 17:22:50 dnl ----------------- dnl The X11R4-X11R6 Xt specification uses an ambiguous String type for most dnl character-strings. dnl dnl It is ambiguous because the specification accommodated the pre-ANSI dnl compilers bundled by more than one vendor in lieu of providing a standard C dnl compiler other than by costly add-ons. Because of this, the specification dnl did not take into account the use of const for telling the compiler that dnl string literals would be in readonly memory. dnl dnl As a workaround, one could (starting with X11R5) define XTSTRINGDEFINES, to dnl let the compiler decide how to represent Xt's strings which were #define'd. dnl That does not solve the problem of using the block of Xt's strings which dnl are compiled into the library (and is less efficient than one might want). dnl dnl Xt specification 7 introduces the _CONST_X_STRING symbol which is used both dnl when compiling the library and compiling using the library, to tell the dnl compiler that String is const. AC_DEFUN([CF_CONST_X_STRING], [ AC_REQUIRE([AC_PATH_XTRA]) CF_SAVE_XTRA_FLAGS([CF_CONST_X_STRING]) AC_TRY_COMPILE( [ #include #include ], [String foo = malloc(1); free((void*)foo)],[ AC_CACHE_CHECK(for X11/Xt const-feature,cf_cv_const_x_string,[ AC_TRY_COMPILE( [ #undef _CONST_X_STRING #define _CONST_X_STRING /* X11R7.8 (perhaps) */ #undef XTSTRINGDEFINES /* X11R5 and later */ #include #include ],[String foo = malloc(1); *foo = 0],[ cf_cv_const_x_string=no ],[ cf_cv_const_x_string=yes ]) ]) CF_RESTORE_XTRA_FLAGS([CF_CONST_X_STRING]) case "$cf_cv_const_x_string" in (no) CF_APPEND_TEXT(CPPFLAGS,-DXTSTRINGDEFINES) ;; (*) CF_APPEND_TEXT(CPPFLAGS,-D_CONST_X_STRING) ;; esac ]) ])dnl dnl --------------------------------------------------------------------------- dnl CF_CURSES_CHTYPE version: 11 updated: 2021/01/02 09:31:20 dnl ---------------- dnl Test if curses defines 'chtype' (usually a 'long' type for SysV curses). AC_DEFUN([CF_CURSES_CHTYPE], [ AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl AC_CACHE_CHECK(for chtype typedef,cf_cv_chtype_decl,[ AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>], [chtype foo; (void)foo], [cf_cv_chtype_decl=yes], [cf_cv_chtype_decl=no])]) if test "$cf_cv_chtype_decl" = yes ; then AC_DEFINE(HAVE_TYPE_CHTYPE,1,[Define to 1 if chtype is declared]) AC_CACHE_CHECK(if chtype is scalar or struct,cf_cv_chtype_type,[ AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>], [static chtype foo; long x = foo; (void)x], [cf_cv_chtype_type=scalar], [cf_cv_chtype_type=struct])]) if test "$cf_cv_chtype_type" = scalar ; then AC_DEFINE(TYPE_CHTYPE_IS_SCALAR,1,[Define to 1 if chtype is a scaler/integer]) fi fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_CURSES_CONFIG version: 2 updated: 2006/10/29 11:06:27 dnl ---------------- dnl Tie together the configure-script macros for curses. It may be ncurses, dnl but unless asked, we do not make a special search for ncurses. However, dnl still check for the ncurses version number, for use in other macros. AC_DEFUN([CF_CURSES_CONFIG], [ CF_CURSES_CPPFLAGS CF_NCURSES_VERSION CF_CURSES_LIBS ])dnl dnl --------------------------------------------------------------------------- dnl CF_CURSES_CPPFLAGS version: 14 updated: 2021/01/02 09:31:20 dnl ------------------ dnl Look for the curses headers. AC_DEFUN([CF_CURSES_CPPFLAGS],[ AC_CACHE_CHECK(for extra include directories,cf_cv_curses_incdir,[ cf_cv_curses_incdir=no case "$host_os" in (hpux10.*) if test "x$cf_cv_screen" = "xcurses_colr" then test -d /usr/include/curses_colr && \ cf_cv_curses_incdir="-I/usr/include/curses_colr" fi ;; (sunos3*|sunos4*) if test "x$cf_cv_screen" = "xcurses_5lib" then test -d /usr/5lib && \ test -d /usr/5include && \ cf_cv_curses_incdir="-I/usr/5include" fi ;; esac ]) if test "$cf_cv_curses_incdir" != no then CF_APPEND_TEXT(CPPFLAGS,$cf_cv_curses_incdir) fi CF_CURSES_HEADER CF_TERM_HEADER ])dnl dnl --------------------------------------------------------------------------- dnl CF_CURSES_HEADER version: 6 updated: 2022/12/02 20:06:52 dnl ---------------- dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common dnl variations of ncurses' installs. dnl dnl $1 = ncurses when looking for ncurses, or is empty AC_DEFUN([CF_CURSES_HEADER],[ AC_CACHE_CHECK(if we have identified curses headers,cf_cv_ncurses_header,[ cf_cv_ncurses_header=none for cf_header in \ ncurses.h ifelse($1,,,[$1/ncurses.h]) \ curses.h ifelse($1,,,[$1/curses.h]) ifelse($1,,[ncurses/ncurses.h ncurses/curses.h]) do AC_TRY_COMPILE([#include <${cf_header}>], [initscr(); endwin()], [cf_cv_ncurses_header=$cf_header; break],[]) done ]) if test "$cf_cv_ncurses_header" = none ; then AC_MSG_ERROR(No curses header-files found) fi # cheat, to get the right #define's for HAVE_NCURSES_H, etc. AC_CHECK_HEADERS($cf_cv_ncurses_header) ])dnl dnl --------------------------------------------------------------------------- dnl CF_CURSES_LIBS version: 45 updated: 2022/12/02 20:06:52 dnl -------------- dnl Look for the curses libraries. Older curses implementations may require dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. AC_DEFUN([CF_CURSES_LIBS],[ AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl AC_MSG_CHECKING(if we have identified curses libraries) AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr(); endwin()], cf_result=yes, cf_result=no) AC_MSG_RESULT($cf_result) if test "$cf_result" = no ; then case "$host_os" in (freebsd*) AC_CHECK_LIB(mytinfo,tgoto,[CF_ADD_LIBS(-lmytinfo)]) ;; (hpux10.*) # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr # next (1998), and xcurses "newer" (2000). There is no header file for # Hcurses; the subdirectory curses_colr has the headers (curses.h and # term.h) for cur_colr if test "x$cf_cv_screen" = "xcurses_colr" then AC_CHECK_LIB(cur_colr,initscr,[ CF_ADD_LIBS(-lcur_colr) ac_cv_func_initscr=yes ],[ AC_CHECK_LIB(Hcurses,initscr,[ # HP's header uses __HP_CURSES, but user claims _HP_CURSES. CF_ADD_LIBS(-lHcurses) CF_APPEND_TEXT(CPPFLAGS,-D__HP_CURSES -D_HP_CURSES) ac_cv_func_initscr=yes ])]) fi ;; (linux*) case `arch 2>/dev/null` in (x86_64) if test -d /lib64 then CF_ADD_LIBDIR(/lib64) else CF_ADD_LIBDIR(/lib) fi ;; (*) CF_ADD_LIBDIR(/lib) ;; esac ;; (sunos3*|sunos4*) if test "x$cf_cv_screen" = "xcurses_5lib" then if test -d /usr/5lib ; then CF_ADD_LIBDIR(/usr/5lib) CF_ADD_LIBS(-lcurses -ltermcap) fi fi ac_cv_func_initscr=yes ;; esac if test ".$ac_cv_func_initscr" != .yes ; then cf_save_LIBS="$LIBS" if test ".${cf_cv_ncurses_version:-no}" != .no then cf_check_list="ncurses curses cursesX" else cf_check_list="cursesX curses ncurses" fi # Check for library containing tgoto. Do this before curses library # because it may be needed to link the test-case for initscr. if test "x$cf_term_lib" = x then AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[ for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown do AC_CHECK_LIB($cf_term_lib,tgoto,[ : "${cf_nculib_root:=$cf_term_lib}" break ]) done ]) fi # Check for library containing initscr test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS" if test "x$cf_curs_lib" = x then for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown do LIBS="-l$cf_curs_lib $cf_save_LIBS" if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then AC_MSG_CHECKING(if we can link with $cf_curs_lib library) AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr()], [cf_result=yes], [cf_result=no]) AC_MSG_RESULT($cf_result) test "$cf_result" = yes && break elif test "$cf_curs_lib" = "$cf_term_lib" ; then cf_result=no elif test "$cf_term_lib" != predefined ; then AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries) AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr(); endwin();], [cf_result=no], [ LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr()], [cf_result=yes], [cf_result=error]) ]) AC_MSG_RESULT($cf_result) test "$cf_result" != error && break fi done fi test "$cf_curs_lib" = unknown && AC_MSG_ERROR(no curses library found) fi fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_DIRNAME version: 5 updated: 2020/12/31 20:19:42 dnl ---------- dnl "dirname" is not portable, so we fake it with a shell script. AC_DEFUN([CF_DIRNAME],[$1=`echo "$2" | sed -e 's%/[[^/]]*$%%'`])dnl dnl --------------------------------------------------------------------------- dnl CF_DISABLE_LEAKS version: 9 updated: 2021/04/03 16:41:50 dnl ---------------- dnl Combine no-leak checks with the libraries or tools that are used for the dnl checks. AC_DEFUN([CF_DISABLE_LEAKS],[ AC_REQUIRE([CF_WITH_DMALLOC]) AC_REQUIRE([CF_WITH_DBMALLOC]) AC_REQUIRE([CF_WITH_VALGRIND]) AC_MSG_CHECKING(if you want to perform memory-leak testing) AC_ARG_ENABLE(leaks, [ --disable-leaks test: free permanent memory, analyze leaks], [enable_leaks=$enableval], [enable_leaks=yes]) dnl with_no_leaks is more readable... if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi AC_MSG_RESULT($with_no_leaks) if test "$enable_leaks" = no ; then AC_DEFINE(NO_LEAKS,1,[Define to 1 if you want to perform memory-leak testing.]) AC_DEFINE(YY_NO_LEAKS,1,[Define to 1 if you want to perform memory-leak testing.]) fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_ENABLE_WARNINGS version: 9 updated: 2021/01/05 19:40:50 dnl ------------------ dnl Configure-option to enable gcc warnings dnl dnl $1 = extra options to add, if supported dnl $2 = option for checking attributes. By default, this is done when dnl warnings are enabled. For other values: dnl yes: always do this, e.g., to use in generated library-headers dnl no: never do this AC_DEFUN([CF_ENABLE_WARNINGS],[ if test "$GCC" = yes || test "$GXX" = yes then CF_FIX_WARNINGS(CFLAGS) CF_FIX_WARNINGS(CPPFLAGS) CF_FIX_WARNINGS(LDFLAGS) AC_MSG_CHECKING(if you want to turn on gcc warnings) CF_ARG_ENABLE(warnings, [ --enable-warnings test: turn on gcc compiler warnings], [enable_warnings=yes], [enable_warnings=no]) AC_MSG_RESULT($enable_warnings) if test "$enable_warnings" = "yes" then ifelse($2,,[CF_GCC_ATTRIBUTES]) CF_GCC_WARNINGS($1) fi ifelse($2,yes,[CF_GCC_ATTRIBUTES]) fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_FIND_LIBRARY version: 11 updated: 2021/01/02 09:31:20 dnl --------------- dnl Look for a non-standard library, given parameters for AC_TRY_LINK. We dnl prefer a standard location, and use -L options only if we do not find the dnl library in the standard library location(s). dnl $1 = library name dnl $2 = library class, usually the same as library name dnl $3 = includes dnl $4 = code fragment to compile/link dnl $5 = corresponding function-name dnl $6 = flag, nonnull if failure should not cause an error-exit dnl dnl Sets the variable "$cf_libdir" as a side-effect, so we can see if we had dnl to use a -L option. AC_DEFUN([CF_FIND_LIBRARY], [ eval 'cf_cv_have_lib_'"$1"'=no' cf_libdir="" AC_CHECK_FUNC($5, eval 'cf_cv_have_lib_'"$1"'=yes',[ cf_save_LIBS="$LIBS" AC_MSG_CHECKING(for $5 in -l$1) LIBS="-l$1 $LIBS" AC_TRY_LINK([$3],[$4], [AC_MSG_RESULT(yes) eval 'cf_cv_have_lib_'"$1"'=yes' ], [AC_MSG_RESULT(no) CF_LIBRARY_PATH(cf_search,$2) for cf_libdir in $cf_search do AC_MSG_CHECKING(for -l$1 in $cf_libdir) LIBS="-L$cf_libdir -l$1 $cf_save_LIBS" AC_TRY_LINK([$3],[$4], [AC_MSG_RESULT(yes) eval 'cf_cv_have_lib_'"$1"'=yes' break], [AC_MSG_RESULT(no) LIBS="$cf_save_LIBS"]) done ]) ]) eval 'cf_found_library="[$]cf_cv_have_lib_'"$1"\" ifelse($6,,[ if test "$cf_found_library" = no ; then AC_MSG_ERROR(Cannot link $1 library) fi ]) ])dnl dnl --------------------------------------------------------------------------- dnl CF_FIND_LINKAGE version: 22 updated: 2020/12/31 20:19:42 dnl --------------- dnl Find a library (specifically the linkage used in the code fragment), dnl searching for it if it is not already in the library path. dnl See also CF_ADD_SEARCHPATH. dnl dnl Parameters (4-on are optional): dnl $1 = headers for library entrypoint dnl $2 = code fragment for library entrypoint dnl $3 = the library name without the "-l" option or ".so" suffix. dnl $4 = action to perform if successful (default: update CPPFLAGS, etc) dnl $5 = action to perform if not successful dnl $6 = module name, if not the same as the library name dnl $7 = extra libraries dnl dnl Sets these variables: dnl $cf_cv_find_linkage_$3 - yes/no according to whether linkage is found dnl $cf_cv_header_path_$3 - include-directory if needed dnl $cf_cv_library_path_$3 - library-directory if needed dnl $cf_cv_library_file_$3 - library-file if needed, e.g., -l$3 AC_DEFUN([CF_FIND_LINKAGE],[ # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these # will be set on completion of the AC_TRY_LINK below. cf_cv_header_path_$3= cf_cv_library_path_$3= CF_MSG_LOG([Starting [FIND_LINKAGE]($3,$6)]) cf_save_LIBS="$LIBS" AC_TRY_LINK([$1],[$2],[ cf_cv_find_linkage_$3=yes cf_cv_header_path_$3=/usr/include cf_cv_library_path_$3=/usr/lib ],[ LIBS="-l$3 $7 $cf_save_LIBS" AC_TRY_LINK([$1],[$2],[ cf_cv_find_linkage_$3=yes cf_cv_header_path_$3=/usr/include cf_cv_library_path_$3=/usr/lib cf_cv_library_file_$3="-l$3" ],[ cf_cv_find_linkage_$3=no LIBS="$cf_save_LIBS" CF_VERBOSE(find linkage for $3 library) CF_MSG_LOG([Searching for headers in [FIND_LINKAGE]($3,$6)]) cf_save_CPPFLAGS="$CPPFLAGS" cf_test_CPPFLAGS="$CPPFLAGS" CF_HEADER_PATH(cf_search,ifelse([$6],,[$3],[$6])) for cf_cv_header_path_$3 in $cf_search do if test -d "$cf_cv_header_path_$3" ; then CF_VERBOSE(... testing $cf_cv_header_path_$3) CPPFLAGS="$cf_save_CPPFLAGS" CF_APPEND_TEXT(CPPFLAGS,-I$cf_cv_header_path_$3) AC_TRY_COMPILE([$1],[$2],[ CF_VERBOSE(... found $3 headers in $cf_cv_header_path_$3) cf_cv_find_linkage_$3=maybe cf_test_CPPFLAGS="$CPPFLAGS" break],[ CPPFLAGS="$cf_save_CPPFLAGS" ]) fi done if test "$cf_cv_find_linkage_$3" = maybe ; then CF_MSG_LOG([Searching for $3 library in [FIND_LINKAGE]($3,$6)]) cf_save_LIBS="$LIBS" cf_save_LDFLAGS="$LDFLAGS" ifelse([$6],,,[ CPPFLAGS="$cf_test_CPPFLAGS" LIBS="-l$3 $7 $cf_save_LIBS" AC_TRY_LINK([$1],[$2],[ CF_VERBOSE(... found $3 library in system) cf_cv_find_linkage_$3=yes]) CPPFLAGS="$cf_save_CPPFLAGS" LIBS="$cf_save_LIBS" ]) if test "$cf_cv_find_linkage_$3" != yes ; then CF_LIBRARY_PATH(cf_search,$3) for cf_cv_library_path_$3 in $cf_search do if test -d "$cf_cv_library_path_$3" ; then CF_VERBOSE(... testing $cf_cv_library_path_$3) CPPFLAGS="$cf_test_CPPFLAGS" LIBS="-l$3 $7 $cf_save_LIBS" LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_$3" AC_TRY_LINK([$1],[$2],[ CF_VERBOSE(... found $3 library in $cf_cv_library_path_$3) cf_cv_find_linkage_$3=yes cf_cv_library_file_$3="-l$3" break],[ CPPFLAGS="$cf_save_CPPFLAGS" LIBS="$cf_save_LIBS" LDFLAGS="$cf_save_LDFLAGS" ]) fi done CPPFLAGS="$cf_save_CPPFLAGS" LDFLAGS="$cf_save_LDFLAGS" fi else cf_cv_find_linkage_$3=no fi ],$7) ]) LIBS="$cf_save_LIBS" if test "$cf_cv_find_linkage_$3" = yes ; then ifelse([$4],,[ CF_ADD_INCDIR($cf_cv_header_path_$3) CF_ADD_LIBDIR($cf_cv_library_path_$3) CF_ADD_LIB($3) ],[$4]) else ifelse([$5],,AC_MSG_WARN(Cannot find $3 library),[$5]) fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_FIX_WARNINGS version: 4 updated: 2021/12/16 18:22:31 dnl --------------- dnl Warning flags do not belong in CFLAGS, CPPFLAGS, etc. Any of gcc's dnl "-Werror" flags can interfere with configure-checks. Those go into dnl EXTRA_CFLAGS. dnl dnl $1 = variable name to repair define([CF_FIX_WARNINGS],[ if test "$GCC" = yes || test "$GXX" = yes then case [$]$1 in (*-Werror=*) cf_temp_flags= for cf_temp_scan in [$]$1 do case "x$cf_temp_scan" in (x-Werror=format*) CF_APPEND_TEXT(cf_temp_flags,$cf_temp_scan) ;; (x-Werror=*) CF_APPEND_TEXT(EXTRA_CFLAGS,$cf_temp_scan) ;; (*) CF_APPEND_TEXT(cf_temp_flags,$cf_temp_scan) ;; esac done if test "x[$]$1" != "x$cf_temp_flags" then CF_VERBOSE(repairing $1: [$]$1) $1="$cf_temp_flags" CF_VERBOSE(... fixed [$]$1) CF_VERBOSE(... extra $EXTRA_CFLAGS) fi ;; esac fi AC_SUBST(EXTRA_CFLAGS) ])dnl dnl --------------------------------------------------------------------------- dnl CF_GCC_ATTRIBUTES version: 24 updated: 2021/03/20 12:00:25 dnl ----------------- dnl Test for availability of useful gcc __attribute__ directives to quiet dnl compiler warnings. Though useful, not all are supported -- and contrary dnl to documentation, unrecognized directives cause older compilers to barf. AC_DEFUN([CF_GCC_ATTRIBUTES], [AC_REQUIRE([AC_PROG_FGREP])dnl AC_REQUIRE([CF_C11_NORETURN])dnl if test "$GCC" = yes || test "$GXX" = yes then cat > conftest.i < "conftest.$ac_ext" < #include "confdefs.h" #include "conftest.h" #include "conftest.i" #if GCC_PRINTF #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) #else #define GCC_PRINTFLIKE(fmt,var) /*nothing*/ #endif #if GCC_SCANF #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var))) #else #define GCC_SCANFLIKE(fmt,var) /*nothing*/ #endif extern void wow(char *,...) GCC_SCANFLIKE(1,2); extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2); extern GCC_NORETURN void foo(void); int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { (void)argc; (void)argv; return 0; } EOF cf_printf_attribute=no cf_scanf_attribute=no for cf_attribute in scanf printf unused noreturn do CF_UPPER(cf_ATTRIBUTE,$cf_attribute) cf_directive="__attribute__(($cf_attribute))" echo "checking for $CC $cf_directive" 1>&AC_FD_CC case "$cf_attribute" in (printf) cf_printf_attribute=yes cat >conftest.h <conftest.h <conftest.h <>confdefs.h case "$cf_attribute" in (noreturn) AC_DEFINE_UNQUOTED(GCC_NORETURN,$cf_directive,[Define to noreturn-attribute for gcc]) ;; (printf) cf_value='/* nothing */' if test "$cf_printf_attribute" != no ; then cf_value='__attribute__((format(printf,fmt,var)))' AC_DEFINE(GCC_PRINTF,1,[Define to 1 if the compiler supports gcc-like printf attribute.]) fi AC_DEFINE_UNQUOTED(GCC_PRINTFLIKE(fmt,var),$cf_value,[Define to printf-attribute for gcc]) ;; (scanf) cf_value='/* nothing */' if test "$cf_scanf_attribute" != no ; then cf_value='__attribute__((format(scanf,fmt,var)))' AC_DEFINE(GCC_SCANF,1,[Define to 1 if the compiler supports gcc-like scanf attribute.]) fi AC_DEFINE_UNQUOTED(GCC_SCANFLIKE(fmt,var),$cf_value,[Define to sscanf-attribute for gcc]) ;; (unused) AC_DEFINE_UNQUOTED(GCC_UNUSED,$cf_directive,[Define to unused-attribute for gcc]) ;; esac fi done else ${FGREP-fgrep} define conftest.i >>confdefs.h fi rm -rf ./conftest* fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_GCC_VERSION version: 9 updated: 2023/03/05 14:30:13 dnl -------------- dnl Find version of gcc, and (because icc/clang pretend to be gcc without being dnl compatible), attempt to determine if icc/clang is actually used. AC_DEFUN([CF_GCC_VERSION],[ AC_REQUIRE([AC_PROG_CC]) GCC_VERSION=none if test "$GCC" = yes ; then AC_MSG_CHECKING(version of $CC) GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[[^(]]*([[^)]][[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`" test -z "$GCC_VERSION" && GCC_VERSION=unknown AC_MSG_RESULT($GCC_VERSION) fi CF_INTEL_COMPILER(GCC,INTEL_COMPILER,CFLAGS) CF_CLANG_COMPILER(GCC,CLANG_COMPILER,CFLAGS) ])dnl dnl --------------------------------------------------------------------------- dnl CF_GCC_WARNINGS version: 41 updated: 2021/01/01 16:53:59 dnl --------------- dnl Check if the compiler supports useful warning options. There's a few that dnl we don't use, simply because they're too noisy: dnl dnl -Wconversion (useful in older versions of gcc, but not in gcc 2.7.x) dnl -Winline (usually not worthwhile) dnl -Wredundant-decls (system headers make this too noisy) dnl -Wtraditional (combines too many unrelated messages, only a few useful) dnl -Wwrite-strings (too noisy, but should review occasionally). This dnl is enabled for ncurses using "--enable-const". dnl -pedantic dnl dnl Parameter: dnl $1 is an optional list of gcc warning flags that a particular dnl application might want to use, e.g., "no-unused" for dnl -Wno-unused dnl Special: dnl If $with_ext_const is "yes", add a check for -Wwrite-strings dnl AC_DEFUN([CF_GCC_WARNINGS], [ AC_REQUIRE([CF_GCC_VERSION]) if test "x$have_x" = xyes; then CF_CONST_X_STRING fi cat > "conftest.$ac_ext" <],[ #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0 return 0; #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0 return 0; #else # error not GNU C library #endif], [cf_cv_gnu_library=yes], [cf_cv_gnu_library=no]) ]) if test x$cf_cv_gnu_library = xyes; then # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE # was changed to help a little. newlib incorporated the change about 4 # years later. AC_CACHE_CHECK(if _DEFAULT_SOURCE can be used as a basis,cf_cv_gnu_library_219,[ cf_save="$CPPFLAGS" CF_APPEND_TEXT(CPPFLAGS,-D_DEFAULT_SOURCE) AC_TRY_COMPILE([#include ],[ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2) return 0; #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3) return 0; #else # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old #endif], [cf_cv_gnu_library_219=yes], [cf_cv_gnu_library_219=no]) CPPFLAGS="$cf_save" ]) if test "x$cf_cv_gnu_library_219" = xyes; then cf_save="$CPPFLAGS" AC_CACHE_CHECK(if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE,cf_cv_gnu_dftsrc_219,[ CF_ADD_CFLAGS(-D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source) AC_TRY_COMPILE([ #include #include ],[ #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1) return 0; #else # error GNU C library is too old #endif], [cf_cv_gnu_dftsrc_219=yes], [cf_cv_gnu_dftsrc_219=no]) ]) test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save" else cf_cv_gnu_dftsrc_219=maybe fi if test "x$cf_cv_gnu_dftsrc_219" != xyes; then AC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[ AC_TRY_COMPILE([#include ],[ #ifndef _XOPEN_SOURCE #error expected _XOPEN_SOURCE to be defined #endif], [cf_cv_gnu_source=no], [cf_save="$CPPFLAGS" CF_ADD_CFLAGS(-D_GNU_SOURCE) AC_TRY_COMPILE([#include ],[ #ifdef _XOPEN_SOURCE #error expected _XOPEN_SOURCE to be undefined #endif], [cf_cv_gnu_source=no], [cf_cv_gnu_source=yes]) CPPFLAGS="$cf_save" ]) ]) if test "$cf_cv_gnu_source" = yes then AC_CACHE_CHECK(if we should also define _DEFAULT_SOURCE,cf_cv_default_source,[ CF_APPEND_TEXT(CPPFLAGS,-D_GNU_SOURCE) AC_TRY_COMPILE([#include ],[ #ifdef _DEFAULT_SOURCE #error expected _DEFAULT_SOURCE to be undefined #endif], [cf_cv_default_source=no], [cf_cv_default_source=yes]) ]) if test "$cf_cv_default_source" = yes then CF_APPEND_TEXT(CPPFLAGS,-D_DEFAULT_SOURCE) fi fi fi fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_HEADER_PATH version: 15 updated: 2021/01/01 13:31:04 dnl -------------- dnl Construct a search-list of directories for a nonstandard header-file dnl dnl Parameters dnl $1 = the variable to return as result dnl $2 = the package name AC_DEFUN([CF_HEADER_PATH], [ $1= # collect the current set of include-directories from compiler flags cf_header_path_list="" if test -n "${CFLAGS}${CPPFLAGS}" ; then for cf_header_path in $CPPFLAGS $CFLAGS do case "$cf_header_path" in (-I*) cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'` CF_ADD_SUBDIR_PATH($1,$2,include,$cf_header_path,NONE) cf_header_path_list="$cf_header_path_list [$]$1" ;; esac done fi # add the variations for the package we are looking for CF_SUBDIR_PATH($1,$2,include) test "$includedir" != NONE && \ test "$includedir" != "/usr/include" && \ test -d "$includedir" && { test -d "$includedir" && $1="[$]$1 $includedir" test -d "$includedir/$2" && $1="[$]$1 $includedir/$2" } test "$oldincludedir" != NONE && \ test "$oldincludedir" != "/usr/include" && \ test -d "$oldincludedir" && { test -d "$oldincludedir" && $1="[$]$1 $oldincludedir" test -d "$oldincludedir/$2" && $1="[$]$1 $oldincludedir/$2" } $1="[$]$1 $cf_header_path_list" ])dnl dnl --------------------------------------------------------------------------- dnl CF_INTEL_COMPILER version: 9 updated: 2023/02/18 17:41:25 dnl ----------------- dnl Check if the given compiler is really the Intel compiler for Linux. It dnl tries to imitate gcc, but does not return an error when it finds a mismatch dnl between prototypes, e.g., as exercised by CF_MISSING_CHECK. dnl dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from dnl the wrappers for gcc and g++ warnings. dnl dnl $1 = GCC (default) or GXX dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS dnl $3 = CFLAGS (default) or CXXFLAGS AC_DEFUN([CF_INTEL_COMPILER],[ AC_REQUIRE([AC_CANONICAL_HOST]) ifelse([$2],,INTEL_COMPILER,[$2])=no if test "$ifelse([$1],,[$1],GCC)" = yes ; then case "$host_os" in (linux*|gnu*) AC_MSG_CHECKING(if this is really Intel ifelse([$1],GXX,C++,C) compiler) cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])" ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -no-gcc" AC_TRY_COMPILE([],[ #ifdef __INTEL_COMPILER #else #error __INTEL_COMPILER is not defined #endif ],[ifelse([$2],,INTEL_COMPILER,[$2])=yes cf_save_CFLAGS="$cf_save_CFLAGS -we147" ],[]) ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS" AC_MSG_RESULT($ifelse([$2],,INTEL_COMPILER,[$2])) ;; esac fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_LIBRARY_PATH version: 11 updated: 2021/01/01 13:31:04 dnl --------------- dnl Construct a search-list of directories for a nonstandard library-file dnl dnl Parameters dnl $1 = the variable to return as result dnl $2 = the package name AC_DEFUN([CF_LIBRARY_PATH], [ $1= cf_library_path_list="" if test -n "${LDFLAGS}${LIBS}" ; then for cf_library_path in $LDFLAGS $LIBS do case "$cf_library_path" in (-L*) cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'` CF_ADD_SUBDIR_PATH($1,$2,lib,$cf_library_path,NONE) cf_library_path_list="$cf_library_path_list [$]$1" ;; esac done fi CF_SUBDIR_PATH($1,$2,lib) $1="$cf_library_path_list [$]$1" ])dnl dnl --------------------------------------------------------------------------- dnl CF_LIB_SUFFIX version: 28 updated: 2021/01/01 16:53:59 dnl ------------- dnl Compute the library file-suffix from the given model name dnl $1 = model name dnl $2 = variable to set (the nominal library suffix) dnl $3 = dependency variable to set (actual filename) dnl The variable $LIB_SUFFIX, if set, prepends the variable to set. AC_DEFUN([CF_LIB_SUFFIX], [ case X$1 in (Xlibtool) $2='.la' $3=[$]$2 ;; (Xdebug) case "$cf_cv_system_name" in (*-msvc*) $2='_g.lib' ;; (*) $2='_g.a' ;; esac $3=[$]$2 ;; (Xprofile) case "$cf_cv_system_name" in (*-msvc*) $2='_p.lib' ;; (*) $2='_p.a' ;; esac $3=[$]$2 ;; (Xshared) case "$cf_cv_system_name" in (aix[[5-7]]*) $2='.so' $3=[$]$2 ;; (*-msvc*) $2='.dll' $3='.dll.lib' ;; (cygwin*|msys*|mingw*) $2='.dll' $3='.dll.a' ;; (darwin*) $2='.dylib' $3=[$]$2 ;; (hpux*) case "$target" in (ia64*) $2='.so' $3=[$]$2 ;; (*) $2='.sl' $3=[$]$2 ;; esac ;; (*) $2='.so' $3=[$]$2 ;; esac ;; (*) case "$target" in (*-msvc*) $2='.lib' ;; (*) $2='.a' ;; esac $3=[$]$2 ;; esac if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}" then $2="${LIB_SUFFIX}${EXTRA_SUFFIX}[$]{$2}" $3="${LIB_SUFFIX}${EXTRA_SUFFIX}[$]{$3}" fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_MSG_LOG version: 5 updated: 2010/10/23 15:52:32 dnl ---------- dnl Write a debug message to config.log, along with the line number in the dnl configure script. AC_DEFUN([CF_MSG_LOG],[ echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC ])dnl dnl --------------------------------------------------------------------------- dnl CF_NCURSES_CC_CHECK version: 6 updated: 2023/02/18 17:47:58 dnl ------------------- dnl Check if we can compile with ncurses' header file dnl $1 is the cache variable to set dnl $2 is the header-file to include dnl $3 is the root name (ncurses or ncursesw) AC_DEFUN([CF_NCURSES_CC_CHECK],[ AC_TRY_COMPILE([ ]ifelse($3,ncursesw,[ #define _XOPEN_SOURCE_EXTENDED #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */ #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */ ])[ #include <$2>],[ #ifdef NCURSES_VERSION ]ifelse($3,ncursesw,[ #ifndef WACS_BSSB #error WACS_BSSB is not defined #endif ])[ printf("%s\\n", NCURSES_VERSION); #else #ifdef __NCURSES_H printf("old\\n"); #else #error __NCURSES_H is not defined #endif #endif ] ,[$1=$2] ,[$1=no]) ])dnl dnl --------------------------------------------------------------------------- dnl CF_NCURSES_CONFIG version: 28 updated: 2021/08/28 15:20:37 dnl ----------------- dnl Tie together the configure-script macros for ncurses, preferring these in dnl order: dnl a) ".pc" files for pkg-config, using $NCURSES_CONFIG_PKG dnl b) the "-config" script from ncurses, using $NCURSES_CONFIG dnl c) just plain libraries dnl dnl $1 is the root library name (default: "ncurses") AC_DEFUN([CF_NCURSES_CONFIG],[ AC_REQUIRE([CF_PKG_CONFIG]) cf_ncuconfig_root=ifelse($1,,ncurses,$1) cf_have_ncuconfig=no if test "x${PKG_CONFIG:=none}" != xnone; then AC_MSG_CHECKING(pkg-config for $cf_ncuconfig_root) if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then AC_MSG_RESULT(yes) AC_MSG_CHECKING(if the $cf_ncuconfig_root package files work) cf_have_ncuconfig=unknown cf_save_CFLAGS="$CFLAGS" cf_save_CPPFLAGS="$CPPFLAGS" cf_save_LIBS="$LIBS" cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`" cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`" # while -W for passing linker flags is prevalent, it is not "standard". # At least one wrapper for c89/c99 (in Apple's xcode) has its own # incompatible _and_ non-standard -W option which gives an error. Work # around that pitfall. case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in (x*c[[89]]9@@*-W*) CF_ADD_CFLAGS($cf_pkg_cflags) CF_ADD_LIBS($cf_pkg_libs) AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr(); mousemask(0,0); tigetstr((char *)0);], [AC_TRY_RUN([#include <${cf_cv_ncurses_header:-curses.h}> int main(void) { const char *xx = curses_version(); return (xx == 0); }], [cf_test_ncuconfig=yes], [cf_test_ncuconfig=no], [cf_test_ncuconfig=maybe])], [cf_test_ncuconfig=no]) CFLAGS="$cf_save_CFLAGS" CPPFLAGS="$cf_save_CPPFLAGS" LIBS="$cf_save_LIBS" if test "x$cf_test_ncuconfig" != xyes; then cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[[^ ]]*//g'` cf_pkg_cflags="$cf_temp" cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[[^ ]]*//g'` cf_pkg_libs="$cf_temp" fi ;; esac CF_APPEND_CFLAGS($cf_pkg_cflags) CF_ADD_LIBS($cf_pkg_libs) AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr(); mousemask(0,0); tigetstr((char *)0);], [AC_TRY_RUN([#include <${cf_cv_ncurses_header:-curses.h}> int main(void) { const char *xx = curses_version(); return (xx == 0); }], [cf_have_ncuconfig=yes], [cf_have_ncuconfig=no], [cf_have_ncuconfig=maybe])], [cf_have_ncuconfig=no]) AC_MSG_RESULT($cf_have_ncuconfig) test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes if test "$cf_have_ncuconfig" != "yes" then CPPFLAGS="$cf_save_CPPFLAGS" LIBS="$cf_save_LIBS" NCURSES_CONFIG_PKG=none else AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries]) NCURSES_CONFIG_PKG=$cf_ncuconfig_root CF_TERM_HEADER fi else AC_MSG_RESULT(no) NCURSES_CONFIG_PKG=none fi else NCURSES_CONFIG_PKG=none fi if test "x$cf_have_ncuconfig" = "xno"; then cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}" CF_ACVERSION_CHECK(2.52, [AC_CHECK_TOOLS(NCURSES_CONFIG, ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)], [AC_PATH_PROGS(NCURSES_CONFIG, ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)]) if test "$NCURSES_CONFIG" != none ; then CF_APPEND_CFLAGS(`$NCURSES_CONFIG --cflags`) CF_ADD_LIBS(`$NCURSES_CONFIG --libs`) # even with config script, some packages use no-override for curses.h CF_CURSES_HEADER(ifelse($1,,ncurses,$1)) dnl like CF_NCURSES_CPPFLAGS AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries]) dnl like CF_NCURSES_LIBS CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_ncuconfig_root) AC_DEFINE_UNQUOTED($cf_nculib_ROOT) dnl like CF_NCURSES_VERSION cf_cv_ncurses_version="`$NCURSES_CONFIG --version`" else CF_NCURSES_CPPFLAGS(ifelse($1,,ncurses,$1)) CF_NCURSES_LIBS(ifelse($1,,ncurses,$1)) fi else NCURSES_CONFIG=none fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_NCURSES_CPPFLAGS version: 22 updated: 2021/01/02 09:31:20 dnl ------------------- dnl Look for the SVr4 curses clone 'ncurses' in the standard places, adjusting dnl the CPPFLAGS variable so we can include its header. dnl dnl The header files may be installed as either curses.h, or ncurses.h (would dnl be obsolete, except that some packagers prefer this name to distinguish it dnl from a "native" curses implementation). If not installed for overwrite, dnl the curses.h file would be in an ncurses subdirectory (e.g., dnl /usr/include/ncurses), but someone may have installed overwriting the dnl vendor's curses. Only very old versions (pre-1.9.2d, the first autoconf'd dnl version) of ncurses don't define either __NCURSES_H or NCURSES_VERSION in dnl the header. dnl dnl If the installer has set $CFLAGS or $CPPFLAGS so that the ncurses header dnl is already in the include-path, don't even bother with this, since we cannot dnl easily determine which file it is. In this case, it has to be . dnl dnl The optional parameter gives the root name of the library, in case it is dnl not installed as the default curses library. That is how the dnl wide-character version of ncurses is installed. AC_DEFUN([CF_NCURSES_CPPFLAGS], [AC_REQUIRE([CF_WITH_CURSES_DIR]) AC_PROVIDE([CF_CURSES_CPPFLAGS])dnl cf_ncuhdr_root=ifelse($1,,ncurses,$1) test -n "$cf_cv_curses_dir" && \ test "$cf_cv_curses_dir" != "no" && { \ CF_ADD_INCDIR($cf_cv_curses_dir/include/$cf_ncuhdr_root) } AC_CACHE_CHECK(for $cf_ncuhdr_root header in include-path, cf_cv_ncurses_h,[ cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h" { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h" for cf_header in $cf_header_list do CF_NCURSES_CC_CHECK(cf_cv_ncurses_h,$cf_header,$1) test "$cf_cv_ncurses_h" != no && break done ]) CF_NCURSES_HEADER CF_TERM_HEADER # some applications need this, but should check for NCURSES_VERSION AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries]) CF_NCURSES_VERSION ])dnl dnl --------------------------------------------------------------------------- dnl CF_NCURSES_HEADER version: 7 updated: 2021/01/04 19:33:05 dnl ----------------- dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common dnl variations of ncurses' installs. dnl dnl See also CF_CURSES_HEADER, which sets the same cache variable. AC_DEFUN([CF_NCURSES_HEADER],[ if test "$cf_cv_ncurses_h" != no ; then cf_cv_ncurses_header=$cf_cv_ncurses_h else AC_CACHE_CHECK(for $cf_ncuhdr_root include-path, cf_cv_ncurses_h2,[ test -n "$verbose" && echo CF_HEADER_PATH(cf_search,$cf_ncuhdr_root) test -n "$verbose" && echo "search path $cf_search" cf_save2_CPPFLAGS="$CPPFLAGS" for cf_incdir in $cf_search do CF_ADD_INCDIR($cf_incdir) for cf_header in \ ncurses.h \ curses.h do CF_NCURSES_CC_CHECK(cf_cv_ncurses_h2,$cf_header,$1) if test "$cf_cv_ncurses_h2" != no ; then cf_cv_ncurses_h2=$cf_incdir/$cf_header test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&AC_FD_MSG break fi test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&AC_FD_MSG done CPPFLAGS="$cf_save2_CPPFLAGS" test "$cf_cv_ncurses_h2" != no && break done test "$cf_cv_ncurses_h2" = no && AC_MSG_ERROR(not found) ]) CF_DIRNAME(cf_1st_incdir,$cf_cv_ncurses_h2) cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`" if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header" fi CF_ADD_INCDIR($cf_1st_incdir) fi # Set definitions to allow ifdef'ing for ncurses.h case "$cf_cv_ncurses_header" in (*ncurses.h) AC_DEFINE(HAVE_NCURSES_H,1,[Define to 1 if we have ncurses.h]) ;; esac case "$cf_cv_ncurses_header" in (ncurses/curses.h|ncurses/ncurses.h) AC_DEFINE(HAVE_NCURSES_NCURSES_H,1,[Define to 1 if we have ncurses/ncurses.h]) ;; (ncursesw/curses.h|ncursesw/ncurses.h) AC_DEFINE(HAVE_NCURSESW_NCURSES_H,1,[Define to 1 if we have ncursesw/ncurses.h]) ;; esac ])dnl dnl --------------------------------------------------------------------------- dnl CF_NCURSES_LIBS version: 21 updated: 2021/09/04 06:37:12 dnl --------------- dnl Look for the ncurses library. This is a little complicated on Linux, dnl because it may be linked with the gpm (general purpose mouse) library. dnl Some distributions have gpm linked with (bsd) curses, which makes it dnl unusable with ncurses. However, we don't want to link with gpm unless dnl ncurses has a dependency, since gpm is normally set up as a shared library, dnl and the linker will record a dependency. dnl dnl The optional parameter gives the root name of the library, in case it is dnl not installed as the default curses library. That is how the dnl wide-character version of ncurses is installed. AC_DEFUN([CF_NCURSES_LIBS], [AC_REQUIRE([CF_NCURSES_CPPFLAGS]) cf_nculib_root=ifelse($1,,ncurses,$1) # This works, except for the special case where we find gpm, but # ncurses is in a nonstandard location via $LIBS, and we really want # to link gpm. cf_ncurses_LIBS="" cf_ncurses_SAVE="$LIBS" AC_CHECK_LIB(gpm,Gpm_Open, [AC_CHECK_LIB(gpm,initscr, [LIBS="$cf_ncurses_SAVE"], [cf_ncurses_LIBS="-lgpm"])]) case "$host_os" in (freebsd*) # This is only necessary if you are linking against an obsolete # version of ncurses (but it should do no harm, since it is static). if test "$cf_nculib_root" = ncurses ; then AC_CHECK_LIB(mytinfo,tgoto,[cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"]) fi ;; esac CF_ADD_LIBS($cf_ncurses_LIBS) if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" then CF_ADD_LIBS(-l$cf_nculib_root) else CF_FIND_LIBRARY($cf_nculib_root,$cf_nculib_root, [#include <${cf_cv_ncurses_header:-curses.h}>], [initscr()], initscr) fi if test -n "$cf_ncurses_LIBS" ; then AC_MSG_CHECKING(if we can link $cf_nculib_root without $cf_ncurses_LIBS) cf_ncurses_SAVE="$LIBS" for p in $cf_ncurses_LIBS ; do q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"` if test "$q" != "$LIBS" ; then LIBS="$q" fi done AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>], [initscr(); mousemask(0,0); tigetstr((char *)0);], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) LIBS="$cf_ncurses_SAVE"]) fi CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_nculib_root) AC_DEFINE_UNQUOTED($cf_nculib_ROOT) ])dnl dnl --------------------------------------------------------------------------- dnl CF_NCURSES_PTHREADS version: 2 updated: 2016/04/22 05:07:41 dnl ------------------- dnl Use this followup check to ensure that we link with pthreads if ncurses dnl uses it. AC_DEFUN([CF_NCURSES_PTHREADS],[ : ${cf_nculib_root:=ifelse($1,,ncurses,$1)} AC_CHECK_LIB($cf_nculib_root,_nc_init_pthreads, cf_cv_ncurses_pthreads=yes, cf_cv_ncurses_pthreads=no) if test "$cf_cv_ncurses_pthreads" = yes then CF_ADD_LIBS(-lpthread) fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_NCURSES_VERSION version: 18 updated: 2024/01/07 06:34:16 dnl ------------------ dnl Check for the version of ncurses, to aid in reporting bugs, etc. dnl Call CF_CURSES_CPPFLAGS first, or CF_NCURSES_CPPFLAGS. We don't use dnl AC_REQUIRE since that does not work with the shell's if/then/else/fi. AC_DEFUN([CF_NCURSES_VERSION], [ AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl AC_CACHE_CHECK(for ncurses version, cf_cv_ncurses_version,[ cf_cv_ncurses_version=no cf_tempfile=out$$ rm -f "$cf_tempfile" AC_TRY_RUN([ $ac_includes_default #include <${cf_cv_ncurses_header:-curses.h}> int main(void) { FILE *fp = fopen("$cf_tempfile", "w"); #ifdef NCURSES_VERSION # ifdef NCURSES_VERSION_PATCH fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH); # else fprintf(fp, "%s\\n", NCURSES_VERSION); # endif #else # ifdef __NCURSES_H fprintf(fp, "old\\n"); # else #error expected ncurses header to define __NCURSES_H # endif #endif ${cf_cv_main_return:-return}(0); }],[ cf_cv_ncurses_version=`cat $cf_tempfile`],,[ # This will not work if the preprocessor splits the line after the # Autoconf token. The 'unproto' program does that. cat > "conftest.$ac_ext" < #undef Autoconf #ifdef NCURSES_VERSION Autoconf NCURSES_VERSION #else #ifdef __NCURSES_H Autoconf "old" #endif ; #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&AC_FD_CC | grep '^Autoconf ' >conftest.out" AC_TRY_EVAL(cf_try) if test -f conftest.out ; then cf_out=`sed -e 's%^Autoconf %%' -e 's%^[[^"]]*"%%' -e 's%".*%%' conftest.out` test -n "$cf_out" && cf_cv_ncurses_version="$cf_out" rm -f conftest.out fi ]) rm -f "$cf_tempfile" ]) test "$cf_cv_ncurses_version" = no || AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries]) ])dnl dnl --------------------------------------------------------------------------- dnl CF_NO_LEAKS_OPTION version: 9 updated: 2021/06/13 19:45:41 dnl ------------------ dnl see CF_WITH_NO_LEAKS dnl dnl $1 = option/name dnl $2 = help-text dnl $3 = symbol to define if the option is set dnl $4 = additional actions to take if the option is set AC_DEFUN([CF_NO_LEAKS_OPTION],[ AC_MSG_CHECKING(if you want to use $1 for testing) AC_ARG_WITH($1, [$2], [case "x$withval" in (x|xno) ;; (*) : "${with_cflags:=-g}" : "${enable_leaks:=no}" with_$1=yes AC_DEFINE_UNQUOTED($3,1,"Define to 1 if you want to use $1 for testing.")ifelse([$4],,[ $4 ]) ;; esac], [with_$1=]) AC_MSG_RESULT(${with_$1:-no}) case ".$with_cflags" in (.*-g*) case .$CFLAGS in (.*-g*) ;; (*) CF_ADD_CFLAGS([-g]) ;; esac ;; esac ])dnl dnl --------------------------------------------------------------------------- dnl CF_PATH_SYNTAX version: 18 updated: 2020/12/31 18:40:20 dnl -------------- dnl Check the argument to see that it looks like a pathname. Rewrite it if it dnl begins with one of the prefix/exec_prefix variables, and then again if the dnl result begins with 'NONE'. This is necessary to work around autoconf's dnl delayed evaluation of those symbols. AC_DEFUN([CF_PATH_SYNTAX],[ if test "x$prefix" != xNONE; then cf_path_syntax="$prefix" else cf_path_syntax="$ac_default_prefix" fi case ".[$]$1" in (.\[$]\(*\)*|.\'*\'*) ;; (..|./*|.\\*) ;; (.[[a-zA-Z]]:[[\\/]]*) # OS/2 EMX ;; (.\[$]\{*prefix\}*|.\[$]\{*dir\}*) eval $1="[$]$1" case ".[$]$1" in (.NONE/*) $1=`echo "[$]$1" | sed -e s%NONE%$cf_path_syntax%` ;; esac ;; (.no|.NONE/*) $1=`echo "[$]$1" | sed -e s%NONE%$cf_path_syntax%` ;; (*) ifelse([$2],,[AC_MSG_ERROR([expected a pathname, not \"[$]$1\"])],$2) ;; esac ])dnl dnl --------------------------------------------------------------------------- dnl CF_PDCURSES_X11 version: 15 updated: 2021/01/02 09:31:20 dnl --------------- dnl Configure for PDCurses' X11 library AC_DEFUN([CF_PDCURSES_X11],[ AC_REQUIRE([CF_X_ATHENA]) CF_ACVERSION_CHECK(2.52, [AC_CHECK_TOOLS(XCURSES_CONFIG, xcurses-config, none)], [AC_PATH_PROGS(XCURSES_CONFIG, xcurses-config, none)]) if test "$XCURSES_CONFIG" != none ; then CF_ADD_CFLAGS(`$XCURSES_CONFIG --cflags`) CF_ADD_LIBS(`$XCURSES_CONFIG --libs`) cf_cv_lib_XCurses=yes else LDFLAGS="$LDFLAGS $X_LIBS" CF_CHECK_CFLAGS($X_CFLAGS) AC_CHECK_LIB(X11,XOpenDisplay, [CF_ADD_LIBS(-lX11)],, [$X_PRE_LIBS $LIBS $X_EXTRA_LIBS]) AC_CACHE_CHECK(for XCurses library,cf_cv_lib_XCurses,[ CF_ADD_LIBS(-lXCurses) AC_TRY_LINK([ #include char *XCursesProgramName = "test"; ],[XCursesExit();], [cf_cv_lib_XCurses=yes], [cf_cv_lib_XCurses=no]) ]) fi if test "$cf_cv_lib_XCurses" = yes ; then AC_DEFINE(UNIX,1,[Define to 1 if using PDCurses on Unix]) AC_DEFINE(XCURSES,1,[Define to 1 if using PDCurses on Unix]) AC_CHECK_HEADER(xcurses.h, AC_DEFINE(HAVE_XCURSES,1,[Define to 1 if using PDCurses on Unix])) else AC_MSG_ERROR(Cannot link with XCurses) fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_PKG_CONFIG version: 13 updated: 2023/10/28 11:59:01 dnl ------------- dnl Check for the package-config program, unless disabled by command-line. dnl dnl Sets $PKG_CONFIG to the pathname of the pkg-config program. AC_DEFUN([CF_PKG_CONFIG], [ AC_MSG_CHECKING(if you want to use pkg-config) AC_ARG_WITH(pkg-config, [[ --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD]], [cf_pkg_config=$withval], [cf_pkg_config=yes]) AC_MSG_RESULT($cf_pkg_config) case "$cf_pkg_config" in (no) PKG_CONFIG=none ;; (yes) CF_ACVERSION_CHECK(2.52, [AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)], [AC_PATH_PROG(PKG_CONFIG, pkg-config, none)]) ;; (*) PKG_CONFIG=$withval ;; esac test -z "$PKG_CONFIG" && PKG_CONFIG=none if test "$PKG_CONFIG" != none ; then CF_PATH_SYNTAX(PKG_CONFIG) elif test "x$cf_pkg_config" != xno ; then AC_MSG_WARN(pkg-config is not installed) fi AC_SUBST(PKG_CONFIG) ])dnl dnl --------------------------------------------------------------------------- dnl CF_POSIX_C_SOURCE version: 12 updated: 2023/02/18 17:41:25 dnl ----------------- dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed. dnl dnl POSIX.1-1990 _POSIX_SOURCE dnl POSIX.1-1990 and _POSIX_SOURCE and dnl POSIX.2-1992 C-Language _POSIX_C_SOURCE=2 dnl Bindings Option dnl POSIX.1b-1993 _POSIX_C_SOURCE=199309L dnl POSIX.1c-1996 _POSIX_C_SOURCE=199506L dnl X/Open 2000 _POSIX_C_SOURCE=200112L dnl dnl Parameters: dnl $1 is the nominal value for _POSIX_C_SOURCE AC_DEFUN([CF_POSIX_C_SOURCE], [AC_REQUIRE([CF_POSIX_VISIBLE])dnl if test "$cf_cv_posix_visible" = no; then cf_POSIX_C_SOURCE=ifelse([$1],,199506L,[$1]) cf_save_CFLAGS="$CFLAGS" cf_save_CPPFLAGS="$CPPFLAGS" CF_REMOVE_DEFINE(cf_trim_CFLAGS,$cf_save_CFLAGS,_POSIX_C_SOURCE) CF_REMOVE_DEFINE(cf_trim_CPPFLAGS,$cf_save_CPPFLAGS,_POSIX_C_SOURCE) AC_CACHE_CHECK(if we should define _POSIX_C_SOURCE,cf_cv_posix_c_source,[ CF_MSG_LOG(if the symbol is already defined go no further) AC_TRY_COMPILE([#include ],[ #ifndef _POSIX_C_SOURCE #error _POSIX_C_SOURCE is not defined #endif], [cf_cv_posix_c_source=no], [cf_want_posix_source=no case .$cf_POSIX_C_SOURCE in (.[[12]]??*) cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE" ;; (.2) cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE" cf_want_posix_source=yes ;; (.*) cf_want_posix_source=yes ;; esac if test "$cf_want_posix_source" = yes ; then AC_TRY_COMPILE([#include ],[ #ifdef _POSIX_SOURCE #error _POSIX_SOURCE is defined #endif],[], cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE") fi CF_MSG_LOG(ifdef from value $cf_POSIX_C_SOURCE) CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS" CF_APPEND_TEXT(CPPFLAGS,$cf_cv_posix_c_source) CF_MSG_LOG(if the second compile does not leave our definition intact error) AC_TRY_COMPILE([#include ],[ #ifndef _POSIX_C_SOURCE #error _POSIX_C_SOURCE is not defined #endif],, [cf_cv_posix_c_source=no]) CFLAGS="$cf_save_CFLAGS" CPPFLAGS="$cf_save_CPPFLAGS" ]) ]) if test "$cf_cv_posix_c_source" != no ; then CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS" CF_ADD_CFLAGS($cf_cv_posix_c_source) fi fi # cf_cv_posix_visible ])dnl dnl --------------------------------------------------------------------------- dnl CF_POSIX_VISIBLE version: 1 updated: 2018/12/31 20:46:17 dnl ---------------- dnl POSIX documents test-macros which an application may set before any system dnl headers are included to make features available. dnl dnl Some BSD platforms (originally FreeBSD, but copied by a few others) dnl diverged from POSIX in 2002 by setting symbols which make all of the most dnl recent features visible in the system header files unless the application dnl overrides the corresponding test-macros. Doing that introduces portability dnl problems. dnl dnl This macro makes a special check for the symbols used for this, to avoid a dnl conflicting definition. AC_DEFUN([CF_POSIX_VISIBLE], [ AC_CACHE_CHECK(if the POSIX test-macros are already defined,cf_cv_posix_visible,[ AC_TRY_COMPILE([#include ],[ #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \ && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \ && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \ && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0) #error conflicting symbols found #endif ],[cf_cv_posix_visible=no],[cf_cv_posix_visible=yes]) ]) ])dnl dnl --------------------------------------------------------------------------- dnl CF_PROG_AR version: 1 updated: 2009/01/01 20:15:22 dnl ---------- dnl Check for archiver "ar". AC_DEFUN([CF_PROG_AR],[ AC_CHECK_TOOL(AR, ar, ar) ]) dnl --------------------------------------------------------------------------- dnl CF_PROG_CC version: 5 updated: 2019/12/31 08:53:54 dnl ---------- dnl standard check for CC, plus followup sanity checks dnl $1 = optional parameter to pass to AC_PROG_CC to specify compiler name AC_DEFUN([CF_PROG_CC],[ CF_ACVERSION_CHECK(2.53, [AC_MSG_WARN(this will incorrectly handle gnatgcc choice) AC_REQUIRE([AC_PROG_CC])], []) ifelse($1,,[AC_PROG_CC],[AC_PROG_CC($1)]) CF_GCC_VERSION CF_ACVERSION_CHECK(2.52, [AC_PROG_CC_STDC], [CF_ANSI_CC_REQD]) CF_CC_ENV_FLAGS ])dnl dnl --------------------------------------------------------------------------- dnl CF_PROG_EXT version: 15 updated: 2021/01/02 09:31:20 dnl ----------- dnl Compute $PROG_EXT, used for non-Unix ports, such as OS/2 EMX. AC_DEFUN([CF_PROG_EXT], [ AC_REQUIRE([CF_CHECK_CACHE]) case "$cf_cv_system_name" in (os2*) CFLAGS="$CFLAGS -Zmt" CF_APPEND_TEXT(CPPFLAGS,-D__ST_MT_ERRNO__) CXXFLAGS="$CXXFLAGS -Zmt" # autoconf's macro sets -Zexe and suffix both, which conflict:w LDFLAGS="$LDFLAGS -Zmt -Zcrtdll" ac_cv_exeext=.exe ;; esac AC_EXEEXT AC_OBJEXT PROG_EXT="$EXEEXT" AC_SUBST(PROG_EXT) test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT",[Define to the program extension (normally blank)]) ])dnl dnl --------------------------------------------------------------------------- dnl CF_REMOVE_CFLAGS version: 3 updated: 2021/09/05 17:25:40 dnl ---------------- dnl Remove a given option from CFLAGS/CPPFLAGS dnl $1 = option to remove dnl $2 = variable to update dnl $3 = nonempty to allow verbose message define([CF_REMOVE_CFLAGS], [ cf_tmp_cflag=`echo "x$1" | sed -e 's/^.//' -e 's/=.*//'` while true do cf_old_cflag=`echo "x[$]$2" | sed -e 's/^.//' -e 's/[[ ]][[ ]]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[[^ ]][[^ ]]*\\)\?%%" -e 's/^[[ ]]*//' -e 's%[[ ]][[ ]]*-D% -D%g' -e 's%[[ ]][[ ]]*-I% -I%g'` test "[$]$2" != "$cf_old_cflag" || break ifelse([$3],,,[CF_VERBOSE(removing old option $1 from $2)]) $2="$cf_old_cflag" done ])dnl dnl --------------------------------------------------------------------------- dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50 dnl ---------------- dnl Remove all -U and -D options that refer to the given symbol from a list dnl of C compiler options. This works around the problem that not all dnl compilers process -U and -D options from left-to-right, so a -U option dnl cannot be used to cancel the effect of a preceding -D option. dnl dnl $1 = target (which could be the same as the source variable) dnl $2 = source (including '$') dnl $3 = symbol to remove define([CF_REMOVE_DEFINE], [ $1=`echo "$2" | \ sed -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[[ ]]/ /g' \ -e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[$]//g'` ])dnl dnl --------------------------------------------------------------------------- dnl CF_RESTORE_XTRA_FLAGS version: 1 updated: 2020/01/11 16:47:45 dnl --------------------- dnl Restore flags saved in CF_SAVE_XTRA_FLAGS dnl $1 = name of current macro define([CF_RESTORE_XTRA_FLAGS], [ LIBS="$cf_save_LIBS_$1" CFLAGS="$cf_save_CFLAGS_$1" CPPFLAGS="$cf_save_CPPFLAGS_$1" ])dnl dnl --------------------------------------------------------------------------- dnl CF_SAVE_XTRA_FLAGS version: 1 updated: 2020/01/11 16:46:44 dnl ------------------ dnl Use this macro to save CFLAGS/CPPFLAGS/LIBS before checks against X headers dnl and libraries which do not update those variables. dnl dnl $1 = name of current macro define([CF_SAVE_XTRA_FLAGS], [ cf_save_LIBS_$1="$LIBS" cf_save_CFLAGS_$1="$CFLAGS" cf_save_CPPFLAGS_$1="$CPPFLAGS" LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}" for cf_X_CFLAGS in $X_CFLAGS do case "x$cf_X_CFLAGS" in x-[[IUD]]*) CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS" ;; *) CFLAGS="$CFLAGS $cf_X_CFLAGS" ;; esac done ])dnl dnl --------------------------------------------------------------------------- dnl CF_SUBDIR_PATH version: 7 updated: 2014/12/04 04:33:06 dnl -------------- dnl Construct a search-list for a nonstandard header/lib-file dnl $1 = the variable to return as result dnl $2 = the package name dnl $3 = the subdirectory, e.g., bin, include or lib AC_DEFUN([CF_SUBDIR_PATH], [ $1= CF_ADD_SUBDIR_PATH($1,$2,$3,$prefix,NONE) for cf_subdir_prefix in \ /usr \ /usr/local \ /usr/pkg \ /opt \ /opt/local \ [$]HOME do CF_ADD_SUBDIR_PATH($1,$2,$3,$cf_subdir_prefix,$prefix) done ])dnl dnl --------------------------------------------------------------------------- dnl CF_TERM_HEADER version: 6 updated: 2021/01/02 09:31:20 dnl -------------- dnl Look for term.h, which is part of X/Open curses. It defines the interface dnl to terminfo database. Usually it is in the same include-path as curses.h, dnl but some packagers change this, breaking various applications. AC_DEFUN([CF_TERM_HEADER],[ AC_CACHE_CHECK(for terminfo header, cf_cv_term_header,[ case "${cf_cv_ncurses_header}" in (*/ncurses.h|*/ncursesw.h) cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[[^.]]*\.h$%term.h%'` ;; (*) cf_term_header=term.h ;; esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do AC_TRY_COMPILE([#include #include <${cf_cv_ncurses_header:-curses.h}> #include <$cf_test> ],[int x = auto_left_margin; (void)x],[ cf_cv_term_header="$cf_test"],[ cf_cv_term_header=unknown ]) test "$cf_cv_term_header" != unknown && break done ]) # Set definitions to allow ifdef'ing to accommodate subdirectories case "$cf_cv_term_header" in (*term.h) AC_DEFINE(HAVE_TERM_H,1,[Define to 1 if we have term.h]) ;; esac case "$cf_cv_term_header" in (ncurses/term.h) AC_DEFINE(HAVE_NCURSES_TERM_H,1,[Define to 1 if we have ncurses/term.h]) ;; (ncursesw/term.h) AC_DEFINE(HAVE_NCURSESW_TERM_H,1,[Define to 1 if we have ncursesw/term.h]) ;; esac ])dnl dnl --------------------------------------------------------------------------- dnl CF_TRIM_X_LIBS version: 3 updated: 2015/04/12 15:39:00 dnl -------------- dnl Trim extra base X libraries added as a workaround for inconsistent library dnl dependencies returned by "new" pkg-config files. AC_DEFUN([CF_TRIM_X_LIBS],[ for cf_trim_lib in Xmu Xt X11 do case "$LIBS" in (*-l$cf_trim_lib\ *-l$cf_trim_lib*) LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'` CF_VERBOSE(..trimmed $LIBS) ;; esac done ]) dnl --------------------------------------------------------------------------- dnl CF_TRY_PKG_CONFIG version: 6 updated: 2020/12/31 10:54:15 dnl ----------------- dnl This is a simple wrapper to use for pkg-config, for libraries which may be dnl available in that form. dnl dnl $1 = package name, which may be a shell variable dnl $2 = extra logic to use, if any, after updating CFLAGS and LIBS dnl $3 = logic to use if pkg-config does not have the package AC_DEFUN([CF_TRY_PKG_CONFIG],[ AC_REQUIRE([CF_PKG_CONFIG]) if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$1"; then CF_VERBOSE(found package $1) cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$1" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "$1" 2>/dev/null`" CF_VERBOSE(package $1 CFLAGS: $cf_pkgconfig_incs) CF_VERBOSE(package $1 LIBS: $cf_pkgconfig_libs) CF_ADD_CFLAGS($cf_pkgconfig_incs) CF_ADD_LIBS($cf_pkgconfig_libs) ifelse([$2],,:,[$2]) else cf_pkgconfig_incs= cf_pkgconfig_libs= ifelse([$3],,:,[$3]) fi ]) dnl --------------------------------------------------------------------------- dnl CF_TRY_XOPEN_SOURCE version: 4 updated: 2022/09/10 15:16:16 dnl ------------------- dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we dnl can define it successfully. AC_DEFUN([CF_TRY_XOPEN_SOURCE],[ AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[ AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY, [cf_cv_xopen_source=no], [cf_save="$CPPFLAGS" CF_APPEND_TEXT(CPPFLAGS,-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE) AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY, [cf_cv_xopen_source=no], [cf_cv_xopen_source=$cf_XOPEN_SOURCE]) CPPFLAGS="$cf_save" ]) ]) if test "$cf_cv_xopen_source" != no ; then CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE) CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE) cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" CF_APPEND_CFLAGS($cf_temp_xopen_source) fi ]) dnl --------------------------------------------------------------------------- dnl CF_UPPER version: 5 updated: 2001/01/29 23:40:59 dnl -------- dnl Make an uppercase version of a variable dnl $1=uppercase($2) AC_DEFUN([CF_UPPER], [ $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` ])dnl dnl --------------------------------------------------------------------------- dnl CF_UTF8_LIB version: 10 updated: 2023/01/11 04:05:23 dnl ----------- dnl Check for multibyte support, and if not found, utf8 compatibility library AC_DEFUN([CF_UTF8_LIB], [ AC_HAVE_HEADERS(wchar.h) AC_CACHE_CHECK(for multibyte character support,cf_cv_utf8_lib,[ cf_save_LIBS="$LIBS" AC_TRY_LINK([ $ac_includes_default #ifdef HAVE_WCHAR_H #include #endif ],[putwc(0,0);], [cf_cv_utf8_lib=yes], [CF_FIND_LINKAGE([ #include ],[putwc(0,0);],utf8, [cf_cv_utf8_lib=add-on], [cf_cv_utf8_lib=no]) ])]) # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between # ncurses/ncursesw: if test "$cf_cv_utf8_lib" = "add-on" ; then AC_DEFINE(HAVE_LIBUTF8_H,1,[Define to 1 if we should include libutf8.h]) CF_ADD_INCDIR($cf_cv_header_path_utf8) CF_ADD_LIBDIR($cf_cv_library_path_utf8) CF_ADD_LIBS($cf_cv_library_file_utf8) fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_VERBOSE version: 3 updated: 2007/07/29 09:55:12 dnl ---------- dnl Use AC_VERBOSE w/o the warnings AC_DEFUN([CF_VERBOSE], [test -n "$verbose" && echo " $1" 1>&AC_FD_MSG CF_MSG_LOG([$1]) ])dnl dnl --------------------------------------------------------------------------- dnl CF_WITH_CURSES_DIR version: 4 updated: 2021/01/02 19:22:58 dnl ------------------ dnl Wrapper for AC_ARG_WITH to specify directory under which to look for curses dnl libraries. AC_DEFUN([CF_WITH_CURSES_DIR],[ AC_MSG_CHECKING(for specific curses-directory) AC_ARG_WITH(curses-dir, [ --with-curses-dir=DIR directory in which (n)curses is installed], [cf_cv_curses_dir=$withval], [cf_cv_curses_dir=no]) AC_MSG_RESULT($cf_cv_curses_dir) if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" then CF_PATH_SYNTAX(withval) if test -d "$cf_cv_curses_dir" then CF_ADD_INCDIR($cf_cv_curses_dir/include) CF_ADD_LIBDIR($cf_cv_curses_dir/lib) fi fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_WITH_DBMALLOC version: 7 updated: 2010/06/21 17:26:47 dnl ---------------- dnl Configure-option for dbmalloc. The optional parameter is used to override dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests. AC_DEFUN([CF_WITH_DBMALLOC],[ CF_NO_LEAKS_OPTION(dbmalloc, [ --with-dbmalloc test: use Conor Cahill's dbmalloc library], [USE_DBMALLOC]) if test "$with_dbmalloc" = yes ; then AC_CHECK_HEADER(dbmalloc.h, [AC_CHECK_LIB(dbmalloc,[debug_malloc]ifelse([$1],,[],[,$1]))]) fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_WITH_DMALLOC version: 7 updated: 2010/06/21 17:26:47 dnl --------------- dnl Configure-option for dmalloc. The optional parameter is used to override dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests. AC_DEFUN([CF_WITH_DMALLOC],[ CF_NO_LEAKS_OPTION(dmalloc, [ --with-dmalloc test: use Gray Watson's dmalloc library], [USE_DMALLOC]) if test "$with_dmalloc" = yes ; then AC_CHECK_HEADER(dmalloc.h, [AC_CHECK_LIB(dmalloc,[dmalloc_debug]ifelse([$1],,[],[,$1]))]) fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_WITH_NCURSES_ETC version: 6 updated: 2023/01/16 10:10:06 dnl ------------------- dnl Use this macro for programs which use any variant of "curses", e.g., dnl "ncurses", and "PDCurses". Programs that can use curses and some unrelated dnl library (such as slang) should use a "--with-screen=XXX" option. dnl dnl This does not use AC_DEFUN, because that would tell autoconf to run each dnl of the macros inside this one - before this macro. define([CF_WITH_NCURSES_ETC],[ CF_WITH_CURSES_DIR cf_cv_screen=curses AC_MSG_CHECKING(for specified curses library type) AC_ARG_WITH(screen, [ --with-screen=XXX use specified curses-libraries], [cf_cv_screen=$withval],[ AC_ARG_WITH(ncursesw, [ --with-ncursesw use wide ncurses-libraries], [cf_cv_screen=ncursesw],[ AC_ARG_WITH(ncurses, [ --with-ncurses use ncurses-libraries], [cf_cv_screen=ncurses],[ AC_ARG_WITH(pdcurses, [ --with-pdcurses compile/link with pdcurses X11 library], [cf_cv_screen=pdcurses],[ AC_ARG_WITH(curses-colr, [ --with-curses-colr compile/link with HPUX 10.x color-curses], [cf_cv_screen=curses_colr],[ AC_ARG_WITH(curses-5lib, [ --with-curses-5lib compile/link with SunOS 5lib curses], [cf_cv_screen=curses_5lib])])])])])]) AC_MSG_RESULT($cf_cv_screen) case $cf_cv_screen in (curses|curses_*) CF_CURSES_CONFIG ;; (ncursesw*) CF_UTF8_LIB CF_NCURSES_CONFIG($cf_cv_screen) ;; (ncurses*) CF_NCURSES_CONFIG($cf_cv_screen) ;; (pdcurses) CF_PDCURSES_X11 ;; (*) AC_MSG_ERROR(unexpected screen-value: $cf_cv_screen) ;; esac CF_NCURSES_PTHREADS($cf_cv_screen) AC_SUBST(cf_cv_screen) ])dnl dnl --------------------------------------------------------------------------- dnl CF_WITH_SCREEN_PDCURSES version: 1 updated: 2020/08/28 16:56:27 dnl ----------------------- dnl Call this macro before CF_ENABLE_WARNINGS for configure scripts which use dnl the "--with-screen=pdcurses" selection. Doing that allows the configure dnl script to search for the X11/Xt header files to declare (or not) the dnl symbol needed to enable "const" in those header files. If that configure dnl option is not used, then those checks are unnecessary. AC_DEFUN([CF_WITH_SCREEN_PDCURSES],[ AC_PROVIDE([AC_PATH_XTRA]) AC_PROVIDE([AC_PATH_X]) if test -n "$with_screen" && test "x$with_screen" = "xpdcurses" then AC_PATH_X AC_PATH_XTRA fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_WITH_VALGRIND version: 1 updated: 2006/12/14 18:00:21 dnl ---------------- AC_DEFUN([CF_WITH_VALGRIND],[ CF_NO_LEAKS_OPTION(valgrind, [ --with-valgrind test: use valgrind], [USE_VALGRIND]) ])dnl dnl --------------------------------------------------------------------------- dnl CF_XOPEN_SOURCE version: 67 updated: 2023/09/06 18:55:27 dnl --------------- dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions, dnl or adapt to the vendor's definitions to get equivalent functionality, dnl without losing the common non-POSIX features. dnl dnl Parameters: dnl $1 is the nominal value for _XOPEN_SOURCE dnl $2 is the nominal value for _POSIX_C_SOURCE dnl dnl The default case prefers _XOPEN_SOURCE over _POSIX_C_SOURCE if the dnl implementation predefines it, because X/Open and most implementations agree dnl that the latter is a legacy or "aligned" value. dnl dnl Because _XOPEN_SOURCE is preferred, if defining _POSIX_C_SOURCE turns dnl that off, then refrain from setting _POSIX_C_SOURCE explicitly. dnl dnl References: dnl https://pubs.opengroup.org/onlinepubs/007904975/functions/xsh_chap02_02.html dnl https://docs.oracle.com/cd/E19253-01/816-5175/standards-5/index.html dnl https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html AC_DEFUN([CF_XOPEN_SOURCE],[ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([CF_POSIX_VISIBLE]) if test "$cf_cv_posix_visible" = no; then cf_XOPEN_SOURCE=ifelse([$1],,500,[$1]) cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2]) cf_xopen_source= case "$host_os" in (aix[[4-7]]*) cf_xopen_source="-D_ALL_SOURCE" ;; (darwin[[0-8]].*) cf_xopen_source="-D_APPLE_C_SOURCE" ;; (darwin*) cf_xopen_source="-D_DARWIN_C_SOURCE" cf_XOPEN_SOURCE= ;; (freebsd*|dragonfly*|midnightbsd*) # 5.x headers associate # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L cf_POSIX_C_SOURCE=200112L cf_XOPEN_SOURCE=600 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" ;; (hpux11*) cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500" ;; (hpux*) cf_xopen_source="-D_HPUX_SOURCE" ;; (irix[[56]].*) cf_xopen_source="-D_SGI_SOURCE" cf_XOPEN_SOURCE= ;; (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc) CF_GNU_SOURCE($cf_XOPEN_SOURCE) ;; (minix*) cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this... ;; (mirbsd*) # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks and other headers which use u_int / u_short types cf_XOPEN_SOURCE= CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) ;; (netbsd*) cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw ;; (openbsd[[6-9]]*) # OpenBSD 6.x has broken locale support, both compile-time and runtime. # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html # Abusing the conformance level is a workaround. AC_MSG_WARN(this system does not provide usable locale support) cf_xopen_source="-D_BSD_SOURCE" cf_XOPEN_SOURCE=700 ;; (openbsd[[4-5]]*) # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw cf_xopen_source="-D_BSD_SOURCE" cf_XOPEN_SOURCE=600 ;; (openbsd*) # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw ;; (osf[[45]]*) cf_xopen_source="-D_OSF_SOURCE" ;; (nto-qnx*) cf_xopen_source="-D_QNX_SOURCE" ;; (sco*) # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer ;; (solaris2.*) cf_xopen_source="-D__EXTENSIONS__" cf_cv_xopen_source=broken ;; (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2) cf_XOPEN_SOURCE= cf_POSIX_C_SOURCE= ;; (*) CF_TRY_XOPEN_SOURCE cf_save_xopen_cppflags="$CPPFLAGS" CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE) # Some of these niche implementations use copy/paste, double-check... if test "$cf_cv_xopen_source" = no ; then CF_VERBOSE(checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE) AC_TRY_COMPILE(CF__XOPEN_SOURCE_HEAD,CF__XOPEN_SOURCE_BODY,,[ AC_MSG_WARN(_POSIX_C_SOURCE definition is not usable) CPPFLAGS="$cf_save_xopen_cppflags"]) fi ;; esac if test -n "$cf_xopen_source" ; then CF_APPEND_CFLAGS($cf_xopen_source,true) fi dnl In anything but the default case, we may have system-specific setting dnl which is still not guaranteed to provide all of the entrypoints that dnl _XOPEN_SOURCE would yield. if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then AC_MSG_CHECKING(if _XOPEN_SOURCE really is set) AC_TRY_COMPILE([#include ],[ #ifndef _XOPEN_SOURCE #error _XOPEN_SOURCE is not defined #endif], [cf_XOPEN_SOURCE_set=yes], [cf_XOPEN_SOURCE_set=no]) AC_MSG_RESULT($cf_XOPEN_SOURCE_set) if test "$cf_XOPEN_SOURCE_set" = yes then AC_TRY_COMPILE([#include ],[ #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE #endif], [cf_XOPEN_SOURCE_set_ok=yes], [cf_XOPEN_SOURCE_set_ok=no]) if test "$cf_XOPEN_SOURCE_set_ok" = no then AC_MSG_WARN(_XOPEN_SOURCE is lower than requested) fi else CF_TRY_XOPEN_SOURCE fi fi fi # cf_cv_posix_visible ]) dnl --------------------------------------------------------------------------- dnl CF_X_ATHENA version: 25 updated: 2023/01/11 04:05:23 dnl ----------- dnl Check for Xaw (Athena) libraries dnl dnl Sets $cf_x_athena according to the flavor of Xaw which is used. AC_DEFUN([CF_X_ATHENA], [ cf_x_athena=${cf_x_athena:-Xaw} AC_MSG_CHECKING(if you want to link with Xaw 3d library) withval= AC_ARG_WITH(Xaw3d, [ --with-Xaw3d link with Xaw 3d library]) if test "$withval" = yes ; then cf_x_athena=Xaw3d AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi AC_MSG_CHECKING(if you want to link with Xaw 3d xft library) withval= AC_ARG_WITH(Xaw3dxft, [ --with-Xaw3dxft link with Xaw 3d xft library]) if test "$withval" = yes ; then cf_x_athena=Xaw3dxft AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi AC_MSG_CHECKING(if you want to link with neXT Athena library) withval= AC_ARG_WITH(neXtaw, [ --with-neXtaw link with neXT Athena library]) if test "$withval" = yes ; then cf_x_athena=neXtaw AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi AC_MSG_CHECKING(if you want to link with Athena-Plus library) withval= AC_ARG_WITH(XawPlus, [ --with-XawPlus link with Athena-Plus library]) if test "$withval" = yes ; then cf_x_athena=XawPlus AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi cf_x_athena_lib="" if test "$PKG_CONFIG" != none ; then cf_athena_list= test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6" for cf_athena_pkg in \ $cf_athena_list \ ${cf_x_athena} \ ${cf_x_athena}-devel \ lib${cf_x_athena} \ lib${cf_x_athena}-devel do CF_TRY_PKG_CONFIG($cf_athena_pkg,[ cf_x_athena_lib="$cf_pkgconfig_libs" CF_UPPER(cf_x_athena_LIBS,HAVE_LIB_$cf_x_athena) AC_DEFINE_UNQUOTED($cf_x_athena_LIBS) CF_TRIM_X_LIBS AC_CACHE_CHECK(for usable $cf_x_athena/Xmu package,cf_cv_xaw_compat,[ AC_TRY_LINK([ $ac_includes_default #include ],[ int check = XmuCompareISOLatin1("big", "small"); (void)check; ],[cf_cv_xaw_compat=yes],[cf_cv_xaw_compat=no])]) if test "$cf_cv_xaw_compat" = no then # workaround for broken ".pc" files... case "$cf_x_athena_lib" in (*-lXmu*) ;; (*) CF_VERBOSE(work around broken package) cf_save_xmu="$LIBS" cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^[ ][ ]*//' -e 's/ .*//'` CF_TRY_PKG_CONFIG(xmu,[ LIBS="$cf_save_xmu" CF_ADD_LIB_AFTER($cf_first_lib,$cf_pkgconfig_libs) ],[ CF_ADD_LIB_AFTER($cf_first_lib,-lXmu) ]) CF_TRIM_X_LIBS ;; esac fi break]) done fi if test -z "$cf_x_athena_lib" ; then CF_X_EXT CF_X_TOOLKIT CF_X_ATHENA_CPPFLAGS($cf_x_athena) CF_X_ATHENA_LIBS($cf_x_athena) fi ])dnl dnl --------------------------------------------------------------------------- dnl CF_X_ATHENA_CPPFLAGS version: 9 updated: 2020/12/31 10:54:15 dnl -------------------- dnl Normally invoked by CF_X_ATHENA, with $1 set to the appropriate flavor of dnl the Athena widgets, e.g., Xaw, Xaw3d, neXtaw. AC_DEFUN([CF_X_ATHENA_CPPFLAGS], [ AC_REQUIRE([AC_PATH_XTRA]) cf_x_athena_root=ifelse([$1],,Xaw,[$1]) cf_x_athena_inc="" for cf_path in default \ /usr/contrib/X11R6 \ /usr/contrib/X11R5 \ /usr/lib/X11R5 \ /usr/local do if test -z "$cf_x_athena_inc" ; then CF_SAVE_XTRA_FLAGS([CF_X_ATHENA_CPPFLAGS]) cf_test=X11/$cf_x_athena_root/SimpleMenu.h if test "$cf_path" != default ; then CF_APPEND_TEXT(CPPFLAGS,-I$cf_path/include) AC_MSG_CHECKING(for $cf_test in $cf_path) else AC_MSG_CHECKING(for $cf_test) fi AC_TRY_COMPILE([ #include #include <$cf_test>],[], [cf_result=yes], [cf_result=no]) AC_MSG_RESULT($cf_result) CF_RESTORE_XTRA_FLAGS([CF_X_ATHENA_CPPFLAGS]) if test "$cf_result" = yes ; then test "$cf_path" = default && cf_x_athena_inc=default test "$cf_path" != default && cf_x_athena_inc="$cf_path/include" break fi fi done if test -z "$cf_x_athena_inc" ; then AC_MSG_WARN([Unable to find Athena header files]) elif test "$cf_x_athena_inc" != default ; then CF_APPEND_TEXT(CPPFLAGS,-I$cf_x_athena_inc) fi ]) dnl --------------------------------------------------------------------------- dnl CF_X_ATHENA_LIBS version: 14 updated: 2023/01/11 04:05:23 dnl ---------------- dnl Normally invoked by CF_X_ATHENA, with $1 set to the appropriate flavor of dnl the Athena widgets, e.g., Xaw, Xaw3d, neXtaw. AC_DEFUN([CF_X_ATHENA_LIBS], [AC_REQUIRE([CF_X_TOOLKIT]) cf_x_athena_root=ifelse([$1],,Xaw,[$1]) cf_x_athena_lib="" for cf_path in default \ /usr/contrib/X11R6 \ /usr/contrib/X11R5 \ /usr/lib/X11R5 \ /usr/local do for cf_lib in \ ${cf_x_athena_root} \ ${cf_x_athena_root}7 \ ${cf_x_athena_root}6 do for cf_libs in \ "-l$cf_lib -lXmu" \ "-l$cf_lib -lXpm -lXmu" \ "-l${cf_lib}_s -lXmu_s" do test -n "$cf_x_athena_lib" && break CF_SAVE_XTRA_FLAGS([CF_X_ATHENA_LIBS]) cf_test=XawSimpleMenuAddGlobalActions test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs" CF_ADD_LIBS($cf_libs) AC_MSG_CHECKING(for $cf_test in $cf_libs) AC_TRY_LINK([ $ac_includes_default #include #include ],[ $cf_test((XtAppContext) 0)], [cf_result=yes], [cf_result=no]) AC_MSG_RESULT($cf_result) CF_RESTORE_XTRA_FLAGS([CF_X_ATHENA_LIBS]) if test "$cf_result" = yes ; then cf_x_athena_lib="$cf_libs" break fi done # cf_libs test -n "$cf_x_athena_lib" && break done # cf_lib done if test -z "$cf_x_athena_lib" ; then AC_MSG_ERROR( [Unable to successfully link Athena library (-l$cf_x_athena_root) with test program]) fi CF_ADD_LIBS($cf_x_athena_lib) CF_UPPER(cf_x_athena_LIBS,HAVE_LIB_$cf_x_athena) AC_DEFINE_UNQUOTED($cf_x_athena_LIBS) ]) dnl --------------------------------------------------------------------------- dnl CF_X_EXT version: 3 updated: 2010/06/02 05:03:05 dnl -------- AC_DEFUN([CF_X_EXT],[ CF_TRY_PKG_CONFIG(Xext,,[ AC_CHECK_LIB(Xext,XextCreateExtension, [CF_ADD_LIB(Xext)])]) ])dnl dnl --------------------------------------------------------------------------- dnl CF_X_TOOLKIT version: 27 updated: 2023/01/11 04:05:23 dnl ------------ dnl Check for X Toolkit libraries AC_DEFUN([CF_X_TOOLKIT], [ AC_REQUIRE([AC_PATH_XTRA]) AC_REQUIRE([CF_CHECK_CACHE]) # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and # in some cases has installed dummy files in the former, other cases replaced # it with a link to the new location). This complicates the configure script. # Check for that pitfall, and recover using pkg-config # # If none of these are set, the configuration is almost certainly broken. if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}" then CF_TRY_PKG_CONFIG(x11,,[AC_MSG_WARN(unable to find X11 library)]) CF_TRY_PKG_CONFIG(ice,,[AC_MSG_WARN(unable to find ICE library)]) CF_TRY_PKG_CONFIG(sm,,[AC_MSG_WARN(unable to find SM library)]) CF_TRY_PKG_CONFIG(xt,,[AC_MSG_WARN(unable to find Xt library)]) else LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS" fi cf_have_X_LIBS=no CF_TRY_PKG_CONFIG(xt,[ case "x$LIBS" in (*-lX11*) ;; (*) # we have an "xt" package, but it may omit Xt's dependency on X11 AC_CACHE_CHECK(for usable X dependency,cf_cv_xt_x11_compat,[ AC_TRY_LINK([ $ac_includes_default #include ],[ int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0); int rc2 = XClearWindow((Display*) 0, (Window) 0); int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0); int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0); ],[cf_cv_xt_x11_compat=yes],[cf_cv_xt_x11_compat=no])]) if test "$cf_cv_xt_x11_compat" = no then CF_VERBOSE(work around broken X11 dependency) # 2010/11/19 - good enough until a working Xt on Xcb is delivered. CF_TRY_PKG_CONFIG(x11,,[CF_ADD_LIB_AFTER(-lXt,-lX11)]) fi ;; esac AC_CACHE_CHECK(for usable X Toolkit package,cf_cv_xt_ice_compat,[ AC_TRY_LINK([ $ac_includes_default #include ],[int num = IceConnectionNumber(0); (void) num ],[cf_cv_xt_ice_compat=yes],[cf_cv_xt_ice_compat=no])]) if test "$cf_cv_xt_ice_compat" = no then # workaround for broken ".pc" files used for X Toolkit. case "x$X_PRE_LIBS" in (*-lICE*) case "x$LIBS" in (*-lICE*) ;; (*) CF_VERBOSE(work around broken ICE dependency) CF_TRY_PKG_CONFIG(ice, [CF_TRY_PKG_CONFIG(sm)], [CF_ADD_LIB_AFTER(-lXt,$X_PRE_LIBS)]) ;; esac ;; esac fi cf_have_X_LIBS=yes ],[ LDFLAGS="$X_LIBS $LDFLAGS" CF_CHECK_CFLAGS($X_CFLAGS) AC_CHECK_FUNC(XOpenDisplay,,[ AC_CHECK_LIB(X11,XOpenDisplay, [CF_ADD_LIB(X11)])]) AC_CHECK_FUNC(XtAppInitialize,,[ AC_CHECK_LIB(Xt, XtAppInitialize, [AC_DEFINE(HAVE_LIBXT,1,[Define to 1 if we can compile with the Xt library]) cf_have_X_LIBS=Xt LIBS="-lXt $LIBS"])]) ]) if test "$cf_have_X_LIBS" = no ; then AC_MSG_WARN( [Unable to successfully link X Toolkit library (-lXt) with test program. You will have to check and add the proper libraries by hand to makefile.]) fi ])dnl dnl --------------------------------------------------------------------------- dnl CF__XOPEN_SOURCE_BODY version: 2 updated: 2023/02/18 17:41:25 dnl --------------------- dnl body of test when test-compiling for _XOPEN_SOURCE check define([CF__XOPEN_SOURCE_BODY], [ #ifndef _XOPEN_SOURCE #error _XOPEN_SOURCE is not defined #endif ]) dnl --------------------------------------------------------------------------- dnl CF__XOPEN_SOURCE_HEAD version: 2 updated: 2023/02/18 17:41:25 dnl --------------------- dnl headers to include when test-compiling for _XOPEN_SOURCE check define([CF__XOPEN_SOURCE_HEAD], [ $ac_includes_default ]) cdk-perl-20240606/configure0000755000000000000000000172120414546506070014103 0ustar rootroot#! /bin/sh # From configure.in Revision: 1.25 . # Guess values for system-dependent variables and create Makefiles. # Generated by Autoconf 2.52.20231210. # # Copyright 2003-2022,2023 Thomas E. Dickey # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # Sed expression to map a string onto a valid variable name. as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Name of the executable. as_me=`echo "$0" |sed 's,.*[\\/],,'` if expr a : '\(a\)' >/dev/null 2>&1; then as_expr="expr" else as_expr="false" fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln' else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file as_executable_p="test -f" # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset="unset" else as_unset="false" fi # NLS nuisances. $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : "${ac_max_here_lines=38}" ac_unique_file="Cdk.xs" ac_default_prefix=/usr # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${datarootdir}/info' mandir='${datarootdir}/man' # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo "$ac_feature" | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo "$ac_feature" | sed 's/-/_/g'` case "$ac_option" in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst \ | --runs | --run | --ru) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* \ | --runs=* | --run=* | --ru=*) runstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo "$ac_package" | sed 's/-/_/g'` case "$ac_option" in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo "$ac_package" | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export "$ac_envvar" ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo "$ac_prev" | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo "$ac_var"` case "$ac_val" in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo "$ac_var"` case "$ac_val" in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. build=$build_alias host=$host_alias target=$target_alias # FIXME: should be removed in autoconf 3.0. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat < if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. EOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue cd "$ac_subdir" # A "../" for each directory in /$ac_subdir. ac_dots=`echo "$ac_subdir" | sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'` case "$srcdir" in .) # No --srcdir option. We are building in place. ac_sub_srcdir="$srcdir" ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_sub_srcdir="$srcdir/$ac_subdir" ;; *) # Relative path. ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;; esac # Check for guested configure; otherwise get Cygnus style configure. if test -f "$ac_sub_srcdir/configure.gnu"; then echo $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive elif test -f "$ac_sub_srcdir/configure"; then echo $SHELL "$ac_sub_srcdir/configure" --help=recursive elif test -f "$ac_sub_srcdir/configure.ac" || test -f "$ac_sub_srcdir/configure.in"; then echo "$ac_configure" --help else echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2 fi cd "$ac_popdir" done fi test -n "$ac_init_help" && exit 0 if "$ac_init_version"; then cat <<\EOF Copyright 2003-2022,2023 Thomas E. Dickey Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. EOF exit 0 fi exec 5>config.log cat >&5 </dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` PATH = $PATH _ASUNAME } >&5 cat >&5 <\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" ac_sep=" " ;; *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" ac_sep=" " ;; esac # Get rid of the leading space. done # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. trap 'exit_status=$? # Save into config.log some information that might help in debugging. echo >&5 echo "## ----------------- ##" >&5 echo "## Cache variables. ##" >&5 echo "## ----------------- ##" >&5 echo >&5 # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } >&5 sed "/^$/d" confdefs.h >conftest.log if test -s conftest.log; then echo >&5 echo "## ------------ ##" >&5 echo "## confdefs.h. ##" >&5 echo "## ------------ ##" >&5 echo >&5 cat conftest.log >&5 fi (echo; echo) >&5 test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" >&5 echo "$as_me: exit $exit_status" >&5 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal" done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:918: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} cat "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:929: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:937: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case "$ac_old_set,$ac_new_set" in set,) { echo "$as_me:953: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:957: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:963: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:965: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:967: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. It doesn't matter if # we pass some twice (in addition to the command line arguments). if test "$ac_new_set" = set; then case "$ac_new_val" in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val" ;; esac fi done if "$ac_cache_corrupted"; then { echo "$as_me:986: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:988: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5' ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_main_return="return" case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac echo "#! $SHELL" >conftest.sh echo "exit 0" >>conftest.sh chmod +x conftest.sh if { (echo "$as_me:1017: PATH=\".;.\"; conftest.sh") >&5 (PATH=".;."; conftest.sh) 2>&5 ac_status=$? echo "$as_me:1020: \$? = $ac_status" >&5 (exit "$ac_status"); }; then ac_path_separator=';' else ac_path_separator=: fi PATH_SEPARATOR="$ac_path_separator" rm -f conftest.sh echo "$as_me:1029: checking for version used by Cdk.pm" >&5 echo $ECHO_N "checking for version used by Cdk.pm... $ECHO_C" >&6 VERSION=`egrep '[$]VERSION[ ][ ]*=' $srcdir/Cdk.pm | sed -e 's/^[^"]*"//' -e 's/".*//'` echo "$as_me:1032: result: $VERSION" >&5 echo "${ECHO_T}$VERSION" >&6 ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:1052: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:1062: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:1066: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:1075: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` || { { echo "$as_me:1079: error: $ac_config_sub $ac_cv_build_alias failed." >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:1084: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:1091: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` || { { echo "$as_me:1100: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:1105: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5' ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_main_return="return" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:1121: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:1136: found $ac_dir/$ac_word" >&5 break done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:1144: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:1147: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:1156: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:1171: found $ac_dir/$ac_word" >&5 break done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:1179: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:1182: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:1195: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:1210: found $ac_dir/$ac_word" >&5 break done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:1218: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:1221: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:1230: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="cc" echo "$as_me:1245: found $ac_dir/$ac_word" >&5 break done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:1253: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:1256: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:1269: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:1289: found $ac_dir/$ac_word" >&5 break done if test "$ac_prog_rejected" = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift set dummy "$ac_dir/$ac_word" ${1+"$@"} shift ac_cv_prog_CC="$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:1311: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:1314: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:1325: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:1340: found $ac_dir/$ac_word" >&5 break done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:1348: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:1351: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:1364: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:1379: found $ac_dir/$ac_word" >&5 break done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:1387: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:1390: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:1402: error: no acceptable cc found in \$PATH" >&5 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:1407:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo "$2"` { (eval echo "$as_me:1410: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:1413: \$? = $ac_status" >&5 (exit "$ac_status"); } { (eval echo "$as_me:1415: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:1418: \$? = $ac_status" >&5 (exit "$ac_status"); } { (eval echo "$as_me:1420: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:1423: \$? = $ac_status" >&5 (exit "$ac_status"); } cat >"conftest.$ac_ext" <<_ACEOF #line 1427 "configure" #include "confdefs.h" int main (void) { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:1443: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'` if { (eval echo "$as_me:1446: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:1449: \$? = $ac_status" >&5 (exit "$ac_status"); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. for ac_file in `ls a.exe conftest.exe 2>/dev/null; ls a.out conftest 2>/dev/null; ls a.* conftest.* 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; a.out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 { { echo "$as_me:1472: error: C compiler cannot create executables" >&5 echo "$as_me: error: C compiler cannot create executables" >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:1478: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:1483: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:1489: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:1492: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:1499: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:1507: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe "conftest$ac_cv_exeext" ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:1514: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:1516: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:1519: checking for executable suffix" >&5 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 if { (eval echo "$as_me:1521: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:1524: \$? = $ac_status" >&5 (exit "$ac_status"); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:1540: error: cannot compute EXEEXT: cannot compile and link" >&5 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} { (exit 1); exit 1; }; } fi rm -f "conftest$ac_cv_exeext" echo "$as_me:1546: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f "conftest.$ac_ext" EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:1552: checking for object suffix" >&5 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 1558 "configure" #include "confdefs.h" int main (void) { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:1570: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:1573: \$? = $ac_status" >&5 (exit "$ac_status"); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 { { echo "$as_me:1585: error: cannot compute OBJEXT: cannot compile" >&5 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} { (exit 1); exit 1; }; } fi rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext" fi echo "$as_me:1592: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:1596: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 1602 "configure" #include "confdefs.h" int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:1617: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:1620: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:1623: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:1626: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_compiler_gnu=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:1638: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:1644: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 1650 "configure" #include "confdefs.h" int main (void) { ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:1662: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:1665: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:1668: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:1671: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_prog_cc_g=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi echo "$as_me:1681: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >"conftest.$ac_ext" <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:1708: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:1711: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:1714: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:1717: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then for ac_declaration in \ ''\ '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >"conftest.$ac_ext" <<_ACEOF #line 1729 "configure" #include "confdefs.h" #include $ac_declaration int main (void) { exit (42); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:1742: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:1745: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:1748: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:1751: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 continue fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" cat >"conftest.$ac_ext" <<_ACEOF #line 1761 "configure" #include "confdefs.h" $ac_declaration int main (void) { exit (42); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:1773: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:1776: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:1779: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:1782: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then break else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" done rm -rf conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo "$ac_declaration" >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5' ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_main_return="return" GCC_VERSION=none if test "$GCC" = yes ; then echo "$as_me:1812: checking version of $CC" >&5 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" test -z "$GCC_VERSION" && GCC_VERSION=unknown echo "$as_me:1816: result: $GCC_VERSION" >&5 echo "${ECHO_T}$GCC_VERSION" >&6 fi INTEL_COMPILER=no if test "$GCC" = yes ; then case "$host_os" in (linux*|gnu*) echo "$as_me:1825: checking if this is really Intel C compiler" >&5 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -no-gcc" cat >"conftest.$ac_ext" <<_ACEOF #line 1830 "configure" #include "confdefs.h" int main (void) { #ifdef __INTEL_COMPILER #else #error __INTEL_COMPILER is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:1847: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:1850: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:1853: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:1856: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then INTEL_COMPILER=yes cf_save_CFLAGS="$cf_save_CFLAGS -we147" else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CFLAGS="$cf_save_CFLAGS" echo "$as_me:1867: result: $INTEL_COMPILER" >&5 echo "${ECHO_T}$INTEL_COMPILER" >&6 ;; esac fi CLANG_COMPILER=no if test "$GCC" = yes ; then echo "$as_me:1876: checking if this is really Clang C compiler" >&5 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" cat >"conftest.$ac_ext" <<_ACEOF #line 1880 "configure" #include "confdefs.h" int main (void) { #ifdef __clang__ #else #error __clang__ is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:1897: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:1900: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:1903: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:1906: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then CLANG_COMPILER=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CFLAGS="$cf_save_CFLAGS" echo "$as_me:1916: result: $CLANG_COMPILER" >&5 echo "${ECHO_T}$CLANG_COMPILER" >&6 fi CLANG_VERSION=none if test "x$CLANG_COMPILER" = "xyes" ; then case "$CC" in (c[1-9][0-9]|*/c[1-9][0-9]) { echo "$as_me:1925: WARNING: replacing broken compiler alias $CC" >&5 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;} CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`" CC=clang ;; esac echo "$as_me:1932: checking version of $CC" >&5 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`" test -z "$CLANG_VERSION" && CLANG_VERSION=unknown echo "$as_me:1936: result: $CLANG_VERSION" >&5 echo "${ECHO_T}$CLANG_VERSION" >&6 for cf_clang_opt in \ -Qunused-arguments \ -Wno-error=implicit-function-declaration do echo "$as_me:1943: checking if option $cf_clang_opt works" >&5 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6 cf_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $cf_clang_opt" cat >"conftest.$ac_ext" <<_ACEOF #line 1948 "configure" #include "confdefs.h" #include int main (void) { printf("hello!\\n"); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:1962: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:1965: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:1968: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:1971: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_clang_optok=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_clang_optok=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" echo "$as_me:1982: result: $cf_clang_optok" >&5 echo "${ECHO_T}$cf_clang_optok" >&6 CFLAGS="$cf_save_CFLAGS" if test "$cf_clang_optok" = yes; then test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6 echo "${as_me:-configure}:1988: testing adding option $cf_clang_opt ..." 1>&5 test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_clang_opt" fi done fi echo "$as_me:1997: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >"conftest.$ac_ext" <<_ACEOF #line 2005 "configure" #include "confdefs.h" #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (char **p, int i) { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main (void) { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f "conftest.$ac_objext" if { (eval echo "$as_me:2052: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:2055: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:2058: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:2061: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" done rm -f "conftest.$ac_ext" "conftest.$ac_objext" CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:2078: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:2081: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # This should have been defined by AC_PROG_CC : "${CC:=cc}" echo "$as_me:2089: checking \$CFLAGS variable" >&5 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6 case "x$CFLAGS" in (*-[IUD]*) echo "$as_me:2093: result: broken" >&5 echo "${ECHO_T}broken" >&6 { echo "$as_me:2095: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;} cf_flags="$CFLAGS" CFLAGS= for cf_arg in $cf_flags do cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_arg do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi done ;; (*) echo "$as_me:2203: result: ok" >&5 echo "${ECHO_T}ok" >&6 ;; esac echo "$as_me:2208: checking \$CC variable" >&5 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6 case "$CC" in (*[\ \ ]-*) echo "$as_me:2212: result: broken" >&5 echo "${ECHO_T}broken" >&6 { echo "$as_me:2214: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;} # humor him... cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'` cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"` CC="$cf_prog" for cf_arg in $cf_flags do case "x$cf_arg" in (x-[IUDfgOW]*) cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_arg do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi ;; (*) CC="$CC $cf_arg" ;; esac done test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6 echo "${as_me:-configure}:2331: testing resulting CC: '$CC' ..." 1>&5 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6 echo "${as_me:-configure}:2335: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6 echo "${as_me:-configure}:2339: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5 ;; (*) echo "$as_me:2343: result: ok" >&5 echo "${ECHO_T}ok" >&6 ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo "$as_me:2351: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:2366: found $ac_dir/$ac_word" >&5 break done fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then echo "$as_me:2374: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else echo "$as_me:2377: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo "$as_me:2386: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_AR="ar" echo "$as_me:2401: found $ac_dir/$ac_word" >&5 break done test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar" fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then echo "$as_me:2410: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6 else echo "$as_me:2413: result: no" >&5 echo "${ECHO_T}no" >&6 fi AR=$ac_ct_AR else AR="$ac_cv_prog_AR" fi echo "$as_me:2422: checking if you want to use pkg-config" >&5 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6 # Check whether --with-pkg-config or --without-pkg-config was given. if test "${with_pkg_config+set}" = set; then withval="$with_pkg_config" cf_pkg_config=$withval else cf_pkg_config=yes fi; echo "$as_me:2432: result: $cf_pkg_config" >&5 echo "${ECHO_T}$cf_pkg_config" >&6 case "$cf_pkg_config" in (no) PKG_CONFIG=none ;; (yes) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 echo "$as_me:2444: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" echo "$as_me:2461: found $ac_dir/$ac_word" >&5 break fi done ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then echo "$as_me:2472: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6 else echo "$as_me:2475: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo "$as_me:2484: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word" echo "$as_me:2501: found $ac_dir/$ac_word" >&5 break fi done test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none" ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then echo "$as_me:2513: result: $ac_pt_PKG_CONFIG" >&5 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6 else echo "$as_me:2516: result: no" >&5 echo "${ECHO_T}no" >&6 fi PKG_CONFIG=$ac_pt_PKG_CONFIG else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi ;; (*) PKG_CONFIG=$withval ;; esac test -z "$PKG_CONFIG" && PKG_CONFIG=none if test "$PKG_CONFIG" != none ; then if test "x$prefix" != xNONE; then cf_path_syntax="$prefix" else cf_path_syntax="$ac_default_prefix" fi case ".$PKG_CONFIG" in (.\$\(*\)*|.\'*\'*) ;; (..|./*|.\\*) ;; (.[a-zA-Z]:[\\/]*) # OS/2 EMX ;; (.\$\{*prefix\}*|.\$\{*dir\}*) eval PKG_CONFIG="$PKG_CONFIG" case ".$PKG_CONFIG" in (.NONE/*) PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%` ;; esac ;; (.no|.NONE/*) PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%` ;; (*) { { echo "$as_me:2559: error: expected a pathname, not \"$PKG_CONFIG\"" >&5 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;} { (exit 1); exit 1; }; } ;; esac elif test "x$cf_pkg_config" != xno ; then { echo "$as_me:2566: WARNING: pkg-config is not installed" >&5 echo "$as_me: WARNING: pkg-config is not installed" >&2;} fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args. set dummy ${ac_tool_prefix}ld; ac_word=$2 echo "$as_me:2573: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$LD"; then ac_cv_prog_LD="$LD" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_LD="${ac_tool_prefix}ld" echo "$as_me:2588: found $ac_dir/$ac_word" >&5 break done fi fi LD=$ac_cv_prog_LD if test -n "$LD"; then echo "$as_me:2596: result: $LD" >&5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:2599: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_LD"; then ac_ct_LD=$LD # Extract the first word of "ld", so it can be a program name with args. set dummy ld; ac_word=$2 echo "$as_me:2608: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_LD"; then ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_LD="ld" echo "$as_me:2623: found $ac_dir/$ac_word" >&5 break done test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="'$(CC)'" fi fi ac_ct_LD=$ac_cv_prog_ac_ct_LD if test -n "$ac_ct_LD"; then echo "$as_me:2632: result: $ac_ct_LD" >&5 echo "${ECHO_T}$ac_ct_LD" >&6 else echo "$as_me:2635: result: no" >&5 echo "${ECHO_T}no" >&6 fi LD=$ac_ct_LD else LD="$ac_cv_prog_LD" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo "$as_me:2647: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_FULL_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $FULL_AR in [\\/]* | ?:[\\/]*) ac_cv_path_FULL_AR="$FULL_AR" # Let the user override the test with a path. ;; *) ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_FULL_AR="$ac_dir/$ac_word" echo "$as_me:2664: found $ac_dir/$ac_word" >&5 break fi done ;; esac fi FULL_AR=$ac_cv_path_FULL_AR if test -n "$FULL_AR"; then echo "$as_me:2675: result: $FULL_AR" >&5 echo "${ECHO_T}$FULL_AR" >&6 else echo "$as_me:2678: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_path_FULL_AR"; then ac_pt_FULL_AR=$FULL_AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo "$as_me:2687: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ac_pt_FULL_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_FULL_AR in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_FULL_AR="$ac_pt_FULL_AR" # Let the user override the test with a path. ;; *) ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_ac_pt_FULL_AR="$ac_dir/$ac_word" echo "$as_me:2704: found $ac_dir/$ac_word" >&5 break fi done test -z "$ac_cv_path_ac_pt_FULL_AR" && ac_cv_path_ac_pt_FULL_AR="'$(AR)'" ;; esac fi ac_pt_FULL_AR=$ac_cv_path_ac_pt_FULL_AR if test -n "$ac_pt_FULL_AR"; then echo "$as_me:2716: result: $ac_pt_FULL_AR" >&5 echo "${ECHO_T}$ac_pt_FULL_AR" >&6 else echo "$as_me:2719: result: no" >&5 echo "${ECHO_T}no" >&6 fi FULL_AR=$ac_pt_FULL_AR else FULL_AR="$ac_cv_path_FULL_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:2731: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:2746: found $ac_dir/$ac_word" >&5 break done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:2754: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:2757: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:2766: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:2781: found $ac_dir/$ac_word" >&5 break done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:2790: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:2793: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi case X$LIB_MODEL in (Xlibtool) DFT_LIB_SUFFIX='.la' DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX ;; (Xdebug) case "$cf_cv_system_name" in (*-msvc*) DFT_LIB_SUFFIX='_g.lib' ;; (*) DFT_LIB_SUFFIX='_g.a' ;; esac DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX ;; (Xprofile) case "$cf_cv_system_name" in (*-msvc*) DFT_LIB_SUFFIX='_p.lib' ;; (*) DFT_LIB_SUFFIX='_p.a' ;; esac DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX ;; (Xshared) case "$cf_cv_system_name" in (aix[5-7]*) DFT_LIB_SUFFIX='.so' DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX ;; (*-msvc*) DFT_LIB_SUFFIX='.dll' DFT_DEP_SUFFIX='.dll.lib' ;; (cygwin*|msys*|mingw*) DFT_LIB_SUFFIX='.dll' DFT_DEP_SUFFIX='.dll.a' ;; (darwin*) DFT_LIB_SUFFIX='.dylib' DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX ;; (hpux*) case "$target" in (ia64*) DFT_LIB_SUFFIX='.so' DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX ;; (*) DFT_LIB_SUFFIX='.sl' DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX ;; esac ;; (*) DFT_LIB_SUFFIX='.so' DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX ;; esac ;; (*) case "$target" in (*-msvc*) DFT_LIB_SUFFIX='.lib' ;; (*) DFT_LIB_SUFFIX='.a' ;; esac DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX ;; esac if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}" then DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}" DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}" fi for ac_prog in ggrep grep do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:2887: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$GREP"; then ac_cv_prog_GREP="$GREP" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_GREP="$ac_prog" echo "$as_me:2902: found $ac_dir/$ac_word" >&5 break done fi fi GREP=$ac_cv_prog_GREP if test -n "$GREP"; then echo "$as_me:2910: result: $GREP" >&5 echo "${ECHO_T}$GREP" >&6 else echo "$as_me:2913: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$GREP" && break done test -n "$GREP" || GREP=": " echo "$as_me:2921: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else for ac_prog in gegrep egrep do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:2933: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path. ;; *) ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_EGREP="$ac_dir/$ac_word" echo "$as_me:2950: found $ac_dir/$ac_word" >&5 break fi done ;; esac fi EGREP=$ac_cv_path_EGREP if test -n "$EGREP"; then echo "$as_me:2961: result: $EGREP" >&5 echo "${ECHO_T}$EGREP" >&6 else echo "$as_me:2964: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$EGREP" && break done test -n "$EGREP" || EGREP=": " test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2972: error: cannot find workable egrep" >&5 echo "$as_me: error: cannot find workable egrep" >&2;} { (exit 1); exit 1; }; } fi fi echo "$as_me:2977: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6 EGREP="$ac_cv_path_EGREP" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5' ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_main_return="return" echo "$as_me:2987: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >"conftest.$ac_ext" <<_ACEOF #line 3008 "configure" #include "confdefs.h" #include Syntax error _ACEOF if { (eval echo "$as_me:3013: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:3019: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 # Broken: fails on valid input. continue fi rm -f conftest.err "conftest.$ac_ext" # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >"conftest.$ac_ext" <<_ACEOF #line 3042 "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:3046: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:3052: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err "conftest.$ac_ext" done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err "conftest.$ac_ext" if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:3089: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >"conftest.$ac_ext" <<_ACEOF #line 3099 "configure" #include "confdefs.h" #include Syntax error _ACEOF if { (eval echo "$as_me:3104: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:3110: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 # Broken: fails on valid input. continue fi rm -f conftest.err "conftest.$ac_ext" # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >"conftest.$ac_ext" <<_ACEOF #line 3133 "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:3137: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:3143: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err "conftest.$ac_ext" done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err "conftest.$ac_ext" if $ac_preproc_ok; then : else { { echo "$as_me:3171: error: C preprocessor \"$CPP\" fails sanity check" >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5' ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_main_return="return" if test -n "$with_screen" && test "x$with_screen" = "xpdcurses" then echo "$as_me:3185: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then withval="$with_x" fi; # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then # Both variables are already set. have_x=yes else if test "${ac_cv_have_x+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -fr conftest.dir if mkdir conftest.dir; then cd conftest.dir # Make sure to not put "make" in the Imakefile rules, since we grep it out. cat >Imakefile <<'EOF' acfindx: @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' EOF if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`" # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /lib) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -fr conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /opt/local/include /opt/X11/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. cat >"conftest.$ac_ext" <<_ACEOF #line 3289 "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:3293: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:3299: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # We can compile using X headers with no special include directory. ac_x_includes= else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Intrinsic.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err "conftest.$ac_ext" fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lXt $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 3332 "configure" #include "confdefs.h" #include int main (void) { XtMalloc (0) ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:3344: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:3347: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:3350: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3353: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 LIBS=$ac_save_LIBS for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib dll; do if test -r "$ac_dir/libXt.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi # $ac_x_libraries = no if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then # Didn't find X anywhere. Cache the known absence of X. ac_cv_have_x="have_x=no" else # Record where we found X for the cache. ac_cv_have_x="have_x=yes \ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" fi fi fi eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then echo "$as_me:3391: result: $have_x" >&5 echo "${ECHO_T}$have_x" >&6 no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" echo "$as_me:3401: result: libraries $x_libraries, headers $x_includes" >&5 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. cat >>confdefs.h <<\EOF #define X_DISPLAY_MISSING 1 EOF X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . case `(uname -sr) 2>/dev/null` in "SunOS 5"*) echo "$as_me:3428: checking whether -R must be followed by a space" >&5 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" cat >"conftest.$ac_ext" <<_ACEOF #line 3432 "configure" #include "confdefs.h" int main (void) { ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:3444: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:3447: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:3450: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3453: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_R_nospace=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_R_nospace=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" if test $ac_R_nospace = yes; then echo "$as_me:3463: result: no" >&5 echo "${ECHO_T}no" >&6 X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat >"conftest.$ac_ext" <<_ACEOF #line 3469 "configure" #include "confdefs.h" int main (void) { ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:3481: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:3484: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:3487: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3490: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_R_space=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_R_space=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" if test $ac_R_space = yes; then echo "$as_me:3500: result: yes" >&5 echo "${ECHO_T}yes" >&6 X_LIBS="$X_LIBS -R $x_libraries" else echo "$as_me:3504: result: neither works" >&5 echo "${ECHO_T}neither works" >&6 fi fi LIBS=$ac_xsave_LIBS esac fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat >"conftest.$ac_ext" <<_ACEOF #line 3524 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XOpenDisplay (void); int main (void) { XOpenDisplay (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:3543: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:3546: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:3549: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3552: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 echo "$as_me:3558: checking for dnet_ntoa in -ldnet" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 3566 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dnet_ntoa (void); int main (void) { dnet_ntoa (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:3585: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:3588: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:3591: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3594: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_dnet_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_dnet_dnet_ntoa=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:3605: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo "$as_me:3612: checking for dnet_ntoa in -ldnet_stub" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 3620 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dnet_ntoa (void); int main (void) { dnet_ntoa (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:3639: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:3642: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:3645: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3648: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_dnet_stub_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:3659: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. echo "$as_me:3678: checking for gethostbyname" >&5 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 3684 "configure" #include "confdefs.h" #define gethostbyname autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ #undef gethostbyname #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (void); int main (void) { /* The GNU C library defines stubs for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) #error found stub for gethostbyname #endif return gethostbyname (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:3715: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:3718: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:3721: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3724: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_func_gethostbyname=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi echo "$as_me:3734: result: $ac_cv_func_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = no; then echo "$as_me:3738: checking for gethostbyname in -lnsl" >&5 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 3746 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (void); int main (void) { gethostbyname (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:3765: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:3768: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:3771: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3774: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_nsl_gethostbyname=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:3785: result: $ac_cv_lib_nsl_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then echo "$as_me:3792: checking for gethostbyname in -lbsd" >&5 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 3800 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (void); int main (void) { gethostbyname (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:3819: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:3822: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:3825: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3828: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_bsd_gethostbyname=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_bsd_gethostbyname=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:3839: result: $ac_cv_lib_bsd_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the nameserver (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. echo "$as_me:3855: checking for connect" >&5 echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 3861 "configure" #include "confdefs.h" #define connect autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ #undef connect #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect (void); int main (void) { /* The GNU C library defines stubs for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_connect) || defined (__stub___connect) #error found stub for connect #endif return connect (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:3892: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:3895: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:3898: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3901: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_func_connect=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi echo "$as_me:3911: result: $ac_cv_func_connect" >&5 echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = no; then echo "$as_me:3915: checking for connect in -lsocket" >&5 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 3923 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect (void); int main (void) { connect (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:3942: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:3945: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:3948: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:3951: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_socket_connect=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_socket_connect=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:3962: result: $ac_cv_lib_socket_connect" >&5 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 if test "$ac_cv_lib_socket_connect" = yes; then X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. echo "$as_me:3971: checking for remove" >&5 echo $ECHO_N "checking for remove... $ECHO_C" >&6 if test "${ac_cv_func_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 3977 "configure" #include "confdefs.h" #define remove autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ #undef remove #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char remove (void); int main (void) { /* The GNU C library defines stubs for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_remove) || defined (__stub___remove) #error found stub for remove #endif return remove (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:4008: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:4011: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:4014: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4017: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_remove=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_func_remove=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi echo "$as_me:4027: result: $ac_cv_func_remove" >&5 echo "${ECHO_T}$ac_cv_func_remove" >&6 if test $ac_cv_func_remove = no; then echo "$as_me:4031: checking for remove in -lposix" >&5 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6 if test "${ac_cv_lib_posix_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 4039 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char remove (void); int main (void) { remove (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:4058: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:4061: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:4064: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4067: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_posix_remove=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_posix_remove=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:4078: result: $ac_cv_lib_posix_remove" >&5 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6 if test "$ac_cv_lib_posix_remove" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo "$as_me:4087: checking for shmat" >&5 echo $ECHO_N "checking for shmat... $ECHO_C" >&6 if test "${ac_cv_func_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 4093 "configure" #include "confdefs.h" #define shmat autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ #undef shmat #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shmat (void); int main (void) { /* The GNU C library defines stubs for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shmat) || defined (__stub___shmat) #error found stub for shmat #endif return shmat (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:4124: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:4127: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:4130: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4133: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_shmat=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_func_shmat=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi echo "$as_me:4143: result: $ac_cv_func_shmat" >&5 echo "${ECHO_T}$ac_cv_func_shmat" >&6 if test $ac_cv_func_shmat = no; then echo "$as_me:4147: checking for shmat in -lipc" >&5 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6 if test "${ac_cv_lib_ipc_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 4155 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shmat (void); int main (void) { shmat (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:4174: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:4177: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:4180: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4183: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_ipc_shmat=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_ipc_shmat=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:4194: result: $ac_cv_lib_ipc_shmat" >&5 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6 if test "$ac_cv_lib_ipc_shmat" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry echo "$as_me:4212: checking for IceConnectionNumber in -lICE" >&5 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 4220 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char IceConnectionNumber (void); int main (void) { IceConnectionNumber (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:4239: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:4242: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:4245: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4248: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_ICE_IceConnectionNumber=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:4259: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi fi echo "$as_me:4271: checking if the POSIX test-macros are already defined" >&5 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6 if test "${cf_cv_posix_visible+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 4278 "configure" #include "confdefs.h" #include int main (void) { #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \ && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \ && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \ && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0) #error conflicting symbols found #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:4297: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:4300: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:4303: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4306: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_posix_visible=no else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_posix_visible=yes fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi echo "$as_me:4317: result: $cf_cv_posix_visible" >&5 echo "${ECHO_T}$cf_cv_posix_visible" >&6 if test "$cf_cv_posix_visible" = no; then cf_XOPEN_SOURCE=500 cf_POSIX_C_SOURCE=199506L cf_xopen_source= case "$host_os" in (aix[4-7]*) cf_xopen_source="-D_ALL_SOURCE" ;; (darwin[0-8].*) cf_xopen_source="-D_APPLE_C_SOURCE" ;; (darwin*) cf_xopen_source="-D_DARWIN_C_SOURCE" cf_XOPEN_SOURCE= ;; (freebsd*|dragonfly*|midnightbsd*) # 5.x headers associate # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L cf_POSIX_C_SOURCE=200112L cf_XOPEN_SOURCE=600 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" ;; (hpux11*) cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500" ;; (hpux*) cf_xopen_source="-D_HPUX_SOURCE" ;; (irix[56].*) cf_xopen_source="-D_SGI_SOURCE" cf_XOPEN_SOURCE= ;; (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc) cf_gnu_xopen_source=$cf_XOPEN_SOURCE echo "$as_me:4359: checking if this is the GNU C library" >&5 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6 if test "${cf_cv_gnu_library+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 4366 "configure" #include "confdefs.h" #include int main (void) { #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0 return 0; #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0 return 0; #else # error not GNU C library #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:4385: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:4388: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:4391: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4394: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_library=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_gnu_library=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi echo "$as_me:4405: result: $cf_cv_gnu_library" >&5 echo "${ECHO_T}$cf_cv_gnu_library" >&6 if test x$cf_cv_gnu_library = xyes; then # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE # was changed to help a little. newlib incorporated the change about 4 # years later. echo "$as_me:4413: checking if _DEFAULT_SOURCE can be used as a basis" >&5 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6 if test "${cf_cv_gnu_library_219+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cf_save="$CPPFLAGS" test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE" cat >"conftest.$ac_ext" <<_ACEOF #line 4425 "configure" #include "confdefs.h" #include int main (void) { #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2) return 0; #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3) return 0; #else # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:4444: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:4447: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:4450: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4453: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_library_219=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_gnu_library_219=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS="$cf_save" fi echo "$as_me:4465: result: $cf_cv_gnu_library_219" >&5 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6 if test "x$cf_cv_gnu_library_219" = xyes; then cf_save="$CPPFLAGS" echo "$as_me:4470: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi cat >"conftest.$ac_ext" <<_ACEOF #line 4575 "configure" #include "confdefs.h" #include #include int main (void) { #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1) return 0; #else # error GNU C library is too old #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:4595: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:4598: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:4601: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4604: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_dftsrc_219=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_gnu_dftsrc_219=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi echo "$as_me:4615: result: $cf_cv_gnu_dftsrc_219" >&5 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save" else cf_cv_gnu_dftsrc_219=maybe fi if test "x$cf_cv_gnu_dftsrc_219" != xyes; then echo "$as_me:4624: checking if we must define _GNU_SOURCE" >&5 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6 if test "${cf_cv_gnu_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 4631 "configure" #include "confdefs.h" #include int main (void) { #ifndef _XOPEN_SOURCE #error expected _XOPEN_SOURCE to be defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:4646: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:4649: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:4652: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4655: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_source=no else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_save="$CPPFLAGS" cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in -D_GNU_SOURCE do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi cat >"conftest.$ac_ext" <<_ACEOF #line 4762 "configure" #include "confdefs.h" #include int main (void) { #ifdef _XOPEN_SOURCE #error expected _XOPEN_SOURCE to be undefined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:4777: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:4780: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:4783: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4786: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_gnu_source=no else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_gnu_source=yes fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS="$cf_save" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi echo "$as_me:4801: result: $cf_cv_gnu_source" >&5 echo "${ECHO_T}$cf_cv_gnu_source" >&6 if test "$cf_cv_gnu_source" = yes then echo "$as_me:4806: checking if we should also define _DEFAULT_SOURCE" >&5 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6 if test "${cf_cv_default_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE" cat >"conftest.$ac_ext" <<_ACEOF #line 4816 "configure" #include "confdefs.h" #include int main (void) { #ifdef _DEFAULT_SOURCE #error expected _DEFAULT_SOURCE to be undefined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:4831: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:4834: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:4837: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4840: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_default_source=no else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_default_source=yes fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi echo "$as_me:4851: result: $cf_cv_default_source" >&5 echo "${ECHO_T}$cf_cv_default_source" >&6 if test "$cf_cv_default_source" = yes then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE" fi fi fi fi ;; (minix*) cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this... ;; (mirbsd*) # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks and other headers which use u_int / u_short types cf_XOPEN_SOURCE= if test "$cf_cv_posix_visible" = no; then cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE cf_save_CFLAGS="$CFLAGS" cf_save_CPPFLAGS="$CPPFLAGS" cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` echo "$as_me:4888: checking if we should define _POSIX_C_SOURCE" >&5 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6 if test "${cf_cv_posix_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo "${as_me:-configure}:4894: testing if the symbol is already defined go no further ..." 1>&5 cat >"conftest.$ac_ext" <<_ACEOF #line 4897 "configure" #include "confdefs.h" #include int main (void) { #ifndef _POSIX_C_SOURCE #error _POSIX_C_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:4912: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:4915: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:4918: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4921: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_posix_c_source=no else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_want_posix_source=no case .$cf_POSIX_C_SOURCE in (.[12]??*) cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE" ;; (.2) cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE" cf_want_posix_source=yes ;; (.*) cf_want_posix_source=yes ;; esac if test "$cf_want_posix_source" = yes ; then cat >"conftest.$ac_ext" <<_ACEOF #line 4942 "configure" #include "confdefs.h" #include int main (void) { #ifdef _POSIX_SOURCE #error _POSIX_SOURCE is defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:4957: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:4960: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:4963: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:4966: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi echo "${as_me:-configure}:4977: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS" test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source" echo "${as_me:-configure}:4985: testing if the second compile does not leave our definition intact error ..." 1>&5 cat >"conftest.$ac_ext" <<_ACEOF #line 4988 "configure" #include "confdefs.h" #include int main (void) { #ifndef _POSIX_C_SOURCE #error _POSIX_C_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:5003: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:5006: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:5009: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:5012: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_posix_c_source=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CFLAGS="$cf_save_CFLAGS" CPPFLAGS="$cf_save_CPPFLAGS" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi echo "$as_me:5028: result: $cf_cv_posix_c_source" >&5 echo "${ECHO_T}$cf_cv_posix_c_source" >&6 if test "$cf_cv_posix_c_source" != no ; then CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS" cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_cv_posix_c_source do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi fi fi # cf_cv_posix_visible ;; (netbsd*) cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw ;; (openbsd[6-9]*) # OpenBSD 6.x has broken locale support, both compile-time and runtime. # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html # Abusing the conformance level is a workaround. { echo "$as_me:5145: WARNING: this system does not provide usable locale support" >&5 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;} cf_xopen_source="-D_BSD_SOURCE" cf_XOPEN_SOURCE=700 ;; (openbsd[4-5]*) # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw cf_xopen_source="-D_BSD_SOURCE" cf_XOPEN_SOURCE=600 ;; (openbsd*) # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw ;; (osf[45]*) cf_xopen_source="-D_OSF_SOURCE" ;; (nto-qnx*) cf_xopen_source="-D_QNX_SOURCE" ;; (sco*) # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer ;; (solaris2.*) cf_xopen_source="-D__EXTENSIONS__" cf_cv_xopen_source=broken ;; (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2) cf_XOPEN_SOURCE= cf_POSIX_C_SOURCE= ;; (*) echo "$as_me:5177: checking if we should define _XOPEN_SOURCE" >&5 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6 if test "${cf_cv_xopen_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 5184 "configure" #include "confdefs.h" $ac_includes_default int main (void) { #ifndef _XOPEN_SOURCE #error _XOPEN_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:5202: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:5205: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:5208: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:5211: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xopen_source=no else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_save="$CPPFLAGS" test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" cat >"conftest.$ac_ext" <<_ACEOF #line 5223 "configure" #include "confdefs.h" $ac_includes_default int main (void) { #ifndef _XOPEN_SOURCE #error _XOPEN_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:5241: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:5244: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:5247: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:5250: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xopen_source=no else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_xopen_source=$cf_XOPEN_SOURCE fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS="$cf_save" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi echo "$as_me:5265: result: $cf_cv_xopen_source" >&5 echo "${ECHO_T}$cf_cv_xopen_source" >&6 if test "$cf_cv_xopen_source" != no ; then CFLAGS=`echo "$CFLAGS" | \ sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'` cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" for cf_add_cflags in $cf_temp_xopen_source do case "x$cf_add_cflags" in (x-[DU]*) cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` while true do cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` test "$CFLAGS" != "$cf_old_cflag" || break CFLAGS="$cf_old_cflag" done cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` while true do cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` test "$CPPFLAGS" != "$cf_old_cflag" || break CPPFLAGS="$cf_old_cflag" done ;; esac cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_add_cflags do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi done fi cf_save_xopen_cppflags="$CPPFLAGS" if test "$cf_cv_posix_visible" = no; then cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE cf_save_CFLAGS="$CFLAGS" cf_save_CPPFLAGS="$CPPFLAGS" cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'` echo "$as_me:5425: checking if we should define _POSIX_C_SOURCE" >&5 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6 if test "${cf_cv_posix_c_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else echo "${as_me:-configure}:5431: testing if the symbol is already defined go no further ..." 1>&5 cat >"conftest.$ac_ext" <<_ACEOF #line 5434 "configure" #include "confdefs.h" #include int main (void) { #ifndef _POSIX_C_SOURCE #error _POSIX_C_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:5449: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:5452: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:5455: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:5458: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_posix_c_source=no else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_want_posix_source=no case .$cf_POSIX_C_SOURCE in (.[12]??*) cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE" ;; (.2) cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE" cf_want_posix_source=yes ;; (.*) cf_want_posix_source=yes ;; esac if test "$cf_want_posix_source" = yes ; then cat >"conftest.$ac_ext" <<_ACEOF #line 5479 "configure" #include "confdefs.h" #include int main (void) { #ifdef _POSIX_SOURCE #error _POSIX_SOURCE is defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:5494: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:5497: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:5500: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:5503: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi echo "${as_me:-configure}:5514: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS" test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source" echo "${as_me:-configure}:5522: testing if the second compile does not leave our definition intact error ..." 1>&5 cat >"conftest.$ac_ext" <<_ACEOF #line 5525 "configure" #include "confdefs.h" #include int main (void) { #ifndef _POSIX_C_SOURCE #error _POSIX_C_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:5540: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:5543: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:5546: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:5549: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_posix_c_source=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CFLAGS="$cf_save_CFLAGS" CPPFLAGS="$cf_save_CPPFLAGS" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi echo "$as_me:5565: result: $cf_cv_posix_c_source" >&5 echo "${ECHO_T}$cf_cv_posix_c_source" >&6 if test "$cf_cv_posix_c_source" != no ; then CFLAGS="$cf_trim_CFLAGS" CPPFLAGS="$cf_trim_CPPFLAGS" cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_cv_posix_c_source do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi fi fi # cf_cv_posix_visible # Some of these niche implementations use copy/paste, double-check... if test "$cf_cv_xopen_source" = no ; then test -n "$verbose" && echo " checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6 echo "${as_me:-configure}:5678: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5 cat >"conftest.$ac_ext" <<_ACEOF #line 5681 "configure" #include "confdefs.h" $ac_includes_default int main (void) { #ifndef _XOPEN_SOURCE #error _XOPEN_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:5699: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:5702: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:5705: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:5708: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 { echo "$as_me:5715: WARNING: _POSIX_C_SOURCE definition is not usable" >&5 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;} CPPFLAGS="$cf_save_xopen_cppflags" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi ;; esac if test -n "$cf_xopen_source" ; then for cf_add_cflags in $cf_xopen_source do case "x$cf_add_cflags" in (x-[DU]*) cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` while true do cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` test "$CFLAGS" != "$cf_old_cflag" || break test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6 echo "${as_me:-configure}:5738: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5 CFLAGS="$cf_old_cflag" done cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` while true do cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` test "$CPPFLAGS" != "$cf_old_cflag" || break test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6 echo "${as_me:-configure}:5750: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5 CPPFLAGS="$cf_old_cflag" done ;; esac cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_add_cflags do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6 echo "${as_me:-configure}:5838: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5 test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6 echo "${as_me:-configure}:5848: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6 echo "${as_me:-configure}:5858: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi done fi if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then echo "$as_me:5870: checking if _XOPEN_SOURCE really is set" >&5 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF #line 5873 "configure" #include "confdefs.h" #include int main (void) { #ifndef _XOPEN_SOURCE #error _XOPEN_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:5888: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:5891: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:5894: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:5897: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_XOPEN_SOURCE_set=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_XOPEN_SOURCE_set=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" echo "$as_me:5906: result: $cf_XOPEN_SOURCE_set" >&5 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6 if test "$cf_XOPEN_SOURCE_set" = yes then cat >"conftest.$ac_ext" <<_ACEOF #line 5911 "configure" #include "confdefs.h" #include int main (void) { #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:5926: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:5929: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:5932: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:5935: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_XOPEN_SOURCE_set_ok=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_XOPEN_SOURCE_set_ok=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_XOPEN_SOURCE_set_ok" = no then { echo "$as_me:5946: WARNING: _XOPEN_SOURCE is lower than requested" >&5 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;} fi else echo "$as_me:5951: checking if we should define _XOPEN_SOURCE" >&5 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6 if test "${cf_cv_xopen_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 5958 "configure" #include "confdefs.h" $ac_includes_default int main (void) { #ifndef _XOPEN_SOURCE #error _XOPEN_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:5976: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:5979: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:5982: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:5985: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xopen_source=no else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_save="$CPPFLAGS" test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" cat >"conftest.$ac_ext" <<_ACEOF #line 5997 "configure" #include "confdefs.h" $ac_includes_default int main (void) { #ifndef _XOPEN_SOURCE #error _XOPEN_SOURCE is not defined #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:6015: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:6018: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:6021: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:6024: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xopen_source=no else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_xopen_source=$cf_XOPEN_SOURCE fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS="$cf_save" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi echo "$as_me:6039: result: $cf_cv_xopen_source" >&5 echo "${ECHO_T}$cf_cv_xopen_source" >&6 if test "$cf_cv_xopen_source" != no ; then CFLAGS=`echo "$CFLAGS" | \ sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'` cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source" for cf_add_cflags in $cf_temp_xopen_source do case "x$cf_add_cflags" in (x-[DU]*) cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` while true do cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` test "$CFLAGS" != "$cf_old_cflag" || break CFLAGS="$cf_old_cflag" done cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` while true do cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` test "$CPPFLAGS" != "$cf_old_cflag" || break CPPFLAGS="$cf_old_cflag" done ;; esac cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_add_cflags do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi done fi fi fi fi # cf_cv_posix_visible echo "$as_me:6186: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 6192 "configure" #include "confdefs.h" #include #include #include #include _ACEOF if { (eval echo "$as_me:6200: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:6206: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_header_stdc=no fi rm -f conftest.err "conftest.$ac_ext" if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >"conftest.$ac_ext" <<_ACEOF #line 6228 "configure" #include "confdefs.h" #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -rf conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >"conftest.$ac_ext" <<_ACEOF #line 6246 "configure" #include "confdefs.h" #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -rf conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >"conftest.$ac_ext" <<_ACEOF #line 6267 "configure" #include "confdefs.h" #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main (void) { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) $ac_main_return(2); $ac_main_return (0); } _ACEOF rm -f "conftest$ac_exeext" if { (eval echo "$as_me:6293: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:6296: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' { (eval echo "$as_me:6298: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:6301: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_header_stdc=no fi rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" fi fi fi echo "$as_me:6314: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\EOF #define STDC_HEADERS 1 EOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:6330: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 6336 "configure" #include "confdefs.h" $ac_includes_default #include <$ac_header> _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:6342: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:6345: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:6348: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:6351: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 eval "$as_ac_Header=no" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi echo "$as_me:6361: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <&5 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6 if test "${ac_cv_have_decl_exit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 6377 "configure" #include "confdefs.h" $ac_includes_default int main (void) { #ifndef exit (void) exit; #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:6392: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:6395: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:6398: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:6401: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_have_decl_exit=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_have_decl_exit=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi echo "$as_me:6411: result: $ac_cv_have_decl_exit" >&5 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6 echo "$as_me:6414: checking for fgrep" >&5 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6 if test "${ac_cv_path_FGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else for ac_prog in gfgrep fgrep do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:6426: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_FGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $FGREP in [\\/]* | ?:[\\/]*) ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path. ;; *) ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_FGREP="$ac_dir/$ac_word" echo "$as_me:6443: found $ac_dir/$ac_word" >&5 break fi done ;; esac fi FGREP=$ac_cv_path_FGREP if test -n "$FGREP"; then echo "$as_me:6454: result: $FGREP" >&5 echo "${ECHO_T}$FGREP" >&6 else echo "$as_me:6457: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$FGREP" && break done test -n "$FGREP" || FGREP=": " test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:6465: error: cannot find workable fgrep" >&5 echo "$as_me: error: cannot find workable fgrep" >&2;} { (exit 1); exit 1; }; } fi fi echo "$as_me:6470: result: $ac_cv_path_FGREP" >&5 echo "${ECHO_T}$ac_cv_path_FGREP" >&6 FGREP="$ac_cv_path_FGREP" echo "$as_me:6474: checking if you want to use C11 _Noreturn feature" >&5 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given. if test "${enable_stdnoreturn+set}" = set; then enableval="$enable_stdnoreturn" test "$enableval" != yes && enableval=no if test "$enableval" != "no" ; then enable_stdnoreturn=yes else enable_stdnoreturn=no fi else enableval=no enable_stdnoreturn=no fi; echo "$as_me:6491: result: $enable_stdnoreturn" >&5 echo "${ECHO_T}$enable_stdnoreturn" >&6 if test $enable_stdnoreturn = yes; then echo "$as_me:6495: checking for C11 _Noreturn feature" >&5 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6 if test "${cf_cv_c11_noreturn+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 6501 "configure" #include "confdefs.h" $ac_includes_default #include static _Noreturn void giveup(void) { exit(0); } int main (void) { if (feof(stdin)) giveup() ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:6517: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:6520: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:6523: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:6526: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_c11_noreturn=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_c11_noreturn=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi echo "$as_me:6537: result: $cf_cv_c11_noreturn" >&5 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6 else cf_cv_c11_noreturn=no, fi if test "$cf_cv_c11_noreturn" = yes; then cat >>confdefs.h <<\EOF #define HAVE_STDNORETURN_H 1 EOF cat >>confdefs.h <&6 echo "${as_me:-configure}:6593: testing repairing CFLAGS: $CFLAGS ..." 1>&5 CFLAGS="$cf_temp_flags" test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6 echo "${as_me:-configure}:6598: testing ... fixed $CFLAGS ..." 1>&5 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 echo "${as_me:-configure}:6602: testing ... extra $EXTRA_CFLAGS ..." 1>&5 fi ;; esac fi if test "$GCC" = yes || test "$GXX" = yes then case $CPPFLAGS in (*-Werror=*) cf_temp_flags= for cf_temp_scan in $CPPFLAGS do case "x$cf_temp_scan" in (x-Werror=format*) test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags " cf_temp_flags="${cf_temp_flags}$cf_temp_scan" ;; (x-Werror=*) test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS " EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan" ;; (*) test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags " cf_temp_flags="${cf_temp_flags}$cf_temp_scan" ;; esac done if test "x$CPPFLAGS" != "x$cf_temp_flags" then test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6 echo "${as_me:-configure}:6641: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5 CPPFLAGS="$cf_temp_flags" test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6 echo "${as_me:-configure}:6646: testing ... fixed $CPPFLAGS ..." 1>&5 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 echo "${as_me:-configure}:6650: testing ... extra $EXTRA_CFLAGS ..." 1>&5 fi ;; esac fi if test "$GCC" = yes || test "$GXX" = yes then case $LDFLAGS in (*-Werror=*) cf_temp_flags= for cf_temp_scan in $LDFLAGS do case "x$cf_temp_scan" in (x-Werror=format*) test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags " cf_temp_flags="${cf_temp_flags}$cf_temp_scan" ;; (x-Werror=*) test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS " EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan" ;; (*) test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags " cf_temp_flags="${cf_temp_flags}$cf_temp_scan" ;; esac done if test "x$LDFLAGS" != "x$cf_temp_flags" then test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6 echo "${as_me:-configure}:6689: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5 LDFLAGS="$cf_temp_flags" test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6 echo "${as_me:-configure}:6694: testing ... fixed $LDFLAGS ..." 1>&5 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6 echo "${as_me:-configure}:6698: testing ... extra $EXTRA_CFLAGS ..." 1>&5 fi ;; esac fi echo "$as_me:6705: checking if you want to turn on gcc warnings" >&5 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6 # Check whether --enable-warnings or --disable-warnings was given. if test "${enable_warnings+set}" = set; then enableval="$enable_warnings" test "$enableval" != yes && enableval=no if test "$enableval" != "no" ; then enable_warnings=yes else enable_warnings=no fi else enableval=no enable_warnings=no fi; echo "$as_me:6722: result: $enable_warnings" >&5 echo "${ECHO_T}$enable_warnings" >&6 if test "$enable_warnings" = "yes" then if test "$GCC" = yes || test "$GXX" = yes then cat > conftest.i <&5 echo "$as_me: checking for $CC __attribute__ directives..." >&6;} cat > "conftest.$ac_ext" < #include "confdefs.h" #include "conftest.h" #include "conftest.i" #if GCC_PRINTF #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) #else #define GCC_PRINTFLIKE(fmt,var) /*nothing*/ #endif #if GCC_SCANF #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var))) #else #define GCC_SCANFLIKE(fmt,var) /*nothing*/ #endif extern void wow(char *,...) GCC_SCANFLIKE(1,2); extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2); extern GCC_NORETURN void foo(void); int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; } EOF cf_printf_attribute=no cf_scanf_attribute=no for cf_attribute in scanf printf unused noreturn do cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` cf_directive="__attribute__(($cf_attribute))" echo "checking for $CC $cf_directive" 1>&5 case "$cf_attribute" in (printf) cf_printf_attribute=yes cat >conftest.h <conftest.h <conftest.h <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:6801: \$? = $ac_status" >&5 (exit "$ac_status"); }; then test -n "$verbose" && echo "$as_me:6803: result: ... $cf_attribute" >&5 echo "${ECHO_T}... $cf_attribute" >&6 cat conftest.h >>confdefs.h case "$cf_attribute" in (noreturn) cat >>confdefs.h <>confdefs.h <<\EOF #define GCC_PRINTF 1 EOF fi cat >>confdefs.h <>confdefs.h <<\EOF #define GCC_SCANF 1 EOF fi cat >>confdefs.h <>confdefs.h <>confdefs.h fi rm -rf ./conftest* fi if test "x$have_x" = xyes; then cf_save_LIBS_CF_CONST_X_STRING="$LIBS" cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS" cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS" LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}" for cf_X_CFLAGS in $X_CFLAGS do case "x$cf_X_CFLAGS" in x-[IUD]*) CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS" ;; *) CFLAGS="$CFLAGS $cf_X_CFLAGS" ;; esac done cat >"conftest.$ac_ext" <<_ACEOF #line 6881 "configure" #include "confdefs.h" #include #include int main (void) { String foo = malloc(1); free((void*)foo) ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:6896: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:6899: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:6902: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:6905: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then echo "$as_me:6908: checking for X11/Xt const-feature" >&5 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6 if test "${cf_cv_const_x_string+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 6915 "configure" #include "confdefs.h" #undef _CONST_X_STRING #define _CONST_X_STRING /* X11R7.8 (perhaps) */ #undef XTSTRINGDEFINES /* X11R5 and later */ #include #include int main (void) { String foo = malloc(1); *foo = 0 ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:6933: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:6936: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:6939: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:6942: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_const_x_string=no else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_const_x_string=yes fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi echo "$as_me:6957: result: $cf_cv_const_x_string" >&5 echo "${ECHO_T}$cf_cv_const_x_string" >&6 LIBS="$cf_save_LIBS_CF_CONST_X_STRING" CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING" CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING" case "$cf_cv_const_x_string" in (no) test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES" ;; (*) test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING" ;; esac else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi cat > "conftest.$ac_ext" <&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall" for cf_opt in \ wd1419 \ wd1683 \ wd1684 \ wd193 \ wd593 \ wd279 \ wd810 \ wd869 \ wd981 do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" if { (eval echo "$as_me:7018: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:7021: \$? = $ac_status" >&5 (exit "$ac_status"); }; then test -n "$verbose" && echo "$as_me:7023: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" fi done CFLAGS="$cf_save_CFLAGS" elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown" then { echo "$as_me:7031: checking for $CC warning options..." >&5 echo "$as_me: checking for $CC warning options..." >&6;} cf_save_CFLAGS="$CFLAGS" cf_warn_CONST="" test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings" cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs" test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings= for cf_opt in W Wall \ Wbad-function-cast \ Wcast-align \ Wcast-qual \ Wdeclaration-after-statement \ Wextra \ Winline \ Wmissing-declarations \ Wmissing-prototypes \ Wnested-externs \ Wpointer-arith \ Wshadow \ Wstrict-prototypes \ Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" if { (eval echo "$as_me:7054: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:7057: \$? = $ac_status" >&5 (exit "$ac_status"); }; then test -n "$verbose" && echo "$as_me:7059: result: ... -$cf_opt" >&5 echo "${ECHO_T}... -$cf_opt" >&6 case "$cf_opt" in (Winline) case "$GCC_VERSION" in ([34].*) test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 echo "${as_me:-configure}:7067: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 continue;; esac ;; (Wpointer-arith) case "$GCC_VERSION" in ([12].*) test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6 echo "${as_me:-configure}:7077: testing feature is broken in gcc $GCC_VERSION ..." 1>&5 continue;; esac ;; esac EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" fi done CFLAGS="$cf_save_CFLAGS" fi rm -rf ./conftest* fi fi echo "$as_me:7094: checking if you want to use dmalloc for testing" >&5 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6 # Check whether --with-dmalloc or --without-dmalloc was given. if test "${with_dmalloc+set}" = set; then withval="$with_dmalloc" case "x$withval" in (x|xno) ;; (*) : "${with_cflags:=-g}" : "${enable_leaks:=no}" with_dmalloc=yes cat >>confdefs.h <&5 echo "${ECHO_T}${with_dmalloc:-no}" >&6 case ".$with_cflags" in (.*-g*) case .$CFLAGS in (.*-g*) ;; (*) cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in -g do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi ;; esac ;; esac if test "$with_dmalloc" = yes ; then echo "$as_me:7230: checking for dmalloc.h" >&5 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6 if test "${ac_cv_header_dmalloc_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 7236 "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:7240: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:7246: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_cv_header_dmalloc_h=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_header_dmalloc_h=no fi rm -f conftest.err "conftest.$ac_ext" fi echo "$as_me:7265: result: $ac_cv_header_dmalloc_h" >&5 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6 if test "$ac_cv_header_dmalloc_h" = yes; then echo "$as_me:7269: checking for dmalloc_debug in -ldmalloc" >&5 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldmalloc $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 7277 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dmalloc_debug (void); int main (void) { dmalloc_debug (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:7296: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:7299: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:7302: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:7305: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_dmalloc_dmalloc_debug=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_dmalloc_dmalloc_debug=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:7316: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then cat >>confdefs.h <&5 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6 # Check whether --with-dbmalloc or --without-dbmalloc was given. if test "${with_dbmalloc+set}" = set; then withval="$with_dbmalloc" case "x$withval" in (x|xno) ;; (*) : "${with_cflags:=-g}" : "${enable_leaks:=no}" with_dbmalloc=yes cat >>confdefs.h <&5 echo "${ECHO_T}${with_dbmalloc:-no}" >&6 case ".$with_cflags" in (.*-g*) case .$CFLAGS in (.*-g*) ;; (*) cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in -g do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi ;; esac ;; esac if test "$with_dbmalloc" = yes ; then echo "$as_me:7467: checking for dbmalloc.h" >&5 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6 if test "${ac_cv_header_dbmalloc_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 7473 "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:7477: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:7483: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_cv_header_dbmalloc_h=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_header_dbmalloc_h=no fi rm -f conftest.err "conftest.$ac_ext" fi echo "$as_me:7502: result: $ac_cv_header_dbmalloc_h" >&5 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6 if test "$ac_cv_header_dbmalloc_h" = yes; then echo "$as_me:7506: checking for debug_malloc in -ldbmalloc" >&5 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldbmalloc $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 7514 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char debug_malloc (void); int main (void) { debug_malloc (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:7533: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:7536: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:7539: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:7542: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_dbmalloc_debug_malloc=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_dbmalloc_debug_malloc=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:7553: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then cat >>confdefs.h <&5 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6 # Check whether --with-valgrind or --without-valgrind was given. if test "${with_valgrind+set}" = set; then withval="$with_valgrind" case "x$withval" in (x|xno) ;; (*) : "${with_cflags:=-g}" : "${enable_leaks:=no}" with_valgrind=yes cat >>confdefs.h <&5 echo "${ECHO_T}${with_valgrind:-no}" >&6 case ".$with_cflags" in (.*-g*) case .$CFLAGS in (.*-g*) ;; (*) cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in -g do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi ;; esac ;; esac echo "$as_me:7703: checking if you want to perform memory-leak testing" >&5 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6 # Check whether --enable-leaks or --disable-leaks was given. if test "${enable_leaks+set}" = set; then enableval="$enable_leaks" enable_leaks=$enableval else enable_leaks=yes fi; if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi echo "$as_me:7714: result: $with_no_leaks" >&5 echo "${ECHO_T}$with_no_leaks" >&6 if test "$enable_leaks" = no ; then cat >>confdefs.h <<\EOF #define NO_LEAKS 1 EOF cat >>confdefs.h <<\EOF #define YY_NO_LEAKS 1 EOF fi for ac_prog in perl perl5 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:7733: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_PERL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$PERL"; then ac_cv_prog_PERL="$PERL" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_PERL="$ac_prog" echo "$as_me:7748: found $ac_dir/$ac_word" >&5 break done fi fi PERL=$ac_cv_prog_PERL if test -n "$PERL"; then echo "$as_me:7756: result: $PERL" >&5 echo "${ECHO_T}$PERL" >&6 else echo "$as_me:7759: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$PERL" && break done test -n "$PERL" || PERL="none" if test "$PERL" = none then { { echo "$as_me:7769: error: no perl found" >&5 echo "$as_me: error: no perl found" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:7774: checking if you want to use cdk5-config for C flags" >&5 echo $ECHO_N "checking if you want to use cdk5-config for C flags... $ECHO_C" >&6 # Check whether --with-cdk or --without-cdk was given. if test "${with_cdk+set}" = set; then withval="$with_cdk" with_cdk=$withval else with_cdk=yes fi; echo "$as_me:7784: result: $with_cdk" >&5 echo "${ECHO_T}$with_cdk" >&6 test "$with_cdk" != no && with_cdk="cdk5-config" if test "$with_cdk" = no then echo "$as_me:7791: checking if you want to use cdkw5-config for C flags" >&5 echo $ECHO_N "checking if you want to use cdkw5-config for C flags... $ECHO_C" >&6 # Check whether --with-cdkw or --without-cdkw was given. if test "${with_cdkw+set}" = set; then withval="$with_cdkw" with_cdk=$withval else with_cdk=yes fi; echo "$as_me:7801: result: $with_cdk" >&5 echo "${ECHO_T}$with_cdk" >&6 test "$with_cdk" != no && with_cdk="cdkw5-config" fi if test $with_cdk = no then # before looking for Cdk, check for the curses library it will use echo "$as_me:7810: checking for specific curses-directory" >&5 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6 # Check whether --with-curses-dir or --without-curses-dir was given. if test "${with_curses_dir+set}" = set; then withval="$with_curses_dir" cf_cv_curses_dir=$withval else cf_cv_curses_dir=no fi; echo "$as_me:7820: result: $cf_cv_curses_dir" >&5 echo "${ECHO_T}$cf_cv_curses_dir" >&6 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" then if test "x$prefix" != xNONE; then cf_path_syntax="$prefix" else cf_path_syntax="$ac_default_prefix" fi case ".$withval" in (.\$\(*\)*|.\'*\'*) ;; (..|./*|.\\*) ;; (.[a-zA-Z]:[\\/]*) # OS/2 EMX ;; (.\$\{*prefix\}*|.\$\{*dir\}*) eval withval="$withval" case ".$withval" in (.NONE/*) withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%` ;; esac ;; (.no|.NONE/*) withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%` ;; (*) { { echo "$as_me:7851: error: expected a pathname, not \"$withval\"" >&5 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} { (exit 1); exit 1; }; } ;; esac if test -d "$cf_cv_curses_dir" then if test -n "$cf_cv_curses_dir/include" ; then for cf_add_incdir in $cf_cv_curses_dir/include do while test "$cf_add_incdir" != /usr/include do if test -d "$cf_add_incdir" then cf_have_incdir=no if test -n "$CFLAGS$CPPFLAGS" ; then # a loop is needed to ensure we can add subdirs of existing dirs for cf_test_incdir in $CFLAGS $CPPFLAGS ; do if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then cf_have_incdir=yes; break fi done fi if test "$cf_have_incdir" = no ; then if test "$cf_add_incdir" = /usr/local/include ; then if test "$GCC" = yes then cf_save_CPPFLAGS=$CPPFLAGS test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF #line 7887 "configure" #include "confdefs.h" #include int main (void) { printf("Hello") ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:7899: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:7902: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:7905: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:7908: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_have_incdir=yes fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS=$cf_save_CPPFLAGS fi fi fi if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 echo "${as_me:-configure}:7925: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'` test "$cf_top_incdir" = "$cf_add_incdir" && break cf_add_incdir="$cf_top_incdir" else break fi else break fi done done fi if test -n "$cf_cv_curses_dir/lib" ; then for cf_add_libdir in $cf_cv_curses_dir/lib do if test "$cf_add_libdir" = /usr/lib ; then : elif test -d "$cf_add_libdir" then cf_have_libdir=no if test -n "$LDFLAGS$LIBS" ; then # a loop is needed to ensure we can add subdirs of existing dirs for cf_test_libdir in $LDFLAGS $LIBS ; do if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then cf_have_libdir=yes; break fi done fi if test "$cf_have_libdir" = no ; then test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 echo "${as_me:-configure}:7961: testing adding $cf_add_libdir to library-path ..." 1>&5 LDFLAGS="-L$cf_add_libdir $LDFLAGS" fi fi done fi fi fi echo "$as_me:7972: checking for extra include directories" >&5 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6 if test "${cf_cv_curses_incdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cf_cv_curses_incdir=no case "$host_os" in (hpux10.*) if test "x$cf_cv_screen" = "xcurses_colr" then test -d /usr/include/curses_colr && \ cf_cv_curses_incdir="-I/usr/include/curses_colr" fi ;; (sunos3*|sunos4*) if test "x$cf_cv_screen" = "xcurses_5lib" then test -d /usr/5lib && \ test -d /usr/5include && \ cf_cv_curses_incdir="-I/usr/5include" fi ;; esac fi echo "$as_me:7998: result: $cf_cv_curses_incdir" >&5 echo "${ECHO_T}$cf_cv_curses_incdir" >&6 if test "$cf_cv_curses_incdir" != no then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir" fi echo "$as_me:8008: checking if we have identified curses headers" >&5 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6 if test "${cf_cv_ncurses_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cf_cv_ncurses_header=none for cf_header in \ ncurses.h \ curses.h ncurses/ncurses.h ncurses/curses.h do cat >"conftest.$ac_ext" <<_ACEOF #line 8020 "configure" #include "confdefs.h" #include <${cf_header}> int main (void) { initscr(); endwin() ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:8032: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:8035: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:8038: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:8041: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_header=$cf_header; break else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi echo "$as_me:8052: result: $cf_cv_ncurses_header" >&5 echo "${ECHO_T}$cf_cv_ncurses_header" >&6 if test "$cf_cv_ncurses_header" = none ; then { { echo "$as_me:8056: error: No curses header-files found" >&5 echo "$as_me: error: No curses header-files found" >&2;} { (exit 1); exit 1; }; } fi # cheat, to get the right #define's for HAVE_NCURSES_H, etc. for ac_header in $cf_cv_ncurses_header do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:8066: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 8072 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:8076: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:8082: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 eval "$as_ac_Header=no" fi rm -f conftest.err "conftest.$ac_ext" fi echo "$as_me:8101: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <&5 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 if test "${cf_cv_term_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "${cf_cv_ncurses_header}" in (*/ncurses.h|*/ncursesw.h) cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'` ;; (*) cf_term_header=term.h ;; esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do cat >"conftest.$ac_ext" <<_ACEOF #line 8129 "configure" #include "confdefs.h" #include #include <${cf_cv_ncurses_header:-curses.h}> #include <$cf_test> int main (void) { int x = auto_left_margin; (void)x ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:8144: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:8147: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:8150: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:8153: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_term_header="$cf_test" else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_term_header=unknown fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" test "$cf_cv_term_header" != unknown && break done fi echo "$as_me:8169: result: $cf_cv_term_header" >&5 echo "${ECHO_T}$cf_cv_term_header" >&6 # Set definitions to allow ifdef'ing to accommodate subdirectories case "$cf_cv_term_header" in (*term.h) cat >>confdefs.h <<\EOF #define HAVE_TERM_H 1 EOF ;; esac case "$cf_cv_term_header" in (ncurses/term.h) cat >>confdefs.h <<\EOF #define HAVE_NCURSES_TERM_H 1 EOF ;; (ncursesw/term.h) cat >>confdefs.h <<\EOF #define HAVE_NCURSESW_TERM_H 1 EOF ;; esac echo "$as_me:8201: checking for chtype typedef" >&5 echo $ECHO_N "checking for chtype typedef... $ECHO_C" >&6 if test "${cf_cv_chtype_decl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 8208 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main (void) { chtype foo; (void)foo ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:8220: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:8223: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:8226: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:8229: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_chtype_decl=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_chtype_decl=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi echo "$as_me:8239: result: $cf_cv_chtype_decl" >&5 echo "${ECHO_T}$cf_cv_chtype_decl" >&6 if test "$cf_cv_chtype_decl" = yes ; then cat >>confdefs.h <<\EOF #define HAVE_TYPE_CHTYPE 1 EOF echo "$as_me:8247: checking if chtype is scalar or struct" >&5 echo $ECHO_N "checking if chtype is scalar or struct... $ECHO_C" >&6 if test "${cf_cv_chtype_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 8254 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main (void) { static chtype foo; long x = foo; (void)x ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:8266: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:8269: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:8272: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:8275: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_chtype_type=scalar else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_chtype_type=struct fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi echo "$as_me:8285: result: $cf_cv_chtype_type" >&5 echo "${ECHO_T}$cf_cv_chtype_type" >&6 if test "$cf_cv_chtype_type" = scalar ; then cat >>confdefs.h <<\EOF #define TYPE_CHTYPE_IS_SCALAR 1 EOF fi fi echo "$as_me:8296: checking for specific curses-directory" >&5 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6 # Check whether --with-curses-dir or --without-curses-dir was given. if test "${with_curses_dir+set}" = set; then withval="$with_curses_dir" cf_cv_curses_dir=$withval else cf_cv_curses_dir=no fi; echo "$as_me:8306: result: $cf_cv_curses_dir" >&5 echo "${ECHO_T}$cf_cv_curses_dir" >&6 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" then if test "x$prefix" != xNONE; then cf_path_syntax="$prefix" else cf_path_syntax="$ac_default_prefix" fi case ".$withval" in (.\$\(*\)*|.\'*\'*) ;; (..|./*|.\\*) ;; (.[a-zA-Z]:[\\/]*) # OS/2 EMX ;; (.\$\{*prefix\}*|.\$\{*dir\}*) eval withval="$withval" case ".$withval" in (.NONE/*) withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%` ;; esac ;; (.no|.NONE/*) withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%` ;; (*) { { echo "$as_me:8337: error: expected a pathname, not \"$withval\"" >&5 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;} { (exit 1); exit 1; }; } ;; esac if test -d "$cf_cv_curses_dir" then if test -n "$cf_cv_curses_dir/include" ; then for cf_add_incdir in $cf_cv_curses_dir/include do while test "$cf_add_incdir" != /usr/include do if test -d "$cf_add_incdir" then cf_have_incdir=no if test -n "$CFLAGS$CPPFLAGS" ; then # a loop is needed to ensure we can add subdirs of existing dirs for cf_test_incdir in $CFLAGS $CPPFLAGS ; do if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then cf_have_incdir=yes; break fi done fi if test "$cf_have_incdir" = no ; then if test "$cf_add_incdir" = /usr/local/include ; then if test "$GCC" = yes then cf_save_CPPFLAGS=$CPPFLAGS test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF #line 8373 "configure" #include "confdefs.h" #include int main (void) { printf("Hello") ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:8385: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:8388: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:8391: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:8394: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_have_incdir=yes fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS=$cf_save_CPPFLAGS fi fi fi if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 echo "${as_me:-configure}:8411: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'` test "$cf_top_incdir" = "$cf_add_incdir" && break cf_add_incdir="$cf_top_incdir" else break fi else break fi done done fi if test -n "$cf_cv_curses_dir/lib" ; then for cf_add_libdir in $cf_cv_curses_dir/lib do if test "$cf_add_libdir" = /usr/lib ; then : elif test -d "$cf_add_libdir" then cf_have_libdir=no if test -n "$LDFLAGS$LIBS" ; then # a loop is needed to ensure we can add subdirs of existing dirs for cf_test_libdir in $LDFLAGS $LIBS ; do if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then cf_have_libdir=yes; break fi done fi if test "$cf_have_libdir" = no ; then test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 echo "${as_me:-configure}:8447: testing adding $cf_add_libdir to library-path ..." 1>&5 LDFLAGS="-L$cf_add_libdir $LDFLAGS" fi fi done fi fi fi cf_cv_screen=curses echo "$as_me:8460: checking for specified curses library type" >&5 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6 # Check whether --with-screen or --without-screen was given. if test "${with_screen+set}" = set; then withval="$with_screen" cf_cv_screen=$withval else # Check whether --with-ncursesw or --without-ncursesw was given. if test "${with_ncursesw+set}" = set; then withval="$with_ncursesw" cf_cv_screen=ncursesw else # Check whether --with-ncurses or --without-ncurses was given. if test "${with_ncurses+set}" = set; then withval="$with_ncurses" cf_cv_screen=ncurses else # Check whether --with-pdcurses or --without-pdcurses was given. if test "${with_pdcurses+set}" = set; then withval="$with_pdcurses" cf_cv_screen=pdcurses else # Check whether --with-curses-colr or --without-curses-colr was given. if test "${with_curses_colr+set}" = set; then withval="$with_curses_colr" cf_cv_screen=curses_colr else # Check whether --with-curses-5lib or --without-curses-5lib was given. if test "${with_curses_5lib+set}" = set; then withval="$with_curses_5lib" cf_cv_screen=curses_5lib fi; fi; fi; fi; fi; fi; echo "$as_me:8504: result: $cf_cv_screen" >&5 echo "${ECHO_T}$cf_cv_screen" >&6 case $cf_cv_screen in (curses|curses_*) echo "$as_me:8510: checking for extra include directories" >&5 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6 if test "${cf_cv_curses_incdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cf_cv_curses_incdir=no case "$host_os" in (hpux10.*) if test "x$cf_cv_screen" = "xcurses_colr" then test -d /usr/include/curses_colr && \ cf_cv_curses_incdir="-I/usr/include/curses_colr" fi ;; (sunos3*|sunos4*) if test "x$cf_cv_screen" = "xcurses_5lib" then test -d /usr/5lib && \ test -d /usr/5include && \ cf_cv_curses_incdir="-I/usr/5include" fi ;; esac fi echo "$as_me:8536: result: $cf_cv_curses_incdir" >&5 echo "${ECHO_T}$cf_cv_curses_incdir" >&6 if test "$cf_cv_curses_incdir" != no then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir" fi echo "$as_me:8546: checking if we have identified curses headers" >&5 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6 if test "${cf_cv_ncurses_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cf_cv_ncurses_header=none for cf_header in \ ncurses.h \ curses.h ncurses/ncurses.h ncurses/curses.h do cat >"conftest.$ac_ext" <<_ACEOF #line 8558 "configure" #include "confdefs.h" #include <${cf_header}> int main (void) { initscr(); endwin() ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:8570: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:8573: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:8576: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:8579: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_header=$cf_header; break else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi echo "$as_me:8590: result: $cf_cv_ncurses_header" >&5 echo "${ECHO_T}$cf_cv_ncurses_header" >&6 if test "$cf_cv_ncurses_header" = none ; then { { echo "$as_me:8594: error: No curses header-files found" >&5 echo "$as_me: error: No curses header-files found" >&2;} { (exit 1); exit 1; }; } fi # cheat, to get the right #define's for HAVE_NCURSES_H, etc. for ac_header in $cf_cv_ncurses_header do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:8604: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 8610 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:8614: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:8620: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 eval "$as_ac_Header=no" fi rm -f conftest.err "conftest.$ac_ext" fi echo "$as_me:8639: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <&5 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 if test "${cf_cv_term_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "${cf_cv_ncurses_header}" in (*/ncurses.h|*/ncursesw.h) cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'` ;; (*) cf_term_header=term.h ;; esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do cat >"conftest.$ac_ext" <<_ACEOF #line 8667 "configure" #include "confdefs.h" #include #include <${cf_cv_ncurses_header:-curses.h}> #include <$cf_test> int main (void) { int x = auto_left_margin; (void)x ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:8682: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:8685: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:8688: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:8691: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_term_header="$cf_test" else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_term_header=unknown fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" test "$cf_cv_term_header" != unknown && break done fi echo "$as_me:8707: result: $cf_cv_term_header" >&5 echo "${ECHO_T}$cf_cv_term_header" >&6 # Set definitions to allow ifdef'ing to accommodate subdirectories case "$cf_cv_term_header" in (*term.h) cat >>confdefs.h <<\EOF #define HAVE_TERM_H 1 EOF ;; esac case "$cf_cv_term_header" in (ncurses/term.h) cat >>confdefs.h <<\EOF #define HAVE_NCURSES_TERM_H 1 EOF ;; (ncursesw/term.h) cat >>confdefs.h <<\EOF #define HAVE_NCURSESW_TERM_H 1 EOF ;; esac echo "$as_me:8739: checking for ncurses version" >&5 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6 if test "${cf_cv_ncurses_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cf_cv_ncurses_version=no cf_tempfile=out$$ rm -f "$cf_tempfile" if test "$cross_compiling" = yes; then # This will not work if the preprocessor splits the line after the # Autoconf token. The 'unproto' program does that. cat > "conftest.$ac_ext" < #undef Autoconf #ifdef NCURSES_VERSION Autoconf NCURSES_VERSION #else #ifdef __NCURSES_H Autoconf "old" #endif ; #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" { (eval echo "$as_me:8765: \"$cf_try\"") >&5 (eval $cf_try) 2>&5 ac_status=$? echo "$as_me:8768: \$? = $ac_status" >&5 (exit "$ac_status"); } if test -f conftest.out ; then cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out` test -n "$cf_out" && cf_cv_ncurses_version="$cf_out" rm -f conftest.out fi else cat >"conftest.$ac_ext" <<_ACEOF #line 8778 "configure" #include "confdefs.h" $ac_includes_default #include <${cf_cv_ncurses_header:-curses.h}> int main(void) { FILE *fp = fopen("$cf_tempfile", "w"); #ifdef NCURSES_VERSION # ifdef NCURSES_VERSION_PATCH fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH); # else fprintf(fp, "%s\\n", NCURSES_VERSION); # endif #else # ifdef __NCURSES_H fprintf(fp, "old\\n"); # else #error expected ncurses header to define __NCURSES_H # endif #endif ${cf_cv_main_return:-return}(0); } _ACEOF rm -f "conftest$ac_exeext" if { (eval echo "$as_me:8805: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:8808: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' { (eval echo "$as_me:8810: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:8813: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_version=`cat $cf_tempfile` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 fi rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" fi rm -f "$cf_tempfile" fi echo "$as_me:8827: result: $cf_cv_ncurses_version" >&5 echo "${ECHO_T}$cf_cv_ncurses_version" >&6 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF #define NCURSES 1 EOF echo "$as_me:8834: checking if we have identified curses libraries" >&5 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF #line 8837 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main (void) { initscr(); endwin() ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:8849: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:8852: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:8855: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:8858: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_result=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" echo "$as_me:8867: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 if test "$cf_result" = no ; then case "$host_os" in (freebsd*) echo "$as_me:8873: checking for tgoto in -lmytinfo" >&5 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmytinfo $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 8881 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char tgoto (void); int main (void) { tgoto (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:8900: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:8903: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:8906: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:8909: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_mytinfo_tgoto=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_mytinfo_tgoto=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:8920: result: $ac_cv_lib_mytinfo_tgoto" >&5 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" fi ;; (hpux10.*) # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr # next (1998), and xcurses "newer" (2000). There is no header file for # Hcurses; the subdirectory curses_colr has the headers (curses.h and # term.h) for cur_colr if test "x$cf_cv_screen" = "xcurses_colr" then echo "$as_me:8950: checking for initscr in -lcur_colr" >&5 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcur_colr $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 8958 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char initscr (void); int main (void) { initscr (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:8977: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:8980: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:8983: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:8986: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_cur_colr_initscr=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_cur_colr_initscr=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:8997: result: $ac_cv_lib_cur_colr_initscr" >&5 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6 if test "$ac_cv_lib_cur_colr_initscr" = yes; then cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" ac_cv_func_initscr=yes else echo "$as_me:9021: checking for initscr in -lHcurses" >&5 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lHcurses $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 9029 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char initscr (void); int main (void) { initscr (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:9048: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:9051: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:9054: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:9057: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_Hcurses_initscr=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_Hcurses_initscr=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:9068: result: $ac_cv_lib_Hcurses_initscr" >&5 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6 if test "$ac_cv_lib_Hcurses_initscr" = yes; then # HP's header uses __HP_CURSES, but user claims _HP_CURSES. cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES" ac_cv_func_initscr=yes fi fi fi ;; (linux*) case `arch 2>/dev/null` in (x86_64) if test -d /lib64 then if test -n "/lib64" ; then for cf_add_libdir in /lib64 do if test "$cf_add_libdir" = /usr/lib ; then : elif test -d "$cf_add_libdir" then cf_have_libdir=no if test -n "$LDFLAGS$LIBS" ; then # a loop is needed to ensure we can add subdirs of existing dirs for cf_test_libdir in $LDFLAGS $LIBS ; do if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then cf_have_libdir=yes; break fi done fi if test "$cf_have_libdir" = no ; then test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 echo "${as_me:-configure}:9126: testing adding $cf_add_libdir to library-path ..." 1>&5 LDFLAGS="-L$cf_add_libdir $LDFLAGS" fi fi done fi else if test -n "/lib" ; then for cf_add_libdir in /lib do if test "$cf_add_libdir" = /usr/lib ; then : elif test -d "$cf_add_libdir" then cf_have_libdir=no if test -n "$LDFLAGS$LIBS" ; then # a loop is needed to ensure we can add subdirs of existing dirs for cf_test_libdir in $LDFLAGS $LIBS ; do if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then cf_have_libdir=yes; break fi done fi if test "$cf_have_libdir" = no ; then test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 echo "${as_me:-configure}:9155: testing adding $cf_add_libdir to library-path ..." 1>&5 LDFLAGS="-L$cf_add_libdir $LDFLAGS" fi fi done fi fi ;; (*) if test -n "/lib" ; then for cf_add_libdir in /lib do if test "$cf_add_libdir" = /usr/lib ; then : elif test -d "$cf_add_libdir" then cf_have_libdir=no if test -n "$LDFLAGS$LIBS" ; then # a loop is needed to ensure we can add subdirs of existing dirs for cf_test_libdir in $LDFLAGS $LIBS ; do if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then cf_have_libdir=yes; break fi done fi if test "$cf_have_libdir" = no ; then test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 echo "${as_me:-configure}:9186: testing adding $cf_add_libdir to library-path ..." 1>&5 LDFLAGS="-L$cf_add_libdir $LDFLAGS" fi fi done fi ;; esac ;; (sunos3*|sunos4*) if test "x$cf_cv_screen" = "xcurses_5lib" then if test -d /usr/5lib ; then if test -n "/usr/5lib" ; then for cf_add_libdir in /usr/5lib do if test "$cf_add_libdir" = /usr/lib ; then : elif test -d "$cf_add_libdir" then cf_have_libdir=no if test -n "$LDFLAGS$LIBS" ; then # a loop is needed to ensure we can add subdirs of existing dirs for cf_test_libdir in $LDFLAGS $LIBS ; do if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then cf_have_libdir=yes; break fi done fi if test "$cf_have_libdir" = no ; then test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 echo "${as_me:-configure}:9221: testing adding $cf_add_libdir to library-path ..." 1>&5 LDFLAGS="-L$cf_add_libdir $LDFLAGS" fi fi done fi cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" fi fi ac_cv_func_initscr=yes ;; esac if test ".$ac_cv_func_initscr" != .yes ; then cf_save_LIBS="$LIBS" if test ".${cf_cv_ncurses_version:-no}" != .no then cf_check_list="ncurses curses cursesX" else cf_check_list="cursesX curses ncurses" fi # Check for library containing tgoto. Do this before curses library # because it may be needed to link the test-case for initscr. if test "x$cf_term_lib" = x then echo "$as_me:9265: checking for tgoto" >&5 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6 if test "${ac_cv_func_tgoto+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 9271 "configure" #include "confdefs.h" #define tgoto autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ #undef tgoto #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char tgoto (void); int main (void) { /* The GNU C library defines stubs for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_tgoto) || defined (__stub___tgoto) #error found stub for tgoto #endif return tgoto (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:9302: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:9305: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:9308: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:9311: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_tgoto=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_func_tgoto=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi echo "$as_me:9321: result: $ac_cv_func_tgoto" >&5 echo "${ECHO_T}$ac_cv_func_tgoto" >&6 if test "$ac_cv_func_tgoto" = yes; then cf_term_lib=predefined else for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown do as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh` echo "$as_me:9330: checking for tgoto in -l$cf_term_lib" >&5 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6 if eval "test \"\${$as_ac_Lib+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$cf_term_lib $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 9338 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char tgoto (void); int main (void) { tgoto (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:9357: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:9360: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:9363: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:9366: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 eval "$as_ac_Lib=no" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:9377: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then : "${cf_nculib_root:=$cf_term_lib}" break fi done fi fi # Check for library containing initscr test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS" if test "x$cf_curs_lib" = x then for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown do LIBS="-l$cf_curs_lib $cf_save_LIBS" if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then echo "$as_me:9400: checking if we can link with $cf_curs_lib library" >&5 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF #line 9403 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main (void) { initscr() ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:9415: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:9418: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:9421: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:9424: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_result=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" echo "$as_me:9433: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 test "$cf_result" = yes && break elif test "$cf_curs_lib" = "$cf_term_lib" ; then cf_result=no elif test "$cf_term_lib" != predefined ; then echo "$as_me:9439: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF #line 9442 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main (void) { initscr(); endwin(); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:9454: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:9457: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:9460: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:9463: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=no else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 9472 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main (void) { initscr() ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:9484: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:9487: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:9490: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:9493: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_result=error fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" echo "$as_me:9505: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 test "$cf_result" != error && break fi done fi test "$cf_curs_lib" = unknown && { { echo "$as_me:9511: error: no curses library found" >&5 echo "$as_me: error: no curses library found" >&2;} { (exit 1); exit 1; }; } fi fi ;; (ncursesw*) for ac_header in wchar.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:9523: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 9529 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:9533: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:9539: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 eval "$as_ac_Header=no" fi rm -f conftest.err "conftest.$ac_ext" fi echo "$as_me:9558: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <&5 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6 if test "${cf_cv_utf8_lib+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cf_save_LIBS="$LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 9576 "configure" #include "confdefs.h" $ac_includes_default #ifdef HAVE_WCHAR_H #include #endif int main (void) { putwc(0,0); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:9593: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:9596: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:9599: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:9602: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_utf8_lib=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these # will be set on completion of the AC_TRY_LINK below. cf_cv_header_path_utf8= cf_cv_library_path_utf8= echo "${as_me:-configure}:9614: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5 cf_save_LIBS="$LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 9619 "configure" #include "confdefs.h" #include int main (void) { putwc(0,0); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:9632: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:9635: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:9638: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:9641: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_find_linkage_utf8=yes cf_cv_header_path_utf8=/usr/include cf_cv_library_path_utf8=/usr/lib else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 LIBS="-lutf8 $cf_save_LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 9655 "configure" #include "confdefs.h" #include int main (void) { putwc(0,0); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:9668: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:9671: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:9674: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:9677: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_find_linkage_utf8=yes cf_cv_header_path_utf8=/usr/include cf_cv_library_path_utf8=/usr/lib cf_cv_library_file_utf8="-lutf8" else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_find_linkage_utf8=no LIBS="$cf_save_LIBS" test -n "$verbose" && echo " find linkage for utf8 library" 1>&6 echo "${as_me:-configure}:9694: testing find linkage for utf8 library ..." 1>&5 echo "${as_me:-configure}:9696: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5 cf_save_CPPFLAGS="$CPPFLAGS" cf_test_CPPFLAGS="$CPPFLAGS" cf_search= # collect the current set of include-directories from compiler flags cf_header_path_list="" if test -n "${CFLAGS}${CPPFLAGS}" ; then for cf_header_path in $CPPFLAGS $CFLAGS do case "$cf_header_path" in (-I*) cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'` test "x$cf_header_path" != "xNONE" && \ test -d "$cf_header_path" && \ { test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path" test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include" test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8" test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include" test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include" test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8" } cf_header_path_list="$cf_header_path_list $cf_search" ;; esac done fi # add the variations for the package we are looking for cf_search= test "x$prefix" != "xNONE" && \ test -d "$prefix" && \ { test -n "$verbose" && echo " ... testing for include-directories under $prefix" test -d "$prefix/include" && cf_search="$cf_search $prefix/include" test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8" test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include" test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include" test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8" } for cf_subdir_prefix in \ /usr \ /usr/local \ /usr/pkg \ /opt \ /opt/local \ $HOME do test "x$cf_subdir_prefix" != "x$prefix" && \ test -d "$cf_subdir_prefix" && \ { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && { test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix" test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include" test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8" test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include" test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include" test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8" } done test "$includedir" != NONE && \ test "$includedir" != "/usr/include" && \ test -d "$includedir" && { test -d "$includedir" && cf_search="$cf_search $includedir" test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8" } test "$oldincludedir" != NONE && \ test "$oldincludedir" != "/usr/include" && \ test -d "$oldincludedir" && { test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir" test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8" } cf_search="$cf_search $cf_header_path_list" for cf_cv_header_path_utf8 in $cf_search do if test -d "$cf_cv_header_path_utf8" ; then test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6 echo "${as_me:-configure}:9787: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5 CPPFLAGS="$cf_save_CPPFLAGS" test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8" cat >"conftest.$ac_ext" <<_ACEOF #line 9795 "configure" #include "confdefs.h" #include int main (void) { putwc(0,0); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:9808: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:9811: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:9814: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:9817: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6 echo "${as_me:-configure}:9822: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5 cf_cv_find_linkage_utf8=maybe cf_test_CPPFLAGS="$CPPFLAGS" break else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 CPPFLAGS="$cf_save_CPPFLAGS" fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" fi done if test "$cf_cv_find_linkage_utf8" = maybe ; then echo "${as_me:-configure}:9840: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5 cf_save_LIBS="$LIBS" cf_save_LDFLAGS="$LDFLAGS" if test "$cf_cv_find_linkage_utf8" != yes ; then cf_search= cf_library_path_list="" if test -n "${LDFLAGS}${LIBS}" ; then for cf_library_path in $LDFLAGS $LIBS do case "$cf_library_path" in (-L*) cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'` test "x$cf_library_path" != "xNONE" && \ test -d "$cf_library_path" && \ { test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path" test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib" test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8" test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib" test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib" test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8" } cf_library_path_list="$cf_library_path_list $cf_search" ;; esac done fi cf_search= test "x$prefix" != "xNONE" && \ test -d "$prefix" && \ { test -n "$verbose" && echo " ... testing for lib-directories under $prefix" test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib" test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8" test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib" test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib" test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8" } for cf_subdir_prefix in \ /usr \ /usr/local \ /usr/pkg \ /opt \ /opt/local \ $HOME do test "x$cf_subdir_prefix" != "x$prefix" && \ test -d "$cf_subdir_prefix" && \ { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && { test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix" test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib" test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8" test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib" test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib" test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8" } done cf_search="$cf_library_path_list $cf_search" for cf_cv_library_path_utf8 in $cf_search do if test -d "$cf_cv_library_path_utf8" ; then test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6 echo "${as_me:-configure}:9915: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5 CPPFLAGS="$cf_test_CPPFLAGS" LIBS="-lutf8 $cf_save_LIBS" LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8" cat >"conftest.$ac_ext" <<_ACEOF #line 9921 "configure" #include "confdefs.h" #include int main (void) { putwc(0,0); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:9934: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:9937: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:9940: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:9943: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6 echo "${as_me:-configure}:9948: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5 cf_cv_find_linkage_utf8=yes cf_cv_library_file_utf8="-lutf8" break else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 CPPFLAGS="$cf_save_CPPFLAGS" LIBS="$cf_save_LIBS" LDFLAGS="$cf_save_LDFLAGS" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi done CPPFLAGS="$cf_save_CPPFLAGS" LDFLAGS="$cf_save_LDFLAGS" fi else cf_cv_find_linkage_utf8=no fi fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS="$cf_save_LIBS" if test "$cf_cv_find_linkage_utf8" = yes ; then cf_cv_utf8_lib=add-on else cf_cv_utf8_lib=no fi fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi echo "$as_me:9990: result: $cf_cv_utf8_lib" >&5 echo "${ECHO_T}$cf_cv_utf8_lib" >&6 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between # ncurses/ncursesw: if test "$cf_cv_utf8_lib" = "add-on" ; then cat >>confdefs.h <<\EOF #define HAVE_LIBUTF8_H 1 EOF if test -n "$cf_cv_header_path_utf8" ; then for cf_add_incdir in $cf_cv_header_path_utf8 do while test "$cf_add_incdir" != /usr/include do if test -d "$cf_add_incdir" then cf_have_incdir=no if test -n "$CFLAGS$CPPFLAGS" ; then # a loop is needed to ensure we can add subdirs of existing dirs for cf_test_incdir in $CFLAGS $CPPFLAGS ; do if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then cf_have_incdir=yes; break fi done fi if test "$cf_have_incdir" = no ; then if test "$cf_add_incdir" = /usr/local/include ; then if test "$GCC" = yes then cf_save_CPPFLAGS=$CPPFLAGS test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF #line 10028 "configure" #include "confdefs.h" #include int main (void) { printf("Hello") ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:10040: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:10043: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:10046: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:10049: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_have_incdir=yes fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS=$cf_save_CPPFLAGS fi fi fi if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 echo "${as_me:-configure}:10066: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'` test "$cf_top_incdir" = "$cf_add_incdir" && break cf_add_incdir="$cf_top_incdir" else break fi else break fi done done fi if test -n "$cf_cv_library_path_utf8" ; then for cf_add_libdir in $cf_cv_library_path_utf8 do if test "$cf_add_libdir" = /usr/lib ; then : elif test -d "$cf_add_libdir" then cf_have_libdir=no if test -n "$LDFLAGS$LIBS" ; then # a loop is needed to ensure we can add subdirs of existing dirs for cf_test_libdir in $LDFLAGS $LIBS ; do if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then cf_have_libdir=yes; break fi done fi if test "$cf_have_libdir" = no ; then test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6 echo "${as_me:-configure}:10102: testing adding $cf_add_libdir to library-path ..." 1>&5 LDFLAGS="-L$cf_add_libdir $LDFLAGS" fi fi done fi cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" fi cf_ncuconfig_root=$cf_cv_screen cf_have_ncuconfig=no if test "x${PKG_CONFIG:=none}" != xnone; then echo "$as_me:10132: checking pkg-config for $cf_ncuconfig_root" >&5 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then echo "$as_me:10135: result: yes" >&5 echo "${ECHO_T}yes" >&6 echo "$as_me:10138: checking if the $cf_ncuconfig_root package files work" >&5 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6 cf_have_ncuconfig=unknown cf_save_CFLAGS="$CFLAGS" cf_save_CPPFLAGS="$CPPFLAGS" cf_save_LIBS="$LIBS" cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`" cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`" # while -W for passing linker flags is prevalent, it is not "standard". # At least one wrapper for c89/c99 (in Apple's xcode) has its own # incompatible _and_ non-standard -W option which gives an error. Work # around that pitfall. case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in (x*c[89]9@@*-W*) cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_pkg_cflags do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF #line 10271 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main (void) { initscr(); mousemask(0,0); tigetstr((char *)0); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:10283: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:10286: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:10289: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:10292: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then if test "$cross_compiling" = yes; then cf_test_ncuconfig=maybe else cat >"conftest.$ac_ext" <<_ACEOF #line 10298 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main(void) { const char *xx = curses_version(); return (xx == 0); } _ACEOF rm -f "conftest$ac_exeext" if { (eval echo "$as_me:10305: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:10308: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' { (eval echo "$as_me:10310: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:10313: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_test_ncuconfig=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_test_ncuconfig=no fi rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" fi else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_test_ncuconfig=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" CFLAGS="$cf_save_CFLAGS" CPPFLAGS="$cf_save_CPPFLAGS" LIBS="$cf_save_LIBS" if test "x$cf_test_ncuconfig" != xyes; then cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'` cf_pkg_cflags="$cf_temp" cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'` cf_pkg_libs="$cf_temp" fi ;; esac for cf_add_cflags in $cf_pkg_cflags do case "x$cf_add_cflags" in (x-[DU]*) cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` while true do cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` test "$CFLAGS" != "$cf_old_cflag" || break CFLAGS="$cf_old_cflag" done cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` while true do cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` test "$CPPFLAGS" != "$cf_old_cflag" || break CPPFLAGS="$cf_old_cflag" done ;; esac cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_add_cflags do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi done cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF #line 10487 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main (void) { initscr(); mousemask(0,0); tigetstr((char *)0); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:10499: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:10502: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:10505: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:10508: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then if test "$cross_compiling" = yes; then cf_have_ncuconfig=maybe else cat >"conftest.$ac_ext" <<_ACEOF #line 10514 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main(void) { const char *xx = curses_version(); return (xx == 0); } _ACEOF rm -f "conftest$ac_exeext" if { (eval echo "$as_me:10521: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:10524: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' { (eval echo "$as_me:10526: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:10529: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_have_ncuconfig=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_have_ncuconfig=no fi rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" fi else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_have_ncuconfig=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" echo "$as_me:10546: result: $cf_have_ncuconfig" >&5 echo "${ECHO_T}$cf_have_ncuconfig" >&6 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes if test "$cf_have_ncuconfig" != "yes" then CPPFLAGS="$cf_save_CPPFLAGS" LIBS="$cf_save_LIBS" NCURSES_CONFIG_PKG=none else cat >>confdefs.h <<\EOF #define NCURSES 1 EOF NCURSES_CONFIG_PKG=$cf_ncuconfig_root echo "$as_me:10562: checking for terminfo header" >&5 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 if test "${cf_cv_term_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "${cf_cv_ncurses_header}" in (*/ncurses.h|*/ncursesw.h) cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'` ;; (*) cf_term_header=term.h ;; esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do cat >"conftest.$ac_ext" <<_ACEOF #line 10580 "configure" #include "confdefs.h" #include #include <${cf_cv_ncurses_header:-curses.h}> #include <$cf_test> int main (void) { int x = auto_left_margin; (void)x ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:10595: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:10598: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:10601: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:10604: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_term_header="$cf_test" else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_term_header=unknown fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" test "$cf_cv_term_header" != unknown && break done fi echo "$as_me:10620: result: $cf_cv_term_header" >&5 echo "${ECHO_T}$cf_cv_term_header" >&6 # Set definitions to allow ifdef'ing to accommodate subdirectories case "$cf_cv_term_header" in (*term.h) cat >>confdefs.h <<\EOF #define HAVE_TERM_H 1 EOF ;; esac case "$cf_cv_term_header" in (ncurses/term.h) cat >>confdefs.h <<\EOF #define HAVE_NCURSES_TERM_H 1 EOF ;; (ncursesw/term.h) cat >>confdefs.h <<\EOF #define HAVE_NCURSESW_TERM_H 1 EOF ;; esac fi else echo "$as_me:10655: result: no" >&5 echo "${ECHO_T}no" >&6 NCURSES_CONFIG_PKG=none fi else NCURSES_CONFIG_PKG=none fi if test "x$cf_have_ncuconfig" = "xno"; then cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}" if test -n "$ac_tool_prefix"; then for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:10671: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NCURSES_CONFIG"; then ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog" echo "$as_me:10686: found $ac_dir/$ac_word" >&5 break done fi fi NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG if test -n "$NCURSES_CONFIG"; then echo "$as_me:10694: result: $NCURSES_CONFIG" >&5 echo "${ECHO_T}$NCURSES_CONFIG" >&6 else echo "$as_me:10697: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$NCURSES_CONFIG" && break done fi if test -z "$NCURSES_CONFIG"; then ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:10710: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_NCURSES_CONFIG"; then ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog" echo "$as_me:10725: found $ac_dir/$ac_word" >&5 break done fi fi ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG if test -n "$ac_ct_NCURSES_CONFIG"; then echo "$as_me:10733: result: $ac_ct_NCURSES_CONFIG" >&5 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6 else echo "$as_me:10736: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_NCURSES_CONFIG" && break done test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none" NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG fi if test "$NCURSES_CONFIG" != none ; then for cf_add_cflags in `$NCURSES_CONFIG --cflags` do case "x$cf_add_cflags" in (x-[DU]*) cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` while true do cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` test "$CFLAGS" != "$cf_old_cflag" || break CFLAGS="$cf_old_cflag" done cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` while true do cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` test "$CPPFLAGS" != "$cf_old_cflag" || break CPPFLAGS="$cf_old_cflag" done ;; esac cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_add_cflags do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi done cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" # even with config script, some packages use no-override for curses.h echo "$as_me:10893: checking if we have identified curses headers" >&5 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6 if test "${cf_cv_ncurses_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cf_cv_ncurses_header=none for cf_header in \ ncurses.h $cf_cv_screen/ncurses.h \ curses.h $cf_cv_screen/curses.h do cat >"conftest.$ac_ext" <<_ACEOF #line 10905 "configure" #include "confdefs.h" #include <${cf_header}> int main (void) { initscr(); endwin() ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:10917: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:10920: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:10923: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:10926: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_header=$cf_header; break else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi echo "$as_me:10937: result: $cf_cv_ncurses_header" >&5 echo "${ECHO_T}$cf_cv_ncurses_header" >&6 if test "$cf_cv_ncurses_header" = none ; then { { echo "$as_me:10941: error: No curses header-files found" >&5 echo "$as_me: error: No curses header-files found" >&2;} { (exit 1); exit 1; }; } fi # cheat, to get the right #define's for HAVE_NCURSES_H, etc. for ac_header in $cf_cv_ncurses_header do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:10951: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 10957 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:10961: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:10967: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 eval "$as_ac_Header=no" fi rm -f conftest.err "conftest.$ac_ext" fi echo "$as_me:10986: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <>confdefs.h <<\EOF #define NCURSES 1 EOF cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` cat >>confdefs.h <"conftest.$ac_ext" <<_ACEOF #line 11042 "configure" #include "confdefs.h" #include int main (void) { printf("Hello") ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:11054: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:11057: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:11060: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:11063: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_have_incdir=yes fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS=$cf_save_CPPFLAGS fi fi fi if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 echo "${as_me:-configure}:11080: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'` test "$cf_top_incdir" = "$cf_add_incdir" && break cf_add_incdir="$cf_top_incdir" else break fi else break fi done done fi } echo "$as_me:11099: checking for $cf_ncuhdr_root header in include-path" >&5 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6 if test "${cf_cv_ncurses_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h" { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h" for cf_header in $cf_header_list do cat >"conftest.$ac_ext" <<_ACEOF #line 11111 "configure" #include "confdefs.h" #include <$cf_header> int main (void) { #ifdef NCURSES_VERSION printf("%s\\n", NCURSES_VERSION); #else #ifdef __NCURSES_H printf("old\\n"); #else #error __NCURSES_H is not defined #endif #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:11135: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:11138: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:11141: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:11144: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_h=$cf_header else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_ncurses_h=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" test "$cf_cv_ncurses_h" != no && break done fi echo "$as_me:11159: result: $cf_cv_ncurses_h" >&5 echo "${ECHO_T}$cf_cv_ncurses_h" >&6 if test "$cf_cv_ncurses_h" != no ; then cf_cv_ncurses_header=$cf_cv_ncurses_h else echo "$as_me:11166: checking for $cf_ncuhdr_root include-path" >&5 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6 if test "${cf_cv_ncurses_h2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else test -n "$verbose" && echo cf_search= # collect the current set of include-directories from compiler flags cf_header_path_list="" if test -n "${CFLAGS}${CPPFLAGS}" ; then for cf_header_path in $CPPFLAGS $CFLAGS do case "$cf_header_path" in (-I*) cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'` test "x$cf_header_path" != "xNONE" && \ test -d "$cf_header_path" && \ { test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path" test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include" test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root" test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include" test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include" test -d "$cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root" } cf_header_path_list="$cf_header_path_list $cf_search" ;; esac done fi # add the variations for the package we are looking for cf_search= test "x$prefix" != "xNONE" && \ test -d "$prefix" && \ { test -n "$verbose" && echo " ... testing for include-directories under $prefix" test -d "$prefix/include" && cf_search="$cf_search $prefix/include" test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root" test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include" test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include" test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" } for cf_subdir_prefix in \ /usr \ /usr/local \ /usr/pkg \ /opt \ /opt/local \ $HOME do test "x$cf_subdir_prefix" != "x$prefix" && \ test -d "$cf_subdir_prefix" && \ { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && { test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix" test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include" test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root" test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include" test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include" test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" } done test "$includedir" != NONE && \ test "$includedir" != "/usr/include" && \ test -d "$includedir" && { test -d "$includedir" && cf_search="$cf_search $includedir" test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root" } test "$oldincludedir" != NONE && \ test "$oldincludedir" != "/usr/include" && \ test -d "$oldincludedir" && { test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir" test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root" } cf_search="$cf_search $cf_header_path_list" test -n "$verbose" && echo "search path $cf_search" cf_save2_CPPFLAGS="$CPPFLAGS" for cf_incdir in $cf_search do if test -n "$cf_incdir" ; then for cf_add_incdir in $cf_incdir do while test "$cf_add_incdir" != /usr/include do if test -d "$cf_add_incdir" then cf_have_incdir=no if test -n "$CFLAGS$CPPFLAGS" ; then # a loop is needed to ensure we can add subdirs of existing dirs for cf_test_incdir in $CFLAGS $CPPFLAGS ; do if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then cf_have_incdir=yes; break fi done fi if test "$cf_have_incdir" = no ; then if test "$cf_add_incdir" = /usr/local/include ; then if test "$GCC" = yes then cf_save_CPPFLAGS=$CPPFLAGS test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF #line 11287 "configure" #include "confdefs.h" #include int main (void) { printf("Hello") ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:11299: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:11302: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:11305: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:11308: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_have_incdir=yes fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS=$cf_save_CPPFLAGS fi fi fi if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 echo "${as_me:-configure}:11325: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'` test "$cf_top_incdir" = "$cf_add_incdir" && break cf_add_incdir="$cf_top_incdir" else break fi else break fi done done fi for cf_header in \ ncurses.h \ curses.h do cat >"conftest.$ac_ext" <<_ACEOF #line 11348 "configure" #include "confdefs.h" #include <$cf_header> int main (void) { #ifdef NCURSES_VERSION printf("%s\\n", NCURSES_VERSION); #else #ifdef __NCURSES_H printf("old\\n"); #else #error __NCURSES_H is not defined #endif #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:11372: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:11375: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:11378: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:11381: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_h2=$cf_header else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_ncurses_h2=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_cv_ncurses_h2" != no ; then cf_cv_ncurses_h2=$cf_incdir/$cf_header test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6 break fi test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6 done CPPFLAGS="$cf_save2_CPPFLAGS" test "$cf_cv_ncurses_h2" != no && break done test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11402: error: not found" >&5 echo "$as_me: error: not found" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:11407: result: $cf_cv_ncurses_h2" >&5 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'` cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`" if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header" fi if test -n "$cf_1st_incdir" ; then for cf_add_incdir in $cf_1st_incdir do while test "$cf_add_incdir" != /usr/include do if test -d "$cf_add_incdir" then cf_have_incdir=no if test -n "$CFLAGS$CPPFLAGS" ; then # a loop is needed to ensure we can add subdirs of existing dirs for cf_test_incdir in $CFLAGS $CPPFLAGS ; do if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then cf_have_incdir=yes; break fi done fi if test "$cf_have_incdir" = no ; then if test "$cf_add_incdir" = /usr/local/include ; then if test "$GCC" = yes then cf_save_CPPFLAGS=$CPPFLAGS test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF #line 11443 "configure" #include "confdefs.h" #include int main (void) { printf("Hello") ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:11455: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:11458: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:11461: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:11464: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_have_incdir=yes fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS=$cf_save_CPPFLAGS fi fi fi if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 echo "${as_me:-configure}:11481: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'` test "$cf_top_incdir" = "$cf_add_incdir" && break cf_add_incdir="$cf_top_incdir" else break fi else break fi done done fi fi # Set definitions to allow ifdef'ing for ncurses.h case "$cf_cv_ncurses_header" in (*ncurses.h) cat >>confdefs.h <<\EOF #define HAVE_NCURSES_H 1 EOF ;; esac case "$cf_cv_ncurses_header" in (ncurses/curses.h|ncurses/ncurses.h) cat >>confdefs.h <<\EOF #define HAVE_NCURSES_NCURSES_H 1 EOF ;; (ncursesw/curses.h|ncursesw/ncurses.h) cat >>confdefs.h <<\EOF #define HAVE_NCURSESW_NCURSES_H 1 EOF ;; esac echo "$as_me:11529: checking for terminfo header" >&5 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 if test "${cf_cv_term_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "${cf_cv_ncurses_header}" in (*/ncurses.h|*/ncursesw.h) cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'` ;; (*) cf_term_header=term.h ;; esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do cat >"conftest.$ac_ext" <<_ACEOF #line 11547 "configure" #include "confdefs.h" #include #include <${cf_cv_ncurses_header:-curses.h}> #include <$cf_test> int main (void) { int x = auto_left_margin; (void)x ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:11562: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:11565: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:11568: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:11571: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_term_header="$cf_test" else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_term_header=unknown fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" test "$cf_cv_term_header" != unknown && break done fi echo "$as_me:11587: result: $cf_cv_term_header" >&5 echo "${ECHO_T}$cf_cv_term_header" >&6 # Set definitions to allow ifdef'ing to accommodate subdirectories case "$cf_cv_term_header" in (*term.h) cat >>confdefs.h <<\EOF #define HAVE_TERM_H 1 EOF ;; esac case "$cf_cv_term_header" in (ncurses/term.h) cat >>confdefs.h <<\EOF #define HAVE_NCURSES_TERM_H 1 EOF ;; (ncursesw/term.h) cat >>confdefs.h <<\EOF #define HAVE_NCURSESW_TERM_H 1 EOF ;; esac # some applications need this, but should check for NCURSES_VERSION cat >>confdefs.h <<\EOF #define NCURSES 1 EOF echo "$as_me:11625: checking for ncurses version" >&5 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6 if test "${cf_cv_ncurses_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cf_cv_ncurses_version=no cf_tempfile=out$$ rm -f "$cf_tempfile" if test "$cross_compiling" = yes; then # This will not work if the preprocessor splits the line after the # Autoconf token. The 'unproto' program does that. cat > "conftest.$ac_ext" < #undef Autoconf #ifdef NCURSES_VERSION Autoconf NCURSES_VERSION #else #ifdef __NCURSES_H Autoconf "old" #endif ; #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" { (eval echo "$as_me:11651: \"$cf_try\"") >&5 (eval $cf_try) 2>&5 ac_status=$? echo "$as_me:11654: \$? = $ac_status" >&5 (exit "$ac_status"); } if test -f conftest.out ; then cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out` test -n "$cf_out" && cf_cv_ncurses_version="$cf_out" rm -f conftest.out fi else cat >"conftest.$ac_ext" <<_ACEOF #line 11664 "configure" #include "confdefs.h" $ac_includes_default #include <${cf_cv_ncurses_header:-curses.h}> int main(void) { FILE *fp = fopen("$cf_tempfile", "w"); #ifdef NCURSES_VERSION # ifdef NCURSES_VERSION_PATCH fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH); # else fprintf(fp, "%s\\n", NCURSES_VERSION); # endif #else # ifdef __NCURSES_H fprintf(fp, "old\\n"); # else #error expected ncurses header to define __NCURSES_H # endif #endif ${cf_cv_main_return:-return}(0); } _ACEOF rm -f "conftest$ac_exeext" if { (eval echo "$as_me:11691: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:11694: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' { (eval echo "$as_me:11696: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:11699: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_version=`cat $cf_tempfile` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 fi rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" fi rm -f "$cf_tempfile" fi echo "$as_me:11713: result: $cf_cv_ncurses_version" >&5 echo "${ECHO_T}$cf_cv_ncurses_version" >&6 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF #define NCURSES 1 EOF cf_nculib_root=$cf_cv_screen # This works, except for the special case where we find gpm, but # ncurses is in a nonstandard location via $LIBS, and we really want # to link gpm. cf_ncurses_LIBS="" cf_ncurses_SAVE="$LIBS" echo "$as_me:11726: checking for Gpm_Open in -lgpm" >&5 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpm $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 11734 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char Gpm_Open (void); int main (void) { Gpm_Open (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:11753: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:11756: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:11759: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:11762: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_gpm_Gpm_Open=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_gpm_Gpm_Open=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:11773: result: $ac_cv_lib_gpm_Gpm_Open" >&5 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then echo "$as_me:11776: checking for initscr in -lgpm" >&5 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6 if test "${ac_cv_lib_gpm_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpm $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 11784 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char initscr (void); int main (void) { initscr (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:11803: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:11806: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:11809: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:11812: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_gpm_initscr=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_gpm_initscr=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:11823: result: $ac_cv_lib_gpm_initscr" >&5 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6 if test "$ac_cv_lib_gpm_initscr" = yes; then LIBS="$cf_ncurses_SAVE" else cf_ncurses_LIBS="-lgpm" fi fi case "$host_os" in (freebsd*) # This is only necessary if you are linking against an obsolete # version of ncurses (but it should do no harm, since it is static). if test "$cf_nculib_root" = ncurses ; then echo "$as_me:11838: checking for tgoto in -lmytinfo" >&5 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmytinfo $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 11846 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char tgoto (void); int main (void) { tgoto (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:11865: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:11868: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:11871: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:11874: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_mytinfo_tgoto=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_mytinfo_tgoto=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:11885: result: $ac_cv_lib_mytinfo_tgoto" >&5 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS" fi fi ;; esac cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" then cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" else eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no' cf_libdir="" echo "$as_me:11934: checking for initscr" >&5 echo $ECHO_N "checking for initscr... $ECHO_C" >&6 if test "${ac_cv_func_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 11940 "configure" #include "confdefs.h" #define initscr autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ #undef initscr #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char initscr (void); int main (void) { /* The GNU C library defines stubs for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_initscr) || defined (__stub___initscr) #error found stub for initscr #endif return initscr (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:11971: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:11974: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:11977: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:11980: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_initscr=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_func_initscr=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi echo "$as_me:11990: result: $ac_cv_func_initscr" >&5 echo "${ECHO_T}$ac_cv_func_initscr" >&6 if test "$ac_cv_func_initscr" = yes; then eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' else cf_save_LIBS="$LIBS" echo "$as_me:11997: checking for initscr in -l$cf_nculib_root" >&5 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6 LIBS="-l$cf_nculib_root $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 12001 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main (void) { initscr() ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:12013: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:12016: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:12019: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:12022: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then echo "$as_me:12024: result: yes" >&5 echo "${ECHO_T}yes" >&6 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 echo "$as_me:12031: result: no" >&5 echo "${ECHO_T}no" >&6 cf_search= cf_library_path_list="" if test -n "${LDFLAGS}${LIBS}" ; then for cf_library_path in $LDFLAGS $LIBS do case "$cf_library_path" in (-L*) cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'` test "x$cf_library_path" != "xNONE" && \ test -d "$cf_library_path" && \ { test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path" test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib" test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root" test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib" test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib" test -d "$cf_library_path/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root" } cf_library_path_list="$cf_library_path_list $cf_search" ;; esac done fi cf_search= test "x$prefix" != "xNONE" && \ test -d "$prefix" && \ { test -n "$verbose" && echo " ... testing for lib-directories under $prefix" test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib" test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root" test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib" test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib" test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root" } for cf_subdir_prefix in \ /usr \ /usr/local \ /usr/pkg \ /opt \ /opt/local \ $HOME do test "x$cf_subdir_prefix" != "x$prefix" && \ test -d "$cf_subdir_prefix" && \ { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && { test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix" test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib" test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root" test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib" test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib" test -d "$cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root" } done cf_search="$cf_library_path_list $cf_search" for cf_libdir in $cf_search do echo "$as_me:12099: checking for -l$cf_nculib_root in $cf_libdir" >&5 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 12103 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main (void) { initscr() ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:12115: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:12118: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:12121: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:12124: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then echo "$as_me:12126: result: yes" >&5 echo "${ECHO_T}yes" >&6 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' break else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 echo "$as_me:12133: result: no" >&5 echo "${ECHO_T}no" >&6 LIBS="$cf_save_LIBS" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" done fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\" if test "$cf_found_library" = no ; then { { echo "$as_me:12148: error: Cannot link $cf_nculib_root library" >&5 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;} { (exit 1); exit 1; }; } fi fi if test -n "$cf_ncurses_LIBS" ; then echo "$as_me:12156: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6 cf_ncurses_SAVE="$LIBS" for p in $cf_ncurses_LIBS ; do q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"` if test "$q" != "$LIBS" ; then LIBS="$q" fi done cat >"conftest.$ac_ext" <<_ACEOF #line 12166 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main (void) { initscr(); mousemask(0,0); tigetstr((char *)0); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:12178: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:12181: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:12184: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:12187: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then echo "$as_me:12189: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 echo "$as_me:12194: result: no" >&5 echo "${ECHO_T}no" >&6 LIBS="$cf_ncurses_SAVE" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` cat >>confdefs.h <&5 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then echo "$as_me:12222: result: yes" >&5 echo "${ECHO_T}yes" >&6 echo "$as_me:12225: checking if the $cf_ncuconfig_root package files work" >&5 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6 cf_have_ncuconfig=unknown cf_save_CFLAGS="$CFLAGS" cf_save_CPPFLAGS="$CPPFLAGS" cf_save_LIBS="$LIBS" cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`" cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`" # while -W for passing linker flags is prevalent, it is not "standard". # At least one wrapper for c89/c99 (in Apple's xcode) has its own # incompatible _and_ non-standard -W option which gives an error. Work # around that pitfall. case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in (x*c[89]9@@*-W*) cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_pkg_cflags do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF #line 12358 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main (void) { initscr(); mousemask(0,0); tigetstr((char *)0); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:12370: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:12373: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:12376: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:12379: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then if test "$cross_compiling" = yes; then cf_test_ncuconfig=maybe else cat >"conftest.$ac_ext" <<_ACEOF #line 12385 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main(void) { const char *xx = curses_version(); return (xx == 0); } _ACEOF rm -f "conftest$ac_exeext" if { (eval echo "$as_me:12392: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:12395: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' { (eval echo "$as_me:12397: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:12400: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_test_ncuconfig=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_test_ncuconfig=no fi rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" fi else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_test_ncuconfig=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" CFLAGS="$cf_save_CFLAGS" CPPFLAGS="$cf_save_CPPFLAGS" LIBS="$cf_save_LIBS" if test "x$cf_test_ncuconfig" != xyes; then cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'` cf_pkg_cflags="$cf_temp" cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'` cf_pkg_libs="$cf_temp" fi ;; esac for cf_add_cflags in $cf_pkg_cflags do case "x$cf_add_cflags" in (x-[DU]*) cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` while true do cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` test "$CFLAGS" != "$cf_old_cflag" || break CFLAGS="$cf_old_cflag" done cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` while true do cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` test "$CPPFLAGS" != "$cf_old_cflag" || break CPPFLAGS="$cf_old_cflag" done ;; esac cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_add_cflags do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi done cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF #line 12574 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main (void) { initscr(); mousemask(0,0); tigetstr((char *)0); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:12586: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:12589: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:12592: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:12595: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then if test "$cross_compiling" = yes; then cf_have_ncuconfig=maybe else cat >"conftest.$ac_ext" <<_ACEOF #line 12601 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main(void) { const char *xx = curses_version(); return (xx == 0); } _ACEOF rm -f "conftest$ac_exeext" if { (eval echo "$as_me:12608: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:12611: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' { (eval echo "$as_me:12613: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:12616: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_have_ncuconfig=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_have_ncuconfig=no fi rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" fi else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_have_ncuconfig=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" echo "$as_me:12633: result: $cf_have_ncuconfig" >&5 echo "${ECHO_T}$cf_have_ncuconfig" >&6 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes if test "$cf_have_ncuconfig" != "yes" then CPPFLAGS="$cf_save_CPPFLAGS" LIBS="$cf_save_LIBS" NCURSES_CONFIG_PKG=none else cat >>confdefs.h <<\EOF #define NCURSES 1 EOF NCURSES_CONFIG_PKG=$cf_ncuconfig_root echo "$as_me:12649: checking for terminfo header" >&5 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 if test "${cf_cv_term_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "${cf_cv_ncurses_header}" in (*/ncurses.h|*/ncursesw.h) cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'` ;; (*) cf_term_header=term.h ;; esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do cat >"conftest.$ac_ext" <<_ACEOF #line 12667 "configure" #include "confdefs.h" #include #include <${cf_cv_ncurses_header:-curses.h}> #include <$cf_test> int main (void) { int x = auto_left_margin; (void)x ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:12682: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:12685: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:12688: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:12691: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_term_header="$cf_test" else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_term_header=unknown fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" test "$cf_cv_term_header" != unknown && break done fi echo "$as_me:12707: result: $cf_cv_term_header" >&5 echo "${ECHO_T}$cf_cv_term_header" >&6 # Set definitions to allow ifdef'ing to accommodate subdirectories case "$cf_cv_term_header" in (*term.h) cat >>confdefs.h <<\EOF #define HAVE_TERM_H 1 EOF ;; esac case "$cf_cv_term_header" in (ncurses/term.h) cat >>confdefs.h <<\EOF #define HAVE_NCURSES_TERM_H 1 EOF ;; (ncursesw/term.h) cat >>confdefs.h <<\EOF #define HAVE_NCURSESW_TERM_H 1 EOF ;; esac fi else echo "$as_me:12742: result: no" >&5 echo "${ECHO_T}no" >&6 NCURSES_CONFIG_PKG=none fi else NCURSES_CONFIG_PKG=none fi if test "x$cf_have_ncuconfig" = "xno"; then cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}" if test -n "$ac_tool_prefix"; then for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:12758: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NCURSES_CONFIG"; then ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog" echo "$as_me:12773: found $ac_dir/$ac_word" >&5 break done fi fi NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG if test -n "$NCURSES_CONFIG"; then echo "$as_me:12781: result: $NCURSES_CONFIG" >&5 echo "${ECHO_T}$NCURSES_CONFIG" >&6 else echo "$as_me:12784: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$NCURSES_CONFIG" && break done fi if test -z "$NCURSES_CONFIG"; then ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:12797: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_NCURSES_CONFIG"; then ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog" echo "$as_me:12812: found $ac_dir/$ac_word" >&5 break done fi fi ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG if test -n "$ac_ct_NCURSES_CONFIG"; then echo "$as_me:12820: result: $ac_ct_NCURSES_CONFIG" >&5 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6 else echo "$as_me:12823: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_NCURSES_CONFIG" && break done test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none" NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG fi if test "$NCURSES_CONFIG" != none ; then for cf_add_cflags in `$NCURSES_CONFIG --cflags` do case "x$cf_add_cflags" in (x-[DU]*) cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` while true do cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` test "$CFLAGS" != "$cf_old_cflag" || break CFLAGS="$cf_old_cflag" done cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'` while true do cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'` test "$CPPFLAGS" != "$cf_old_cflag" || break CPPFLAGS="$cf_old_cflag" done ;; esac cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_add_cflags do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi done cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" # even with config script, some packages use no-override for curses.h echo "$as_me:12980: checking if we have identified curses headers" >&5 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6 if test "${cf_cv_ncurses_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cf_cv_ncurses_header=none for cf_header in \ ncurses.h $cf_cv_screen/ncurses.h \ curses.h $cf_cv_screen/curses.h do cat >"conftest.$ac_ext" <<_ACEOF #line 12992 "configure" #include "confdefs.h" #include <${cf_header}> int main (void) { initscr(); endwin() ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:13004: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:13007: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:13010: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:13013: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_header=$cf_header; break else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" done fi echo "$as_me:13024: result: $cf_cv_ncurses_header" >&5 echo "${ECHO_T}$cf_cv_ncurses_header" >&6 if test "$cf_cv_ncurses_header" = none ; then { { echo "$as_me:13028: error: No curses header-files found" >&5 echo "$as_me: error: No curses header-files found" >&2;} { (exit 1); exit 1; }; } fi # cheat, to get the right #define's for HAVE_NCURSES_H, etc. for ac_header in $cf_cv_ncurses_header do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:13038: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 13044 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF if { (eval echo "$as_me:13048: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:13054: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 eval "$as_ac_Header=no" fi rm -f conftest.err "conftest.$ac_ext" fi echo "$as_me:13073: result: `eval echo '${'"$as_ac_Header"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then cat >>confdefs.h <>confdefs.h <<\EOF #define NCURSES 1 EOF cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` cat >>confdefs.h <"conftest.$ac_ext" <<_ACEOF #line 13129 "configure" #include "confdefs.h" #include int main (void) { printf("Hello") ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:13141: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:13144: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:13147: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:13150: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_have_incdir=yes fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS=$cf_save_CPPFLAGS fi fi fi if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 echo "${as_me:-configure}:13167: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'` test "$cf_top_incdir" = "$cf_add_incdir" && break cf_add_incdir="$cf_top_incdir" else break fi else break fi done done fi } echo "$as_me:13186: checking for $cf_ncuhdr_root header in include-path" >&5 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6 if test "${cf_cv_ncurses_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h" { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h" for cf_header in $cf_header_list do cat >"conftest.$ac_ext" <<_ACEOF #line 13198 "configure" #include "confdefs.h" #include <$cf_header> int main (void) { #ifdef NCURSES_VERSION printf("%s\\n", NCURSES_VERSION); #else #ifdef __NCURSES_H printf("old\\n"); #else #error __NCURSES_H is not defined #endif #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:13222: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:13225: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:13228: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:13231: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_h=$cf_header else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_ncurses_h=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" test "$cf_cv_ncurses_h" != no && break done fi echo "$as_me:13246: result: $cf_cv_ncurses_h" >&5 echo "${ECHO_T}$cf_cv_ncurses_h" >&6 if test "$cf_cv_ncurses_h" != no ; then cf_cv_ncurses_header=$cf_cv_ncurses_h else echo "$as_me:13253: checking for $cf_ncuhdr_root include-path" >&5 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6 if test "${cf_cv_ncurses_h2+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else test -n "$verbose" && echo cf_search= # collect the current set of include-directories from compiler flags cf_header_path_list="" if test -n "${CFLAGS}${CPPFLAGS}" ; then for cf_header_path in $CPPFLAGS $CFLAGS do case "$cf_header_path" in (-I*) cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'` test "x$cf_header_path" != "xNONE" && \ test -d "$cf_header_path" && \ { test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path" test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include" test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root" test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include" test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include" test -d "$cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root" } cf_header_path_list="$cf_header_path_list $cf_search" ;; esac done fi # add the variations for the package we are looking for cf_search= test "x$prefix" != "xNONE" && \ test -d "$prefix" && \ { test -n "$verbose" && echo " ... testing for include-directories under $prefix" test -d "$prefix/include" && cf_search="$cf_search $prefix/include" test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root" test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include" test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include" test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" } for cf_subdir_prefix in \ /usr \ /usr/local \ /usr/pkg \ /opt \ /opt/local \ $HOME do test "x$cf_subdir_prefix" != "x$prefix" && \ test -d "$cf_subdir_prefix" && \ { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && { test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix" test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include" test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root" test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include" test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include" test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" } done test "$includedir" != NONE && \ test "$includedir" != "/usr/include" && \ test -d "$includedir" && { test -d "$includedir" && cf_search="$cf_search $includedir" test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root" } test "$oldincludedir" != NONE && \ test "$oldincludedir" != "/usr/include" && \ test -d "$oldincludedir" && { test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir" test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root" } cf_search="$cf_search $cf_header_path_list" test -n "$verbose" && echo "search path $cf_search" cf_save2_CPPFLAGS="$CPPFLAGS" for cf_incdir in $cf_search do if test -n "$cf_incdir" ; then for cf_add_incdir in $cf_incdir do while test "$cf_add_incdir" != /usr/include do if test -d "$cf_add_incdir" then cf_have_incdir=no if test -n "$CFLAGS$CPPFLAGS" ; then # a loop is needed to ensure we can add subdirs of existing dirs for cf_test_incdir in $CFLAGS $CPPFLAGS ; do if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then cf_have_incdir=yes; break fi done fi if test "$cf_have_incdir" = no ; then if test "$cf_add_incdir" = /usr/local/include ; then if test "$GCC" = yes then cf_save_CPPFLAGS=$CPPFLAGS test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF #line 13374 "configure" #include "confdefs.h" #include int main (void) { printf("Hello") ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:13386: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:13389: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:13392: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:13395: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_have_incdir=yes fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS=$cf_save_CPPFLAGS fi fi fi if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 echo "${as_me:-configure}:13412: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'` test "$cf_top_incdir" = "$cf_add_incdir" && break cf_add_incdir="$cf_top_incdir" else break fi else break fi done done fi for cf_header in \ ncurses.h \ curses.h do cat >"conftest.$ac_ext" <<_ACEOF #line 13435 "configure" #include "confdefs.h" #include <$cf_header> int main (void) { #ifdef NCURSES_VERSION printf("%s\\n", NCURSES_VERSION); #else #ifdef __NCURSES_H printf("old\\n"); #else #error __NCURSES_H is not defined #endif #endif ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:13459: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:13462: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:13465: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:13468: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_h2=$cf_header else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_ncurses_h2=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" if test "$cf_cv_ncurses_h2" != no ; then cf_cv_ncurses_h2=$cf_incdir/$cf_header test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6 break fi test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6 done CPPFLAGS="$cf_save2_CPPFLAGS" test "$cf_cv_ncurses_h2" != no && break done test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:13489: error: not found" >&5 echo "$as_me: error: not found" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:13494: result: $cf_cv_ncurses_h2" >&5 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'` cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`" if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header" fi if test -n "$cf_1st_incdir" ; then for cf_add_incdir in $cf_1st_incdir do while test "$cf_add_incdir" != /usr/include do if test -d "$cf_add_incdir" then cf_have_incdir=no if test -n "$CFLAGS$CPPFLAGS" ; then # a loop is needed to ensure we can add subdirs of existing dirs for cf_test_incdir in $CFLAGS $CPPFLAGS ; do if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then cf_have_incdir=yes; break fi done fi if test "$cf_have_incdir" = no ; then if test "$cf_add_incdir" = /usr/local/include ; then if test "$GCC" = yes then cf_save_CPPFLAGS=$CPPFLAGS test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir" cat >"conftest.$ac_ext" <<_ACEOF #line 13530 "configure" #include "confdefs.h" #include int main (void) { printf("Hello") ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:13542: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:13545: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:13548: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:13551: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_have_incdir=yes fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" CPPFLAGS=$cf_save_CPPFLAGS fi fi fi if test "$cf_have_incdir" = no ; then test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6 echo "${as_me:-configure}:13568: testing adding $cf_add_incdir to include-path ..." 1>&5 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'` test "$cf_top_incdir" = "$cf_add_incdir" && break cf_add_incdir="$cf_top_incdir" else break fi else break fi done done fi fi # Set definitions to allow ifdef'ing for ncurses.h case "$cf_cv_ncurses_header" in (*ncurses.h) cat >>confdefs.h <<\EOF #define HAVE_NCURSES_H 1 EOF ;; esac case "$cf_cv_ncurses_header" in (ncurses/curses.h|ncurses/ncurses.h) cat >>confdefs.h <<\EOF #define HAVE_NCURSES_NCURSES_H 1 EOF ;; (ncursesw/curses.h|ncursesw/ncurses.h) cat >>confdefs.h <<\EOF #define HAVE_NCURSESW_NCURSES_H 1 EOF ;; esac echo "$as_me:13616: checking for terminfo header" >&5 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6 if test "${cf_cv_term_header+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "${cf_cv_ncurses_header}" in (*/ncurses.h|*/ncursesw.h) cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'` ;; (*) cf_term_header=term.h ;; esac for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h" do cat >"conftest.$ac_ext" <<_ACEOF #line 13634 "configure" #include "confdefs.h" #include #include <${cf_cv_ncurses_header:-curses.h}> #include <$cf_test> int main (void) { int x = auto_left_margin; (void)x ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:13649: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:13652: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:13655: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:13658: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_term_header="$cf_test" else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_term_header=unknown fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" test "$cf_cv_term_header" != unknown && break done fi echo "$as_me:13674: result: $cf_cv_term_header" >&5 echo "${ECHO_T}$cf_cv_term_header" >&6 # Set definitions to allow ifdef'ing to accommodate subdirectories case "$cf_cv_term_header" in (*term.h) cat >>confdefs.h <<\EOF #define HAVE_TERM_H 1 EOF ;; esac case "$cf_cv_term_header" in (ncurses/term.h) cat >>confdefs.h <<\EOF #define HAVE_NCURSES_TERM_H 1 EOF ;; (ncursesw/term.h) cat >>confdefs.h <<\EOF #define HAVE_NCURSESW_TERM_H 1 EOF ;; esac # some applications need this, but should check for NCURSES_VERSION cat >>confdefs.h <<\EOF #define NCURSES 1 EOF echo "$as_me:13712: checking for ncurses version" >&5 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6 if test "${cf_cv_ncurses_version+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cf_cv_ncurses_version=no cf_tempfile=out$$ rm -f "$cf_tempfile" if test "$cross_compiling" = yes; then # This will not work if the preprocessor splits the line after the # Autoconf token. The 'unproto' program does that. cat > "conftest.$ac_ext" < #undef Autoconf #ifdef NCURSES_VERSION Autoconf NCURSES_VERSION #else #ifdef __NCURSES_H Autoconf "old" #endif ; #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" { (eval echo "$as_me:13738: \"$cf_try\"") >&5 (eval $cf_try) 2>&5 ac_status=$? echo "$as_me:13741: \$? = $ac_status" >&5 (exit "$ac_status"); } if test -f conftest.out ; then cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out` test -n "$cf_out" && cf_cv_ncurses_version="$cf_out" rm -f conftest.out fi else cat >"conftest.$ac_ext" <<_ACEOF #line 13751 "configure" #include "confdefs.h" $ac_includes_default #include <${cf_cv_ncurses_header:-curses.h}> int main(void) { FILE *fp = fopen("$cf_tempfile", "w"); #ifdef NCURSES_VERSION # ifdef NCURSES_VERSION_PATCH fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH); # else fprintf(fp, "%s\\n", NCURSES_VERSION); # endif #else # ifdef __NCURSES_H fprintf(fp, "old\\n"); # else #error expected ncurses header to define __NCURSES_H # endif #endif ${cf_cv_main_return:-return}(0); } _ACEOF rm -f "conftest$ac_exeext" if { (eval echo "$as_me:13778: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:13781: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"' { (eval echo "$as_me:13783: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:13786: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_ncurses_version=`cat $cf_tempfile` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 fi rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext" fi rm -f "$cf_tempfile" fi echo "$as_me:13800: result: $cf_cv_ncurses_version" >&5 echo "${ECHO_T}$cf_cv_ncurses_version" >&6 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF #define NCURSES 1 EOF cf_nculib_root=$cf_cv_screen # This works, except for the special case where we find gpm, but # ncurses is in a nonstandard location via $LIBS, and we really want # to link gpm. cf_ncurses_LIBS="" cf_ncurses_SAVE="$LIBS" echo "$as_me:13813: checking for Gpm_Open in -lgpm" >&5 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpm $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 13821 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char Gpm_Open (void); int main (void) { Gpm_Open (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:13840: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:13843: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:13846: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:13849: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_gpm_Gpm_Open=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_gpm_Gpm_Open=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:13860: result: $ac_cv_lib_gpm_Gpm_Open" >&5 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then echo "$as_me:13863: checking for initscr in -lgpm" >&5 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6 if test "${ac_cv_lib_gpm_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpm $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 13871 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char initscr (void); int main (void) { initscr (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:13890: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:13893: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:13896: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:13899: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_gpm_initscr=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_gpm_initscr=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:13910: result: $ac_cv_lib_gpm_initscr" >&5 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6 if test "$ac_cv_lib_gpm_initscr" = yes; then LIBS="$cf_ncurses_SAVE" else cf_ncurses_LIBS="-lgpm" fi fi case "$host_os" in (freebsd*) # This is only necessary if you are linking against an obsolete # version of ncurses (but it should do no harm, since it is static). if test "$cf_nculib_root" = ncurses ; then echo "$as_me:13925: checking for tgoto in -lmytinfo" >&5 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmytinfo $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 13933 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char tgoto (void); int main (void) { tgoto (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:13952: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:13955: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:13958: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:13961: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_mytinfo_tgoto=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_mytinfo_tgoto=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:13972: result: $ac_cv_lib_mytinfo_tgoto" >&5 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS" fi fi ;; esac cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" then cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" else eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no' cf_libdir="" echo "$as_me:14021: checking for initscr" >&5 echo $ECHO_N "checking for initscr... $ECHO_C" >&6 if test "${ac_cv_func_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 14027 "configure" #include "confdefs.h" #define initscr autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ #undef initscr #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char initscr (void); int main (void) { /* The GNU C library defines stubs for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_initscr) || defined (__stub___initscr) #error found stub for initscr #endif return initscr (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:14058: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:14061: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:14064: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:14067: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_initscr=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_func_initscr=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi echo "$as_me:14077: result: $ac_cv_func_initscr" >&5 echo "${ECHO_T}$ac_cv_func_initscr" >&6 if test "$ac_cv_func_initscr" = yes; then eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' else cf_save_LIBS="$LIBS" echo "$as_me:14084: checking for initscr in -l$cf_nculib_root" >&5 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6 LIBS="-l$cf_nculib_root $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 14088 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main (void) { initscr() ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:14100: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:14103: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:14106: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:14109: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then echo "$as_me:14111: result: yes" >&5 echo "${ECHO_T}yes" >&6 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 echo "$as_me:14118: result: no" >&5 echo "${ECHO_T}no" >&6 cf_search= cf_library_path_list="" if test -n "${LDFLAGS}${LIBS}" ; then for cf_library_path in $LDFLAGS $LIBS do case "$cf_library_path" in (-L*) cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'` test "x$cf_library_path" != "xNONE" && \ test -d "$cf_library_path" && \ { test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path" test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib" test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root" test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib" test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib" test -d "$cf_library_path/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root" } cf_library_path_list="$cf_library_path_list $cf_search" ;; esac done fi cf_search= test "x$prefix" != "xNONE" && \ test -d "$prefix" && \ { test -n "$verbose" && echo " ... testing for lib-directories under $prefix" test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib" test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root" test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib" test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib" test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root" } for cf_subdir_prefix in \ /usr \ /usr/local \ /usr/pkg \ /opt \ /opt/local \ $HOME do test "x$cf_subdir_prefix" != "x$prefix" && \ test -d "$cf_subdir_prefix" && \ { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && { test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix" test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib" test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root" test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib" test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib" test -d "$cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root" } done cf_search="$cf_library_path_list $cf_search" for cf_libdir in $cf_search do echo "$as_me:14186: checking for -l$cf_nculib_root in $cf_libdir" >&5 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 14190 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main (void) { initscr() ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:14202: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:14205: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:14208: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:14211: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then echo "$as_me:14213: result: yes" >&5 echo "${ECHO_T}yes" >&6 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes' break else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 echo "$as_me:14220: result: no" >&5 echo "${ECHO_T}no" >&6 LIBS="$cf_save_LIBS" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" done fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\" if test "$cf_found_library" = no ; then { { echo "$as_me:14235: error: Cannot link $cf_nculib_root library" >&5 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;} { (exit 1); exit 1; }; } fi fi if test -n "$cf_ncurses_LIBS" ; then echo "$as_me:14243: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6 cf_ncurses_SAVE="$LIBS" for p in $cf_ncurses_LIBS ; do q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"` if test "$q" != "$LIBS" ; then LIBS="$q" fi done cat >"conftest.$ac_ext" <<_ACEOF #line 14253 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header:-curses.h}> int main (void) { initscr(); mousemask(0,0); tigetstr((char *)0); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:14265: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:14268: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:14271: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:14274: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then echo "$as_me:14276: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 echo "$as_me:14281: result: no" >&5 echo "${ECHO_T}no" >&6 LIBS="$cf_ncurses_SAVE" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` cat >>confdefs.h <>confdefs.h <&6 else cf_cv_system_name="$system_name" fi test -z "$system_name" && system_name="$cf_cv_system_name" test -n "$cf_cv_system_name" && echo "$as_me:14323: result: Configuring for $cf_cv_system_name" >&5 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6 if test ".$system_name" != ".$cf_cv_system_name" ; then echo "$as_me:14327: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6 { { echo "$as_me:14329: error: \"Please remove config.cache and try again.\"" >&5 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;} { (exit 1); exit 1; }; } fi cf_x_athena=${cf_x_athena:-Xaw} echo "$as_me:14336: checking if you want to link with Xaw 3d library" >&5 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6 withval= # Check whether --with-Xaw3d or --without-Xaw3d was given. if test "${with_Xaw3d+set}" = set; then withval="$with_Xaw3d" fi; if test "$withval" = yes ; then cf_x_athena=Xaw3d echo "$as_me:14347: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:14350: result: no" >&5 echo "${ECHO_T}no" >&6 fi echo "$as_me:14354: checking if you want to link with Xaw 3d xft library" >&5 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6 withval= # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given. if test "${with_Xaw3dxft+set}" = set; then withval="$with_Xaw3dxft" fi; if test "$withval" = yes ; then cf_x_athena=Xaw3dxft echo "$as_me:14365: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:14368: result: no" >&5 echo "${ECHO_T}no" >&6 fi echo "$as_me:14372: checking if you want to link with neXT Athena library" >&5 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6 withval= # Check whether --with-neXtaw or --without-neXtaw was given. if test "${with_neXtaw+set}" = set; then withval="$with_neXtaw" fi; if test "$withval" = yes ; then cf_x_athena=neXtaw echo "$as_me:14383: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:14386: result: no" >&5 echo "${ECHO_T}no" >&6 fi echo "$as_me:14390: checking if you want to link with Athena-Plus library" >&5 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6 withval= # Check whether --with-XawPlus or --without-XawPlus was given. if test "${with_XawPlus+set}" = set; then withval="$with_XawPlus" fi; if test "$withval" = yes ; then cf_x_athena=XawPlus echo "$as_me:14401: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:14404: result: no" >&5 echo "${ECHO_T}no" >&6 fi cf_x_athena_lib="" if test "$PKG_CONFIG" != none ; then cf_athena_list= test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6" for cf_athena_pkg in \ $cf_athena_list \ ${cf_x_athena} \ ${cf_x_athena}-devel \ lib${cf_x_athena} \ lib${cf_x_athena}-devel do if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6 echo "${as_me:-configure}:14424: testing found package $cf_athena_pkg ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_athena_pkg" 2>/dev/null`" test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6 echo "${as_me:-configure}:14430: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6 echo "${as_me:-configure}:14434: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_pkgconfig_incs do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" cf_x_athena_lib="$cf_pkgconfig_libs" cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` cat >>confdefs.h <&6 echo "${as_me:-configure}:14565: testing ..trimmed $LIBS ..." 1>&5 ;; esac done echo "$as_me:14571: checking for usable $cf_x_athena/Xmu package" >&5 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6 if test "${cf_cv_xaw_compat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 14578 "configure" #include "confdefs.h" $ac_includes_default #include int main (void) { int check = XmuCompareISOLatin1("big", "small"); (void)check; ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:14596: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:14599: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:14602: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:14605: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xaw_compat=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_xaw_compat=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi echo "$as_me:14615: result: $cf_cv_xaw_compat" >&5 echo "${ECHO_T}$cf_cv_xaw_compat" >&6 if test "$cf_cv_xaw_compat" = no then # workaround for broken ".pc" files... case "$cf_x_athena_lib" in (*-lXmu*) ;; (*) test -n "$verbose" && echo " work around broken package" 1>&6 echo "${as_me:-configure}:14627: testing work around broken package ..." 1>&5 cf_save_xmu="$LIBS" cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'` if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then test -n "$verbose" && echo " found package xmu" 1>&6 echo "${as_me:-configure}:14635: testing found package xmu ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "xmu" 2>/dev/null`" test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6 echo "${as_me:-configure}:14641: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6 echo "${as_me:-configure}:14645: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_pkgconfig_incs do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" LIBS="$cf_save_xmu" test -n "$verbose" && echo " ...before $LIBS" 1>&6 echo "${as_me:-configure}:14765: testing ...before $LIBS ..." 1>&5 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'` test -n "$verbose" && echo " ...after $LIBS" 1>&6 echo "${as_me:-configure}:14770: testing ...after $LIBS ..." 1>&5 else cf_pkgconfig_incs= cf_pkgconfig_libs= test -n "$verbose" && echo " ...before $LIBS" 1>&6 echo "${as_me:-configure}:14778: testing ...before $LIBS ..." 1>&5 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'` test -n "$verbose" && echo " ...after $LIBS" 1>&6 echo "${as_me:-configure}:14783: testing ...after $LIBS ..." 1>&5 fi for cf_trim_lib in Xmu Xt X11 do case "$LIBS" in (*-l$cf_trim_lib\ *-l$cf_trim_lib*) LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'` test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6 echo "${as_me:-configure}:14794: testing ..trimmed $LIBS ..." 1>&5 ;; esac done ;; esac fi break else cf_pkgconfig_incs= cf_pkgconfig_libs= : fi done fi if test -z "$cf_x_athena_lib" ; then if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then test -n "$verbose" && echo " found package Xext" 1>&6 echo "${as_me:-configure}:14819: testing found package Xext ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`" test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6 echo "${as_me:-configure}:14825: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6 echo "${as_me:-configure}:14829: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_pkgconfig_incs do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" : else cf_pkgconfig_incs= cf_pkgconfig_libs= echo "$as_me:14950: checking for XextCreateExtension in -lXext" >&5 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXext $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 14958 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XextCreateExtension (void); int main (void) { XextCreateExtension (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:14977: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:14980: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:14983: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:14986: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_Xext_XextCreateExtension=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_Xext_XextCreateExtension=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:14997: result: $ac_cv_lib_Xext_XextCreateExtension" >&5 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" fi fi # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and # in some cases has installed dummy files in the former, other cases replaced # it with a link to the new location). This complicates the configure script. # Check for that pitfall, and recover using pkg-config # # If none of these are set, the configuration is almost certainly broken. if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}" then if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then test -n "$verbose" && echo " found package x11" 1>&6 echo "${as_me:-configure}:15033: testing found package x11 ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`" test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6 echo "${as_me:-configure}:15039: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6 echo "${as_me:-configure}:15043: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_pkgconfig_incs do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" : else cf_pkgconfig_incs= cf_pkgconfig_libs= { echo "$as_me:15163: WARNING: unable to find X11 library" >&5 echo "$as_me: WARNING: unable to find X11 library" >&2;} fi if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then test -n "$verbose" && echo " found package ice" 1>&6 echo "${as_me:-configure}:15170: testing found package ice ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`" test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6 echo "${as_me:-configure}:15176: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6 echo "${as_me:-configure}:15180: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_pkgconfig_incs do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" : else cf_pkgconfig_incs= cf_pkgconfig_libs= { echo "$as_me:15300: WARNING: unable to find ICE library" >&5 echo "$as_me: WARNING: unable to find ICE library" >&2;} fi if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then test -n "$verbose" && echo " found package sm" 1>&6 echo "${as_me:-configure}:15307: testing found package sm ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`" test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6 echo "${as_me:-configure}:15313: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6 echo "${as_me:-configure}:15317: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_pkgconfig_incs do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" : else cf_pkgconfig_incs= cf_pkgconfig_libs= { echo "$as_me:15437: WARNING: unable to find SM library" >&5 echo "$as_me: WARNING: unable to find SM library" >&2;} fi if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then test -n "$verbose" && echo " found package xt" 1>&6 echo "${as_me:-configure}:15444: testing found package xt ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`" test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6 echo "${as_me:-configure}:15450: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6 echo "${as_me:-configure}:15454: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_pkgconfig_incs do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" : else cf_pkgconfig_incs= cf_pkgconfig_libs= { echo "$as_me:15574: WARNING: unable to find Xt library" >&5 echo "$as_me: WARNING: unable to find Xt library" >&2;} fi else LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS" fi cf_have_X_LIBS=no if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then test -n "$verbose" && echo " found package xt" 1>&6 echo "${as_me:-configure}:15587: testing found package xt ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`" test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6 echo "${as_me:-configure}:15593: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6 echo "${as_me:-configure}:15597: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_pkgconfig_incs do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" case "x$LIBS" in (*-lX11*) ;; (*) # we have an "xt" package, but it may omit Xt's dependency on X11 echo "$as_me:15718: checking for usable X dependency" >&5 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6 if test "${cf_cv_xt_x11_compat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 15725 "configure" #include "confdefs.h" $ac_includes_default #include int main (void) { int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0); int rc2 = XClearWindow((Display*) 0, (Window) 0); int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0); int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:15745: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:15748: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:15751: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:15754: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xt_x11_compat=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_xt_x11_compat=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi echo "$as_me:15764: result: $cf_cv_xt_x11_compat" >&5 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6 if test "$cf_cv_xt_x11_compat" = no then test -n "$verbose" && echo " work around broken X11 dependency" 1>&6 echo "${as_me:-configure}:15770: testing work around broken X11 dependency ..." 1>&5 # 2010/11/19 - good enough until a working Xt on Xcb is delivered. if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then test -n "$verbose" && echo " found package x11" 1>&6 echo "${as_me:-configure}:15777: testing found package x11 ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`" test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6 echo "${as_me:-configure}:15783: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6 echo "${as_me:-configure}:15787: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_pkgconfig_incs do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" : else cf_pkgconfig_incs= cf_pkgconfig_libs= test -n "$verbose" && echo " ...before $LIBS" 1>&6 echo "${as_me:-configure}:15910: testing ...before $LIBS ..." 1>&5 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'` test -n "$verbose" && echo " ...after $LIBS" 1>&6 echo "${as_me:-configure}:15915: testing ...after $LIBS ..." 1>&5 fi fi ;; esac echo "$as_me:15923: checking for usable X Toolkit package" >&5 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6 if test "${cf_cv_xt_ice_compat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 15930 "configure" #include "confdefs.h" $ac_includes_default #include int main (void) { int num = IceConnectionNumber(0); (void) num ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:15946: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:15949: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:15952: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:15955: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_xt_ice_compat=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_xt_ice_compat=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi echo "$as_me:15965: result: $cf_cv_xt_ice_compat" >&5 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6 if test "$cf_cv_xt_ice_compat" = no then # workaround for broken ".pc" files used for X Toolkit. case "x$X_PRE_LIBS" in (*-lICE*) case "x$LIBS" in (*-lICE*) ;; (*) test -n "$verbose" && echo " work around broken ICE dependency" 1>&6 echo "${as_me:-configure}:15979: testing work around broken ICE dependency ..." 1>&5 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then test -n "$verbose" && echo " found package ice" 1>&6 echo "${as_me:-configure}:15984: testing found package ice ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`" test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6 echo "${as_me:-configure}:15990: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6 echo "${as_me:-configure}:15994: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_pkgconfig_incs do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then test -n "$verbose" && echo " found package sm" 1>&6 echo "${as_me:-configure}:16113: testing found package sm ..." 1>&5 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`" cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`" test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6 echo "${as_me:-configure}:16119: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6 echo "${as_me:-configure}:16123: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5 cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_pkgconfig_incs do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" : else cf_pkgconfig_incs= cf_pkgconfig_libs= : fi else cf_pkgconfig_incs= cf_pkgconfig_libs= test -n "$verbose" && echo " ...before $LIBS" 1>&6 echo "${as_me:-configure}:16252: testing ...before $LIBS ..." 1>&5 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'` test -n "$verbose" && echo " ...after $LIBS" 1>&6 echo "${as_me:-configure}:16257: testing ...after $LIBS ..." 1>&5 fi ;; esac ;; esac fi cf_have_X_LIBS=yes else cf_pkgconfig_incs= cf_pkgconfig_libs= LDFLAGS="$X_LIBS $LDFLAGS" test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6 echo "${as_me:-configure}:16277: testing checking additions to CFLAGS ..." 1>&5 cf_check_cflags="$CFLAGS" cf_check_cppflags="$CPPFLAGS" cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $X_CFLAGS do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6 echo "${as_me:-configure}:16362: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5 test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6 echo "${as_me:-configure}:16372: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6 echo "${as_me:-configure}:16382: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi if test "x$cf_check_cflags" != "x$CFLAGS" ; then cat >"conftest.$ac_ext" <<_ACEOF #line 16391 "configure" #include "confdefs.h" #include int main (void) { printf("Hello world"); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:16403: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:16406: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:16409: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:16412: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6 echo "${as_me:-configure}:16420: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6 echo "${as_me:-configure}:16425: testing but keeping change to \$CPPFLAGS ..." 1>&5 fi CFLAGS="$cf_check_cflags" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi echo "$as_me:16433: checking for XOpenDisplay" >&5 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6 if test "${ac_cv_func_XOpenDisplay+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 16439 "configure" #include "confdefs.h" #define XOpenDisplay autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ #undef XOpenDisplay #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XOpenDisplay (void); int main (void) { /* The GNU C library defines stubs for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay) #error found stub for XOpenDisplay #endif return XOpenDisplay (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:16470: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:16473: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:16476: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:16479: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_XOpenDisplay=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_func_XOpenDisplay=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi echo "$as_me:16489: result: $ac_cv_func_XOpenDisplay" >&5 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6 if test "$ac_cv_func_XOpenDisplay" = yes; then : else echo "$as_me:16495: checking for XOpenDisplay in -lX11" >&5 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 16503 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XOpenDisplay (void); int main (void) { XOpenDisplay (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:16522: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:16525: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:16528: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:16531: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_X11_XOpenDisplay=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_X11_XOpenDisplay=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:16542: result: $ac_cv_lib_X11_XOpenDisplay" >&5 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" fi fi echo "$as_me:16566: checking for XtAppInitialize" >&5 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6 if test "${ac_cv_func_XtAppInitialize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 16572 "configure" #include "confdefs.h" #define XtAppInitialize autoconf_temporary #include /* least-intrusive standard header which defines gcc2 __stub macros */ #undef XtAppInitialize #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XtAppInitialize (void); int main (void) { /* The GNU C library defines stubs for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize) #error found stub for XtAppInitialize #endif return XtAppInitialize (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:16603: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:16606: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:16609: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:16612: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_func_XtAppInitialize=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_func_XtAppInitialize=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi echo "$as_me:16622: result: $ac_cv_func_XtAppInitialize" >&5 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6 if test "$ac_cv_func_XtAppInitialize" = yes; then : else echo "$as_me:16628: checking for XtAppInitialize in -lXt" >&5 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXt $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 16636 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XtAppInitialize (void); int main (void) { XtAppInitialize (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:16655: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:16658: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:16661: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:16664: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_Xt_XtAppInitialize=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_Xt_XtAppInitialize=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:16675: result: $ac_cv_lib_Xt_XtAppInitialize" >&5 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then cat >>confdefs.h <<\EOF #define HAVE_LIBXT 1 EOF cf_have_X_LIBS=Xt LIBS="-lXt $LIBS" fi fi fi if test "$cf_have_X_LIBS" = no ; then { echo "$as_me:16692: WARNING: Unable to successfully link X Toolkit library (-lXt) with test program. You will have to check and add the proper libraries by hand to makefile." >&5 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with test program. You will have to check and add the proper libraries by hand to makefile." >&2;} fi cf_x_athena_root=$cf_x_athena cf_x_athena_inc="" for cf_path in default \ /usr/contrib/X11R6 \ /usr/contrib/X11R5 \ /usr/lib/X11R5 \ /usr/local do if test -z "$cf_x_athena_inc" ; then cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS" cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS" cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS" LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}" for cf_X_CFLAGS in $X_CFLAGS do case "x$cf_X_CFLAGS" in x-[IUD]*) CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS" ;; *) CFLAGS="$CFLAGS $cf_X_CFLAGS" ;; esac done cf_test=X11/$cf_x_athena_root/SimpleMenu.h if test "$cf_path" != default ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}-I$cf_path/include" echo "$as_me:16733: checking for $cf_test in $cf_path" >&5 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6 else echo "$as_me:16736: checking for $cf_test" >&5 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6 fi cat >"conftest.$ac_ext" <<_ACEOF #line 16740 "configure" #include "confdefs.h" #include #include <$cf_test> int main (void) { ; return 0; } _ACEOF rm -f "conftest.$ac_objext" if { (eval echo "$as_me:16754: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:16757: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest.$ac_objext"' { (eval echo "$as_me:16760: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:16763: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_result=no fi rm -f "conftest.$ac_objext" "conftest.$ac_ext" echo "$as_me:16772: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS" CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS" CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS" if test "$cf_result" = yes ; then test "$cf_path" = default && cf_x_athena_inc=default test "$cf_path" != default && cf_x_athena_inc="$cf_path/include" break fi fi done if test -z "$cf_x_athena_inc" ; then { echo "$as_me:16788: WARNING: Unable to find Athena header files" >&5 echo "$as_me: WARNING: Unable to find Athena header files" >&2;} elif test "$cf_x_athena_inc" != default ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc" fi cf_x_athena_root=$cf_x_athena cf_x_athena_lib="" for cf_path in default \ /usr/contrib/X11R6 \ /usr/contrib/X11R5 \ /usr/lib/X11R5 \ /usr/local do for cf_lib in \ ${cf_x_athena_root} \ ${cf_x_athena_root}7 \ ${cf_x_athena_root}6 do for cf_libs in \ "-l$cf_lib -lXmu" \ "-l$cf_lib -lXpm -lXmu" \ "-l${cf_lib}_s -lXmu_s" do test -n "$cf_x_athena_lib" && break cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS" cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS" cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS" LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}" for cf_X_CFLAGS in $X_CFLAGS do case "x$cf_X_CFLAGS" in x-[IUD]*) CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS" ;; *) CFLAGS="$CFLAGS $cf_X_CFLAGS" ;; esac done cf_test=XawSimpleMenuAddGlobalActions test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs" cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" echo "$as_me:16853: checking for $cf_test in $cf_libs" >&5 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6 cat >"conftest.$ac_ext" <<_ACEOF #line 16856 "configure" #include "confdefs.h" $ac_includes_default #include #include int main (void) { $cf_test((XtAppContext) 0) ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:16873: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:16876: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:16879: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:16882: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_result=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_result=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" echo "$as_me:16891: result: $cf_result" >&5 echo "${ECHO_T}$cf_result" >&6 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS" CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS" CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS" if test "$cf_result" = yes ; then cf_x_athena_lib="$cf_libs" break fi done # cf_libs test -n "$cf_x_athena_lib" && break done # cf_lib done if test -z "$cf_x_athena_lib" ; then { { echo "$as_me:16908: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;} { (exit 1); exit 1; }; } fi cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` cat >>confdefs.h <&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$XCURSES_CONFIG"; then ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog" echo "$as_me:16957: found $ac_dir/$ac_word" >&5 break done fi fi XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG if test -n "$XCURSES_CONFIG"; then echo "$as_me:16965: result: $XCURSES_CONFIG" >&5 echo "${ECHO_T}$XCURSES_CONFIG" >&6 else echo "$as_me:16968: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$XCURSES_CONFIG" && break done fi if test -z "$XCURSES_CONFIG"; then ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG for ac_prog in xcurses-config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:16981: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_XCURSES_CONFIG"; then ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test. else ac_save_IFS=$IFS; IFS=$ac_path_separator ac_dummy="$PATH" for ac_dir in $ac_dummy; do IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog" echo "$as_me:16996: found $ac_dir/$ac_word" >&5 break done fi fi ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG if test -n "$ac_ct_XCURSES_CONFIG"; then echo "$as_me:17004: result: $ac_ct_XCURSES_CONFIG" >&5 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6 else echo "$as_me:17007: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_XCURSES_CONFIG" && break done test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none" XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG fi if test "$XCURSES_CONFIG" != none ; then cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in `$XCURSES_CONFIG --cflags` do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" cf_cv_lib_XCurses=yes else LDFLAGS="$LDFLAGS $X_LIBS" test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6 echo "${as_me:-configure}:17142: testing checking additions to CFLAGS ..." 1>&5 cf_check_cflags="$CFLAGS" cf_check_cppflags="$CPPFLAGS" cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $X_CFLAGS do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6 echo "${as_me:-configure}:17227: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5 test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6 echo "${as_me:-configure}:17237: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6 echo "${as_me:-configure}:17247: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi if test "x$cf_check_cflags" != "x$CFLAGS" ; then cat >"conftest.$ac_ext" <<_ACEOF #line 17256 "configure" #include "confdefs.h" #include int main (void) { printf("Hello world"); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:17268: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:17271: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:17274: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:17277: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then : else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6 echo "${as_me:-configure}:17285: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6 echo "${as_me:-configure}:17290: testing but keeping change to \$CPPFLAGS ..." 1>&5 fi CFLAGS="$cf_check_cflags" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi echo "$as_me:17298: checking for XOpenDisplay in -lX11" >&5 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 17306 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XOpenDisplay (void); int main (void) { XOpenDisplay (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:17325: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:17328: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:17331: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:17334: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_X11_XOpenDisplay=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_X11_XOpenDisplay=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:17345: result: $ac_cv_lib_X11_XOpenDisplay" >&5 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" fi echo "$as_me:17367: checking for XCurses library" >&5 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6 if test "${cf_cv_lib_XCurses+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" cat >"conftest.$ac_ext" <<_ACEOF #line 17390 "configure" #include "confdefs.h" #include char *XCursesProgramName = "test"; int main (void) { XCursesExit(); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:17405: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:17408: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:17411: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:17414: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then cf_cv_lib_XCurses=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 cf_cv_lib_XCurses=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" fi echo "$as_me:17425: result: $cf_cv_lib_XCurses" >&5 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6 fi if test "$cf_cv_lib_XCurses" = yes ; then cat >>confdefs.h <<\EOF #define UNIX 1 EOF cat >>confdefs.h <<\EOF #define XCURSES 1 EOF echo "$as_me:17440: checking for xcurses.h" >&5 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6 if test "${ac_cv_header_xcurses_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 17446 "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:17450: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:17456: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_cv_header_xcurses_h=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_header_xcurses_h=no fi rm -f conftest.err "conftest.$ac_ext" fi echo "$as_me:17475: result: $ac_cv_header_xcurses_h" >&5 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6 if test "$ac_cv_header_xcurses_h" = yes; then cat >>confdefs.h <<\EOF #define HAVE_XCURSES 1 EOF fi else { { echo "$as_me:17486: error: Cannot link with XCurses" >&5 echo "$as_me: error: Cannot link with XCurses" >&2;} { (exit 1); exit 1; }; } fi ;; (*) { { echo "$as_me:17493: error: unexpected screen-value: $cf_cv_screen" >&5 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;} { (exit 1); exit 1; }; } ;; esac : ${cf_nculib_root:=$cf_cv_screen} as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh` echo "$as_me:17501: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6 if eval "test \"\${$as_ac_Lib+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$cf_nculib_root $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 17509 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char _nc_init_pthreads (void); int main (void) { _nc_init_pthreads (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:17528: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:17531: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:17534: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:17537: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 eval "$as_ac_Lib=no" fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:17548: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then cf_cv_ncurses_pthreads=yes else cf_cv_ncurses_pthreads=no fi if test "$cf_cv_ncurses_pthreads" = yes then cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" fi # now look for Cdk cf_pkg_exists=no if test "x${PKG_CONFIG:=none}" != xnone; then for cf_pkg_name in cdk5 cdkw5 do echo "$as_me:17582: checking pkg-config for $cf_pkg_name" >&5 echo $ECHO_N "checking pkg-config for $cf_pkg_name... $ECHO_C" >&6 "$PKG_CONFIG" --exists $cf_pkg_name && cf_pkg_exists=yes echo "$as_me:17585: result: $cf_pkg_exists" >&5 echo "${ECHO_T}$cf_pkg_exists" >&6 test $cf_pkg_exists = yes && break done if test "$cf_pkg_exists" = yes; then cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_pkg_name` cf_pkg_libs=`$PKG_CONFIG --libs $cf_pkg_name` cf_fix_cppflags=no cf_new_cflags= cf_new_cppflags= cf_new_extra_cppflags= for cf_add_cflags in $cf_pkg_cflags do case "$cf_fix_cppflags" in (no) case "$cf_add_cflags" in (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) case "$cf_add_cflags" in (-D*) cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=yes if test "$cf_fix_cppflags" = yes ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue elif test "${cf_tst_cflags}" = "\"'" ; then test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" continue fi ;; esac case "$CPPFLAGS" in (*$cf_add_cflags) ;; (*) case "$cf_add_cflags" in (-D*) cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'` CPPFLAGS=`echo "$CPPFLAGS" | \ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'` ;; esac test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags " cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags" ;; esac ;; (*) test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags " cf_new_cflags="${cf_new_cflags}$cf_add_cflags" ;; esac ;; (yes) test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags " cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags" cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'` test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \ && test -z "${cf_tst_cflags}" \ && cf_fix_cppflags=no ;; esac done if test -n "$cf_new_cflags" ; then test -n "$CFLAGS" && CFLAGS="$CFLAGS " CFLAGS="${CFLAGS}$cf_new_cflags" fi if test -n "$cf_new_cppflags" ; then test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS " CPPFLAGS="${CPPFLAGS}$cf_new_cppflags" fi if test -n "$cf_new_extra_cppflags" ; then test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS " EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags" fi cf_add_libs="$LIBS" # reverse order cf_add_0lib= for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done # filter duplicates for cf_add_1lib in $cf_add_0lib; do for cf_add_2lib in $cf_add_libs; do if test "x$cf_add_1lib" = "x$cf_add_2lib"; then cf_add_1lib= break fi done test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs" done LIBS="$cf_add_libs" fi fi if test "$cf_pkg_exists" = no; then echo "$as_me:17711: checking for cdk.h" >&5 echo $ECHO_N "checking for cdk.h... $ECHO_C" >&6 if test "${ac_cv_header_cdk_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 17717 "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:17721: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:17727: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_cv_header_cdk_h=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_header_cdk_h=no fi rm -f conftest.err "conftest.$ac_ext" fi echo "$as_me:17746: result: $ac_cv_header_cdk_h" >&5 echo "${ECHO_T}$ac_cv_header_cdk_h" >&6 if test "$ac_cv_header_cdk_h" = yes; then : else CPPFLAGS="$CPPFLAGS -I/usr/include/cdk" echo "$as_me:17753: checking for cdk/cdk.h" >&5 echo $ECHO_N "checking for cdk/cdk.h... $ECHO_C" >&6 if test "${ac_cv_header_cdk_cdk_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >"conftest.$ac_ext" <<_ACEOF #line 17759 "configure" #include "confdefs.h" #include _ACEOF if { (eval echo "$as_me:17763: \"$ac_cpp "conftest.$ac_ext"\"") >&5 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1 ac_status=$? $EGREP -v '^ *\+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:17769: \$? = $ac_status" >&5 (exit "$ac_status"); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_cv_header_cdk_cdk_h=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_header_cdk_cdk_h=no fi rm -f conftest.err "conftest.$ac_ext" fi echo "$as_me:17788: result: $ac_cv_header_cdk_cdk_h" >&5 echo "${ECHO_T}$ac_cv_header_cdk_cdk_h" >&6 if test "$ac_cv_header_cdk_cdk_h" = yes; then cat >>confdefs.h <<\EOF #define HAVE_CDK_CDK_H 1 EOF else { { echo "$as_me:17798: error: cannot find cdk header file" >&5 echo "$as_me: error: cannot find cdk header file" >&2;} { (exit 1); exit 1; }; } fi fi echo "$as_me:17806: checking for initCDKScreen in -lcdk" >&5 echo $ECHO_N "checking for initCDKScreen in -lcdk... $ECHO_C" >&6 if test "${ac_cv_lib_cdk_initCDKScreen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcdk $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 17814 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char initCDKScreen (void); int main (void) { initCDKScreen (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:17833: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:17836: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:17839: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:17842: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_cdk_initCDKScreen=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_cdk_initCDKScreen=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:17853: result: $ac_cv_lib_cdk_initCDKScreen" >&5 echo "${ECHO_T}$ac_cv_lib_cdk_initCDKScreen" >&6 if test "$ac_cv_lib_cdk_initCDKScreen" = yes; then LIBS="-lcdk $LIBS" else echo "$as_me:17859: checking for initCDKScreen in -lcdkw" >&5 echo $ECHO_N "checking for initCDKScreen in -lcdkw... $ECHO_C" >&6 if test "${ac_cv_lib_cdkw_initCDKScreen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcdkw $LIBS" cat >"conftest.$ac_ext" <<_ACEOF #line 17867 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char initCDKScreen (void); int main (void) { initCDKScreen (); ; return 0; } _ACEOF rm -f "conftest.$ac_objext" "conftest$ac_exeext" if { (eval echo "$as_me:17886: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:17889: \$? = $ac_status" >&5 (exit "$ac_status"); } && { ac_try='test -s "conftest$ac_exeext"' { (eval echo "$as_me:17892: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:17895: \$? = $ac_status" >&5 (exit "$ac_status"); }; }; then ac_cv_lib_cdkw_initCDKScreen=yes else echo "$as_me: failed program was:" >&5 cat "conftest.$ac_ext" >&5 ac_cv_lib_cdkw_initCDKScreen=no fi rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext" LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:17906: result: $ac_cv_lib_cdkw_initCDKScreen" >&5 echo "${ECHO_T}$ac_cv_lib_cdkw_initCDKScreen" >&6 if test "$ac_cv_lib_cdkw_initCDKScreen" = yes; then LIBS="-lcdkw $LIBS" else { { echo "$as_me:17912: error: cannot find cdk library" >&5 echo "$as_me: error: cannot find cdk library" >&2;} { (exit 1); exit 1; }; } fi fi fi elif $with_cdk --version 2>/dev/null >/dev/null then CFLAGS=`$with_cdk --cflags` LIBS=`$with_cdk --libs` else { { echo "$as_me:17926: error: cannot use $cdk_config script" >&5 echo "$as_me: error: cannot use $cdk_config script" >&2;} { (exit 1); exit 1; }; } fi ### output makefile script ac_config_files="$ac_config_files Makefile.PL" ac_config_commands="$ac_config_commands default" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if cmp -s $cache_file confcache; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. cat >confdef2opt.sed <<\EOF t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote d : quote s,[ `~#$^&*(){}\\|;'"<>?],\\&,g s,\[,\\&,g s,\],\\&,g s,\$,$$,g p EOF # We use echo to avoid assuming a particular line-breaking character. # The extra dot is to prevent the shell from consuming trailing # line-breaks from the sub-command output. A line-break within # single-quotes doesn't work because, if this script is created in a # platform that uses two characters for line-breaks (e.g., DOS), tr # would break. ac_LF_and_DOT=`echo; echo .` DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` rm -f confdef2opt.sed : "${CONFIG_STATUS=./config.status}" ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:18043: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >"$CONFIG_STATUS" <<_ACEOF #! $SHELL # Generated automatically by configure. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. me=\`echo "\$0" | sed -e 's,.*\\/,,'\` debug=false SHELL=\${CONFIG_SHELL-$SHELL} ac_cs_invocation="\$0 \$@" CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS _ACEOF cat >>"$CONFIG_STATUS" <<\_ACEOF # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Name of the executable. as_me=`echo "$0" |sed 's,.*[\\/],,'` if expr a : '\(a\)' >/dev/null 2>&1; then as_expr="expr" else as_expr="false" fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln' else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file as_executable_p="test -f" # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset="unset" else as_unset="false" fi # NLS nuisances. $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } exec 6>&1 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS" fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS" fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS" fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS" fi cat >>"$CONFIG_STATUS" <<\EOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." EOF cat >>"$CONFIG_STATUS" <>"$CONFIG_STATUS" <<\EOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` shift set dummy "$ac_option" "$ac_optarg" ${1+"$@"} shift ;; -*);; *) # This is not an option, so the user has probably given explicit # arguments. ac_need_defaults=false;; esac case $1 in # Handling of the options. EOF cat >>"$CONFIG_STATUS" <>"$CONFIG_STATUS" <<\EOF --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:18218: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) shift CONFIG_FILES="$CONFIG_FILES $1" ac_need_defaults=false;; --header | --heade | --head | --hea ) shift CONFIG_HEADERS="$CONFIG_HEADERS $1" ac_need_defaults=false;; # This is an error. -*) { { echo "$as_me:18237: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done exec 5>>config.log cat >&5 << _ACEOF ## ----------------------- ## ## Running config.status. ## ## ----------------------- ## This file was extended by $as_me 2.52.20231210, executed with CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS > "$ac_cs_invocation" on `(hostname || uname -n) 2>/dev/null | sed 1q` _ACEOF EOF cat >>"$CONFIG_STATUS" <>"$CONFIG_STATUS" <<\EOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile.PL" ) CONFIG_FILES="$CONFIG_FILES Makefile.PL" ;; "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; *) { { echo "$as_me:18283: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if "$ac_need_defaults"; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. : "${TMPDIR=/tmp}" { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=$TMPDIR/cs$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 { (exit 1); exit 1; } } EOF cat >>"$CONFIG_STATUS" <"\$tmp"/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datarootdir@,$datarootdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@runstatedir@,$runstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@DEFS@,$DEFS,;t t s,@LIBS@,$LIBS,;t t s,@VERSION@,$VERSION,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t s,@AR@,$AR,;t t s,@ac_ct_AR@,$ac_ct_AR,;t t s,@PKG_CONFIG@,$PKG_CONFIG,;t t s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t s,@LD@,$LD,;t t s,@ac_ct_LD@,$ac_ct_LD,;t t s,@FULL_AR@,$FULL_AR,;t t s,@ac_pt_FULL_AR@,$ac_pt_FULL_AR,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@DFT_LIB_SUFFIX@,$DFT_LIB_SUFFIX,;t t s,@CPP@,$CPP,;t t s,@GREP@,$GREP,;t t s,@EGREP@,$EGREP,;t t s,@X_CFLAGS@,$X_CFLAGS,;t t s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t s,@X_LIBS@,$X_LIBS,;t t s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t s,@FGREP@,$FGREP,;t t s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t s,@STDC_NORETURN@,$STDC_NORETURN,;t t s,@PERL@,$PERL,;t t s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t s,@cf_cv_screen@,$cf_cv_screen,;t t CEOF EOF cat >>"$CONFIG_STATUS" <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while "$ac_more_lines"; do if test "$ac_beg" -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag else sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag fi if test ! -s "$tmp"/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed # It is possible to make a multiline substitution using escaped newlines. # Ensure that we do not split the substitution between script fragments. ac_BEG=$ac_end ac_END=`expr "$ac_end" + "$ac_max_sed_lines"` sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next if test -s "$tmp"/subs.next; then grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit if test ! -s "$tmp"/subs.edit; then grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit if test ! -s "$tmp"/subs.edit; then if test "$ac_beg" -gt 1; then ac_end=`expr "$ac_end" - 1` continue fi fi fi fi if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr "$ac_sed_frag" + 1` ac_beg=$ac_end ac_end=`expr "$ac_end" + "$ac_max_sed_lines"` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds="cat" fi fi # test -n "$CONFIG_FILES" EOF cat >>"$CONFIG_STATUS" <<\EOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in - | *:- | *:-:* ) # input from stdin cat >"$tmp"/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then { case "$ac_dir" in [\\/]* | ?:[\\/]* ) as_incr_dir=;; *) as_incr_dir=.;; esac as_dummy="$ac_dir" for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do case $as_mkdir_dir in # Skip DOS drivespec ?:) as_incr_dir=$as_mkdir_dir ;; *) as_incr_dir=$as_incr_dir/$as_mkdir_dir test -d "$as_incr_dir" || mkdir "$as_incr_dir" ;; esac done; } ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` else ac_dir_suffix= ac_dots= fi case "$srcdir" in .) ac_srcdir=. if test -z "$ac_dots"; then ac_top_srcdir=. else ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) ac_srcdir="$srcdir$ac_dir_suffix"; ac_top_srcdir="$srcdir" ;; *) # Relative path. ac_srcdir="$ac_dots$srcdir$ac_dir_suffix" ac_top_srcdir="$ac_dots$srcdir" ;; esac if test x"$ac_file" != x-; then { echo "$as_me:18538: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated automatically by config.status. */ configure_input="Generated automatically from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo "$tmp"/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:18556: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:18569: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } EOF cat >>"$CONFIG_STATUS" <<\EOF ac_warn_datarootdir=no if test x"$ac_file" != x-; then for ac_item in $ac_file_inputs do ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"` if test -n "$ac_seen"; then ac_used=`grep '@datarootdir@' "$ac_item"` if test -z "$ac_used"; then { echo "$as_me:18585: WARNING: datarootdir was used implicitly but not set: $ac_seen" >&5 echo "$as_me: WARNING: datarootdir was used implicitly but not set: $ac_seen" >&2;} ac_warn_datarootdir=yes fi fi ac_seen=`grep '${datarootdir}' "$ac_item"` if test -n "$ac_seen"; then { echo "$as_me:18594: WARNING: datarootdir was used explicitly but not set: $ac_seen" >&5 echo "$as_me: WARNING: datarootdir was used explicitly but not set: $ac_seen" >&2;} ac_warn_datarootdir=yes fi done fi if test "x$ac_warn_datarootdir" = xyes; then ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'" fi EOF cat >>"$CONFIG_STATUS" <>"$CONFIG_STATUS" <<\EOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out rm -f "$tmp"/stdin EOF test -n "${FGREP}" || FGREP="grep -F" test -n "${EGREP}" || EGREP="grep -E" cat >>"$CONFIG_STATUS" <>"$CONFIG_STATUS" <<\EOF if test x"$ac_file" != x-; then cp "$tmp/out" "$ac_file" for ac_name in prefix exec_prefix datarootdir do ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"` if test -n "$ac_seen"; then ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"` if test -z "$ac_init"; then ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'` { echo "$as_me:18638: WARNING: Variable $ac_name is used but was not set: $ac_seen" >&5 echo "$as_me: WARNING: Variable $ac_name is used but was not set: $ac_seen" >&2;} fi fi done $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out if test -s "$tmp"/out; then ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out` { echo "$as_me:18649: WARNING: Some variables may not be substituted: $ac_seen" >&5 echo "$as_me: WARNING: Some variables may not be substituted: $ac_seen" >&2;} fi else cat "$tmp"/out fi rm -f "$tmp"/out done EOF cat >>"$CONFIG_STATUS" <<\EOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` case "$ac_dest" in default ) # move confdefs.h aside while using perl, since it gets confused test -f "confdefs.h" && mv confdefs.h confdefs.hdr $PERL Makefile.PL test -f "confdefs.hdr" && mv confdefs.hdr confdefs.h # add to the distclean rule to cleanup files created by the configure script cat >>Makefile <Makefile.old echo "** updated Makefile to allow in-tree test-builds" diff Makefile Makefile.old mv Makefile.old Makefile fi ;; esac done EOF cat >>"$CONFIG_STATUS" <<\EOF { (exit 0); exit 0; } EOF chmod +x "$CONFIG_STATUS" ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: exec 5>/dev/null $SHELL "$CONFIG_STATUS" || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. "$ac_cs_success" || { (exit 1); exit 1; } fi cdk-perl-20240606/Makefile.PL.in0000644000000000000000000000115414156740573014552 0ustar rootroot# # $Author: tom $ # $Date: 2021/12/16 22:45:15 $ # $Revision: 1.6 $ # use ExtUtils::MakeMaker; # # See README and Perl's MakeMaker.pm for guidance in modifying the # LIBS and INC strings. # WriteMakefile( 'NAME' => 'Cdk', 'PREFIX' => '@prefix@', 'VERSION' => '@VERSION@', 'EXE_EXT' => '@EXEEXT@', 'OBJ_EXT' => '.@OBJEXT@', 'LIB_EXT' => '@DFT_LIB_SUFFIX@', 'CC' => '@CC@ @CFLAGS@ @EXTRA_CFLAGS@', 'FULL_AR' => '@FULL_AR@', 'LD' => '@CC@', 'INC' => '@CPPFLAGS@ @EXTRA_CPPFLAGS@', 'LIBS' => ['@LIBS@'], 'RANLIB' => '@RANLIB@', 'clean' => {FILES => 'Makefile.old'}, );