pdmenu/0000755000000000000000000000000012427315273007242 5ustar pdmenu/INSTALL0000644000000000000000000000355612355063701010300 0ustar Compilation and Installation Quick Start: If you're in a hurry to see Pdmenu, just run "make test" now -- pdmenu will be compiled, and will run on a sample pdmenurc file. Then, read the rest of this file. :-) Libraries: To compile Pdmenu, you need the S-Lang library. This can be found at ftp://space.mit.edu/pub/davis/slang/ Optionally, if you wish to compile pdmenu with mouse support, you need to install the GPM library. Find it on a linux ftp site near you. Configuration: Pdmenu uses an autoconf configure script. Typically, if you want the pdmenu binary installed in /usr/bin, and the pdmenurc file installed in /etc, you should type: ./configure --prefix=/usr --sysconfdir=/etc To get a list of all the possible arguments the configure script can use, type: ./configure --help Note that if you have slang installed in a nonstandard location, you might need to set two variables before you are run ./configure in the next step: SLANG_LIB_LOC Set this to the directory where the slang libraries are located. SLANG_H_LOC Set this to the filename where slang.h is located. After running configure, you might want to take a look at makeinfo, which is part of Pdmenu's makefile - there are a few options you can turn on there. You can also look at src/config.h and modify some things there. This is optional. Compilation: Pdmenu has been compiled on many flavors of Unix. You shouldn't have any problems with those OS's, but for others, you're on your own. If you get it to work on something else, please let me know. To build Pdmenu, type: make Testing: To try out the program before installing it, type: make test Installation: To install Pdmenu, become root and type: make install Report any problems to me, . Please see the README and man pages for more information about Pdmenu. pdmenu/autoconf/0000755000000000000000000000000012427315273011060 5ustar pdmenu/autoconf/makeinfo.in0000644000000000000000000000073312355063701013200 0ustar prefix = @prefix@ exec_prefix = @exec_prefix@ BINDIR = @bindir@ MANDIR = @mandir@ LIBDIR = @libdir@/pdmenu SYSCONFDIR = @sysconfdir@ DATADIR = @datadir@ CC = @CC@ INSTALL = @INSTALL@ LN_S = @LN_S@ VER = @VER@ DEFINES = -DETCDIR=\"${SYSCONFDIR}/\" -DVER=\"${VER}\" @DEFS@ \ $(PROFILE) -D__USE_FIXED_PROTOTYPES__ -D_GNU_SOURCE \ -DLOCALEDIR=\"@datadir@/locale\" CFLAGS = $(DEFINES) @gcc_cflags@ @CFLAGS@ LIBS = @LIBS@ $(EFENCE) INSTALL_PROGRAM = ${INSTALL} pdmenu/autoconf/mkinstalldirs0000755000000000000000000000132212355063701013660 0ustar #! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.1 2002/05/23 00:07:47 joey Exp $ errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here pdmenu/autoconf/config.sub0000755000000000000000000010460612355063701013046 0ustar #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011 Free Software Foundation, Inc. timestamp='2011-03-23' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # 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 2 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, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # 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. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # 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: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # 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. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -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 (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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" 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 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -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) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile-* | tilegx-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; # This must be matched before tile*. tilegx*) basic_machine=tilegx-unknown os=-linux-gnu ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # 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) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $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 ;; -mvs* | -opened*) vendor=ibm ;; -os400*) 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 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: pdmenu/autoconf/install-sh0000755000000000000000000001272112355063701013063 0ustar #! /bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # 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. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # 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 $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 pdmenu/autoconf/config.guess0000755000000000000000000012673012355063701013405 0ustar #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011 Free Software Foundation, Inc. timestamp='2011-05-11' # 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 2 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, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # 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. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -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 (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 trap 'exit 1' 1 2 15 # 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. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { 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) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; 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 ; set_cc_for_build= ;' # 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) >/dev/null 2>&1 ; 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 # 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 tupples: *-*-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". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-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. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $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 # 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/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) 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. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $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 [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; 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. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; 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'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; 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) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # 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:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $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; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $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 echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *: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 [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 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 [ -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 [ "${HP_ARCH}" = "" ]; then eval $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 [ ${HP_ARCH} = "hppa2.0w" ] then eval $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 echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $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; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; 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*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; 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:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; 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/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 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/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` 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="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-gnueabi else echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-tilera-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; 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. echo i386-sequent-sysv4 exit ;; 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. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; 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 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; 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 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; 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 configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; 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*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$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 UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *: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 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #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 (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #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 printf ("vax-dec-ultrix\n"); exit (0); # 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; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp 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` /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 exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: pdmenu/examples/0000755000000000000000000000000012427315273011060 5ustar pdmenu/examples/pdmenurc.monitor.in0000644000000000000000000000070712355063701014713 0ustar #!@PDMENU_BINDIR@/pdmenu # # A menu of system monitoring commands. # Note that all the commands in here should be commands that can safely # be run as root without letting the user get a shell or perform any other # mischief. # menu:main:System Monitor Menu: exec:_Log monitor::tail -f /var/log/messages exec:_Statnet::statnet # Note: run top in secure mode! exec:_Top::top s exec:_Watch who's logged on::watch -n 1 w exec:_Procinfo::procinfo -f pdmenu/examples/README0000644000000000000000000000144712355063701011742 0ustar This is a collection of sample pdmenurc files for Pdmenu and support files for the rc's: pdmenurc - A simple pdmenurc file for beginners to modify pdmenurc.monitor - An example of a pdmenurc file I use to display system monitoring info on a dumb terminal. pdmenurc.complex - Shows off advanced features of the pdmenurc file, and how to accomplish some neat tricks in a pdmenurc file. newbie/ - Contributed pdmenurc file and associated helper scripts that tries to offer as much to the newbie unix user as possible. ba.lpd - Cornell University Bear Access Launchpad clone based on pdmenu. If you have an interesting pdmenurc, please send it to joey@kitenet.net for inclusion here. pdmenu/examples/showdir.pl0000755000000000000000000000513112355063701013073 0ustar #!/usr/bin/perl # # Syntax: showdir.pl # editdir.pl # # If called as showdir, it will display files. If called as editdir, # it edits files. # # Where is the directory to display, and # is the optional name of the directory they were on previously. # Doen't specify yourself, it is only used internally by the # program. # # Generates a pdmenurc file at stdout that lets the user view files in the # directory (or edit them if the program is run as "editdir.pl"), and change # to other directories. The file will define a menu named # "show_directory_", unless the option is passed, # in which case the menu will be named if ($0=~m/editdir/ ne undef) { $mode='edit'; $editor=$ENV{EDITOR} || $ENV{VISUAL} || 'pico'; } else { $mode='show'; } $dir=shift; $dir.='/' if $dir=~m#/$# eq undef; # make sure there is a trailing / on $dir. $olddir=shift; $olddir.='/' if $olddir=~m#/$# eq undef; # make sure there is a trailing / on $olddir. $menuname=shift; $menuname="show_directory_$dir" if !$menuname; print "menu:$menuname:Files in $dir:"; print "Select a file to $mode it or select a directory to move into it.\n"; opendir(PWD,$dir); @dirlist=readdir(PWD); foreach $fn (sort(@dirlist)) { # Make a version of $fn that has ':' and '\' and '_' characters # escaped out. $fne=$fn; $fne=~s/\\/\\\\/g; $fne=~s/:/\\:/g; $fne=~s/_/\\_/g; if (-d "$dir/$fn" && $fn ne '.' && $fn ne '..') { # See if the directory the selected is the directory we were just on # previously. if ("$dir$fn/" ne $olddir) { print "group:$fne/\n"; print "exec::makemenu:$0 $dir$fne/ $dir\n"; print "show:::show_directory_$dir$fne/\n"; print "remove:::show_directory_$dir$fne/\n"; print "endgroup\n"; } else { print "exit:$fne/\n"; } } elsif ($fn eq '..' && $dir ne '/') { # Go down one directory. ($parent)=$dir=~m:^(.*)/.*?/:; $parent.='/'; # If they select to go down one directory, and the result is the directory # we were just on previously, then exit the menu instead of displaying # a new one. if ($parent ne $olddir) { print "group:$fne/\n"; print "exec::makemenu:$0 $parent $dir\n"; print "show:::show_directory_$parent\n"; print "remove:::show_directory_$parent\n"; print "endgroup\n"; } else { print "exit:$fne/\n"; } } elsif ($fn ne '.' && $fn ne '..') { if ($mode eq 'show') { print "exec:$fne:display:cat $dir$fn 2>/dev/null\n"; } else { print "exec:$fne:pause:$editor $dir$fn\n"; } } } closedir(PWD); pdmenu/examples/editdir.pl0000777000000000000000000000000012355063701015046 2showdir.plustar pdmenu/examples/pdmenurc.complex.in0000644000000000000000000000356312355063701014676 0ustar #!@PDMENU_BINDIR@/pdmenu # # This pdmenurc shows off the more complicated things that can be done with # Pdmenu. If you get lost, see the pdmenurc(5) man page, or the simpler # pdmenurc files. # Define the main menu. # Note the use of the preproc command to put the hostname in the menu title. preproc:echo menu:main:`hostname` menu # Let's display a list of files in the current directory. Let the # user navigate around by hitting enter on subdirectories. Let them # display a file simply by hitting enter on it. # The showdir script can be in different places, depending on if # pdmenu has been installed yet or not, which is why I try running # it three different ways. group:_File viewer exec::makemenu: (\ ./showdir.pl `pwd` "" show_directory || \ examples/showdir.pl `pwd` "" show_directory || \ @PDMENU_LIBDIR@/pdmenu/showdir.pl `pwd` "" show_directory \ ) 2>/dev/null show:::show_directory remove:::show_directory endgroup # Display a list of users who are logged in, and talk to the one that # is selected. group:_Talk to someone exec::makemenu:\ echo "menu:talk:Talk to someone:Select who to talk to" ; \ for user in `users`; do \ echo "exec:Talk to _$user:pause:talk $user" ; \ done show:::talk remove:::talk endgroup show:_Torture test menu::torture nop exit:E_xit menu:torture:Torture Test Menu:Don't try this at home.. show:_Display this menu again::torture show:_Display main menu again::main group:_Add item to this menu exec::makemenu,edit:\ echo "menu:torture:Torture Test Menu:Don't try this at home.."; \ echo "exec:~Menu Item Title:~:pause:~Menu Item Command:~" endgroup group:_Add item to the main menu exec::makemenu,edit:\ echo menu:main:`hostname` menu ; \ echo "exec:~Menu Item Title:~:pause:~Menu Item Command:~" endgroup helptext:_Date in help text:command: echo -n "at the tone the time is "; date pdmenu/examples/ba.lpd0000755000000000000000000001317112355063701012145 0ustar #!/bin/sh # Bear Access Launchpad based on pdmenu # This file by Randolph Chung 9/25/97 # Pdmenu is written by Joey Hess # requires pdmenu version >= 1.2 # also uses several basic GNU utilities: date, grep, mkfifo and tail OLDTERM=$TERM X=OFF case "$1" in --no-x|-n) X=OFF ;; --with-x|-x) X=ON ;; esac export TERM=vt100 stty rows 24 # some CU telnet servers assume a 24 line display # So this is a hack... sue me :) LINE=`grep -n '^# ba4unix #' $0|cut -d: -f1` if [ "$X" = "ON" ]; then export browser=netscape export tn3270=x3270 export telnet="xterm -e telnet" else export browser=lynx export tn3270=tn3270 export telnet=telnet fi tail --lines=+$LINE "$0" | pdmenu - export TERM=$OLDTERM exit 0 # make dash -n happy gross eh cat <&1|grep Principal:|cut -f2|tr A-Z a-z|sed -e 's/@cit.*//'`)"; \ echo "group:Get kerberos ticket"; \ echo "exec:::kinit"; \ echo "exit"; \ echo "endgroup"; \ echo "group:List kerberos tickets"; \ echo "exec:List kerberos tickets:display:klist 2>&1"; \ echo "exit"; \ echo "endgroup"; \ echo "group:Destroy kerberos tickets"; \ echo "exec::display:kdestroy 2>&1"; \ echo "exit"; \ echo "endgroup"; \ echo "nop"; \ echo "exit:Main Menu" show:::kerb remove:::kerb endgroup exec:Mail::mutt exec:Traveler's Mail::$telnet tmail.mail.cornell.edu exec:CUInfo via web::$browser http://www.cornell.edu/ exec:CUInfo/WWW via Telnet::$telnet www.cornell.edu exec:World Wide Web::$browser exec:Network News::slrn -n -C show:Library resources...::library exec:Just the Facts::$telnet jtf.cit.cornell.edu 1240 exec:Course Technology Information::$browser http://instruct1.cit.cornell.edu/course.html exec:Career Services::$browser http://www.career.cornell.edu/ccs/ exec:Who I Am::$browser http://whoiam.cornell.edu/ exec:File Transfer (FTP)::ncftp show:Campus Hosts (Telnet)...::$telnet nop exit:Quit: menu:library:Library Resources:Library Resources exec:Library catalog::$tn3270 notis.library.cornell.edu show:Circulation Services...::lib_circ exec:Cornell Library Web::$browser http://www.library.cornell.edu/ exec:Cornell Library Web via telnet::$telnet gateway.library.cornell.edu 328 exec:Electronic Journals - WWW::$browser http://www.library.cornell.edu/library/ejournal.html exec:Mann Library Gateway::$browser http://mann.library.cornell.edu/no_javascript/gateway.html show:Abstracts and Indexes...::lib_index show:Cornell Library Catalogs...::lib_cat nop exit:_Main menu...: menu:lib_circ:Circulation Services exec:Booksout::$telnet gateway.library.cornell.edu 343 exec:Course Reserve::$telnet gateway.library.cornell.edu 344 exec:Renew, Recall, ILL and More!::$browser http://www.library.cornell.edu/library/forms.html nop exit:return to Library Resources...: menu:lib_index:Abstracts and Indexes exec:Abstracts & Indexes Linked to the Catalog::$telnet gateway.library.cornell.edu 333 exec:Avery Architectural Index::$telnet gateway.library.cornell.edu 304 exec:Bib. of the History of Art::$telnet gateway.library.cornell.edu 340 exec:Chemical Abstract Student Edition::$telnet gateway.library.cornell.edu 342 exec:Ei Compendex - WWW::$browser http://www.englib.cornell.edu/electronic_resources/compendex.html exec:Engineering Index (Eip)::$telnet gateway.library.cornell.edu 309 exec:English Short Title Catalog::$telnet gateway.library.cornell.edu 329 exec:Foreign Legal Periodicals::$telnet gateway.library.cornell.edu 310 exec:Hispanic Amer. Periodicals::$telnet gateway.library.cornell.edu 312 exec:Hist. of Science & Tech.::$telnet gateway.library.cornell.edu 313 exec:INSPEC::$telnet gateway.library.cornell.edu 317 exec:MathSci Net - WWW::$browser http://www.ams.org/mathscinet/ exec:Periodical Contents Index - WWW::$browser http://pci.chadwyck.com/ exec:RILM (Music Abstracts)::$telnet gateway.library.cornell.edu 341 exec:UnCover (Article Delivery)::$telnet gateway.library.cornell.edu 327 exec:Books in Print::$tn3270 cbsserv1.cbs.cornell.edu 1242 exec:Cornell Lecture Recordings 1975-1995::$telnet gopher2.cit.cornell.edu 301 nop exit:return to Library Resources...: menu:lib_cat:Library catalogs exec:Library catalog::$tn3270 notis.library.cornell.edu exec:CUL Experimental WWW Catalog::$browser http://www.library.cornell.edu/catalog/ exec:Cornell Medical College Catalog::$telnet gateway.library.cornell.edu 319 exec:CRL Catalog (Chicago)::$telnet gateway.library.cornell.edu 308 exec:OCLC (WorldCat)::$telnet gateway.library.cornell.edu 321 exec:RLIN/Eureka::$telnet gateway.library.cornell.edu 325 nop exit:Library resources...: menu:$telnet:Campus Hosts:Campus Hosts exec:GAEA (CISER)::$telnet gaea.ciser.cornell.edu exec:INSTRUCT1 ::$telnet instruct1.cit.cornell.edu exec:INSTRUCT2 ::$telnet instruct2.cit.cornell.edu exec:INSTRUCT3 ::$telnet instruct3.cit.cornell.edu exec:RSRCH1 ::$telnet rsrch1.cit.cornell.edu exec:SAFETYNET ::$telnet safetynet.cit.cornell.edu exec:CORNELLC ::$tn3270 cornellc.cit.cornell.edu exec:Telnet ::$telnet exec:TN3270 ::$tn3270 nop exit:Main menu...: pdmenu/examples/pdmenurc.in0000644000000000000000000000146012355063701013222 0ustar #!@PDMENU_BINDIR@/pdmenu # # Note that the above bang-path isn't required, but it lets you run this # file directly as a sort of pdmenu script. # Sample menus for Pdmenu. # Define the main menu. menu:main:Main Menu show:_Internet menu..::internet exec:_Change your password:pause:passwd exec:_Directory listing:truncate:ls -l exec:_Change directory:edit,set:echo PWD=~set to?:~ exec:_Who's online?:truncate:echo "These users are online:";w nop exit:_Exit # This is a submenu. menu:internet:Internet:Internet programs exec:_Mail::putt exec:_News::slrn -C -n exec:_WWW::lynx http://www.yahoo.com/ exec:_Talk:edit,pause:ytalk -x ~Talk to who?:joey~ exec:_Finger:edit,display:finger ~Enter address to finger:~ 2>/dev/null exec:_Telnet:edit,pause:telnet ~Telnet to where?:~ nop exit:_Main menu.. pdmenu/examples/newbie/0000755000000000000000000000000012427315273012331 5ustar pdmenu/examples/newbie/pdmenurc.newbie.in0000644000000000000000000002263612355063701015753 0ustar #!@PDMENU_BINDIR@/pdmenu # Note that the above bang-path isn't required, but it lets you run this # file directly as a sort of pdmenu script. # this pdmenurc file is adapted from the default /etc/pdmenurc and # other example files, and is put together with the newbie linux user # in mind; i'm trying to provide him/her with as many tools as # possible. it was originally constructed for a couple who were given # a 386 by a friend. with linux and pdmenu, i was able to turn it # into a respectible internet machine. # # please read the comments for suggestions of ways you may # make it useful to your new unix user, and send any feedback to # jeff.covey@pobox.com # Set a pleasing color scheme. color:desktop:white:blue color:title:yellow:red color:base:yellow:red # Define the main menu. # Note the use of the preproc command to put the hostname in the menu title. preproc:echo menu:main:`whoami`@`hostname`\'s menu show:_Internet menu...::internet show:_Edit files...::file-editing # uncomment this if your users need to use the floppy drive, and look # at the menu for this below. this setup uses sudo, which you'll have # to install and configure as well. # show:Use a _floppy disk...::floppy show:System _Tools...::system-tools # if you want your user(s) to have access to the command line, # uncomment the next line. # exec:Drop to a _shell::echo "When you're done, type 'exit' to return to the menu.";/bin/sh -login # Autodetect if rpm is available, and if so, enable the redhat menu. preproc:\ if rpm >/dev/null 2>/dev/null ; then \ echo "show:_Redhat menu...::redhat" ; \ fi show:_Help!::help nop # if you have some games installed, you could make a menu item for # them here. i make entries for a number of bsd games below. # show:Play a game...::games # check that the path to fortune is correct here exec:Give a random quote:display:/usr/games/fortune exec:Display the time:display:date nop # if your user(s) should be able to shutdown or reboot the system, # uncomment this line and the menu below, and configure sudo. # show:Shutdown the computer...::shutdown exit:E_xit # This is a submenu. menu:internet:Internet Programs # if you're connecting with a modem, uncomment these once you've # configured ppp # exec:Connect to the internet::/usr/bin/sudo /usr/sbin/ppp-on # exec:Disconnect from the internet::/usr/bin/sudo /usr/sbin/ppp-off # show:Am I connected?...::modem-status # nop # if this is a system that dials in to a server to retrieve mail, you # may want to set your user(s) up with fetchmail and uncomment the # next line. # exec:_Download Mail:pause:echo "fetching mail...";fetchmail # in my case, pine was their login shell on the isp, so i was able to # just use the following line instead. # exec:Read/write _Mail/Newsgroups::rlogin -l foo bar.com # exec:Read _Newsgroups::tin -r exec:Surf the _Web::lynx exec:_Internet Relay Chat::irc # if it's a home computer, this probably isn't much use to them, but # uncomment it if you have a use for it. # group:_Talk to other users online # exec::makemenu: \ # echo "menu:talk:Select the user you want to talk to"; \ # for u in `users`; do \ # echo "exec:$u::talk $u"; \ # done # show:::talk # remove:::talk # endgroup exec:_Telnet:edit,pause:telnet ~Telnet to where?:~ exec:_Finger:edit,display:finger ~Enter address to finger:~ exec:_Ping:edit,pause:echo "Press Ctrl-c to stop pinging"\ ;ping ~Ping what server?:~ nop exec:Minicom::minicom nop exit:_Main menu... #modem-status - uncomment this if they're using a modem # menu:modem-status:Modem status # uncomment the next line to let your user(s) check the status of the # modem. this assumes your modem is on /dev/modem. # exec:Am I _connected?:display:/usr/lib/pdmenu/modem-check # exec:_Display system messages:display:echo "Recent system messages:";\ # tail /var/log/messages # nop # exit:_Back... #system tools menu:system-tools:System Tools exec:_See how much disk space is free:display:echo \ "Free space on filesystems:"; df exec:_Who's online?:display:echo "These users are online:";w exec:_Display system messages:display:echo "Recent system messages:";\ tail /var/log/messages exec:_Change your password:pause:passwd nop exit:_Main menu... #floppy handling # menu:floppy:Use a floppy disk # exec:_Mount a dos/windows floppy:pause:mount /a && \ # echo "Floppy disk mounted on /a"; \ # echo "Don't forget to unmount it when you're done with it!" # exec:_Unmount a floppy:pause:umount /a && \ # echo "Floppy disk unmounted from /a" # show:_Format (erase) a dos/windows floppy...::floppy-format # nop # exit:_Main menu... #formatting floppies # menu:floppy-format:This will erase everything on your floppy!:This will erase everything on your floppy! # exec:_Format (erase) a dos/windows floppy:pause:sudo fdformat /dev/fd0H1440 && \ # sudo /sbin/mkfs -t msdos /dev/fd0 && \ # echo "Floppy successfully formatted." # exit:_Don't format the floppy #file editing menu:file-editing:Edit Files exec:Edit a _new file::pico # Note that this checks in several places for editdir.pl, # so this will work before and after pdmenu is actually installed # on the system. group:Edit an _existing file exec::makemenu: ( \ ../editdir.pl `pwd` "" edit-existing || \ examples/editdir.pl `pwd` "" edit-existing || \ @PDMENU_LIBDIR@/pdmenu/editdir.pl `pwd` "" edit-existing \ ) 2>/dev/null show:::edit-existing remove:::edit-existing endgroup nop # i highly recommend installing the gnu midnight commander for your # user(s) and uncommenting the next line. alternately, it shouldn't # be too hard to make pdmenu menu items that are front-ends for "rm", # "cp", "mkdir", and friends, if anyone feels like doing it. # exec:_Manage your files::mc # nop exit:_Main menu... #games menu # menu:games:Games # show:Adventure games...::adventure-games # show:Card games...::card-games # show:Board games...::board-games # exec:Hangman::/usr/games/hangman # exec:Bog::bog # exec:Hunt the Wumpus::/usr/games/wumpus # exec:Make anagrams:edit,pause:agm ~Word(s) from which to make anagrams:~ | more # nop # exit:_Main menu... #adventure games menu # menu:adventure-games:Adventure Games # exec:Adventure:pause:/usr/games/advent # exec:Battlestar:pause:/usr/games/battlestar # exec:The Golden Baton:pause:/usr/games/scottfree 1_baton # exec:The Time Machine:pause:/usr/games/scottfree 2_timemachine # exec:Arrows of Death, Part One:pause:/usr/games/scottfree 3_arrow1 # exec:Arrows of Death, Part Two:pause:/usr/games/scottfree 4_arrow2 # exec:Escape from Pulsar 7:pause:/usr/games/scottfree 5_pulsar7 # exec:Circus:pause:/usr/games/scottfree 6_circus # exec:Feasibility Experiment:pause:/usr/games/scottfree 7_feasibility # exec:Wizard of Akyrz:pause:/usr/games/scottfree 8_akyrz # exec:Perseus and Andromeda:pause:/usr/games/scottfree 9_perseus # exec:Ten Little Indians:pause:/usr/games/scottfree A_tenlittleindians # exec:Waxworks:pause:/usr/games/scottfree B_waxworks # exec:Paranoia::/usr/games/paranoia # nop # exit:_Back... #card games menu # menu:card-games:Card Games # exec:Cribbage::/usr/games/cribbage # exec:Canfield::/usr/games/canfield # exec:Go fish::/usr/games/fish # nop # exit:_Main menu... #board games # menu:board-games:Board Games:Board Games # exec:Yahtzee::/usr/games/yahtzee # exec:Backgammon::/usr/games/backgammon # exec:Monopoly::/usr/games/monop # nop # exit:_Main menu... #help menu menu:help:Help # if you want to make yourself available to your user(s) if he/she # gets stuck, uncomment the next line and add your email address to # it. # exec:_Send a message to your system administrator::pine foo@bar # i used lyx to create a linux sgml manual for them, then printed it # out in postscript format, and also generated it as html with a menu # item for it here. # exec:Read the mushskeet manual::lynx /usr/local/lib/mushskeet-manual/mushskeet-manual.html exec:Help on _using this menu system::man pdmenu exec:Read a _Man Page:edit:man ~Read the manual page for what command?:~ # i used emacs for info because i've never gotten the keys to work # correctly in the stand-alone info program; you may have better # luck. if you do uncomment the line below, be nice and add a line to # /usr/share/info/dir explaining that they need to hit C-x C-c to exit # emacs. # exec:Use the _info documentation system::emacs-nox -e info # if you have the howtos installed, uncomment the next line. # exec:Read the _Howtos::lynx /usr/share/doc/HTML/ldp/HOWTO-INDEX.html nop exit:_Main menu... #redhat menu menu:redhat:Redhat group:Get _info about an installed package exec::makemenu: \ echo "menu:rpm-info:Select the package about which you want info"; \ for p in `rpm -qa`; do \ echo "exec:$p:display:rpm -qi $p"; \ done show:::rpm-info remove:::rpm-info endgroup group:_List the files that belong to an installed package exec::makemenu: \ echo "menu:rpm-file-list:Select the package for which you want to list the files"; \ for p in `rpm -qa`; do \ echo "exec:$p:display:rpm -ql $p"; \ done show:::rpm-file-list remove:::rpm-file-list endgroup exec:List which package a _command belongs to:edit,display:/usr/lib/pdmenu/rpm-info-on-command ~What command?:~ exec:List which package a _file belongs to:edit,display:rpm -qif ~What file?:~ 2> /dev/null nop exit:_Main menu... #shutdown menu # menu:shutdown:Shutdown the computer # exec:_Shutdown the computer::/usr/bin/sudo /sbin/shutdown -h now # exec:_Reboot the computer::/usr/bin/sudo /sbin/shutdown -r now # nop # exit:_Main menu... pdmenu/examples/newbie/modem-check0000755000000000000000000000025212355063701014426 0ustar #! /bin/sh if [ -f /var/lock/LCK..modem ] 2> /dev/null; then echo "Yes, your modem seems to be in use." else echo "No, your modem appears to be disconnected." fi pdmenu/examples/newbie/rpm-info-on-command0000755000000000000000000000032412355063701016027 0ustar #! /bin/sh FILE_WITH_PATH=`which $1` if [ -f $FILE_WITH_PATH ] 2> /dev/null; then OWNING_PACKAGE=`rpm -qf $FILE_WITH_PATH` rpm -qi $OWNING_PACKAGE else echo "There's no such command in your path." fi pdmenu/README0000644000000000000000000000634412371442031010120 0ustar Pdmenu, a simple menu program: By Joey Hess This program is Copyright 1995-2011 by Joey Hess, and may be distributed under the terms of the GPL. What is Pdmenu? Pdmenu is a menuing system for Unix. It is designed to be easy to use, and is suitable for a login shell for inexperienced users, or it can just be ran at the command line as a handy menu. Pdmenu features color support and GPM mouse support at the linux console. It compiles on most varieties of Unix. See Pdmenu's man pages for information about the format of the pdmenurc file, and how to use the program. I was prompted to write Pdmenu when I took a look at a shell script that used dialog to generate similar menus. The shell script was huge, complicated, and ugly, and had to be modified manually to add anything to the menu. I hope that Pdmenu is better. :-) For more info, visit Pdmenu's home page at: http://joeyh.name/code/pdmenu/ Please see INSTALL for building and installation instructions. Precompiled binaries: rpm: If you use a RPM based distribution, a spec file is included in the source tarball (redhat/pdmenu.spec) and can be used to build a RPM. deb: If you use Debian Linux, a .deb of pdmenu is available from ftp.debian.org or a mirror in the usual location. The pdmenu source tree will also build a .deb on its own on a debian system, just run "dpkg-buildpackage". A few sample uses of Pdmenu: Here are a few ways I've used Pdmenu: * Just a menu which users can get by typing pdmenu at the prompt. (Suprise..) * As a login shell. (Just change their shell, it works fine.) * A neat trick is to put something like #!/usr/bin/pdmenu on the top line of a pdmenu config file, and make the file executable. * As a menu displayed when the system boots, or as a system monitor menu. There are several sample pdmenurc files that show off the features of Pdmenu in the examples/ subdirectory. Note that you try these at your own risk. If you put in a command that lets a user get root, it's your own fault, not mine. Thanks go out to: Rob Lesan, who builds RPMs of pdmenu for me, since I don't have a redhat machine. Randolph Chung, who helped me learn C and Linux, and who has put up with all my questions to this day. And he threw together mouse support for Pdmenu in no time flat one night, too. Christiaan Keet, who asked for a menu program, and got it, and who helped me with beta testing. John E. Davis, creator of the S-Lang library, who's been willing to answer questions about the less-documented parts. Lassen Software, Inc, whose dos-based Program Manager Plus software was the inspiration for this program. All the people mentioned in debian/changelog who sent in patches, translations, etc, and have kept pdmenu under development much longer than I would have expected. Please, send me feedback. I welcome any comments, feature requests, or bug reports. Send them to joey@kitenet.net. Please include the version number of pdmenu, slang, and your operating system in bug reports. If you are interested in becoming a Pdmenu beta tester, and/or being notified of new releases, please mail me about it, and I'll add you to the announce list. Joey Hess, pdmenu/Makefile0000644000000000000000000000603512355063701010702 0ustar CFLAGS_FOR_GCC = -Wall SRCDIR = src XGETTEXT = xgettext --keyword=_ --keyword=N_ --add-comments=TRANS: POTFILE = po/pdmenu.pot SRCFILES = $(wildcard $(SRCDIR)/*.c) OBJFILES := $(SRCFILES:%.c=%.o) LANGS = fr ru es MOS := $(addprefix po/, $(addsuffix .mo, $(LANGS))) LOCALEDIR = $(INSTALL_PREFIX)/usr/share/locale all: pdmenu $(POTFILE) $(MOS) include makeinfo pdmenu: .dep $(OBJFILES) ${CC} -o pdmenu $(OBJFILES) $(CFLAGS) $(LIBS) depend: .dep dep: .dep .dep: src/*.h src/*.c mv makeinfo makeinfo.bak awk '$$0 ~ /^# DO NOT REMOVE THIS LINE/ { exit } { print }' \ < makeinfo.bak > makeinfo -rm -f makeinfo.bak echo "# DO NOT REMOVE THIS LINE" >> makeinfo $(CC) -MM $(SRCFILES) | sed 's!^\(.*\)\.o[ :]!$(SRCDIR)/\1.o:!' \ >> makeinfo touch .dep distclean: clean -$(MAKE) -C po distclean find . -name '\#*\#' -o -name '*.bak' -o -name '.??*' -o \ -name '*~' -o -name '.gdb_history' -exec rm {} \; rm -f examples/pdmenurc examples/pdmenurc.monitor \ examples/pdmenurc.complex examples/newbie/pdmenurc.newbie \ src/slang.h config.cache config.log config.status makeinfo \ .dep gmon.out doc/pdmenu.man doc/pdmenurc.man clean: $(MAKE) $(POTFILE) # make sure translators' input is ready rm -f $(OBJFILES) pdmenu $(MOS) install: all $(INSTALL) -d $(INSTALL_PREFIX)/$(BINDIR) \ $(INSTALL_PREFIX)/$(MANDIR)/man1 \ $(INSTALL_PREFIX)/$(MANDIR)/man5 \ $(INSTALL_PREFIX)/$(SYSCONFDIR) \ $(INSTALL_PREFIX)/$(DATADIR)/pdmenu $(INSTALL_PROGRAM) pdmenu $(INSTALL_PREFIX)/$(BINDIR) $(INSTALL) doc/pdmenu.man $(INSTALL_PREFIX)/$(MANDIR)/man1/pdmenu.1 -m 0644 $(INSTALL) doc/pdmenurc.man $(INSTALL_PREFIX)/$(MANDIR)/man5/pdmenurc.5 -m 0644 if [ -e $(INSTALL_PREFIX)/$(SYSCONFDIR)/pdmenurc ]; then \ echo "Backing up $(INSTALL_PREFIX)/$(SYSCONFDIR)/pdmenurc to $(INSTALL_PREFIX)/$(SYSCONFDIR)/pdmenurc.old .." ; \ cp $(INSTALL_PREFIX)/$(SYSCONFDIR)/pdmenurc $(INSTALL_PREFIX)/$(SYSCONFDIR)/pdmenurc.old ; \ fi $(INSTALL) examples/pdmenurc $(INSTALL_PREFIX)/$(SYSCONFDIR)/pdmenurc -m 0644 $(INSTALL) examples/showdir.pl $(INSTALL_PREFIX)/$(DATADIR)/pdmenu cd $(INSTALL_PREFIX)/$(DATADIR)/pdmenu && $(LN_S) -f showdir.pl editdir.pl for lang in $(LANGS); do \ [ ! -d $(LOCALEDIR)/$$lang/LC_MESSAGES/ ] && mkdir -p $(LOCALEDIR)/$$lang/LC_MESSAGES/; \ install -m 644 po/$$lang.mo $(LOCALEDIR)/$$lang/LC_MESSAGES/pdmenu.mo; \ done test: pdmenu ./pdmenu examples/pdmenurc debian: dpkg-buildpackage -tc -rfakeroot configure: configure.ac autoconf config.status: configure ./configure makeinfo: autoconf/makeinfo.in config.status ./config.status .c.o: cd $(SRCDIR) && $(CC) -c ../$< $(CFLAGS) $(POTFILE): $(SRCFILES) $(XGETTEXT) -o $(POTFILE)-update $(SRCFILES) if test -f $(POTFILE); then \ if diff -I '^"POT-Creation-Date:' -I '^Report-Msgid-Bugs-To:' $(POTFILE) $(POTFILE)-update >/dev/null 2>&1; then \ rm -f $(POTFILE)-update; \ else \ rm -f $(POTFILE); \ mv $(POTFILE)-update $(POTFILE); \ fi; \ else \ mv $(POTFILE)-update $(POTFILE); \ fi %.mo: %.po msgfmt -o $@ $< .PHONY: debian test install clean distclean pdmenu/configure.ac0000644000000000000000000001342712371443531011534 0ustar dnl Written by Joey Hess with some help from autoscan. dnl Process this file with autoconf to generate the configure script. AC_INIT(pdmenu) AC_CONFIG_SRCDIR([src/pdmenu.c]) AC_CONFIG_AUX_DIR(autoconf) PACKAGE=pdmenu AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") AC_SUBST(PACKAGE) dnl List of all translations. ALL_LINGUAS="" AM_GNU_GETTEXT dnl Checks for programs. AC_PROG_CC dnl If we are using gcc for a compiler, I'd like to add some cflags which dnl are specified in the CFLAGS_FOR_GCC variable in the Makefile. if test "$GCC" = yes ; then gcc_cflags='$(CFLAGS_FOR_GCC)' fi AC_SUBST(gcc_cflags) dnl Check to see if the C compiler can handle the -pipe flag. dnl To make this work, I set CFLAGS to temporarily include -pipe. oldcflags="$CFLAGS" CFLAGS="$CFLAGS -pipe" AC_MSG_CHECKING(whether cc accepts -pipe) AC_TRY_COMPILE(,,echo yes,echo no; CFLAGS="$oldcflags") AC_PROG_LN_S AC_PROG_INSTALL AC_MSG_CHECKING(if install -d works) $ac_cv_path_install -d ./test/test2 2>/dev/null if test -d ./test/test2 ; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) INSTALL='autoconf/install-sh -c' fi dnl Clean up our mess rmdir ./test/test2 2>/dev/null rmdir ./test 2>/dev/null dnl Let the user specify an alternate location for the libs. dnl I have to add this to CFLAGS, instead of to LIBS, to placate dnl some compiler that wanted -L before -l . if test "$SLANG_LIB_LOC" != "" ; then CFLAGS="-L$SLANG_LIB_LOC $CFLAGS" fi dnl The function we check for in libslang is important, because dnl we need to make sure we have the right version of slang. AC_CHECK_LIB(slang, SLsig_block_signals,, AC_MSG_ERROR(can't find required slang library or library is obsolete. Try setting the SLANG_LIB_LOC environment variable to point to the directory containing the slang library.)) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(getopt.h) dnl The slang headers can be in several places. AC_CHECK_HEADERS($SLANG_H_LOC, slang_h_ok=yes) if test "$slang_h_ok" = yes ; then SLANG_H=$SLANG_H_LOC else AC_CHECK_HEADERS(slang.h slang/slang.h, break) if test "$ac_cv_header_slang_h" = yes ; then SLANG_H=slang.h elif test "$ac_cv_header_slang_slang_h" = yes ; then SLANG_H=slang/slang.h else AC_MSG_ERROR(can't find required slang.h header file. Try setting the SLANG_H_LOC environment variable to point to it.) fi fi AC_SUBST(SLANG_H) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST dnl AC_HEADER_TIME dnl Checks for library functions. AC_TYPE_SIGNAL AC_CHECK_FUNCS(setenv) AC_CHECK_FUNCS(getopt_long, , [ AC_MSG_WARN(long command line switches are disabled.) AC_CHECK_FUNCS(getopt, , AC_MSG_WARN(all command line switches are disabled!) ) ]) AC_CHECK_FUNCS(asprintf) # Allow user to control whether gpm is linked in. AC_ARG_WITH([gpm], AC_HELP_STRING([--with-gpm], [link in gpm (default is YES if available)]), [ac_cv_use_gpm=$withval], [ac_cv_use_gpm=yes]) AC_CACHE_CHECK([whether to use gpm], [ac_cv_use_gpm], [ac_cv_use_gpm=yes]) dnl Checks for gpm, first the headers, then functions needed, then the library. if test "$ac_cv_use_gpm" = yes ; then AC_CHECK_HEADERS(gpm.h) dnl Mouse support requires the select function. AC_CHECK_FUNCS(select) if test "$ac_cv_header_gpm_h" = yes && test "$ac_cv_func_select" = yes ; then AC_CHECK_LIB(gpm, Gpm_Close) if test "$ac_cv_lib_gpm_Gpm_Close" != yes ; then AC_MSG_WARN(pdmenu will be built without GPM mouse support.) else AC_DEFINE(GPM_SUPPORT) fi else AC_MSG_WARN(pdmenu will be built without GPM mouse support.) fi fi AC_CHECK_PROG(DATE_PROG,date,yes,no) if test "$DATE_PROG" = yes ; then AC_MSG_CHECKING(for GNU compatable date utility) GNU_DATE_TEST=`date +"%B %d %Y %d %b %y" 2>/dev/null` if test "$GNU_DATE_TEST" = "" ; then AC_MSG_RESULT(not found) else AC_MSG_RESULT(found) AC_MSG_CHECKING(the date) BUILD_DATE=`date +"%B %d %Y"` AC_SUBST(BUILD_DATE) AC_MSG_RESULT($BUILD_DATE) fi fi AC_PROG_AWK if test "$AWK" != "" ; then AC_MSG_CHECKING(pdmenu's version) VER=`$AWK -F "[[()]]" '/pdmenu \(.*\) / {print $2 ; exit}' , 2004. # # msgid "" msgstr "" "Project-Id-Version: pdmenu 1.2.83\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2004-06-02 10:56-0700\n" "PO-Revision-Date: 2004-06-02 21:25+0200\n" "Last-Translator: Jean-Luc Coulon (f5ibh) \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-15\n" "Content-Transfer-Encoding: 8bit" #. Display wait text. #: src/actions.c:95 msgid "Please wait..." msgstr "Veuillez patienter..." #: src/actions.c:108 msgid "Press Esc to close window." msgstr "Pressez la touche « Échap » pour fermer la fenêtre." #: src/actions.c:200 msgid "Command returned no output" msgstr "La commande n'a produit aucune sortie." #. pause 1st #: src/actions.c:316 msgid "Press Enter to return to Pdmenu." msgstr "Pressez la touche « Entrée » pour retourner à Pdmenu." #: src/error.c:31 #, c-format msgid "pdmenu error: " msgstr "Erreur de pdmenu : " #: src/inputbox.c:53 src/inputbox.c:77 msgid "Press Enter when done, or Esc to cancel" msgstr "Pressez « Entrée » pour valider ou « Échap » pour abandonner" #. They hit a bad key. Display help. #: src/menu.c:427 msgid "Arrow keys move, Esc exits current menu, Enter runs program" msgstr "" "Les touches directionnelles permettent de se déplacer, « Échap » quitte " "le menu en cours, « Entrée » lance le programme " #: src/menu.c:458 #, c-format msgid "Attempt to remove menu \"%s\" failed: menu is on screen." msgstr "" "La tentative pour supprimer le menu « %s » a échoué : le menu est affiché." #: src/pdmenu.c:29 #, c-format msgid "" "Usage: pdmenu [options] [menufiles ..]\n" "\tmenufiles the rc files to read instead of\n" "\t ~/.pdmenurc or %spdmenurc\n" "\t-h --help display this help\n" "\t-c --color enable color\n" "\t-u --unpark cursor moves to current selection\n" "\t-q --quit 'q' key does not exit program\n" "\t-mmenuid --menu=menuid display menu with this menuid on startup\n" "\t-v --version show version information\n" "\t-r --retro draw menus using old style\n" "\t-l --lowbit do not use high bit line drawing characters\n" "\t-n --numeric do not use 8 and 2 for moving up and down\n" msgstr "Usage : pdmenu [options] [fichiers de menus...]\n" "\tfichier de menus fichiers rc à lire à la place de\n" "\t ~/.pdmenurc ou %spdmenurc\n" "\t-h --help afficher cette aide\n" "\t-c --color mettre en couleurs\n" "\t-u --unpark déplacer le curseur vers la sélection en cours\n" "\t-q --quit la touche « q » ne permet pas de quitter le\n" "\t programme\n" "\t-midmenu --menu=idmenu afficher le menu avec cet idmenu au démarrage\n" "\t-v --version afficher la version du programme\n" "\t-r --retro dessiner les menus en utilisant l'ancien style\n" "\t-l --lowbit ne pas utiliser les caractères semi-graphiques\n" "\t-n --numeric ne pas utiliser les touches 8 et 2 pour se\n" "\t déplacer vers le haut ou vers le bas\n" #: src/pdmenu.c:44 msgid "(Long options are disabled.)" msgstr "(Les options longues ne sont pas actives)." #: src/pdmenu.c:51 #, c-format msgid "Pdmenu %s GPL Copyright (C) 1995-2002 by Joey Hess \n" msgstr "" "menu %s GPL Copyright (C) 1995-2002 par Joey Hess \n" #: src/pdmenu.c:159 msgid "Unable to find any pdmenurc files, or all pdmenurc files are empty." msgstr "" "Impossible de trouver aucun fichier pdmenurc ou tous ces fichiers sont vides." #. Couldn't find the menu if we get to here. #: src/pdmenu.c:170 #, c-format msgid "Menu \"%s\" is not defined." msgstr "Le menu « %s » n'est pas défini." #: src/pdmenu.c:197 msgid "Pdmenu" msgstr "Pdmenu" #: src/rc.c:186 #, c-format msgid "%s:%i Invalid screen part name, \"%s\"." msgstr "%s:%i nom de la partie d'écran incorrecte, « %s »." #: src/rc.c:197 #, c-format msgid "%s:%i \"endgroup\" found outside of group block." msgstr "%s:%i « endgroup » placé en dehors d'un bloc de groupe." #: src/rc.c:201 #, c-format msgid "%s:%i Invalid or misplaced keyword, \"%s\"." msgstr "%s:%i mot-clé incorrect ou mal placé, « %s »." #: src/rc.c:241 #, c-format msgid "%s:%i Nested \"group\" commands." msgstr "%s:%i commandes « group » imbriquées." #: src/rc.c:333 #, c-format msgid "%s: \"group\" command used without \"endgroup\"." msgstr "%s : commande « group » utilisée sans « endgroup »." #: src/screen.c:147 msgid "Unable to initialize key mappings." msgstr "Impossible d'initialiser les affectations des touches." #: src/screen.c:193 msgid "Error: The screen is too small." msgstr "Erreur : l'écran est trop petit." #: src/window.c:36 #, c-format msgid "Welcome to Pdmenu %s by Joey Hess " msgstr "Bienvenue dans Pdmenu %s par Joey·Hess·" pdmenu/po/es.po0000644000000000000000000001130712355063701010625 0ustar # Pdmenu Spanish translation. # Copyright (C) 2009 # This file is distributed under the same license as the pdmenu package. # Juan Ramon Jimenez Garcia , 2009. # # msgid "" msgstr "" "Project-Id-Version: pdmenu 1.2.93\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2005-07-23 09:12-0400\n" "PO-Revision-Date: 2009-04-16 10:49+0100\n" "Last-Translator: Juan Ramon Jimenez Garcia \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-15\n" "Content-Transfer-Encoding: 8bit\n" #: src/actions.c:95 msgid "Please wait..." msgstr "Por favor, espere..." #: src/actions.c:108 msgid "Press Esc to close window." msgstr "Pulse Escape para cerrar la ventana" #: src/actions.c:200 msgid "Command returned no output" msgstr "El comando no devolvió ninguna salida" #: src/actions.c:316 msgid "Press Enter to return to Pdmenu." msgstr "Pulse Enter para volver a Pdmenu" #: src/error.c:31 #, c-format msgid "pdmenu error: " msgstr "Error de pdmenu" #: src/inputbox.c:53 src/inputbox.c:77 msgid "Press Enter when done, or Esc to cancel" msgstr "Pulse Enter cuando finalice o Escape para cancelar" #: src/menu.c:427 msgid "Arrow keys move, Esc exits current menu, Enter runs program" msgstr "Cursores para moverse, Escape para salir del menú actual, Enter ejecuta un programa" #: src/menu.c:458 #, c-format msgid "Attempt to remove menu \"%s\" failed: menu is on screen." msgstr "Ha fallado el intento de borrar el menú \"%s\": el menú está en la pantalla " #: src/pdmenu.c:29 #, c-format msgid "" "Usage: pdmenu [options] [menufiles ..]\n" "\tmenufiles the rc files to read instead of\n" "\t ~/.pdmenurc or %spdmenurc\n" "\t-h --help display this help\n" "\t-c --color enable color\n" "\t-u --unpark cursor moves to current selection\n" "\t-q --quit 'q' key does not exit program\n" "\t-mmenuid --menu=menuid display menu with this menuid on startup\n" "\t-v --version show version information\n" "\t-r --retro draw menus using old style\n" "\t-l --lowbit do not use high bit line drawing characters\n" "\t-n --numeric do not use 8 and 2 for moving up and down\n" msgstr "Uso: pdmenu [opciones] [menufile ..]\n" "\tmenufile fichero rc de entrada que se usará en lugar de \n" "\t ~/.pdmenurc o %spdmenurc\n" "\t-h --help muestra esta ayuda\n" "\t-c --color habilita el color\n" "\t-u --unpark el cursor se mueve a la selección actual\n" "\t-q --quit la tecla 'q' no hace salir del programa\n" "\t-mmenuid --menu=menuid muestra el menú con este menuid en el arranque\n" "\t-v --version muestra información sobre la versión\n" "\t-r --retro dibuja los menús utilizando un estilo antiguo\n" "\t-l --lowbit no usa los caracteres semigráficos\n" "\t-n --numeric no usa el 8 ni el 2 para moverse arriba y abajo\n" #: src/pdmenu.c:44 msgid "(Long options are disabled.)" msgstr "(Las opciones largas están deshabilitadas)" #: src/pdmenu.c:51 #, c-format msgid "Pdmenu %s GPL Copyright (C) 1995-2002 by Joey Hess \n" msgstr "Pdmenu %s GPL Copyright (C) 1995-2002 por Joey Hess \n" #: src/pdmenu.c:159 msgid "Unable to find any pdmenurc files, or all pdmenurc files are empty." msgstr "No se encuentra ningún fichero pdmenurc o todos están vacios" #: src/pdmenu.c:170 #, c-format msgid "Menu \"%s\" is not defined." msgstr "El menú \"%s\" no está definido" #: src/pdmenu.c:197 msgid "Pdmenu" msgstr "Pdmenu" #: src/rc.c:186 #, c-format msgid "%s:%i Invalid screen part name, \"%s\"." msgstr "%s:%i Nombre de parte de pantalla incorrecto, \"%s\"." #: src/rc.c:197 #, c-format msgid "%s:%i \"endgroup\" found outside of group block." msgstr "%s:%i encontrado \"endgroup\" fuera de un bloque de grupo." #: src/rc.c:201 #, c-format msgid "%s:%i Invalid or misplaced keyword, \"%s\"." msgstr "%s:%i Clave incorrecta o fuera de lugar, \"%s\"." #: src/rc.c:241 #, c-format msgid "%s:%i Nested \"group\" commands." msgstr "%s:%i Comandos \"group\" anidados." #: src/rc.c:333 #, c-format msgid "%s: \"group\" command used without \"endgroup\"." msgstr "%s: Comando \"group\" utilizado sin \"endgroup\"." #: src/screen.c:138 msgid "Unable to initialize key mappings." msgstr "Imposible inicializar el mapa de teclas." #: src/screen.c:184 msgid "Error: The screen is too small." msgstr "Error: La pantalla es demasiado pequeña." #: src/window.c:37 #, c-format msgid "Welcome to Pdmenu %s by Joey Hess " msgstr "Bienvenido a Pdmenu %s por Joey Hess " pdmenu/po/pdmenu.pot0000644000000000000000000000612712371441244011676 0ustar # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-08-09 11:47-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: src/actions.c:95 msgid "Please wait..." msgstr "" #: src/actions.c:108 msgid "Press Esc to close window." msgstr "" #: src/actions.c:200 msgid "Command returned no output" msgstr "" #: src/actions.c:345 msgid "Press Enter to return to Pdmenu." msgstr "" #: src/error.c:31 #, c-format msgid "pdmenu error: " msgstr "" #: src/pdmenu.c:29 #, c-format msgid "" "Usage: pdmenu [options] [menufiles ..]\n" "\tmenufiles the rc files to read instead of\n" "\t ~/.pdmenurc or %spdmenurc\n" "\t-h --help display this help\n" "\t-s --superhot enable super hot keys\n" "\t-c --color enable color\n" "\t-u --unpark cursor moves to current selection\n" "\t-q --quit 'q' key does not exit program\n" "\t-mmenuid --menu=menuid display menu with this menuid on startup\n" "\t-v --version show version information\n" "\t-r --retro draw menus using old style\n" "\t-l --lowbit do not use high bit line drawing characters\n" "\t-n --numeric do not use 8 and 2 for moving up and down\n" msgstr "" #: src/pdmenu.c:45 msgid "(Long options are disabled.)" msgstr "" #: src/pdmenu.c:52 #, c-format msgid "Pdmenu %s GPL Copyright (C) 1995-2002 by Joey Hess \n" msgstr "" #: src/pdmenu.c:164 msgid "Unable to find any pdmenurc files, or all pdmenurc files are empty." msgstr "" #: src/pdmenu.c:175 #, c-format msgid "Menu \"%s\" is not defined." msgstr "" #: src/pdmenu.c:202 msgid "Pdmenu" msgstr "" #: src/rc.c:186 #, c-format msgid "%s:%i Invalid screen part name, \"%s\"." msgstr "" #: src/rc.c:197 #, c-format msgid "%s:%i \"endgroup\" found outside of group block." msgstr "" #: src/rc.c:201 #, c-format msgid "%s:%i Invalid or misplaced keyword, \"%s\"." msgstr "" #: src/rc.c:241 #, c-format msgid "%s:%i Nested \"group\" commands." msgstr "" #: src/rc.c:333 #, c-format msgid "%s: \"group\" command used without \"endgroup\"." msgstr "" #: src/inputbox.c:53 src/inputbox.c:77 msgid "Press Enter when done, or Esc to cancel" msgstr "" #: src/screen.c:140 msgid "Unable to initialize key mappings." msgstr "" #: src/screen.c:186 msgid "Error: The screen is too small." msgstr "" #: src/window.c:37 #, c-format msgid "Welcome to Pdmenu %s by Joey Hess " msgstr "" #: src/menu.c:447 msgid "Arrow keys move, Esc exits current menu, Enter runs program" msgstr "" #: src/menu.c:478 #, c-format msgid "Attempt to remove menu \"%s\" failed: menu is on screen." msgstr "" pdmenu/po/da.po0000644000000000000000000001123412355063701010601 0ustar # Danish translation pdmenu. # Copyright (C) 2011 pdmenu og nedenst??ende overs??ttere. # This file is distributed under the same license as the pdmenu package. # Joe Hansen , 2011. # msgid "" msgstr "" "Project-Id-Version: pdmenu\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2005-07-23 09:12-0400\n" "PO-Revision-Date: 2011-01-07 17:30+01:00\n" "Last-Translator: Joe Hansen \n" "Language-Team: Danish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: src/actions.c:95 msgid "Please wait..." msgstr "Vent venligst..." #: src/actions.c:108 msgid "Press Esc to close window." msgstr "Tryk Esc for at lukke vindue." #: src/actions.c:200 msgid "Command returned no output" msgstr "Kommando returnerede ingen uddata" #: src/actions.c:316 msgid "Press Enter to return to Pdmenu." msgstr "Tryk Retur for at returnere til Pdmenu." #: src/error.c:31 #, c-format msgid "pdmenu error: " msgstr "pdmenu-fejl: " #: src/inputbox.c:53 src/inputbox.c:77 msgid "Press Enter when done, or Esc to cancel" msgstr "Tryk Retur n??r f??rdig, eller Esc for at afbryde" #: src/menu.c:427 msgid "Arrow keys move, Esc exits current menu, Enter runs program" msgstr "Flyt med piletaster, Esc afslutter aktuel menu, Retur k??rer program" #: src/menu.c:458 #, c-format msgid "Attempt to remove menu \"%s\" failed: menu is on screen." msgstr "Fors??g p?? at fjerne menu ??%s?? mislykkedes: Menu er p?? sk??rmen." #: src/pdmenu.c:29 #, c-format msgid "" "Usage: pdmenu [options] [menufiles ..]\n" "\tmenufiles the rc files to read instead of\n" "\t ~/.pdmenurc or %spdmenurc\n" "\t-h --help display this help\n" "\t-c --color enable color\n" "\t-u --unpark cursor moves to current selection\n" "\t-q --quit 'q' key does not exit program\n" "\t-mmenuid --menu=menuid display menu with this menuid on startup\n" "\t-v --version show version information\n" "\t-r --retro draw menus using old style\n" "\t-l --lowbit do not use high bit line drawing characters\n" "\t-n --numeric do not use 8 and 2 for moving up and down\n" msgstr "" "Brug: pdmenu [tilvalg] [menufiler..]\n" "\tmenufiler rc-filerne der skal l??ses i steden for\n" "\t ~/.pdmenurc eller %spdmenurc\n" "\t-h --help vis denne hj??lpetekst\n" "\t-c --color aktiver farve\n" "\t-u --unpark mark??r flytter til aktuel markering\n" "\t-q --quit q-tasten medf??rer ikke afslutning af program\n" "\t-mmenuid --menu=menuid vis menu med denne menuid ved opstart\n" "\t-v --version vis versionsinformation\n" "\t-r --retro tegn menuer med brug af gammel stil\n" "\t-l --lowbit brug ikke h??jbit linjetegningstegn\n" "\t-n --numeric brug ikke 8 og 2 for bev??gelse op og ned\n" #: src/pdmenu.c:44 msgid "(Long options are disabled.)" msgstr "(Lange tilvalg er deaktiveret.)" #: src/pdmenu.c:51 #, c-format msgid "Pdmenu %s GPL Copyright (C) 1995-2002 by Joey Hess \n" msgstr "Pdmenu %s GPL-ophavsret 1995-2002 af Joey Hess \n" #: src/pdmenu.c:159 msgid "Unable to find any pdmenurc files, or all pdmenurc files are empty." msgstr "" "Kan ikke finde nogen pdmenurc-filer, eller ogs?? er alle pdmenurc-filer " "tomme." #: src/pdmenu.c:170 #, c-format msgid "Menu \"%s\" is not defined." msgstr "Menu ??%s?? er ikke defineret." #: src/pdmenu.c:197 msgid "Pdmenu" msgstr "Pdmenu" #: src/rc.c:186 #, c-format msgid "%s:%i Invalid screen part name, \"%s\"." msgstr "%s:%i Ugyldigt sk??rmpartsnavn, ??%s??." #: src/rc.c:197 #, c-format msgid "%s:%i \"endgroup\" found outside of group block." msgstr "%s:%i ??endgroup?? fundet uden for gruppeblok." #: src/rc.c:201 #, c-format msgid "%s:%i Invalid or misplaced keyword, \"%s\"." msgstr "%s:%i Ugyldigt eller fejlplaceret n??gleord, ??%s??." #: src/rc.c:241 #, c-format msgid "%s:%i Nested \"group\" commands." msgstr "%s:%i Indlejrede gruppekommandoer (group)." #: src/rc.c:333 #, c-format msgid "%s: \"group\" command used without \"endgroup\"." msgstr "%s: gruppekommando (group) brugt uden ??endgroup??." #: src/screen.c:138 msgid "Unable to initialize key mappings." msgstr "Kunne ikke initialisere n??gleovers??ttelser." #: src/screen.c:184 msgid "Error: The screen is too small." msgstr "Fejl: Sk??rmen er for lille." #: src/window.c:37 #, c-format msgid "Welcome to Pdmenu %s by Joey Hess " msgstr "Velkommen til Pdmenu %s af Joey Hess " pdmenu/po/ru.po0000644000000000000000000001333012355063701010642 0ustar # translation of ru.po to Russian # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Yuri Kozlov , 2008. msgid "" msgstr "" "Project-Id-Version: pdmenu 1.2.93\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2005-07-23 09:12-0400\n" "PO-Revision-Date: 2008-05-11 14:49+0400\n" "Last-Translator: Yuri Kozlov \n" "Language-Team: Russian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: src/actions.c:95 msgid "Please wait..." msgstr "Подождите..." #: src/actions.c:108 msgid "Press Esc to close window." msgstr "Чтобы закрыть окно, нажмите Esc." #: src/actions.c:200 msgid "Command returned no output" msgstr "Команда ничего не вернула" #: src/actions.c:316 msgid "Press Enter to return to Pdmenu." msgstr "Чтобы вернутьÑÑ Ð² Pdmenu, нажмите Enter." #: src/error.c:31 #, c-format msgid "pdmenu error: " msgstr "ошибка pdmenu: " #: src/inputbox.c:53 src/inputbox.c:77 msgid "Press Enter when done, or Esc to cancel" msgstr "Ð”Ð»Ñ Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð¸Ñ Ð½Ð°Ð¶Ð¼Ð¸Ñ‚Ðµ Enter, а Ð´Ð»Ñ Ð¾Ñ‚Ð¼ÐµÐ½Ñ‹ Esc" #: src/menu.c:427 msgid "Arrow keys move, Esc exits current menu, Enter runs program" msgstr "Клавиши Ñтрелок Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ, Esc Ð´Ð»Ñ Ð²Ñ‹Ñ…Ð¾Ð´Ð° из текущего меню, Enter Ð´Ð»Ñ Ð·Ð°Ð¿ÑƒÑка программы" #: src/menu.c:458 #, c-format msgid "Attempt to remove menu \"%s\" failed: menu is on screen." msgstr "Ðе удалоÑÑŒ удалить меню \"%s\": меню на Ñкране." #: src/pdmenu.c:29 #, c-format msgid "" "Usage: pdmenu [options] [menufiles ..]\n" "\tmenufiles the rc files to read instead of\n" "\t ~/.pdmenurc or %spdmenurc\n" "\t-h --help display this help\n" "\t-c --color enable color\n" "\t-u --unpark cursor moves to current selection\n" "\t-q --quit 'q' key does not exit program\n" "\t-mmenuid --menu=menuid display menu with this menuid on startup\n" "\t-v --version show version information\n" "\t-r --retro draw menus using old style\n" "\t-l --lowbit do not use high bit line drawing characters\n" "\t-n --numeric do not use 8 and 2 for moving up and down\n" msgstr "" "ИÑпользование: pdmenu [параметры] [файлы_меню ..]\n" "\tфайлы_меню файлы rc, которые нужно иÑпользовать\n" "\t вмеÑто ~/.pdmenurc или %spdmenurc\n" "\t-h --help показать Ñту Ñправку\n" "\t-c --color включить цвета\n" "\t-u --unpark курÑор перемещаетÑÑ Ð² текущий выбранный пункт\n" "\t-q --quit по клавише 'q' программа не завершаетÑÑ\n" "\t-mmenuid --menu=menuid показать меню Ñ menuid при запуÑке\n" "\t-v --version показать информацию о верÑии\n" "\t-r --retro риÑовать меню в Ñтаром Ñтиле\n" "\t-l --lowbit не иÑпользовать Ñимволы рамок Ð´Ð»Ñ Ñ€Ð¸ÑованиÑ\n" "\t-n --numeric не иÑпользовать клавиши 8 и 2\n" " Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð²Ð²ÐµÑ€Ñ… и вниз\n" #: src/pdmenu.c:44 msgid "(Long options are disabled.)" msgstr "(длинные Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð² выключены.)" #: src/pdmenu.c:51 #, c-format msgid "Pdmenu %s GPL Copyright (C) 1995-2002 by Joey Hess \n" msgstr "Pdmenu %s GPL Copyright (C) 1995-2002 by Joey Hess \n" #: src/pdmenu.c:159 msgid "Unable to find any pdmenurc files, or all pdmenurc files are empty." msgstr "Ðе удалоÑÑŒ найти ни одного файла pdmenurc, или вÑе файлы pdmenurc пуÑты." #: src/pdmenu.c:170 #, c-format msgid "Menu \"%s\" is not defined." msgstr "Меню \"%s\" не определено." #: src/pdmenu.c:197 msgid "Pdmenu" msgstr "Pdmenu" #: src/rc.c:186 #, c-format msgid "%s:%i Invalid screen part name, \"%s\"." msgstr "%s:%i Ð½ÐµÐ²ÐµÑ€Ð½Ð°Ñ ÑÐºÑ€Ð°Ð½Ð½Ð°Ñ Ñ‡Ð°Ñть в имени, \"%s\"." #: src/rc.c:197 #, c-format msgid "%s:%i \"endgroup\" found outside of group block." msgstr "%s:%i найдена \"endgroup\" вне группового блока." #: src/rc.c:201 #, c-format msgid "%s:%i Invalid or misplaced keyword, \"%s\"." msgstr "%s:%i неверное или не там указанное ключевое Ñлово, \"%s\"." #: src/rc.c:241 #, c-format msgid "%s:%i Nested \"group\" commands." msgstr "%s:%i вложенные команды \"group\"." #: src/rc.c:333 #, c-format msgid "%s: \"group\" command used without \"endgroup\"." msgstr "%s: команда \"group\" иÑпользуетÑÑ Ð±ÐµÐ· \"endgroup\"." #: src/screen.c:138 msgid "Unable to initialize key mappings." msgstr "Ðе удалоÑÑŒ выполнить инициализацию привÑзки клавиш." #: src/screen.c:184 msgid "Error: The screen is too small." msgstr "Ошибка: Ñкран Ñлишком мал." #: src/window.c:37 #, c-format msgid "Welcome to Pdmenu %s by Joey Hess " msgstr "ПриветÑтвуем в Pdmenu %s, Joey Hess " pdmenu/debian/0000755000000000000000000000000012427315273010464 5ustar pdmenu/debian/changelog0000644000000000000000000013436712427315231012346 0ustar pdmenu (1.3.4) unstable; urgency=medium * Orphaned the Debian package. -- Joey Hess Sat, 08 Nov 2014 00:22:48 -0400 pdmenu (1.3.3) unstable; urgency=medium * Added autotools-dev to the build to update config.{guess,sub}, and do it before the clean target. Closes: #756569 Thanks, Fernando Seiti Furusato. -- Joey Hess Sat, 09 Aug 2014 11:52:19 -0400 pdmenu (1.3.2) unstable; urgency=low * debian/rules: use dh * Rename libgpm-dev build dep. * Build with gpm support on s390, hopefully this is ok now. -- Joey Hess Tue, 23 Aug 2011 13:29:13 -0400 pdmenu (1.3.1) unstable; urgency=low * Use arch wildcards in build deps. Closes: #634487 -- Joey Hess Tue, 19 Jul 2011 09:22:38 -0400 pdmenu (1.3.0) unstable; urgency=low * Add support for "exec entries"; menu entries that pdmenu execs, replacing itself with their process. Contributed by Stephen Blott * Add -s switch enabling superhot mode, in which pressing an unambiguous menu hotkey immediately runs that menu item. Contributed by Stephen Blott -- Joey Hess Sun, 01 May 2011 11:33:29 -0400 pdmenu (1.2.99) unstable; urgency=low * Add Danish translation from Joe Dalton. Closes: #609579 -- Joey Hess Sun, 06 Feb 2011 00:02:31 -0400 pdmenu (1.2.98) unstable; urgency=low * Spanish translation from Juan Ramón Jiménez García. -- Joey Hess Fri, 31 Jul 2009 13:47:46 -0400 pdmenu (1.2.97) unstable; urgency=low * Avoid crash when running inside screen by not re-running SLtt_get_terminfo() when returning from running a command. (This smells like a bug in slang.) Closes: #523097 -- Joey Hess Thu, 09 Apr 2009 12:50:58 -0400 pdmenu (1.2.96) unstable; urgency=low * ACK NMU. Closes: #505502 * Fix a few man page issues. * Switch to new format copyright. -- Joey Hess Mon, 24 Nov 2008 10:23:51 -0500 pdmenu (1.2.95+nmu1) unstable; urgency=low * Non-maintainer upload. * Handle disconnection by gpm server gracefully. Closes: #505502. Based on patch by Samuel Thibault . -- Ben Hutchings Mon, 24 Nov 2008 02:19:18 +0000 pdmenu (1.2.95) unstable; urgency=low * Actually enable Russian translation in Makefile. * Put in a workaround for slang bug #407835. (If it is a bug.. workaround is just to enable its OS-specific utf-8 sensing code.) -- Joey Hess Tue, 22 Jul 2008 12:50:30 -0400 pdmenu (1.2.94) unstable; urgency=low * Added a Russian translation from Yuri Kozlov. Closes: #480646 -- Joey Hess Tue, 22 Jul 2008 00:29:41 -0400 pdmenu (1.2.93) unstable; urgency=low * Pdmenu's repository has moved from svn to git. * Improve extended description. * Minor improvement to debian/rules clean. -- Joey Hess Fri, 19 Oct 2007 20:55:24 -0400 pdmenu (1.2.92) unstable; urgency=low * Don't link with libtermcap, it's not needed. -- Joey Hess Thu, 19 Jul 2007 14:09:04 -0400 pdmenu (1.2.91) unstable; urgency=low * Update menu file for new menu policy and de-hardcode path to pdmenu in it. -- Joey Hess Sun, 08 Jul 2007 16:28:55 -0400 pdmenu (1.2.90) unstable; urgency=low * Correct urls to current location of the web page. * Remove some urls for downloading the source etc that are no longer valid. -- Joey Hess Mon, 04 Jun 2007 16:46:53 -0400 pdmenu (1.2.89) unstable; urgency=low * Add config.sub/config.guess update code to the debian/rules clean target. Closes: #379702 -- Joey Hess Tue, 25 Jul 2006 11:44:43 -0400 pdmenu (1.2.88) unstable; urgency=low * Add links to svn. * debhelper v5, current policy. * Add !kfreebsd-any arch specifier to the libgpmg1-dev build dep. Closes: #377792 * Deal with install-menu moving. * Dummied up debian changelog format for first changelog entries, which predated that format. My, lintian is getting picky. -- Joey Hess Tue, 11 Jul 2006 20:38:34 -0400 pdmenu (1.2.87) unstable; urgency=low * The Return of the Shadows (thanks JED, apologies JMS) -- Joey Hess Sat, 23 Jul 2005 09:22:01 -0400 pdmenu (1.2.86) unstable; urgency=low * Switch to slang 2. * Since slang 2 has removed SLSMG_BUILD_CHAR which was used to add shadows to characters, the shadow code was changed to just draw solid black shadows that do not display the shadowed code underneath. -- Joey Hess Mon, 20 Jun 2005 14:18:37 -0400 pdmenu (1.2.85) unstable; urgency=low * First translation, to French. Closes: #253877 * Fixed mo file building and installation. -- Joey Hess Fri, 11 Jun 2004 13:09:58 -0400 pdmenu (1.2.84) unstable; urgency=low * Patch from Martin Quinson to avoid use of string concatenation and make life easier for translators. Closes: #252322 * Fix segfault introduced by above patch. -- Joey Hess Fri, 4 Jun 2004 14:59:34 -0300 pdmenu (1.2.83) unstable; urgency=low * Patch to add a new helptext command. Thanks, John Daley. * Move the stdin reopening hack to rc.c, so it is done only if a rc file was read from stdin. Reverted the earlier change, so it opens /dev/tty again. This will break on non-unix98 pty systems (linux without /dev/pts), but at least it will work better than the old thing, which did not work at all. -- Joey Hess Wed, 10 Dec 2003 19:41:10 -0500 pdmenu (1.2.82) unstable; urgency=low * Added "lynx style" menu navigation, using left and right arrow keys. Closes: #197274 -- Joey Hess Fri, 22 Aug 2003 16:42:14 -0400 pdmenu (1.2.81) unstable; urgency=low * At suggestion of Bill Allombert, redo debian menu support, so there are three separate menu-methods, that generate three separate menus, for text, x11, and vc. /etc/pdmenurc then just inlcudes whichever ones is appropriate for the environment, no nasty cpp.pl hacks. This will also play nicer with menu's hints and collapsing code, since menu will know what items are really in each menu. -- Joey Hess Tue, 27 May 2003 21:49:37 -0400 pdmenu (1.2.80) unstable; urgency=low * Fix from Lou Sortman for bug if an _ was escaped, and then a hotkey placed later on the line. Sorry I took so long Lou! -- Joey Hess Mon, 12 May 2003 14:15:09 -0400 pdmenu (1.2.79) unstable; urgency=low * Detect 2 queued escapes and assume the first one is a literal escape. * s/pine/mutt/ on example menus -- Joey Hess Tue, 18 Mar 2003 17:24:57 -0800 pdmenu (1.2.78) unstable; urgency=low * Fixed some problems with sample menus in pdmenurc(5). Closes: #183978 * Don't call Screen_Init on startup until after initting gpm. I think that gpm_init was overriding the resize signal or something. Anyway, this fixes resizes in xterm, as mentioned in #116599. * Fix doubled conffiles. * Hacked ba.lpd example script in truely evil way to make dash -n prse it ok. * Update config.guess and config.sub. -- Joey Hess Sat, 8 Mar 2003 17:33:47 -0500 pdmenu (1.2.77) unstable; urgency=low * Added --with-gpm/--without-gpm to configure script. * In debian/rules, configure gpm out on s/390, since it seems that gpm crashes pdmenu there, and gpm makes little sense on s/390's consoles. Closes: #165560 * No need to build-dep on libgpm for s390. -- Joey Hess Sun, 20 Oct 2002 20:32:32 -0400 pdmenu (1.2.76) unstable; urgency=low * Solaris needs #include -- Joey Hess Sat, 17 Aug 2002 23:16:03 -0400 pdmenu (1.2.75) unstable; urgency=low * Don't use dh_installmanpages. -- Joey Hess Wed, 26 Jun 2002 22:31:14 -0400 pdmenu (1.2.74) unstable; urgency=low * Moved DEB_BUILD_OPTIONS cruft out of makeinfo. -- Joey Hess Wed, 12 Jun 2002 13:05:32 -0400 pdmenu (1.2.73) unstable; urgency=low * Moved stuff to /usr/share/ -- Joey Hess Mon, 10 Jun 2002 11:56:46 -0400 pdmenu (1.2.72) unstable; urgency=low * Fixed remove bug. Closes: #149152 -- Joey Hess Sun, 9 Jun 2002 19:01:40 -0400 pdmenu (1.2.71) unstable; urgency=low * Support DEB_BUILD_OPTIONS. * Debhelper v4. -- Joey Hess Sat, 1 Jun 2002 19:37:29 -0400 pdmenu (1.2.70) unstable; urgency=low * De-escape "\:" in prompt titles. Closes: #146727 * Only accept Enter when pausing after a program run, to prevent input typed ahead at the program (eg, down key in less) from accidentually triggering it. Closes: #145616 * Updated to use debhelper v4. * Updated to new autoconf. * Moved non-substituted stuff from makeinfo to Makefile. * Properly gettextized, rather than the wierd strings.h I made up way back when. Translations, anyone? -- Joey Hess Wed, 22 May 2002 14:01:09 -0400 pdmenu (1.2.69) unstable; urgency=low * Removed -fstrict-protoypes since gcc 3.0 does not understand it (why?) Closes: #104615 * Made it build clean on gcc 3.0. -- Joey Hess Sat, 14 Jul 2001 23:26:26 -0400 pdmenu (1.2.68) unstable; urgency=low * Need to rebuild pdmenu now that slang has gone back to non-multibyte because the shadow code uses macros that determine if it is multibyte or not at compile time. A versioned build dep makes sure all the ports will build with the right version. This fixes shadows yet again. * Gpm is not used for the hurd. * BTW, pdmenu's gpm support at the linux console on devfs systems is broken; this is a bug in gpm. -- Joey Hess Mon, 25 Jun 2001 21:45:09 -0400 pdmenu (1.2.67) unstable; urgency=low * Shadows are fixed, thanks to Edmund GRIMLEY EVANS * May only work with recent versions of slang now, though. -- Joey Hess Mon, 14 May 2001 22:53:07 -0400 pdmenu (1.2.66) unstable; urgency=low * Use printf in pdmenurc.debian, not echo -e, so it will work with ash. * Copyright updates. * Added a title command to the pdmenurc after several user requests. * Compiles cleanly with -Wall once more, there were some prototype changes in slang. * Lost the yellow on red text ("pleasing color scheme"?? what was I thinking?) * Damn and blast. Debian's patching of slang for wide character set support has gone and broken my shadow code, and I don't know how to fix it. I've reverted to stupid shadows in the Debian binary. :-( -- Joey Hess Fri, 11 May 2001 17:08:38 -0400 pdmenu (1.2.65) unstable; urgency=low * Patch from Jan Rafaj to make it open the actual tty, not /dev/tty, if a pdmenurc file is read on stdin. The issue is that if /dev/tty is used, child processes use it for stdin/out, which, while it should work ok, can yeild confusing behavior if you're playing around with ttyname(). -- Joey Hess Tue, 26 Sep 2000 10:14:01 -0700 pdmenu (1.2.64) unstable; urgency=low * Killed the debian/compress file, using -X to dh_compress instead. -- Joey Hess Sun, 20 Aug 2000 18:28:38 -0700 pdmenu (1.2.63) unstable; urgency=low * Applied a patch from Kees Schoenmakers that is supposed to fix a problem where pdmenu spins in the background if the xterm it was running in is closed. I cannot reproduce this one myself. -- Joey Hess Mon, 7 Aug 2000 22:02:29 -0700 pdmenu (1.2.62) unstable; urgency=low * Fixed a dead email address. -- Joey Hess Mon, 31 Jul 2000 14:45:03 -0700 pdmenu (1.2.61) unstable; urgency=low * Conflicts with older versions of menu that don't support onlyrunasroot. Closes: #56744 * This version will depend on recent versions of libgpm1g, fixing a reported segfault with older versions. Closes: #56748 -- Joey Hess Wed, 5 Apr 2000 17:02:00 -0700 pdmenu (1.2.60) frozen unstable; urgency=low * Modified spec file so it will work with .tar.gz files that do not include the version number. I am currently generating that type of tarball. * Merged potato branch. (Words archealogists of the future will long ponder). -- Joey Hess Mon, 3 Apr 2000 14:30:44 -0700 pdmenu (1.2.59) frozen unstable; urgency=low * Rebuilt to remove cvs cruft "man pages". No code changes. Closes: #58030 -- Joey Hess Sun, 13 Feb 2000 14:55:09 -0800 pdmenu (1.2.58) frozen unstable; urgency=low * Ok, the signal blocking added in the last version just breaks other things, so I have reverted it entirely. This version is identical to 1.2.56 except for the changelog. Closes: #55651 * This should go in frozen, since 1.2.57 is broken pretty bad, and this is just a reversion to an earlier version. -- Joey Hess Wed, 19 Jan 2000 16:13:19 -0800 pdmenu (1.2.57) unstable; urgency=low * Block signals before running command, so if it receives a signal while the command it running, it doesn't wake up and fight with the command for the tty. -- Joey Hess Thu, 13 Jan 2000 12:49:53 -0800 pdmenu (1.2.56) unstable; urgency=low * Ah, I figured out the shadow weirdness issue at last -- fixed. -- Joey Hess Fri, 7 Jan 2000 14:05:34 -0800 pdmenu (1.2.55) unstable; urgency=low * Corrected off-by-one error in SHADOW. -- Joey Hess Fri, 7 Jan 2000 02:59:05 -0800 pdmenu (1.2.54) unstable; urgency=low * Modified menu method to not crash if ran as a user -- it just doesn't do anything. Closes: #53933 -- Joey Hess Wed, 5 Jan 2000 14:09:05 -0800 pdmenu (1.2.53) unstable; urgency=low * Build deps added. -- Joey Hess Sat, 4 Dec 1999 15:09:54 -0800 pdmenu (1.2.52) unstable; urgency=low * Reupload, the source in the debian archive is borked. -- Joey Hess Thu, 2 Dec 1999 12:42:01 -0800 pdmenu (1.2.51) unstable; urgency=low * Built with a newer slang library, Closes: #50689 -- Joey Hess Mon, 25 Oct 1999 10:44:53 -0700 pdmenu (1.2.50) unstable; urgency=low * Fixed a file descriptior leak. Closes: #46885 -- Joey Hess Thu, 7 Oct 1999 14:00:10 -0700 pdmenu (1.2.49) unstable; urgency=low * First actual code change since february. Fixed a problem with pdmenu not closing the mouse when it runs programs. gpm_active was not being set. Thanks to Kevin Ryde for pinpointing the problem. (Closes: #46627) -- Joey Hess Mon, 4 Oct 1999 15:03:28 -0700 pdmenu (1.2.48) unstable; urgency=low * Fixed probable error in redhat spec file, uses FHS man pages now. I hope Red Hat can handle FHS.. -- Joey Hess Mon, 6 Sep 1999 16:47:45 -0700 pdmenu (1.2.47) unstable; urgency=low * Fully FHS compliant. -- Joey Hess Mon, 6 Sep 1999 16:17:07 -0700 pdmenu (1.2.46) unstable; urgency=low * Oops, last upload broke my web page, fixed. -- Joey Hess Sat, 4 Sep 1999 22:27:28 -0700 pdmenu (1.2.45) unstable; urgency=low * Deleted a lot of accidental cruft. -- Joey Hess Sat, 4 Sep 1999 22:24:55 -0700 pdmenu (1.2.44) unstable; urgency=low * Corrected CHANGES link. * Integrated with my local build system to auto-update home page. -- Joey Hess Fri, 27 Aug 1999 20:11:26 -0700 pdmenu (1.2.43) unstable; urgency=low * Rebuilt with new slang1-dev to fix slang dependancy. * Checked into CVS. Set up a debian/fixlinks script to correct symlinks. -- Joey Hess Fri, 27 Aug 1999 19:59:12 -0700 pdmenu (1.2.42) unstable; urgency=low * Removed redundant part of regexp in debian pdmenurc. -- Joey Hess Mon, 2 Aug 1999 13:28:57 -0700 pdmenu (1.2.41) unstable; urgency=low * Updates to console and display detection in debian pdmenurc (Closes: #42300) -- Joey Hess Mon, 2 Aug 1999 10:34:17 -0700 pdmenu (1.2.40) unstable; urgency=low * Renamed /var/lib/pdmenu/pdmenurc_auto to .pdmenurc_auto. Had to do this so if we have a per-user .pdmenurc_auto, it actually has that name, not pdmenurc_auto. * Added a compatability symlink it /var/lib/pdmenu/ so pdmenurc files that use the old pdmenurc_auto name will keep working. * Modified /etc/pdmenurc to use the new name. -- Joey Hess Thu, 25 Feb 1999 23:40:02 -0800 pdmenu (1.2.39) unstable; urgency=low * Copyright updates. * Removed duplicate GPL. * Now complains about invalid screen part names. * Fixed "color:selbarhot". -- Joey Hess Fri, 19 Feb 1999 12:33:47 -0800 pdmenu (1.2.38) unstable; urgency=low * Rebuilt with ncurses 4. -- Joey Hess Fri, 30 Oct 1998 19:27:29 -0800 pdmenu (1.2.37) unstable; urgency=low * Removed icon=none from debian menu file. -- Joey Hess Wed, 5 Aug 1998 14:25:23 -0700 pdmenu (1.2.36) unstable; urgency=low * Added --numeric flag, which disables use of '2' and '8' for cursor movement. (Useful if you want numbered hotkeys.) -- Joey Hess Mon, 4 May 1998 13:12:30 -0700 pdmenu (1.2.35) unstable; urgency=low * Now linked with slang 1.2. -- Joey Hess Sat, 25 Apr 1998 16:36:11 -0700 pdmenu (1.2.34) unstable; urgency=low * Fixed minor lintian errors. (No du file, control file permissions.) -- Joey Hess Sat, 14 Mar 1998 20:01:12 -0800 pdmenu (1.2.33) unstable; urgency=low * Updated COPYING file to new version of GPL, and updated debian/copyright to new fsf address. -- Joey Hess Mon, 9 Feb 1998 12:51:17 -0800 pdmenu (1.2.32) unstable; urgency=low * No longer depend on perl for cpp.pl, perl-base is sufficient. -- Joey Hess Sat, 7 Feb 1998 19:27:48 -0800 pdmenu (1.2.31) unstable; urgency=low * Added a check to configure to see if cc understands -pipe. -- Joey Hess Sun, 1 Feb 1998 17:02:06 -0800 pdmenu (1.2.30) unstable; urgency=low * Updated pdmenurc.newbie. * Updated doc/ANNOUNCE. * Added doc/ANNOUCE into /usr/doc/pdmenu in debian package. -- Joey Hess Tue, 23 Dec 1997 11:07:44 -0500 pdmenu (1.2.29.5) unstable; urgency=low * Don't force --lowbit mode on when --retro is used. -- Joey Hess Wed, 10 Dec 1997 14:04:28 -0500 pdmenu (1.2.29.4) unstable; urgency=low * Fixed a problem exhibited if you exec some programs (including telnet) from pdmenu when it has read its pdmenurc file from stdin. -- Joey Hess Mon, 8 Dec 1997 16:36:19 -0500 pdmenu (1.2.29.3) unstable; urgency=low * Beautiful shadows, thanks to JED. -- Joey Hess Sat, 6 Dec 1997 01:17:28 -0500 pdmenu (1.2.29.2) unstable; urgency=low * Added --lowbit switch, which makes pdmenu not use high bit ascii line drawing characters. This fixes the #1 FAQ about pdmenu. -- Joey Hess Fri, 5 Dec 1997 00:58:17 -0500 pdmenu (1.2.29.1) unstable; urgency=low * Added better spec file by Jeff Covey. -- Joey Hess Fri, 28 Nov 1997 21:02:32 -0500 pdmenu (1.2.29) unstable; urgency=low * Added pdmenurc.newbie file and some helper scripts by Jeff Covey * Added ba.lpd file by Randolph Chung * Modified showdir.pl so if it is called as editdir.pl, it edits files instead of displaying them. -- Joey Hess Thu, 27 Nov 1997 23:38:10 -0500 pdmenu (1.2.28) unstable; urgency=low * Fixed tab expansion problem. * Fixed problem with continutation lines being used where they shouldn't be. * Install showdir.pl into /usr/lib/pdmenu/. * Fixed (for the second time) segfault if exec::show command returns no output. -- Joey Hess Wed, 26 Nov 1997 14:28:18 -0500 pdmenu (1.2.27) unstable; urgency=low * Changed all occurrences of kite.ml.org to kitenet.net. -- Joey Hess Mon, 17 Nov 1997 15:39:10 -0500 pdmenu (1.2.26) unstable; urgency=low * Wrote a small, simplistic cpp like program in perl, and now use this program instead of cpp for parsing /var/lib/pdmenu/pdmenurc_auto. Using plain cpp had undesirable side effects. * Suggests perl again. no longer suggests cpp. * Added md5sums file back in. -- Joey Hess Sun, 2 Nov 1997 20:54:47 -0500 pdmenu (1.2.25) unstable; urgency=low * Conflicts: menu (<< 1.4), becuase of things it does in the menu-methods file that old versions of menu do not understand. -- Joey Hess Fri, 17 Oct 1997 16:12:36 -0400 pdmenu (1.2.24) unstable; urgency=low * Modified configure to check for asprintf, and if not found, use more standard functions. * Got rid of sinclude in Makefile (changed to include), for portability. * For portability, make sure the -L comes before the -lslang. * Added setenv() code, to be used if setenv is not otherwise available. The code is from: ftp://ftp.uu.net/systems/unix/bsd-sources/lib/libc/stdlib/ * Cleaned up setenv() code so gcc doesn't complain about it. * No longer use rint() or floor() at all. -- Joey Hess Tue, 7 Oct 1997 20:22:33 -0400 pdmenu (1.2.23) unstable; urgency=low * Removed the limit on the number of items that can be in a menu. * Removed limits.h (hurrah!) * Merged ShowMessage() and RunShow() for a speedup. * Added helptext back in when viewing a file (removed by accident). * Doesn't crash on very long home directories now. -- Joey Hess Sun, 5 Oct 1997 22:08:29 -0400 pdmenu (1.2.22) unstable; urgency=low * Got rid of the limit on the number of windows that can appear on the screen at one time. * Got rid of the limit on the number of menus that can be defined in the rc file. * Made rc file syntax errors easier to understand. * Simplified the build process. -- Joey Hess Sat, 4 Oct 1997 21:41:23 -0400 pdmenu (1.2.21) unstable; urgency=low * Emacs-indented the source. -- Joey Hess Sat, 4 Oct 1997 19:29:06 -0400 pdmenu (1.2.20) unstable; urgency=low * Let debhelper automatically generate calls to update-menus in postinst, postrm. -- Joey Hess Sat, 27 Sep 1997 13:30:31 -0400 pdmenu (1.2.19) unstable; urgency=low * Uses debhelper to build. * Fix a bug in how putenv is used. Unfortunatly, this introduces a memory leak. Modified configure script to detect if setenv is present and use it instead if possible, eliminating the problem for linux systems. * Rename getline to pdgetline. * Allow use of RunSetEnv even if we don't have putenv or setenv, so you can still do chdir. * Fixed bug if you try to set an environment variable using a non-existant command. * Fixed exec flag initialization bug. (Again? I think I lost this fix.) * Read stdin if asked to open file named "-". * Removed unused /usr/sbin directory from package. -- Joey Hess Sat, 20 Sep 1997 21:29:08 -0400 pdmenu (1.2.18) unstable; urgency=low * Minor optimzations to CalcMenu, pdstrtok. * getline: remove trailing \n always. * Routine update of debian/rules: Fixed binary-indep target. -- Joey Hess Sat, 13 Sep 1997 16:22:24 -0400 pdmenu (1.2.17) unstable; urgency=low * Fixed a memory leak. * Modified menu methods file so debian menus are always available, even during pdmenu install. * /var/lib/pdmenu/pdmenurc_auto is no longer part of the package. * /etc/pdmenurc modified so it does not display an error if /var/lib/pdmenu/pdmenurc_auto is not present. * Remove /var/lib/pdmenu/pdmenurc_auto on purge. * Removing the package works ok now if you have already deleted /etc/menu-methods/pdmenu. -- Joey Hess Wed, 30 Jul 1997 22:51:25 -0400 pdmenu (1.2.16) unstable; urgency=low * Removed more arbitrary limits: no more limit on size of menu item text, menu item command, or rc file line length, or on the length of strings pdmenu uses for any other purpose. * Fixed bug when there was no \n at eof of a pdmenurc file. * Use SLsmg_Tab_Width when appropriate. * Made pdmenu resize immediately. (Something of a hack..) * Fixed rare crash on resize. * Unified error handling. * Fixed makefile problem (listed .c files by accident, not .o files) * Only suggests, not recommends, menu and cpp. * Rebuilt with fixed gpm library, to fix dependancies. (#11593) * Fixed some other problems using checker. What a godsend.. - SelHotKey was not skipping items with no hotkey. - Menu flags were not always initialized properly, with odd results. - ShowMessage was not setting item->type on all menu items. - RunShow was overflowing a string. * Checker seems happy with pdmenu now. * If a exec:{display,truncate} command returns no output, display the error message on the status bar, not in a window. * Changed behavior of exec:setenv command - now it parses the first line of output, not the last. -- Joey Hess Mon, 21 Jul 1997 20:37:03 -0400 pdmenu (1.2.15) unstable; urgency=low * Added #include to actions.c * Added a test for terminfo, if not found, link with -ltermcap * Fixed bug introduced in 1.2.13 in the truncate flag. * Removed some (but not all) arbitrary limits: no more limit on size of menu name, menu title, or menu helptext. -- Joey Hess Sat, 19 Jul 1997 14:30:47 -0400 pdmenu (1.2.14) unstable; urgency=low * /usr/doc/pdmnu/changelog was bad symlink. Fixed. * Routine update of debian/rules: Fakeroot and sudo fixes. -- Joey Hess Fri, 18 Jul 1997 17:23:42 -0400 pdmenu (1.2.13) unstable; urgency=low * showdir.pl: sort directory listing. * RunShow: handle tabs in input. * I thought I'd already done this, but turn off mouse support immediatly if it doesn't initalize, so if pdmenu crashes or is killed, cut and paste isn't messed up. * I thought I'd done this too (did I lose a version somewhere?), but fixed a problem in ShowMessage that was leading to frequent crashes. * Code reorganization. * Routine update of debian/rules: Only run sudo when really necessary - makes fakeroot work. -- Joey Hess Mon, 14 Jul 1997 13:49:45 -0400 pdmenu (1.2.12) unstable; urgency=low * Fixed a crash if the menu file was a single "nop". * Built with new gpm library, so it is now entirely libc6, not libc5 and libc6 mixed. * Fixed a bug in ShowMessage() -- Joey Hess Tue, 1 Jul 1997 11:50:23 -0400 pdmenu (1.2.11) unstable; urgency=low * Merged changes from menu package pdmenu example menu method. Now it includes menu.h, so you can toggle between long and short titles easily. * So that can work, updated to recommend menu >= 1.4 * Fixed problem with debian menus that was preventing urls from being used in menu items, becuase cpp thought everything after "//" was a comment. -- Joey Hess Thu, 26 Jun 1997 14:16:43 -0400 pdmenu (1.2.10) unstable; urgency=low * Changed debian menu method to not allow +, -, 2, or 8 to be used as hotkeys, since they can be used for navigation. -- Joey Hess Wed, 25 Jun 1997 14:32:20 -0400 pdmenu (1.2.9) unstable; urgency=low * Rebuilt to use libc6. -- Joey Hess Mon, 23 Jun 1997 22:31:41 -0400 pdmenu (1.2.8) unstable; urgency=low * configure script no longer uses perl to figure out the version number. -- Joey Hess Fri, 13 Jun 1997 14:56:04 -0400 pdmenu (1.2.7) unstable; urgency=low * Added --retro command line option that makes pdmenu use the pre-1.2.4 look. -- Joey Hess Wed, 11 Jun 1997 12:44:22 -0400 pdmenu (1.2.6) unstable; urgency=low * Fixed some buffer overflows. * Fixed overoptimization that had weird results with empty menus. * NOP's are now allowed as the first item in a menu. * Fixed a bug with menu items with an empty text field. * Fixed longstanding bug that there was no \n after the "Press enter to return to pdmenu." prompt. * Made flags case-insensitive. * Fixed resizing if an item is added to a menu on the fly. * Integrated in several changes that were almost lost in a disk crash last week. -- Joey Hess Thu, 5 Jun 1997 16:25:28 -0400 pdmenu (1.2.5) unstable; urgency=low * Added group commands. These are menu items that execute more than one pdmenu command when selected. * The makemenu flag no longer displays the menu it makes. If you used this feature, you must change your pdmenurc file to run a group command that runs the makemenu command and then runs a show command to display the menu. * This fixes a bug in the makemenu flag if the generated menu is empty. * Changed remove to be a command that can appear only in menus and groups. Also, remove command has a (currently unused) flags field now, and a description field. * Fixed a memory leak in the remove command. -- Joey Hess Mon, 26 May 1997 15:35:24 -0400 pdmenu (1.2.4) unstable; urgency=low * Menus that are not active can now change to a different color and lose some decorations. * Introduced a new easy to understand long form for the flags to the exec command. * Worked around a bug in makemenu flag if generated menu is empty (not yet really fixed). * Added a make dep target. * Routine update of debian/rules: Run dpkg-gencontrol after debstd, and delete substvars during clean. * Fixed column mis-align in --help text. -- Joey Hess Thu, 22 May 1997 13:23:04 -0400 pdmenu (1.2.3) unstable; urgency=low * Fixed a bug in the postinst, that would cause a failure if a version of menu older than 1.0 was installed when pdmenu installs. * move compat= in menu method to first non-comment line, at request from Joost. -- Joey Hess Tue, 6 May 1997 13:20:50 -0400 pdmenu (1.2.2) unstable; urgency=low * No longer depends on perl. * Updated menu file to version 1.0 format. * Does not depend on menu, only recommends it. -- Joey Hess Mon, 21 Apr 1997 21:08:28 -0400 pdmenu (1.2.1) unstable; urgency=low * Got rid of pdmenu-genmenu. Replaced with a menu-method file that depends on menu 1.0 or greater. * Previously, if a menu was defined twice, the second definition could add items to the menu, but would not change the title or help text of the menu. Now, it does change the title and help text. * It is no longer a fatal error for a menu to be completly empty. (Such menus are now ignored.) -- Joey Hess Sat, 19 Apr 1997 22:40:23 -0400 pdmenu (1.2.0) unstable; urgency=low * Added 'm' flag to exec, which allows you to generate and display submenus on the fly while pdmenu is running. * Added remove keyword, to remove a menu. * '\' can now be used to escape out ':' characters in pdmenurc files. * Patch from Peter Tobias to fix bug in 's' flag. * Increaded size of MENU_ITEM_COMMANDSIZE to 512 characters. * Reorganized the sample pdmenurc files. * Added a pdmenurc.complex that shows off the more advanced features. * Reorganized pdmenurc(5). -- Joey Hess Thu, 10 Apr 1997 14:40:51 -0400 pdmenu (1.1.8) unstable; urgency=low * Added --menu= option to jump to a submenu on startup. * Man page and --help fixups. * Cleaned up version string. -- Joey Hess Wed, 9 Apr 1997 12:55:27 -0400 pdmenu (1.1.7) unstable; urgency=low * Fixed another problem with install -d * Fixed two buffer overruns. * Comments can end with \ to continue over to the next line now. * Fixed problem with whitespace not being allowed before comments. * Routine update of debian/rules: Run dpkg-gencontrol after debstd, and delete substvars during clean. -- Joey Hess Mon, 7 Apr 1997 13:27:52 -0400 pdmenu (1.1.6) unstable; urgency=low * Added --unpark option, which lets the cursor move to the selected line on a menu, to make pdmenu more friendly to speech generation software. -- Joey Hess Sun, 30 Mar 1997 23:36:13 -0500 pdmenu (1.1.5) unstable; urgency=low * Fixed a bug in input box, that could cause random crashes and other problems. -- Joey Hess Thu, 27 Mar 1997 22:41:45 -0500 pdmenu (1.1.4) unstable; urgency=low * Fixed a stupid typo in the pdmenurc file. -- Joey Hess Sun, 23 Mar 1997 14:38:02 -0500 pdmenu (1.1.3) unstable; urgency=low * Fixed problem with debian menu generation: if a command had "text","x11", or "vc" in its name, there were problems. -- Joey Hess Sat, 22 Mar 1997 21:56:03 -0500 pdmenu (1.1.2) unstable; urgency=low * Run dpkg-gencontrol after debstd. * Oops, fixed problem in pdmenurc file from last version. -- Joey Hess Thu, 20 Mar 1997 01:44:07 -0500 pdmenu (1.1.1) unstable; urgency=low * SYSV3 portability changes: * Fall back on floor() if rint() is not available. * Fix CFLAGS in Makefile. * Got rid of use of perl in pdmenurc.debian file. * Increased maximum length of menu name up to 80 characters from 32, because deeply nested debian menus can have quite long names. * Fall back on autoconf/install-sh if install -d doesn't work. * Improved line wrapping when displaying command output in a window. * Added 't' flag, which is the same as 'd', but truncates command output. Makes some things look much better when displayed in windows. (At request of Steve Frampton.) * Malloc only as many menus and as much space in the menus as we actually need. * Fixed bug in hotkey processing. * Improved make localdist. * Recognize '\' continuation lines. * Added --version switch. -- Joey Hess Tue, 18 Mar 1997 12:31:56 -0500 pdmenu (1.0.2) unstable; urgency=low * Fall back on mkdir if install -d fails, for compatability with bsdinstall. * Depends on slang0.99.34 (> 0.99.38) -- Joey Hess Mon, 17 Mar 1997 12:46:29 -0500 pdmenu (1.0.1) unstable; urgency=low * Fix date in LSM. * Routine update of debian/rules: Clean up junk files in subdirs. * Portability modifications for AIX: * Test if compiler is gcc. If not, don't set some CFLAGS values. * malloc() some strings, instead of using fixed-length arrays that xlc chokes on. Only had to do this in two places that used a calculated expression as the size of the string. * Fixed input box so backspace will work in my xterm (it sends 127 for some reason). -- Joey Hess Sat, 15 Mar 1997 00:25:23 -0500 pdmenu (1.0.0) unstable; urgency=low * Small documentation changes. * Added doc/ANNOUNCE file. * Removed outdated copy of lsm file. * Fixed spec file. -- Joey Hess Thu, 6 Mar 1997 22:17:05 -0500 pdmenu (0.6.4) unstable; urgency=low * Cleaned up base directory -- moved sources into src/, docs into doc/, autoconf stuff into autoconf/ * Fixed a few minor bugs in Makefile. * Minor doc fixes. * Added copyright header to all source files, etc. * Fixed very long standing problem with make test -- now it's a little quicker. -- Joey Hess Sat, 1 Mar 1997 18:49:19 -0500 pdmenu (0.6.3) unstable; urgency=low * Now builds on SunOS. * Fixed a bug that would cause pdmenu to crash after the screen was refreshed 30 times, or after 30 interactive programs were run. * make distclean removes autoconf generated slang.h. * Several small portability changes: * Work if getopt_long and/or getopt are unavailable. * Work with versions of tar that don't have the 'x' option. * Allow user to specify location of slang header file and of slang libraries when running configure. * Make sure a GNU compatable date is used to generate LSM file date. * Guess the size of the tar file more portably, using perl. * Use putenv, not setenv. * Include both string.h and strings.h. * Add -D__USE_FIXED_PROTOTYPES__ to gcc command line. * Moved man pages to subdirectory. * Routine update of debian/rules: Modifications for multiple binary package support. -- Joey Hess Thu, 27 Feb 1997 20:06:34 -0500 pdmenu (0.6.2) unstable; urgency=low * Fixed a bug in the automatically generated menus. if the id of a menu entry was the same as part of the command to run, there were problems. * Routine update of debian/rules: Call debstd after fixing file perms. -- Joey Hess Sat, 1 Feb 1997 22:28:56 -0500 pdmenu (0.6.1) unstable; urgency=low * ^L will redraw screen, as well as ^R. * More mods to configure script (redhat compatability). * Fixed pdmenu-genmenu problem with menu items that could run in either text or x11 mode showing up twice on the menus. -- Joey Hess Sat, 18 Jan 1997 21:34:42 -0500 pdmenu (0.6.0) unstable; urgency=low * Converted to use autoconf. * Lots of code reorganization and other changes; no changes to actual functionality of the program. -- Joey Hess Thu, 16 Jan 1997 20:18:18 -0500 pdmenu (0.5.10) unstable; urgency=low * Rewrote pdmenu-genmenu so it will only work with menu >= 0.10, but is simpler and faster. Updated man page, changed package dependancies accordingly. -- Joey Hess Tue, 7 Jan 1997 18:48:27 -0500 pdmenu (0.5.9) unstable; urgency=low * More fixes to postinst, postrm scripts, thanks to Joost. -- Joey Hess Tue, 7 Jan 1997 18:26:28 -0500 pdmenu (0.5.8) unstable; urgency=low * Rewrote and cleaned up rc file processing. * Fixed bug in postinst, postrm, that was making the pdmenurc_auto file 0 bytes long on upgrades. * postrm purge will remove conffile /etc/menu-methods/pdmenu * debstd no longer handles the menu file. (Because I need to handle things differently than the standard case.) -- Joey Hess Mon, 6 Jan 1997 21:43:17 -0500 pdmenu (0.5.7) unstable; urgency=low * Added redhat spec file, and built RPMs of pdmenu for the first time in a long while, thanks to Rob Lesan. -- Joey Hess Wed, 1 Jan 1997 20:44:57 -0500 pdmenu (0.5.6) unstable; urgency=low * Added a man page for pdmenu-genmenu (#6285) * Routine update of debian/rules: Use build-stamp instead of build. -- Joey Hess Tue, 31 Dec 1996 20:55:59 -0500 pdmenu (0.5.5) unstable; urgency=low * Fixed another bad bug in pdmenu-genmenu that made the menus unusable. * Fixed a minor hotkey bug in pdmenu-genmenu. -- Joey Hess Fri, 27 Dec 1996 21:24:09 -0500 pdmenu (0.5.4) unstable; urgency=low * Large cleanup of pdmenu-genmenu; fixed several serious bugs in it. * Moved pdmenu-genmenu into /usr/sbin. * Made /etc/menu-methods/pdmenu be a conffile, similar to those installed in the same directory by the menu package. -- Joey Hess Thu, 26 Dec 1996 21:41:43 -0500 pdmenu (0.5.3) unstable; urgency=low * Fixed a bug with hotkey selection on debian auto-generated menus. * Cursor doesn't jump around the screen anymore. * Now handles screen resizing properly. -- Joey Hess Thu, 26 Dec 1996 11:26:38 -0500 pdmenu (0.5.2) unstable; urgency=low * Added rc file preprocessing via the preproc command. * Pdmenu will now detect if X or the linux console is available, and automatically add/remove menu items that depend on X or the console. * Added Reccommends: cpp to control file. * Upped the maximum number of menus from 20 to 50. * Handle upper and lowercase "needs" fields in pdmenu-genmenu. * Fixed a bug that occurred when a rc file containing just a menu keyword was read. -- Joey Hess Fri, 20 Dec 1996 13:38:53 -0500 pdmenu (0.5.1) unstable; urgency=low * Fixed a bug if escape was hit in an edit window at the linux console. -- Joey Hess Thu, 19 Dec 1996 19:38:05 -0500 pdmenu (0.5.0) unstable; urgency=low * Built with new version of slang library. * Key handling fixed to work properly, thanks to new features of slang. * Escape key will close the current window. * A line of help is displayed if an invalid key is pressed. * The TERMCAP problem is solved! Slang will now work even if TERMCAP is set to something like "co#80:li#24:". Removed advice in README.debian about how to deal with this problem. * Fixed a bug that would mess up cut and paste in an xterm after pdmenu ran. * Added long options. * Added ctrl-u (pageup) and ctrl-v (pagedown) -- Joey Hess Wed, 18 Dec 1996 23:33:00 -0500 pdmenu (0.4.2) unstable; urgency=low * Changed author and maintainer email address, and updated name of ftp site. * Reset gpm to normal while shelled out to run a program or in a text box * Can now hold down on shift to use gpm to cut and paste normally. * Improved rc file parsing and sanity checking. * Fixed compilation without gpm support. * Skip over "nops" when moving in the menu. -- Joey Hess Mon, 16 Dec 1996 15:50:57 -0500 pdmenu (0.4.1) unstable; urgency=low * libgpm1 is required. * Cleanups to mouse support, and right mouse button exits a menu now. * Fixed compiled-in version number. * Added a debian menu entry for pdmenu (in Apps/Shells). * Supports -f option to the menu generator. * Added check for screen too small. * Ctrl-g will not exit program if -q option is passed on the command line. -- Joey Hess Sun, 15 Dec 1996 01:54:01 -0500 pdmenu (0.4.0) unstable; urgency=low * Experimental GPM mouse support added, thanks to Randolph Chung. * Makefile autodetects version number from this changelog. * Threw in a warning about how xterm and slang conflict over how TERMCAP should be set. -- Joey Hess Sat, 14 Dec 1996 21:10:16 -0500 pdmenu (0.3.4) unstable; urgency=low * Pdmenu now works in rxvt with TERM=rxvt, and in some windows telnet clients. -- Joey Hess Sat, 14 Dec 1996 14:15:12 -0500 pdmenu (0.3.3) unstable; urgency=low * Modified "menu" command in rc file so existing menus can be added to later in the rc file. * Added support for debian's "menu" package. Menus created by the "menu" package can now be used in pdmenu. * Added README.debian with instructions for using update-menu menus with pdmenu. * Added "read" command to rc file, to let above change work. * Added dependencies on perl and menu. -- Joey Hess Mon, 25 Nov 1996 23:30:21 -0500 pdmenu (0.3.2) unstable; urgency=low * Routine update of debian/rules. * Split man page in two: pdmenu and pdmenurc * Lots of cleanups and additions to the man pages. -- Joey Hess Sun, 10 Nov 1996 20:30:24 -0500 pdmenu (0.3.1) unstable; urgency=low * Debianized. * Autogenerate .lsm file. * Added code to detect the correct screen size when used with broken termcap/terminfo files. -- Joey Hess Sun, 3 Nov 1996 19:31:59 -0500 pdmenu (0.3) unstable; urgency=low * 0.3 3rd public release 21JUN96 Removed "-n" flag. Now, color is off by default. To turn it on, either use the "-c" flag, or set the COLORTERM environment variable. (Setting COLORTERM has the side effect of making color work properly in jed, slrn, and maybe other programs that use the slang library.) "make config" now works even if you only have perl 4.x, not just 5.x Ctrl-r forces a screen redraw. Split config.h up into lots of little .h files, should make it easier to configure different things. * 0.3pre6 Final bugfix 15JUN96 'p' flag works again (oops...) Revamped rc file processing. Control and high-bit characters in menus are changed to spaces. Tab characters in menus/windows are ok now. Avoided making color combos that blink on the linux console be the default colors. Allowed default colors to be configured in config.h Commands that return null output can be run with the 'w' flag without problems. Added "nop" command for a blank line in the menu. * 0.3pre5 More bugfixing 11MAR96 Kept it from stomping on $HOME. (oops..) Fixed key handling, although it's still far from perfect. Added home and end key handling. Other minor fixes. * 0.3pre4 Bugfix and minor improvements 27JAN96 No shadows in B&W mode, faster scrolling on slow terminals, and other cosmetic fixes. Fixed nasty problem with menus greater than 127 lines long. Fixed ShowMessage to work with broken gcc. 's' flag to exec command to set environment variables. More robust parsing of rc file. Sped up screen redraws, thanks to John E. Davis, author of S-LANG. Fixed make config. * 0.3pre3 Creeping featureitus 18JAN96 Fixed 'd' without 'n' flag so it'll not segfault. 'e' flag to exec command to let you enter text. 'd' flag to exec command to display output of command in a window. Configurable colors via the "color" command. Menus can now contain more items than will fit on the screen; they scroll. * 0.3pre2 Bugfix 11JAN96 Created autoconfig script ("make config"). Lots and lots of bugs fixed. Added -n and -q switches. * 0.3pre1 The need for speed 10JAN96 **IMPORTANT** This version is a total rewrite in C. It is like the earlier versions in spirit only. There are sure to be lots of bugs, and there is no support for configurable menu colors in this version. However, it's now MUCH faster, and easier to use, with loads of new options. * 0.2 The enevitable bugfix 02DEC95 Added support for multiple menu files being used at once. Just specify them all as parameters. Got rid of the width item in the menu definitions. Because of conflicts with multiple other programs named "menu", the Makefile now installs it as pdmenu instead. See INSTALL for details. Added support for different colored menus. Added a background title to the menus. Fixed bug in detection of menus. * 0.1 First public release 26NOV95 -- Joey Hess Sun, 3 Nov 1996 19:31:59 -0500 pdmenu/debian/menu-method-vc0000644000000000000000000000315012355063701013232 0ustar #!/usr/bin/install-menu # # pdmenu menu-method for menus that include VC programs # The verson of the menu package that can process this. compat="menu-1" # Include the local preferences, pdmenu only uses the defintion of title(). !include menu.h # Filename of the pdmenurc file we will generate. genmenu="pdmenurc.vc.new" # Where the system wide generated file is placed. rootprefix="/var/lib/pdmenu/" userprefix="." onlyrunasroot=true # Title of the top level menu that is made. mainmenutitle="Debian Menus" # Don't ever use "q" as a hotkey in menus, becuase it is used to popdown # submenus. Also, don't use "+", "2", "-" or "8" becuase they are used to # navigate the menus. hotkeyexclude="q+-28" # Some text to go at the top of the autogenerated file. preoutput="# Automatically generated pdmenurc file.\n# Do not edit (see /usr/share/doc/pdmenu/README.debian)\n\n" # In what order we output the menus. treewalk="c(m)" # How to start a new menu in the rc file. startmenu="menu:" esc($section,":") ":" esc(title(),":") "\n" # How to add a submenu to a menu. submenutitle=" show:" esc(escfirst(title(),$hotkey,"_"),":") "..::" esc($section,":") "\n" # The supported display types, in order of preference. supported vc= " exec:" esc(escfirst(title(),$hotkey,"_"),":") "::" $command "\n" text= " exec:" esc(escfirst(title(),$hotkey,"_"),":") "::" $command "\n" endsupported # Pdmenu doesn't need anything special at the end of a menu. endmenu= "\n" # Command to run at end. This overwrites the old menu file with the new one # we just made. postrun="mv -f " prefix() "pdmenurc.vc.new " prefix() "pdmenurc.vc 2>/dev/null" pdmenu/debian/postinst0000644000000000000000000000064112355063701012267 0ustar #!/bin/sh set -e if [ "$1" = configure ] && dpkg --compare-versions "$2" lt 1.2.81; then rm -f /var/lib/pdmenu/.pdmenurc_auto /var/lib/pdmenu/pdmenurc_auto fi # Handle the two menu methods installed by hand. for inst in /etc/menu-methods/pdmenu-vc /etc/menu-methods/pdmenu-x11; do if [ -x /usr/bin/update-menus ] && [ -f $inst ] ; then chmod a+x $inst # update-menus will be run below fi done #DEBHELPER# pdmenu/debian/install0000644000000000000000000000002412355063701012045 0ustar debian/pdmenurc etc pdmenu/debian/menu0000644000000000000000000000013712355063701011350 0ustar ?package(pdmenu):needs="text" section="Applications/Shells" \ title="Pdmenu" command="pdmenu" pdmenu/debian/dirs0000644000000000000000000000001712355063701011342 0ustar var/lib/pdmenu pdmenu/debian/pdmenurc0000644000000000000000000000150512355063701012221 0ustar #!/usr/bin/pdmenu #Note that the above bang-path isn't required, but it lets you run this #file directly as a sort of pdmenu script. #Define the main menu: menu:main:Main Menu # This ties in with Debian's autogenerated Apps menu. show:_Debian Menus..::/Debian exec:_Change your password:p:passwd exec:_Directory listing:display:ls -l exec:_Change directory:edit,setenv:echo PWD=~set to?:~ exec:_Who's online?:truncate:echo "These users are online:";w nop exit:E_xit # If you edit this file, you will probably not want to remove the following # section, which makes menus of Debian apps available. preproc: \ if tty|egrep -q "tty[0-9]|vc/[0-9]|console"; then \ cat /var/lib/pdmenu/pdmenurc.vc; \ elif [ "$DISPLAY" ]; then \ cat /var/lib/pdmenu/pdmenurc.x11; \ else \ cat /var/lib/pdmenu/pdmenurc; \ fi pdmenu/debian/menu-method-x110000644000000000000000000000317612355063701013243 0ustar #!/usr/bin/install-menu # # pdmenu menu-method for menus that include X programs # The verson of the menu package that can process this. compat="menu-1" # Include the local preferences, pdmenu only uses the defintion of title(). !include menu.h # Filename of the pdmenurc file we will generate. genmenu="pdmenurc.x11.new" # Where the system wide generated file is placed. rootprefix="/var/lib/pdmenu/" userprefix="." onlyrunasroot=true # Title of the top level menu that is made. mainmenutitle="Debian Menus" # Don't ever use "q" as a hotkey in menus, becuase it is used to popdown # submenus. Also, don't use "+", "2", "-" or "8" becuase they are used to # navigate the menus. hotkeyexclude="q+-28" # Some text to go at the top of the autogenerated file. preoutput="# Automatically generated pdmenurc file.\n# Do not edit (see /usr/share/doc/pdmenu/README.debian)\n\n" # In what order we output the menus. treewalk="c(m)" # How to start a new menu in the rc file. startmenu="menu:" esc($section,":") ":" esc(title(),":") "\n" # How to add a submenu to a menu. submenutitle=" show:" esc(escfirst(title(),$hotkey,"_"),":") "..::" esc($section,":") "\n" # The supported display types, in order of preference. supported x11= " exec:" esc(escfirst(title(),$hotkey,"_"),":") ":noclear:" $command " >/dev/null 2>&1 &\n" text= " exec:" esc(escfirst(title(),$hotkey,"_"),":") "::" $command "\n" endsupported # Pdmenu doesn't need anything special at the end of a menu. endmenu= "\n" # Command to run at end. This overwrites the old menu file with the new one # we just made. postrun="mv -f " prefix() "pdmenurc.x11.new " prefix() "pdmenurc.x11 2>/dev/null" pdmenu/debian/postrm0000644000000000000000000000064012355063701011727 0ustar #!/bin/sh -e # Handle two menu methods not installed by debhelper. for inst in /etc/menu-methods/pdmenu-vc /etc/menu-methods/pdmenu-x11; do if [ "$1" = "remove" ] && [ -f "$inst" ]; then chmod a-x $inst ; fi # update-menus will be run below done #DEBHELPER# case "$1" in purge) rm -rf /var/lib/pdmenu ;; upgrade);; remove);; *) echo "postrm called with unknown argument \`$1'" >&2 exit 0 ;; esac pdmenu/debian/README.Debian0000644000000000000000000000301512355063701012520 0ustar Automatic menu generation: ------------------------- When used with Debian Linux, Pdmenu interfaces with Debian's "menu" package to provide automatically generated menus of programs on your Debian system. The autogenerated menu files are stored in two places: /var/lib/pdmenu/pdmenurc{,.vc,x11} Global autogenerated menu files. ~/.pdmenurc{,.vc,x11} Autogenerated file for a single user. To incorporate one of these files into your pdmenu menus, use the read command to read it in: read:/var/lib/pdmenu/.pdmenurc_auto You might want to use a more complex command, like this one, which will filter out X programs if you're not in X, etc: preproc: \ if tty|egrep -q "tty[0-9]|vc/[0-9]|console"; then \ cat /var/lib/pdmenu/pdmenurc.vc; \ elif [ "$DISPLAY" ]; then \ cat /var/lib/pdmenu/pdmenurc.x11; \ else \ cat /var/lib/pdmenu/pdmenurc; \ fi This will make a menu named "/Debian" available, along with a bunch of submenus like "/Debian/Apps" and "/Debian/Apps/Games". You can use the show command in a menu to add an entry to the menu that displays these menus: menu:main:Main Menu:This is a sample main menu show:Debian Menus..::/Debian If you make a ~/.menu directory (see documentation of the menu package for details), then the ~/.pdmenurc files will be created when you run update-menus. Joey Hess pdmenu/debian/compat0000644000000000000000000000000212355063701011656 0ustar 8 pdmenu/debian/control0000644000000000000000000000134712427315142012067 0ustar Source: pdmenu Section: shells Priority: optional Build-Depends: debhelper (>= 8), autotools-dev, libslang2-dev (>= 1.4.4-3), libgpm-dev [!hurd-any !kfreebsd-any], gettext, dpkg-dev (>= 1.9.0) Maintainer: Debian QA Group Standards-Version: 3.9.5 Vcs-Git: git://git.kitenet.net/pdmenu Homepage: https://joeyh.name/code/pdmenu/ Package: pdmenu Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: menu (>= 2.1.29) Conflicts: menu (<< 2.0.0-5) Description: simple console menu program A full screen console menu program, intended to be comfortable login shell for inexperienced users. . Pdmenu interfaces with Debian's menu system, to provide automatically-generated lists of installed programs. pdmenu/debian/rules0000755000000000000000000000170312371437274011551 0ustar #!/usr/bin/make -f CFLAGS=-O2 -Wall -g INSTALL_PROGRAM=install %: dh $@ --with autotools_dev override_dh_auto_configure: ./configure $(GPMCONFIG) --prefix=/usr --sysconfdir=/etc \ --mandir=/usr/share/man CFLAGS="$(CFLAGS)" override_dh_auto_test: # make test is interactive; skip it override_dh_auto_clean: dh_autotools-dev_updateconfig if [ -e Makefile ]; then $(MAKE) distclean; fi dh_autotools-dev_restoreconfig override_dh_auto_install: $(MAKE) INSTALL_PREFIX=debian/pdmenu \ INSTALL_PROGRAM="$(INSTALL_PROGRAM)" install override_dh_installmenu: dh_installmenu install debian/menu-method-x11 debian/pdmenu/etc/menu-methods/pdmenu-x11 install debian/menu-method-vc debian/pdmenu/etc/menu-methods/pdmenu-vc override_dh_installexamples: dh_installexamples -X.in -X.pl examples/* override_dh_compress: dh_compress -X examples/ # Not intended for use by anyone except the author. announcedir: @echo ${HOME}/src/joeywiki/code/pdmenu/news pdmenu/debian/menu-method0000644000000000000000000000302012355063701012620 0ustar #!/usr/bin/install-menu # # pdmenu menu-method for menus of plain text programs # The verson of the menu package that can process this. compat="menu-1" # Include the local preferences, pdmenu only uses the defintion of title(). !include menu.h # Filename of the pdmenurc file we will generate. genmenu="pdmenurc.new" # Where the system wide generated file is placed. rootprefix="/var/lib/pdmenu/" userprefix="." onlyrunasroot=true # Title of the top level menu that is made. mainmenutitle="Debian Menus" # Don't ever use "q" as a hotkey in menus, becuase it is used to popdown # submenus. Also, don't use "+", "2", "-" or "8" becuase they are used to # navigate the menus. hotkeyexclude="q+-28" # Some text to go at the top of the autogenerated file. preoutput="# Automatically generated pdmenurc file.\n# Do not edit (see /usr/share/doc/pdmenu/README.debian)\n\n" # In what order we output the menus. treewalk="c(m)" # How to start a new menu in the rc file. startmenu="menu:" esc($section,":") ":" esc(title(),":") "\n" # How to add a submenu to a menu. submenutitle=" show:" esc(escfirst(title(),$hotkey,"_"),":") "..::" esc($section,":") "\n" # The supported display types, in order of preference. supported text= " exec:" esc(escfirst(title(),$hotkey,"_"),":") "::" $command "\n" endsupported # Pdmenu doesn't need anything special at the end of a menu. endmenu= "\n" # Command to run at end. This overwrites the old menu file with the new one # we just made. postrun="mv -f " prefix() "pdmenurc.new " prefix() "pdmenurc 2>/dev/null" pdmenu/debian/copyright0000644000000000000000000000047312355063701012417 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Files: * Copyright: Copyright (c) 1995-2011 Joey Hess License: GPL-2+ The full text of the GPL is distributed as doc/COPYING in pdmenu's source, and is distributed in /usr/share/common-licenses/GPL-2 on Debian systems. pdmenu/debian/docs0000644000000000000000000000004612355063701011333 0ustar doc/BUGS README doc/TODO doc/ANNOUNCE pdmenu/doc/0000755000000000000000000000000012427315273010007 5ustar pdmenu/doc/BUGS0000644000000000000000000000231512355063701010467 0ustar This is the first, yes, the first C program I ever wrote. if you're a seasoned C programmer, and you're ROTFL over my code, please write me , and give me a hand or just some constructive criticizm. If you want to report a bug, first visit the pdmenu web site (http://kitenet.net/~joey/code/pdmenu/) and check that the latest version of pdmenu has the bug. Most bug reports I get have already been fixed, and the bug reporter is just using an outdated pdmenu. Once you verify there is still a bug, mail , describing how to reproduce the bug. Please tell me the versions of pdmenu, slang, and what operating system you are using, along with the pdmenurc file that caused the problem and any other pertinent information. Current known bugs: I'm sure there are spelling errors throughout. Too bad. Run a program that has the pause flag set. At the press any key to continue prompt, resize the screen. The screen ends up sized wrong when you get back to pdmenu. In an rc file, a '\' on a line by itself with no continuation lines just before it will not be stripped out. When using pdmenurc.complex to view a file with tabs, ie, INSTALL, some lines are missing their last character. pdmenu/doc/pdmenu.man.in0000644000000000000000000001110412355063701012372 0ustar .\" -*- nroff -*- .TH PDMENU 1 "@BUILD_DATE@" "@VER@" "Commands" .SH NAME pdmenu \- simple full screen menu program .SH SYNOPSIS .B pdmenu [\fIoptions\fP] [\fImenufile\fP ...] .SH DESCRIPTION .I pdmenu is a simple menu program that displays a menu from which the user can pick programs to run. Submenus are supported. .PP When you run .I pdmenu , you will be presented with a menu. Simply use the arrow keys to move to the program you want to run, and press Enter to run the program. When the program ends, you will be returned to the menu. .PP If you are running .I pdmenu at the linux console, and gpm is running, you can move the mouse and click to navigate through the menus. .PP Some menu items are actually submenus, and will take you to another menu. Others may cause a text edit window to be displayed, where you can enter parameters for a command before running it. Still others may run a command, and display the output in a window. .SH KEYS Here are all keys you need to get around in \fIpdmenu\fP: .IP "[up arrow], 8, -" Move up one line in the menu. .IP "[down arrow], 2, +" Move down one line. .IP "[page up], [ctrl-u]" Move up an entire screen. .IP "[page down], [space], [ctrl-v]" Move down an entire screen. .IP "[home]" Move to the first entry of the menu. .IP "[end]" Move to the last entry of the menu. .IP "q" Exit the current menu, or exit .I pdmenu if used on the first menu. Does not work in the text edit windows. (This will not work if there is also a hotkey set up for 'q', the hotkey takes precedence.) .IP "ESC" Close the currently active window, and return to the previous window, or exit .I pdmenu if used on the first menu. .IP "[ctrl-c]" Exit .I pdmenu immediately. .IP "[ctrl-r]" Force a redraw of the screen. .IP "[enter]" Launch the selected menu item. In a text edit window, closes the window. .IP "[backspace]" Performs a destructive backspace in a text edit window. .IP "hotkeys" Some letters of a menu item may be highlighted. These are hotkeys; simply press the highlighted letter to select the next menu item with that hotkey. .SH OPTIONS .IP "-h, --help" Display usage summary and exit. .IP "-c, --color" Use color. By default, .I pdmenu will display in black and white mode. If your terminal supports color, use this switch. .IP "-u, --unpark" "Unparks" the cursor from the bottom of the screen. When this option is selected, the cursor moves to be on the line of the menu that is currently selected. This makes .I pdmenu more useable with speech synthesis systems that need to know what line is the current line on the screen. .IP "-mmenuid, --menu=menuid" Instead of displaying the first menu from the menufile, select the menu with the id "menuid" and display it. .IP "-q, --quit" By default, at the opening menu, 'q' will exit \fIpdmenu\fP. If the \-q switch is specified, this will not be the case. This is useful if you want to prevent the user from ever exiting \fIpdmenu\fP. (This also disables control-c and the right mouse button from exiting \fIpdmenu\fP.) .IP "-r, --retro" This makes .I pdmenu use an old style for displaying menus. Menus in the background don't change color, or lose their hotkeys. Note that this will also be a little bit faster than the default on slow terminals and the like. .IP "-l, --lowbit" By default, .I pdmenu will use nice high bit line drawing characters if it thinks your terminal is capable. Sometimes it gets this wrong and you get borders that look all messed up. Then you should use this --lowbit switch to force it to use low bit line drawing characters. .IP "-n, --numeric" Disables the use of the keys 2 and 8 for moving up and down. This is useful if you want to use numbered hotkeys. .IP "menufile ..." Specify a menu definition file or files to use. If you specify multiple files, they will all be loaded in together. By default, the first menu in the first menufile will be displayed when .I pdmenu starts, but this can be overridden by the --menu= option. If menufile is "-", pdmenu will read standard input as a menu file. .SH NOTES To use the mouse to cut and paste as usual, hold down on the shift key when you use the mouse. .SH FILES .I @PDMENU_SYSCONFDIR@/pdmenurc .RS Default config file. See .BR pdmenurc (5) for details. .RE .I ~/.pdmenurc .RS If this exists, it overrides @PDMENU_SYSCONFDIR@/pdmenurc. See .BR pdmenurc (5) for details. .SH ENVIRONMENT .IP COLORTERM Set this variable to make .I pdmenu to use color by default. .SH DISTRIBUTION Redistribution is subject to the GNU public license. .SH BUGS See the file BUGS that came with .I pdmenu for the current buglist. .SH AUTHOR Joey Hess, . .SH "SEE ALSO" .BR pdmenurc (5) pdmenu/doc/ANNOUNCE0000644000000000000000000000435512355063701011143 0ustar Newsgroups: comp.os.linux.announce Subject: Pdmenu 1.2.30 - simple text mode menu system Followup-to: comp.os.linux.misc Pdmenu is a menu system for Unix. It is designed to be easy to use, and is suitable for a login shell for inexperienced users, or it can just be run at the command line as a handy menu program. Pdmenu features color support and, GPM mouse support at the Linux console. It compiles on Linux and a variety of other Unix's. I was prompted to write Pdmenu when I took a look at a shell script that used dialog to generate similar menus. The shell script was huge, complicated, and ugly, and had to be modified manually to add anything to the menu. I hope that Pdmenu is better. :-) For more info, including source code and packages for Debian and Red Hat visit Pdmenu's home page at: http://kitenet.net/~joey/code/pdmenu/ I have just released Pdmenu 1.2.30. The biggest change in this new version of Pdmenu is that it no longer has hard coded limits of any sort. Now you can load up any number of menus of any length. Other changes since Pdmenu version 1.0.0 include: * Much nicer looking shadows under windows. * Menus that are not active now change to a different color and lose some decorations. (The old behavior can be re-enabled with the --retro command line parameter.) * Added a --lowbit command line parameter, which forces pdmenu to not use high bit ascii line drawing characters. * Added --menu= option to jump to a submenu on startup. * Added --unpark option, which lets the cursor move to the selected line on a menu, to make pdmenu more friendly to speech generation software. * Introduced a new easy to understand long form for the flags to the exec command. * Added group commands. These are menu items that execute more than one pdmenu command when selected. For example, you could make a group command that runs a program, pops up a submenu, and when the submenu closes, exits pdmenu. * If you run pdmenu in a xterm, and resize the xterm, pdmenu will immediately resize now. * Fixed a large number of buffer overflows and memory leaks and other bugs. * Portability fixes for building on other Unix's. * Added several contributed example pdmenurc files to showcase some of the capabilities of pdmenu. * Optimizations. pdmenu/doc/TODO0000644000000000000000000000213112355063701010470 0ustar Yet to be done: * A menu file editor, to make it easy for you to set up your own menus. * Break out a general widget library. * Scrollbars on menus. * Autodetect if terminal supports color * Handle BS characters properly, so man pages can be displayed in windows. This would be nasty to do, and the benefit is small... * There are some ugly loops in DoMenu_Up and DoMenu_Down that could be eliminated by careful programming. * Support arrow keys, etc in inputbox. * SIGSTP handler, so ^Z suspends (when not in -q mode) * Possible: add an immediate command that takes another command that normally only appears in a menu as its parameter and runs it immediatly. ie, immediate:remove:::menuid * Add an option for a help text for each command in the menu, displayed on help line. (Defaults to on, but can be turned off for slow terminals.) * Use checker's garbage collector to find all leaks. * Rewrite RunShow. There has to be a better way. * When esc is hit while editing something, back out only one edit step, instead of going all the way back to the menu. pdmenu/doc/pdmenurc.man.in0000644000000000000000000003170112355063701012724 0ustar .\" -*- nroff -*- .TH PDMENURC 5 "@BUILD_DATE@" "pdmenu" "File formats" .SH NAME pdmenurc \- menu definitions file for pdmenu .SH SYNOPSIS .B /etc/pdmenurc .PP .B ~/.pdmenurc .SH DESCRIPTION The pdmenurc file defines menus for .BR pdmenu (1) to display. Each menu consists of one or more menu entries. The first menu to appear in the file is displayed by .BR pdmenu (1) when it starts up, and can have menu entries that call up submenus. .SH EXAMPLES Here is a sample pdmenurc file: .PP #Set a pleasing color scheme. color:desktop:blue:blue color:title:blue:white color:base:blue:white #this is a comment menu:main:Main Menu:Things to do at foobar show:_Games..::games exec:_Mail::pine exec:_News::slrn -C exec:_WWW::lynx exec:_Irc::irc exec:_Directory _Listing:display:ls -l exec:_Who's online?:truncate:w exec:_Finger:edit,truncate:finger ~finger who?:~ nop exit:E_xit menu:games:Games:Some text-based games exec:_Tetris for Terminals::/usr/games/tt exec:_Adventure:pause:/usr/games/adventure exec:_Zork:pause:/usr/games/zork nop exit:_Back to main menu.. This will display a menu, with a submenu for games. .SH FORMAT .BR pdmenu (1) doesn't care how the pdmenurc is indented; all whitespace is ignored. However, each command must be on its own line. The commands are grouped into two classes: those that appear only in menus, and those that can appear anywhere in the file. .SS COMMANDS THAT MAY BE USED ANYWHERE These commands may appear in a menu, or outside of a menu. They take effect as soon as .BR pdmenu (1) sees them. .TP menu This starts a menu. All items between this menu command and the next will comprise one menu. If a menu with the same id has already been defined earlier, then all items between this menu command and the next will be added to the menu. The syntax is: .RS .PP \fImenu:menuid:title[:helptext]\fR .TP menuid The id of the menu (each menu must have a unique id). .TP title The title of the menu. .TP helptext Text to be displayed at the bottom of the screen when the menu is active. .RE .TP title This overrides the default title at the top of the screen. The syntax is: .RS .PP \fItitle:text\fR .RE .TP color This changes the color of a part of the display. Later color commands override earlier color commands that would affect the same part of the display. The syntax is: .RS .PP \fIcolor:screenpart:foreground[:background]\fR .TP screenpart The area of the screen which takes on the selected color scheme. Areas of the screen that can be set are: .RS .TP desktop The space over which the menus appear. .TP title The line at the top of the screen. .TP base The line at the bottom of the screen. .TP menu The normal color of text in a menu. .TP selbar The selection bar in the menu, when over normal text. .TP shadow The shadow of a window .TP menuhot The color of text in a menu that is a hotkey. .TP selbarhot The color of a hotkey when the selection bar is over it. .TP unselmenu The color of a menu window that is not currently active. .RE .TP foreground The color to use in the foreground. Valid colors are: .RS black gray red brightred green brightgreen brown yellow blue brightblue magenta brightmagenta cyan brightcyan lightgray white .RE .PP .TP background The color to use in the background. On most terminals, the background color can only be one of the colors listed in the first column above. .RE .TP read This causes another menu definitions file to be read in and replace the read command. This is quite similar to #include in a c program. The syntax is: .RS .PP \fIread:rcfile\fR .PP Note that no checking is done to prevent recursive read commands, and that such a recursive command can crash pdmenu. .RE .TP preproc This runs a command, and uses its output as a pdmenurc file, which is read in and replaces the preproc command. Typically a preprocessor such as m4 or cpp will be used. The syntax is: .RS .PP \fIpreproc:command [args]\fR .PP Note that no checking is done to prevent recursive preproc commands, and that such a recursive command can crash pdmenu. .RE .SS COMMANDS THAT MUST APPEAR INSIDE MENUS These commands must always appear within a menu. They are only executed if the user selects them from the menu. .TP show This displays a submenu. The syntax is: .RS .PP \fIshow:desc:flags:menuid\fR .TP menuid The id of the menu to show, corresponding to the menuid given in the menu's definition. .TP desc The description of the submenu to appear in the parent window. .RS .PP To place a hotkey in the description, put a '_' before the character you want to become the hotkey. It is a good idea to differentiate submenus from commands in a menu by, for example, appending ".." to their descriptions. .RE .IP flags Currently ignored. .IP .RE .TP nop This does nothing but place a blank line in the menu. Nop commands may not appear as the first command in a menu. Syntax: .RS .PP \fInop[:text]\fR .TP text If this is present, it will appear in the menu where the nop is. Otherwise, the nop in the menu will be a blank line. .RE .TP helptext This changes the helptext of the currently displayed menu. The syntax is: .RS .PP \fIhelptext:desc:flags:help text\fR .TP desc The text to appear on the menu. .TP flags Currently the only available flag is "command", which makes the help text be read in from a command in the help text field, instead of using the literal value of the field. The first line the command outputs becomes the new help text. .RE .TP exit If only one menu is on the screen when this is selected, then .BR pdmenu (1) will quit. Otherwise, this will take the user back to the parent menu of the menu they are currently in. Selecting an exit command in a menu is equivalent to pressing 'q', unless you have ran .BR pdmenu (1) with the \-q switch. The syntax is: .RS .PP \fIexit:desc\fR .TP desc The description of the menu item. .RS .PP To place a hotkey in the description, put a '_' before the character you want to become the hotkey. .RE .RE .TP group This creates a menu entry that can run multiple commands at the same time. After the group command, list the commands that make up the group. Close the group with the \fIendgroup\fP command. When the group is selected from the menu, each command in the group will be run, in turn. Note that if a group caintains an exit command, processing will stop there even if there are more commands in the group. Group commands may not be nested. The syntax is: .RS .PP \fIgroup:desc\fR .TP desc The description of the menu item. .RS .PP To place a hotkey in the description, put a '_' before the character you want to become the hotkey. .RE .RE .TP endgroup This closes a \fIgroup\fP command. Every command between the opening group command and the endgroup comprises a group of commands. .TP exec This runs a command. The syntax is: .RS .PP \fIexec:desc:flags:command\fR .TP command The actual command to run when this item is selected. .RS .PP Normally, .BR pdmenu (1) passes the command to .BR system (3) for exacution. However, if the first token of the command is "exec", then the command is executed directly with the .BR execvp (3) system call. As such, the .BR pdmenu (1) process is wholly replaced by the command. .RE .TP desc The description of the command that appears in the menu. .RS .PP To place a hotkey in the description, put a '_' before the character you want to become the hotkey. .RE .TP flags How to run this command, and what to do with its output. Any number of the following flags can be specified, in any order, separated by commas. (for example, "display,edit") .RS .PP Some of the flags conflict with each over, for example, 'display' and 'pause' cannot both be used at the same time. If conflicting flags are specified, Pdmenu will just pick one of them and use it. .PP Note that to maintain backward compatability with old versions of Pdmenu, the flags can be formatted differently: as a sequence of characters, each character a flag and corrisponding to the first character of the long flag name, and nothing separating the characters. However, this format is obsolete and hard to understand, and should no longer be used. .TP noclear By default the screen is cleared and the terminal is reset to normal before .BR pdmenu (1) runs a command from the menu, and after the command exits, the screen is redrawn. If this flag is set, the screen is not cleared or redrawn. Use it if you have a command on the menu that does not produce any output to the screen. (Conflicts with: 'pause') .TP pause Pause after the command exits. Use this if you need to see the output of the command. (Conflicts with: 'noclear', 'display', 'truncate', 'makemenu', and 'setenv') .TP display Display the output of the command in a window. If this flag is set, the 'pause' flag is disabled, and the 'noclear' flag is automatically set. If the command outputs lines that are too long, they will be wrapped inside the window. (Conflicts with: 'pause', 'truncate', 'makemenu', 'setenv') .TP truncate Like 'display', except the output of the command is truncated to fit in the window, not wrapped. (Conflicts with: 'pause', 'display', 'mmakemenu', 'setenv') .TP edit Edit the command interactively. .RS .PP When this flag is set, the command to be run is scanned for any tags of the format \fI~title:default~\fR. For each that is found, a text entry window is displayed, with the title equal to the contents of the title field, and the default text equal to the contents of the default field. .PP To use the '~' or ':' characters in the command without having them interpreted as tag delimiters, escape them with a '\e' character. (Ie, '\e~' and '\e:') .PP \fISecurity warning!\fR Any exec command that uses the 'edit' flag will be a security hole. The user need only to enter text with a ';' in it, and they can run an arbitrary command after the semicolon! .PP There is no fix for this security problem at this time. If the user running .BR pdmenu (1) is not a trusted user (if they are a guest user, say), do not allow them access to any exec commands that have the 'edit' flag set. .RE .TP makemenu This flag lets you generate menus on the fly as .BR pdmenu (1) is running. It runs the command, then processes the output of the command as if it were a pdmenurc file. .RS .PP Here is a sample use of this flag. It creates a menu of people who are logged on, and lets you talk to one of them. Notice the use of \fIremove\fP to clear the menu after we use it. .PP group:_Talk exec::makemenu: \\ echo "menu:talk:Talk"; \\ for u in `users`; do \\ echo "exec:$u::talk $u"; \\ done show:::talk remove:::talk endgroup .PP (Conflicts with: 'display', 'truncate', 'pause', 'display', 'setenv') .RE .TP setenv Set an environment variable. .RS .PP This flag causes .BR pdmenu (1) to set a variable in its own environment. .BR pdmenu (1) runs the exec command, and looks at the command's output. The first line should be in the format .RS VAR=value .RE Where VAR is the environment variable to set, and value is the new value for the variable. .PP For example, use "echo PWD=/tmp" to set the current working directory to /tmp. (Conflicts with: 'makemenu', 'display', 'truncate', and 'pause') .RE .RE .RE .TP remove This removes a menu from Pdmenu's list of menus. You should never attempt to remove a menu that is currently being displayed on screen. The syntax is: .RS .PP \fIremove:desc:flags:menuid\fR .PP .TP desc The description of the command that appears in the menu. .RS .PP To place a hotkey in the description, put a '_' before the character you want to become the hotkey. .RE .TP flags Currently ignored. .TP menuid The id of the menu to remove. If the menu wih id \fImenuid\fR does not exist, no error is reported. .PP This command is typically used after creating and using a new menu via the 'makemenu' flag to \fIexec\fR, to remove a menu that is no longer needed. For example, if you have the followng pdmenurc: menu:main:Main Menu group:_Test exec::makemenu: \\ echo menu:sample:Dir; \\ echo exec:_Directory:pause:ls show:::sample endgroup Each time the user selects "Test" from the Main Menu, the menu that appears has another Directory command on it. If you don't want this to happen, and you want only one Directory command to be on the menu, add a command to remove the menu after it is used, like this: menu:main:Main Menu group:_Test exec::makemenu: \\ echo menu:sample:Dir; \\ echo exec:_Directory:pause:ls show:::sample remove:::sample endgroup .SH NOTES If a line ends with '\\', .BR pdmenu (1) will read in the next line as part of the same logical line. .PP If you want the ':' character to appear in a field, you may escape out the ':' character by placing '\\' before it. You don't need to do this if the field is the last field in a line. .SH FILES .I @PDMENU_SYSCONFDIR@/pdmenurc .RS Default config file. .RE .I ~/.pdmenurc .RS If this exists, it overrides @PDMENU_SYSCONFDIR@/pdmenurc. .SH AUTHOR Joey Hess, . .SH "SEE ALSO" .BR pdmenu (1) pdmenu/doc/COPYING0000644000000000000000000004311012355063701011035 0ustar GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 2 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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. pdmenu/configure0000755000000000000000000064464012371445155011170 0ustar #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # 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 as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="pdmenu" ac_unique_file="src/pdmenu.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_list= ac_subst_vars='LTLIBOBJS LIBOBJS PDMENU_LIBDIR PDMENU_SYSCONFDIR PDMENU_BINDIR TAR_FILE_SIZE_GUESS PERL_PROG OLD_VER VER AWK BUILD_DATE DATE_PROG SLANG_H INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM LN_S gcc_cflags INTL_LIBTOOL_SUFFIX_PREFIX MKINSTALLDIRS GENCAT INSTOBJEXT DATADIRNAME POSUB POFILES INTLOBJS INTLLIBS GMOFILES CATOBJEXT CATALOGS USE_INCLUDED_LIBINTL BUILD_INCLUDED_LIBINTL INTLBISON XGETTEXT GMSGFMT MSGFMT USE_NLS LIBICONV GLIBC21 ALLOCA EGREP GREP CPP RANLIB host_os host_vendor host_cpu host build_os build_vendor build_cpu build OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC SET_MAKE PACKAGE target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking with_libiconv_prefix enable_nls with_included_gettext with_gpm ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # 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. # (The list follows the same order as the GNU Coding Standards.) 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' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= 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 case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -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) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) 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_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$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 ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$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 ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$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 | -n) 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 ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$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_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=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 ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_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'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe 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 ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # 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 the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` 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 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # 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 <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-nls do not use Native Language Support Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib --with-included-gettext use the GNU gettext library included here --with-gpm link in gpm (default is YES if available) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) 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. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this 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_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/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` /usr/bin/hostinfo = `(/usr/bin/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` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # 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. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } 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. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi as_fn_append ac_header_list " stdlib.h" as_fn_append ac_header_list " unistd.h" as_fn_append ac_header_list " sys/param.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; 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,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_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 # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## 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_aux_dir= for ac_dir in autoconf "$srcdir"/autoconf; 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 as_fn_error $? "cannot find install-sh, install.sh, or shtool in autoconf \"$srcdir\"/autoconf" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. PACKAGE=pdmenu cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF ALL_LINGUAS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" 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 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&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 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS 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 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&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 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; 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 conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* 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 (p, i) 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; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; 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 () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : 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 # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&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 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror in -lcposix" >&5 $as_echo_n "checking for strerror in -lcposix... " >&6; } if ${ac_cv_lib_cposix_strerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcposix $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strerror (); int main () { return strerror (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cposix_strerror=yes else ac_cv_lib_cposix_strerror=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cposix_strerror" >&5 $as_echo "$ac_cv_lib_cposix_strerror" >&6; } if test "x$ac_cv_lib_cposix_strerror" = xyes; then : LIBS="$LIBS -lcposix" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&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. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$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. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end 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 -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end 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 -f 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #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 () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac # 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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes else ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes else ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then : ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_header in $ac_header_list do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" if test "x$ac_cv_func_getpagesize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 $as_echo_n "checking for working mmap... " >&6; } if ${ac_cv_func_mmap_fixed_mapped+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_mmap_fixed_mapped=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed mmap private fixed at somewhere currently unmapped mmap private fixed at somewhere already mapped mmap shared not fixed mmap shared fixed at somewhere currently unmapped mmap shared fixed at somewhere already mapped For private mappings, we should verify that changes cannot be read() back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ #include #include #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main () { char *data, *data2, *data3; const char *cdata2; int i, pagesize; int fd, fd2; pagesize = getpagesize (); /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) return 1; for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) return 2; if (write (fd, data, pagesize) != pagesize) return 3; close (fd); /* Next, check that the tail of a page is zero-filled. File must have non-zero length, otherwise we risk SIGBUS for entire page. */ fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); if (fd2 < 0) return 4; cdata2 = ""; if (write (fd2, cdata2, 1) != 1) return 5; data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); if (data2 == MAP_FAILED) return 6; for (i = 0; i < pagesize; ++i) if (*(data2 + i)) return 7; close (fd2); if (munmap (data2, pagesize)) return 8; /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) return 9; if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) return 10; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) return 11; /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) return 12; if (read (fd, data3, pagesize) != pagesize) return 13; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) return 14; close (fd); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_mmap_fixed_mapped=yes else ac_cv_func_mmap_fixed_mapped=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } if test $ac_cv_func_mmap_fixed_mapped = yes; then $as_echo "#define HAVE_MMAP 1" >>confdefs.h fi rm -f conftest.mmap conftest.txt { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5 $as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; } if ${ac_cv_gnu_library_2_1+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky GNU user" >/dev/null 2>&1; then : ac_cv_gnu_library_2_1=yes else ac_cv_gnu_library_2_1=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5 $as_echo "$ac_cv_gnu_library_2_1" >&6; } GLIBC21="$ac_cv_gnu_library_2_1" for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ stdlib.h string.h unistd.h sys/param.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \ getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \ strdup strtoul tsearch __argz_count __argz_stringify __argz_next do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then : withval=$with_libiconv_prefix; for dir in `echo "$withval" | tr : ' '`; do if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS -liconv" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 $as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then $as_echo "#define HAVE_ICONV 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 $as_echo_n "checking for iconv declaration... " >&6; } if ${am_cv_proto_iconv+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : am_cv_proto_iconv_arg1="" else am_cv_proto_iconv_arg1="const" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- }$am_cv_proto_iconv" >&5 $as_echo "${ac_t:- }$am_cv_proto_iconv" >&6; } cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 _ACEOF fi LIBICONV= if test "$am_cv_lib_iconv" = yes; then LIBICONV="-liconv" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } if ${am_cv_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char* cs = nl_langinfo(CODESET); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_langinfo_codeset=yes else am_cv_langinfo_codeset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 $as_echo "$am_cv_langinfo_codeset" >&6; } if test $am_cv_langinfo_codeset = yes; then $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h fi if test $ac_cv_header_locale_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 $as_echo_n "checking for LC_MESSAGES... " >&6; } if ${am_cv_val_LC_MESSAGES+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_val_LC_MESSAGES=yes else am_cv_val_LC_MESSAGES=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 $as_echo "$am_cv_val_LC_MESSAGES" >&6; } if test $am_cv_val_LC_MESSAGES = yes; then $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 $as_echo_n "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. if test "${enable_nls+set}" = set; then : enableval=$enable_nls; USE_NLS=$enableval else USE_NLS=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no INTLLIBS= if test "$USE_NLS" = "yes"; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether included gettext is requested" >&5 $as_echo_n "checking whether included gettext is requested... " >&6; } # Check whether --with-included-gettext was given. if test "${with_included_gettext+set}" = set; then : withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval else nls_cv_force_use_gnu_gettext=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nls_cv_force_use_gnu_gettext" >&5 $as_echo "$nls_cv_force_use_gnu_gettext" >&6; } nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then CATOBJEXT=NONE ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" if test "x$ac_cv_header_libintl_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } if ${gt_cv_func_gnugettext1_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include extern int _nl_msg_cat_cntr; int main () { bindtextdomain ("", ""); return (int) gettext ("") + _nl_msg_cat_cntr ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_gnugettext1_libc=yes else gt_cv_func_gnugettext1_libc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_gnugettext1_libc" >&5 $as_echo "$gt_cv_func_gnugettext1_libc" >&6; } if test "$gt_cv_func_gnugettext1_libc" != "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } if ${gt_cv_func_gnugettext1_libintl+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -lintl $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include extern int _nl_msg_cat_cntr; int main () { bindtextdomain ("", ""); return (int) gettext ("") + _nl_msg_cat_cntr ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_gnugettext1_libintl=yes else gt_cv_func_gnugettext1_libintl=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_gnugettext1_libintl" >&5 $as_echo "$gt_cv_func_gnugettext1_libintl" >&6; } fi if test "$gt_cv_func_gnugettext1_libc" = "yes" \ || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \ && test "$PACKAGE" != gettext; }; then $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then INTLLIBS="-lintl $LIBICONV" fi gt_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" for ac_func in dcgettext do : ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext" if test "x$ac_cv_func_dcgettext" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DCGETTEXT 1 _ACEOF fi done LIBS="$gt_save_LIBS" # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi CATOBJEXT=.gmo fi fi if test "$CATOBJEXT" = "NONE"; then nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then INTLOBJS="\$(GETTOBJS)" # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes CATOBJEXT=.gmo INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi if test "$GMSGFMT" != ":"; then if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then : ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: found msgfmt program is not GNU msgfmt; ignore it" >&5 $as_echo "found msgfmt program is not GNU msgfmt; ignore it" >&6; } GMSGFMT=":" fi fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then : ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; } XGETTEXT=":" fi fi POSUB=po fi ac_config_commands="$ac_config_commands default-1" if test "$PACKAGE" = gettext; then BUILD_INCLUDED_LIBINTL=yes fi for ac_prog in bison do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_INTLBISON+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$INTLBISON"; then ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_INTLBISON="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi INTLBISON=$ac_cv_prog_INTLBISON if test -n "$INTLBISON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLBISON" >&5 $as_echo "$INTLBISON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$INTLBISON" && break done if test -z "$INTLBISON"; then ac_verc_fail=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of bison" >&5 $as_echo_n "checking version of bison... " >&6; } ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 $as_echo "$ac_prog_version" >&6; } fi if test $ac_verc_fail = yes; then INTLBISON=: fi for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done nls_cv_header_intl= nls_cv_header_libgt= DATADIRNAME=share INSTOBJEXT=.mo GENCAT=gencat if test "x$CATOBJEXT" != "x"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 $as_echo_n "checking for catalogs to be installed... " >&6; } NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 $as_echo "$LINGUAS" >&6; } fi if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi INTL_LIBTOOL_SUFFIX_PREFIX= 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 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&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 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS 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 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&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 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* 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 (p, i) 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; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; 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 () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : 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 if test "$GCC" = yes ; then gcc_cflags='$(CFLAGS_FOR_GCC)' fi oldcflags="$CFLAGS" CFLAGS="$CFLAGS -pipe" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc accepts -pipe" >&5 $as_echo_n "checking whether cc accepts -pipe... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo yes else echo no; CFLAGS="$oldcflags" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if install -d works" >&5 $as_echo_n "checking if install -d works... " >&6; } $ac_cv_path_install -d ./test/test2 2>/dev/null if test -d ./test/test2 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } INSTALL='autoconf/install-sh -c' fi rmdir ./test/test2 2>/dev/null rmdir ./test 2>/dev/null if test "$SLANG_LIB_LOC" != "" ; then CFLAGS="-L$SLANG_LIB_LOC $CFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SLsig_block_signals in -lslang" >&5 $as_echo_n "checking for SLsig_block_signals in -lslang... " >&6; } if ${ac_cv_lib_slang_SLsig_block_signals+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lslang $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char SLsig_block_signals (); int main () { return SLsig_block_signals (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_slang_SLsig_block_signals=yes else ac_cv_lib_slang_SLsig_block_signals=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_slang_SLsig_block_signals" >&5 $as_echo "$ac_cv_lib_slang_SLsig_block_signals" >&6; } if test "x$ac_cv_lib_slang_SLsig_block_signals" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSLANG 1 _ACEOF LIBS="-lslang $LIBS" else as_fn_error $? "can't find required slang library or library is obsolete. Try setting the SLANG_LIB_LOC environment variable to point to the directory containing the slang library." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end 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 -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end 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 -f 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #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 () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi for ac_header in getopt.h do : ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" if test "x$ac_cv_header_getopt_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT_H 1 _ACEOF fi done for ac_header in $SLANG_H_LOC do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF slang_h_ok=yes fi done if test "$slang_h_ok" = yes ; then SLANG_H=$SLANG_H_LOC else for ac_header in slang.h slang/slang.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF break fi done if test "$ac_cv_header_slang_h" = yes ; then SLANG_H=slang.h elif test "$ac_cv_header_slang_slang_h" = yes ; then SLANG_H=slang/slang.h else as_fn_error $? "can't find required slang.h header file. Try setting the SLANG_H_LOC environment variable to point to it." "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF for ac_func in setenv do : ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" if test "x$ac_cv_func_setenv" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SETENV 1 _ACEOF fi done for ac_func in getopt_long do : ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long" if test "x$ac_cv_func_getopt_long" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT_LONG 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: long command line switches are disabled." >&5 $as_echo "$as_me: WARNING: long command line switches are disabled." >&2;} for ac_func in getopt do : ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt" if test "x$ac_cv_func_getopt" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: all command line switches are disabled!" >&5 $as_echo "$as_me: WARNING: all command line switches are disabled!" >&2;} fi done fi done for ac_func in asprintf do : ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf" if test "x$ac_cv_func_asprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ASPRINTF 1 _ACEOF fi done # Allow user to control whether gpm is linked in. # Check whether --with-gpm was given. if test "${with_gpm+set}" = set; then : withval=$with_gpm; ac_cv_use_gpm=$withval else ac_cv_use_gpm=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use gpm" >&5 $as_echo_n "checking whether to use gpm... " >&6; } if ${ac_cv_use_gpm+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_use_gpm=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_use_gpm" >&5 $as_echo "$ac_cv_use_gpm" >&6; } if test "$ac_cv_use_gpm" = yes ; then for ac_header in gpm.h do : ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default" if test "x$ac_cv_header_gpm_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GPM_H 1 _ACEOF fi done for ac_func in select do : ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select" if test "x$ac_cv_func_select" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SELECT 1 _ACEOF fi done if test "$ac_cv_header_gpm_h" = yes && test "$ac_cv_func_select" = yes ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Close in -lgpm" >&5 $as_echo_n "checking for Gpm_Close in -lgpm... " >&6; } if ${ac_cv_lib_gpm_Gpm_Close+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgpm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char Gpm_Close (); int main () { return Gpm_Close (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gpm_Gpm_Close=yes else ac_cv_lib_gpm_Gpm_Close=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Close" >&5 $as_echo "$ac_cv_lib_gpm_Gpm_Close" >&6; } if test "x$ac_cv_lib_gpm_Gpm_Close" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGPM 1 _ACEOF LIBS="-lgpm $LIBS" fi if test "$ac_cv_lib_gpm_Gpm_Close" != yes ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pdmenu will be built without GPM mouse support." >&5 $as_echo "$as_me: WARNING: pdmenu will be built without GPM mouse support." >&2;} else $as_echo "#define GPM_SUPPORT 1" >>confdefs.h fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pdmenu will be built without GPM mouse support." >&5 $as_echo "$as_me: WARNING: pdmenu will be built without GPM mouse support." >&2;} fi fi # Extract the first word of "date", so it can be a program name with args. set dummy date; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DATE_PROG+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DATE_PROG"; then ac_cv_prog_DATE_PROG="$DATE_PROG" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DATE_PROG="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_DATE_PROG" && ac_cv_prog_DATE_PROG="no" fi fi DATE_PROG=$ac_cv_prog_DATE_PROG if test -n "$DATE_PROG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE_PROG" >&5 $as_echo "$DATE_PROG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$DATE_PROG" = yes ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU compatable date utility" >&5 $as_echo_n "checking for GNU compatable date utility... " >&6; } GNU_DATE_TEST=`date +"%B %d %Y %d %b %y" 2>/dev/null` if test "$GNU_DATE_TEST" = "" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking the date" >&5 $as_echo_n "checking the date... " >&6; } BUILD_DATE=`date +"%B %d %Y"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DATE" >&5 $as_echo "$BUILD_DATE" >&6; } fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done if test "$AWK" != "" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking pdmenu's version" >&5 $as_echo_n "checking pdmenu's version... " >&6; } VER=`$AWK -F "[()]" '/pdmenu \(.*\) / {print $2 ; exit}' &5 $as_echo "$VER" >&6; } OLD_VER=`$AWK -F "[()]" '\ /^pdmenu \(.*\) / { \ if (++c==2) \ { print $2 ; exit } \ }' &5 $as_echo "$as_me: WARNING: cannot determine pdmenu version without awk." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: setting version to UNKNOWN - edit Makefile and fix!" >&5 $as_echo "$as_me: WARNING: setting version to UNKNOWN - edit Makefile and fix!" >&2;} VER=UNKNOWN OLD_VER=UNKNOWN fi for ac_prog in perl perl4 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PERL_PROG+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PERL_PROG"; then ac_cv_prog_PERL_PROG="$PERL_PROG" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PERL_PROG="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PERL_PROG=$ac_cv_prog_PERL_PROG if test -n "$PERL_PROG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL_PROG" >&5 $as_echo "$PERL_PROG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PERL_PROG" && break done if test "$PERL_PROG" != "" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking the size of the tar file" >&5 $as_echo_n "checking the size of the tar file... " >&6; } TAR_FILE_SIZE_GUESS=`perl -e '\ print int(qx{tar cf - . |gzip| wc -c}/1024)'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: about $TAR_FILE_SIZE_GUESS kb" >&5 $as_echo "about $TAR_FILE_SIZE_GUESS kb" >&6; } fi if test "$bindir" != '${exec_prefix}/bin' ; then PDMENU_BINDIR=$bindir elif test "$exec_prefix" != NONE ; then PDMENU_BINDIR=$exec_prefix/bin elif test "$prefix" != NONE ; then PDMENU_BINDIR=$prefix/bin else PDMENU_BINDIR=$ac_default_prefix/bin fi if test "$sysconfdir" != '${prefix}/etc' ; then PDMENU_SYSCONFDIR=$sysconfdir elif test "$prefix" != NONE ; then PDMENU_SYSCONFDIR=$prefix/etc else PDMENU_SYSCONFDIR=$ac_default_prefix/etc fi if test "$datadir" != '${prefix}/share' ; then PDMENU_LIBDIR=$datadir elif test "$datadir" != NONE ; then PDMENU_LIBDIR=$prefix/share else PDMENU_LIBDIR=$ac_default_prefix/share fi ac_config_files="$ac_config_files makeinfo:autoconf/makeinfo.in doc/pdmenu.man doc/pdmenurc.man examples/pdmenurc examples/pdmenurc.monitor examples/pdmenurc.complex examples/newbie/pdmenurc.newbie src/slang.h redhat/pdmenu.spec" 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, we kill variables containing newlines. # 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. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 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}' # 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 branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # 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 ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -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 the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "makeinfo") CONFIG_FILES="$CONFIG_FILES makeinfo:autoconf/makeinfo.in" ;; "doc/pdmenu.man") CONFIG_FILES="$CONFIG_FILES doc/pdmenu.man" ;; "doc/pdmenurc.man") CONFIG_FILES="$CONFIG_FILES doc/pdmenurc.man" ;; "examples/pdmenurc") CONFIG_FILES="$CONFIG_FILES examples/pdmenurc" ;; "examples/pdmenurc.monitor") CONFIG_FILES="$CONFIG_FILES examples/pdmenurc.monitor" ;; "examples/pdmenurc.complex") CONFIG_FILES="$CONFIG_FILES examples/pdmenurc.complex" ;; "examples/newbie/pdmenurc.newbie") CONFIG_FILES="$CONFIG_FILES examples/newbie/pdmenurc.newbie" ;; "src/slang.h") CONFIG_FILES="$CONFIG_FILES src/slang.h" ;; "redhat/pdmenu.spec") CONFIG_FILES="$CONFIG_FILES redhat/pdmenu.spec" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 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 # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries 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[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # 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 by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "default-1":C) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" fi ;; esac done ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # 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=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || 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 || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi pdmenu/CHANGES0000777000000000000000000000000012355063701013322 2debian/changelogustar pdmenu/src/0000755000000000000000000000000012427315273010031 5ustar pdmenu/src/mouse.c0000644000000000000000000000547112355063701011330 0ustar /* * Mouse support for pdmenu * by randolph chung , modified by Joey. */ /* * Copyright (c) 1996, 1997 by Randolph Chung and * Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ #ifdef GPM_SUPPORT #include "global.h" #include "mouse.h" #include #include #include int gpm_active=0; /* 1 if gpm is currently activated */ /* checks mouse status */ /* return vals: * MOUSE_NOTHING = nothing interesting, or did something already * MOUSE_BUTTON_LEFT = pressed left mouse button * MOUSE_BUTTON_RIGHT = pressed right mouse button * MOUSE_UP = mouse moved up one character * MOUSE_DOWN = mouse moved down one character */ int CheckMouse() { fd_set rfds; struct timeval tv; int retval; Gpm_Event event; while (1) { /* wait for input on gpm_fd or STDIN */ FD_ZERO(&rfds); FD_SET(gpm_fd, &rfds); FD_SET(0, &rfds); /* filedes of STDIN is 0 */ /* wait for 10 seconds, but doesn't really matter .... */ tv.tv_sec = 10; tv.tv_usec = 0; retval = select(gpm_fd+1, &rfds, NULL, NULL, &tv); if (retval > 0) { /* data available */ if (FD_ISSET(gpm_fd, &rfds)) { /* data is for mice */ switch (Gpm_GetEvent(&event)) { case 1: /* can read something */ if ((event.type & GPM_DOWN) && (event.buttons & GPM_B_LEFT)) return(MOUSE_BUTTON_LEFT); if ((event.type & GPM_DOWN) && (event.buttons & GPM_B_RIGHT)) return(MOUSE_BUTTON_RIGHT); if (event.dy > 0) return(MOUSE_DOWN); if (event.dy < 0) return(MOUSE_UP); break; case -1: /* can read nothing */ break; case 0: /* disconnected */ gpm_ok = 0; return(MOUSE_NOTHING); } /* switch */ } else { /* data is for keyboard */ return(MOUSE_NOTHING); } /* else */ } /* if */ } } #if 0 void ClearMouse(void) { fd_set rfds; struct timeval tv; int retval; Gpm_Event event; do { /* check for input on gpm_fd */ FD_ZERO(&rfds); FD_SET(gpm_fd, &rfds); /* wait for 500 microseconds -- we are just checking for pending inputs */ tv.tv_sec = 0; tv.tv_usec = 500; retval = select(gpm_fd+1, &rfds, NULL, NULL, &tv); if (retval) Gpm_GetEvent(&event); } while (retval); } #endif /* Return 1 if mouse detected, 0 otherwise */ int InitMouse() { Gpm_Connect conn; conn.eventMask = ~0; /* I want all events */ conn.defaultMask = 0; /* no default treatment */ conn.maxMod = 0; /* only read unmodified mouse keys */ conn.minMod = 0; gpm_zerobased = 1; /* coordinates start from zero */ gpm_fd=Gpm_Open(&conn, 0); if (gpm_fd < 0) { Gpm_Close(); gpm_active=0; return 0; } else { gpm_active=1; return 1; } } void EndMouse() { if (gpm_active) Gpm_Close(); gpm_active=0; } #endif pdmenu/src/window.h0000644000000000000000000000044012355063701011503 0ustar /* * Copyright (c) 1995-1999 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ void DrawAll(void); void Force_Redraw(void); void Resize_Screen(void); void AddWindow(Menu_Type *); void ExitWindow(); int IsVisible(Menu_Type *); pdmenu/src/error.c0000644000000000000000000000134012355063701011320 0ustar /* * Error routines */ /* * Copyright (c) 1997-1999 by Joey Hess (joey@kitenet.net) and William Thompson * (wakko@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ #include "global.h" #include "mouse.h" #include "error.h" #include "screen.h" #include #include #include #include #define _(String) gettext (String) /* Display an error. The parameters work like printf() */ void Error(const char *fmt, ...) { va_list arglist; #ifdef GPM_SUPPORT EndMouse(); #endif Screen_Reset(); va_start(arglist, fmt); fprintf(stderr, _("pdmenu error: ")); vfprintf(stderr, fmt, arglist); fprintf(stderr, "\n"); va_end(arglist); exit(1); } pdmenu/src/rc.c0000644000000000000000000002252712355063701010605 0ustar /* Rc file and data structure handling */ /* * Copyright (c) 1995-2001 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ #include "global.h" #include "rc.h" #include "pdstring.h" #include "screen.h" #include "menu.h" #include "error.h" #include #include "pdgetline.h" #include #include #include #include #include #include #include #include #define _(String) gettext (String) /* * Passed a menu item and a character, set the flag on the menu item that * the character corresponds to, if any. * Returns the number of flags that were set. */ int SetFlags(Menu_Item_Type *i,char c) { switch(tolower(c)) { case NOCLEAR_FLAG: return i->noclear_flag=1; case PAUSE_FLAG: return i->pause_flag=1; case DISPLAY_FLAG: return i->display_flag=1; case EDIT_FLAG: return i->edit_flag=1; case SETENV_FLAG: return i->setenv_flag=1; case TRUNCATE_FLAG: return i->truncate_flag=1; case MAKEMENU_FLAG: return i->makemenu_flag=1; case COMMAND_FLAG: return i->command_flag=1; } return 0; } /* * Read in a pdmenu style rc file. Preserves data from any other files that * might have previously been read. * * Returns 0 if it fails, 1 if it succeeds. * * type should be either RC_FILE (for normal files) or RC_PREPROC (for * a command to run and read standard input from). * */ char ReadRc (char *fname,int type) { char *str, *str_p, *tmp; int i,j,line,newflag; Menu_Item_Type *ingroup=NULL; /* points to last item we added to group */ Menu_Item_Type *currentitem=NULL; /* the item we are adding to the menus */ FILE *fp=NULL; line=0; if (type == RC_FILE) { if (fname[0] == '-' && fname[1] == '\0') fp=stdin; else fp=fopen(fname,"r"); } else if (type == RC_PREPROC) fp=popen(fname,"r"); if (fp==NULL) { return 0; } while ((str=pdgetline(fp,1))) { line++; /* Trim leading whitespace */ str_p=str; while (isspace(str_p[0])) str_p++; /* Ignore comments and blank lines. */ if (str_p[0]=='#' || str_p[0]==';' || str_p[0]=='\0') { free(str); continue; } /* Chop off 1st delimeter, to give us our keyword. */ if ((tmp=unescape(pdstrtok(str_p,FIELD_DELIM),FIELD_DELIM)) == NULL) { free(str); continue; } /* process the data depending on the keyword */ if (strcasecmp(tmp,PREPROC_KEYWORD)==0) { /* * We want the rest of the string. \n is just a convenient * delemiter that cannot ever match. */ ReadRc(pdstrtok(NULL,'\n'),RC_PREPROC); } else if (strcasecmp(tmp,ADD_MENU_KEYWORD)==0) { if ((tmp=unescape(pdstrtok(NULL,FIELD_DELIM),FIELD_DELIM)) == NULL) { free(str); continue; } /* Try to find the menu by name. */ if ((current_rc_menu=LookupMenu(tmp)) == NULL) { /* Didn't find, so new menu is needed. */ if (!menus) { /* This is the first menu in the list */ menus=malloc(sizeof(Menu_Type)); menus->last=NULL; } else { menus->next=malloc(sizeof(Menu_Type)); menus->next->last=menus; menus=menus->next; } menus->next=NULL; current_rc_menu=menus; current_rc_menu->num=0; current_rc_menu->name=malloc(strlen(tmp)+1); strcpy(current_rc_menu->name,tmp); current_rc_menu->selected=0; current_rc_menu->x=0; current_rc_menu->y=0; current_rc_menu->dx=0; current_rc_menu->dy=0; current_rc_menu->mustscroll=0; /* Allocate space for some menu items */ current_rc_menu->items=malloc(sizeof(Menu_Item_Type *) * MENU_INC); current_rc_menu->num_avail=MENU_INC; } if ((tmp=unescape(pdstrtok(NULL,FIELD_DELIM),FIELD_DELIM)) == NULL) { current_rc_menu->title=malloc(1); strcpy(current_rc_menu->title,""); } else { current_rc_menu->title=malloc(strlen(tmp)+1); strcpy(current_rc_menu->title,tmp); } if ((tmp=pdstrtok(NULL,'\n')) == NULL) { current_rc_menu->helptext=malloc(1); strcpy(current_rc_menu->helptext,""); } else { current_rc_menu->helptext=malloc(strlen(tmp)+1); strcpy(current_rc_menu->helptext,tmp); } current_rc_menu->recalc=1; } else if (strcasecmp(tmp,TITLE_KEYWORD)==0) { /* set title */ free(ScreenTitle); ScreenTitle=strdup(pdstrtok(NULL,FIELD_DELIM)); } else if (strcasecmp(tmp,COLOR_KEYWORD)==0) { /* color def */ if ((tmp=unescape(pdstrtok(NULL,FIELD_DELIM),FIELD_DELIM)) == NULL ) { free(str); continue; } for (i=0;inum++; } else Error(_("%s:%i \"endgroup\" found outside of group block."),fname,line); } /* Everything from here on out requires a menu be set up first. */ else if (!menus || current_rc_menu == NULL) Error(_("%s:%i Invalid or misplaced keyword, \"%s\"."),fname,line,tmp); else if ((strcasecmp(tmp,EXEC_KEYWORD)==0) || (strcasecmp(tmp,SHOW_MENU_KEYWORD)==0) || (strcasecmp(tmp,HELP_TEXT_KEYWORD)==0) || (strcasecmp(tmp,EXIT_KEYWORD)==0) || (strcasecmp(tmp,NOP_KEYWORD)==0) || (strcasecmp(tmp,GROUP_KEYWORD)==0) || (strcasecmp(tmp,REMOVE_KEYWORD)==0)) { if (ingroup == NULL) { /* add next item to menu */ /* Check to see if enough space is malloc()'d for the element. */ if (current_rc_menu->num >= current_rc_menu->num_avail) { current_rc_menu->num_avail+=MENU_INC; current_rc_menu->items=realloc(current_rc_menu->items, sizeof(Menu_Item_Type *) * current_rc_menu->num_avail); } currentitem=current_rc_menu->items[current_rc_menu->num] = malloc(sizeof(Menu_Item_Type)); current_rc_menu->recalc=1; /* make sure the menu gets resized */ } else /* add to linked list for group */ currentitem=currentitem->next=malloc(sizeof(Menu_Item_Type)); currentitem->next=NULL; if (strcasecmp(tmp,EXEC_KEYWORD)==0) currentitem->type=MENU_EXEC; else if (strcasecmp(tmp,SHOW_MENU_KEYWORD)==0) currentitem->type=MENU_SHOW; else if (strcasecmp(tmp,NOP_KEYWORD)==0) currentitem->type=MENU_NOP; else if (strcasecmp(tmp,HELP_TEXT_KEYWORD)==0) currentitem->type=MENU_HELP_TEXT; else if (strcasecmp(tmp,GROUP_KEYWORD)==0) { if (ingroup == NULL) { ingroup=currentitem; currentitem->type=MENU_GROUP; } else Error(_("%s:%i Nested \"group\" commands."),fname,line); } else if (strcasecmp(tmp,REMOVE_KEYWORD)==0) currentitem->type=MENU_REMOVE; else currentitem->type=MENU_EXIT; currentitem->hotkey=-1; if ((tmp=unescape(pdstrtok(NULL,FIELD_DELIM),FIELD_DELIM)) != NULL) { for (i=0;ihotkey=i; for (;itext=malloc(strlen(tmp)+1); strcpy(currentitem->text,tmp); } else { currentitem->text=malloc(1); strcpy(currentitem->text,""); } currentitem->noclear_flag=0; currentitem->pause_flag=0; currentitem->display_flag=0; currentitem->truncate_flag=0; currentitem->edit_flag=0; currentitem->makemenu_flag=0; currentitem->setenv_flag=0; if ((tmp=unescape(pdstrtok(NULL,FIELD_DELIM),FIELD_DELIM)) != NULL) { /* * Process flags. If the flag string is very short, use the old * flag style for backwards compatability. */ if (strlen(tmp) < 4) for (i=0;icommand=malloc(strlen(tmp)+1); strcpy(currentitem->command,tmp); } else { currentitem->command=malloc(1); strcpy(currentitem->command,""); } if (ingroup == NULL) current_rc_menu->num++; } else Error("%s:%i Invalid or misplaced keyword, \"%s\".",fname,line,tmp); free(str); } if (fp == stdin) { /* * Make sure that we have the real tty open as stdin. * You see, if a rc file is passed to pdmenu on stdin, then * after the rc file is read, there is no longer stdin available * for programs pdmenu launches to use. */ int fd = open("/dev/tty", O_RDWR); dup2(fd, 0); close(fd); } else if (type == RC_FILE) fclose(fp); else if (type == RC_PREPROC) pclose(fp); if (ingroup != NULL) Error(_("%s: \"group\" command used without \"endgroup\"."),fname); return 1; } pdmenu/src/error.h0000644000000000000000000000025212355063701011326 0ustar /* * Copyright (c) 1997-1999 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ void Error(const char *, ...); pdmenu/src/global.h0000644000000000000000000000170412355063701011440 0ustar /* * All pdmenu code will want to include this file. */ /* * Copyright (c) 1995-1999 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ #include "config.h" #include "menutype.h" #include "windowtype.h" /* Global variables */ /* Pointer to linked list of all windows on the screen */ Window_List_Type *CurrentWindow; /* Pointer to linked list of all available menus. */ Menu_Type *menus; /* Pointer to the menu that will be modified by new rc commands. */ Menu_Type *current_rc_menu; /* Boolean variables, 0=no, 1=yes */ int Use_Color; int Q_Exits; int Unpark_Cursor; #ifdef GPM_SUPPORT /* Was the mouse detected? */ int gpm_ok; #endif /* Set when the screen has resized */ int Want_Screen_Resize; /* Use old-style look if set. */ int Retro; /* Don't use high bit line drawing chars. */ int Lowbit; /* Don't use 2 or 8 for up and down if set */ int Numeric; /* Use superhot hot keys */ int Superhot; pdmenu/src/actions.h0000644000000000000000000000033212355063701011634 0ustar /* * Copyright (c) 1995-1999 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ int Pdmenu_Action(Menu_Type *); void Handle_Ctrl_C(void); int NullAction(void); pdmenu/src/menu.c0000644000000000000000000003175112355063701011144 0ustar /* * Copyright (c) 1995, 1996, 1997 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ #include "global.h" #include "screen.h" #include "menu.h" #include "mouse.h" #include "keyboard.h" #include "window.h" #include #include #include #include "slang.h" #include #include "error.h" #include #define _(String) gettext (String) /* Highlight the hotkey of a given menu item, if there is a hotkey. */ void HighlightHotkey (Menu_Type *m,int item,int highlight_color) { if (m->items[item]->hotkey!=-1) { SLsmg_set_color(highlight_color); SLsmg_gotorc(m->y+item+1-m->offset,m->x+2+m->items[item]->hotkey); SLsmg_write_char(m->items[item]->text[m->items[item]->hotkey]); } } /* * Select a particular item in a menu. * Pass the object color to change it to as the second parameter. */ void SelMenuItem (Menu_Type *m,int object_color,int object_hi_color) { SLsmg_set_color(object_color); SLsmg_gotorc(m->y+1+m->selected-m->offset,m->x+1); SLsmg_write_char(' '); SLsmg_write_nstring(m->items[m->selected]->text,m->dx-4); SLsmg_write_char(' '); HighlightHotkey(m,m->selected,object_hi_color); /* * Position cursor in bottom corner of screen, or to right of selected * menu entry */ if (Unpark_Cursor == 0) SLsmg_gotorc(SLtt_Screen_Rows-1,SLtt_Screen_Cols-1); else SLsmg_gotorc(m->y+1+m->selected-m->offset,m->x+m->dx-1); } /* * Fill in the entries in a menu. Set the color first. * Calls SelMenuItem to select the menu item, as well. * Pass active = 1 if this menu is active */ void FillMenu (Menu_Type *m,int active) { int c; for(c=m->offset;cnum && cdy-2+m->offset;c++) { if (active || Retro) SLsmg_set_color(MENU); else SLsmg_set_color(UNSEL_MENU); SLsmg_gotorc(m->y+c+1-m->offset,m->x+2); SLsmg_write_nstring(m->items[c]->text,m->dx-4); SLsmg_write_char(' '); if (active || Retro) HighlightHotkey(m,c,MENU_HI); } if (active || Retro) SelMenuItem(m,SELBAR,SELBAR_HI); } /* Calculate the dimentions of a menu so it fits onscreen. * * Note that since tabs in menus are BAD thing, and this must be called * before a menu is displayed, we also expand tabs out to spaces in this * function. We also get rid of any nasty control characters in the menu. */ void CalcMenu (Menu_Type *m) { int i,j,k,c,len,dx,dy; char *s; /* * If we are in B&W mode (SLtt_Use_Ansi_Colors==0), then we don't * need to allocate space for shadows. */ if (m->recalc) { m->recalc=0; dy=m->num+2; if (dy>SLtt_Screen_Rows-2-SLtt_Use_Ansi_Colors) { dy=SLtt_Screen_Rows-2-SLtt_Use_Ansi_Colors; m->mustscroll=1; } else { m->mustscroll=0; } m->offset=0; dx=strlen(m->title)+2; for(c=0;cnum;c++) { /* * Using strchr turns out to be 10 or 20 x faster than * finding tabs by hand. */ s=m->items[c]->text; while ((s=strchr(s,'\t')) != NULL) { i=(s - m->items[c]->text); j=((i/SLsmg_Tab_Width)+1)*SLsmg_Tab_Width-i-1; if (j>0) { len=strlen(m->items[c]->text); /* Expand the string to allow space for the tab. */ m->items[c]->text=realloc(m->items[c]->text,len + j + 1); s=m->items[c]->text + i; /* * Shift the contents of the string after the tab right * by j characters. */ for (k=len - i;k>0;k--) { s[k+j]=s[k]; } } /* Replace the tab with j spaces. */ for (k=0;k<=j;k++) s[k]=' '; } if (dxitems[c]->text)+4) dx=strlen(m->items[c]->text)+4; } if (dx>SLtt_Screen_Cols-SLtt_Use_Ansi_Colors) dx=SLtt_Screen_Cols-SLtt_Use_Ansi_Colors; m->dx=dx; m->dy=dy; m->x=(SLtt_Screen_Cols-dx)/2; m->y=(SLtt_Screen_Rows-dy)/2; } } /* * Draw a menu * Pass the menu to draw, and pass active = 1 if this menu is active. */ void DrawMenu (Menu_Type *m,int active) { if (active || Retro) SLsmg_set_color(MENU); else SLsmg_set_color(UNSEL_MENU); CalcMenu(m); DrawDialog(m->title,m->x,m->y,m->dx,m->dy,1); FillMenu(m,active); } /* These are all helper functions for DoMenu() */ void DoMenu_Up (Menu_Type *m) { int scrolled=0; SelMenuItem(m,MENU,MENU_HI); /* Todo: rewrite without the loop. */ do { if (--m->selected < 0) m->selected=m->num-1; if ((m->mustscroll) && ((m->selected==m->num-1) || (m->selected < m->offset))) { if (m->selected==m->num-1) m->offset=m->num - m->dy+2; else m->offset--; scrolled=1; } } while (m->items[m->selected]->type == MENU_NOP); if (scrolled) { FillMenu(m,1); } else { SLsmg_refresh(); /* looks faster on slow terminals */ SelMenuItem(m,SELBAR,SELBAR_HI); } SLsmg_refresh(); } void DoMenu_Down(Menu_Type *m) { int scrolled=0; SelMenuItem(m,MENU,MENU_HI); /* Todo: rewrite without the loop. */ do { if (++m->selected >= m->num) m->selected=0; if ((m->mustscroll) && ((m->selected==0) || (m->selected-m->offset > m->dy-3))) { if (m->selected==0) m->offset=0; else m->offset++; scrolled=1; } } while (m->items[m->selected]->type == MENU_NOP); if (scrolled) { FillMenu(m,1); } else { SLsmg_refresh(); SelMenuItem(m,SELBAR,SELBAR_HI); } SLsmg_refresh(); } void DoMenu_PageUp(Menu_Type *m) { SelMenuItem(m,MENU,MENU_HI); if (m->mustscroll) { m->selected=m->selected - m->dy+2; if (m->selected<0) m->selected=0; while (m->items[m->selected]->type == MENU_NOP) m->selected--; m->offset=m->selected; FillMenu(m,1); } else { m->selected=0; SelMenuItem(m,SELBAR,SELBAR_HI); } SLsmg_refresh(); } void DoMenu_PageDown (Menu_Type *m) { SelMenuItem(m,MENU,MENU_HI); if (m->mustscroll) { m->selected=m->selected + m->dy-2; if (m->selected>m->num-1) m->selected=m->num-1; while (m->items[m->selected]->type == MENU_NOP) m->selected++; m->offset=m->selected; if (m->offset > m->num - m->dy+2) m->offset=m->num - m->dy+2; FillMenu(m,1); } else { m->selected=m->num-1; SelMenuItem(m,SELBAR,SELBAR_HI); } SLsmg_refresh(); } void DoMenu_Home (Menu_Type *m) { SelMenuItem(m,MENU,MENU_HI); m->selected=0; m->offset=0; FillMenu(m,1); SLsmg_refresh(); } void DoMenu_End (Menu_Type *m) { SelMenuItem(m,MENU,MENU_HI); m->selected=m->num-1; m->offset=m->selected; if (m->offset > m->num -m->dy +2) m->offset=m->num - m->dy +2; FillMenu(m,1); SLsmg_refresh(); } /* * Pass this a menu and a key and it will try to move to an item on the # menu that has the key for a hotkey. * Returns 1 if it moves to the hotkey ok, 0 otherwise */ int SelHotKey(Menu_Type *m, int key) { int c=m->selected+1; if (c >= m->num) c=0; do { if ( (m->items[c]->hotkey != -1) && ( (key==m->items[c]->text[m->items[c]->hotkey]) || (toupper(key)==m->items[c]->text[m->items[c]->hotkey]) ) ) { SelMenuItem(m,MENU,MENU_HI); m->selected=c; if ((m->mustscroll) && ((c > m->offset+m->dy-3) || (c < m->offset))) { /* have to set the correct offset to it */ m->offset=c; if (m->offset > m->num - m->dy +2) m->offset=m->num - m->dy +2; FillMenu(m,1); } else { SelMenuItem(m,SELBAR,SELBAR_HI); } SLsmg_refresh(); return 1; } c++; if (c >= m->num) c=0; } while (c!=m->selected); return 0; } int HotKeyMatches(Menu_Type *m, int key, int i) { return m->items[i]->hotkey != -1 && ( (key==m->items[i]->text[m->items[i]->hotkey]) || toupper(key)==m->items[i]->text[m->items[i]->hotkey] ); } int UniqHotKeyMatches(Menu_Type *m, int key) { int i = 0; int n = m->num; int c = 0; if ( HotKeyMatches(m,key,m->selected) ) for (i=0; iselected > 0) DoMenu_Up(m); break; case MOUSE_DOWN: /* Don't scroll off bottom of menu with mouse */ if (m->selected < m->num-1) DoMenu_Down(m); break; } /* switch */ } while (!done); } #endif /* Handle keypresses. */ key=getch(); switch (key) { case 0: if (Want_Screen_Resize) { Resize_Screen(); Force_Redraw(); } break; case '-': case '8': case SL_KEY_UP: if (key != '8' || ! Numeric) DoMenu_Up(m); else SelHotKey(m,key); break; case '+': case '=': /* no need to shift for + */ case '2': case SL_KEY_DOWN: if (key != '2' || ! Numeric) DoMenu_Down(m); else SelHotKey(m,key); break; case ' ': case 22: /* ctrl-v */ case SL_KEY_NPAGE: DoMenu_PageDown(m); break; case 21: /* ctrl-u */ case SL_KEY_PPAGE: DoMenu_PageUp(m); break; case SL_KEY_HOME: DoMenu_Home(m); break; case SL_KEY_END: DoMenu_End(m); break; case 3: /* ctrl-c */ Ctrl_C_Action(m); break; case 12: /* ctrl-l */ case 18: /* ctrl-r */ Force_Redraw(); break; case '\n': case '\r': case SL_KEY_RIGHT: c=MenuAction(m); if (c!=0) return c; break; case 65535: break; default: c=SelHotKey(m,key); if ( Superhot && UniqHotKeyMatches(m,key) ) return MenuAction(m); if (c!=0) break; /* No hotkeys match, so use q or ESC to close the menu. */ if ((key=='q') || (key=='Q') || (key==27) || (key ==SL_KEY_LEFT)) return Q_KEY_EXIT; /* They hit a bad key. Display help. */ DrawBase(_("Arrow keys move, Esc exits current menu, Enter runs program")); SLsmg_refresh(); } } } /* * Pass this a menu name, and it will return a pointer to the menu structure, * or NULL if it cannot find the menu. */ Menu_Type *LookupMenu (const char *menuname) { Menu_Type *m=menus; while (m) { if (strcasecmp(menuname,m->name) == 0) return m; m=m->last; } return NULL; } /* * Remove a menu from the menu list. */ void RemoveMenu(Menu_Type *m) { int i; Menu_Item_Type *next_item, *this_item; /* Check to see if this menu is currently visible onscreen */ if (IsVisible(m)) Error(_("Attempt to remove menu \"%s\" failed: menu is on screen."),m->name); /* Check to see if this is the menu new rc lines add to. */ /* if (current_rc_menu == m) current_rc_menu=NULL; */ /* Remove all the items in the menu. */ for(i=0;i < m->num;i++) { next_item=m->items[i]->next; while (next_item != NULL) { /* remove whole linked list */ this_item=next_item; next_item=this_item->next; free(this_item->command); free(this_item->text); free(this_item); } free(m->items[i]->command); free(m->items[i]->text); free(m->items[i]); } /* Free other parts of the menu structure. */ free(m->name); free(m->title); free(m->helptext); /* Remove the menu from the linked list. */ if (m->last) m->last->next=m->next; if (m->next) m->next->last=m->last; else { /* * No next menu means this is the last menu. So we need to change menus to * point to the menu before this one. Of course, if that menu is * nonexistant, there are no menus at all left. */ if (m->last) menus=m->last; else menus=NULL; } /* Finally, free the menu */ free(m); } /* * Examines all menus, and checks to see if any menu is all empty or * starts with a "nop" command, or ends with one. These are things that * make the menu display code very unhappy, so it fixes them. */ void SanityCheckMenus() { int i; Menu_Type *m=menus, *nextm; while (m) { /* Remove NOPs at end of menu. */ while (m->num > 1 && m->items[m->num-1]->type == MENU_NOP) { free(m->items[m->num-1]); m->num--; } /* Remove NOPs at beginning of menu. */ while (m->num > 0 && m->items[0]->type == MENU_NOP) { free(m->items[0]); for (i=1;i < m->num; i++) m->items[i-1]=m->items[i]; m->num--; } /* Remove empty menus. */ if (m->num == 0) { nextm=m->last; RemoveMenu(m); m=nextm; } else m=m->last; } } pdmenu/src/windowtype.h0000644000000000000000000000056412355063701012414 0ustar /* * Copyright (c) 1995-1999 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ /* * This is a type for a double linked list of windows that are currently * onscreen. */ typedef struct Window_List_Type { Menu_Type *menu; struct Window_List_Type *last; struct Window_List_Type *next; } Window_List_Type; pdmenu/src/window.c0000644000000000000000000000617112355063701011505 0ustar /* Handles a set of windows on screen. */ /* * Copyright (c) 1995-2002 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ #include "global.h" #include "screen.h" #include "menu.h" #include "slang.h" #include "window.h" #include "actions.h" #include "rc.h" #include "error.h" #include #include #include #define _(String) gettext (String) /* * This is a pointer to the first window that pdmenu pops up. * This is only used by DrawAll, where we need to draw the screen starting * with the first menu, and then onwards. Technically, we don't need this, * but I'd prefer not to have to walk back through the whole linked list of * windows to find the first one each time DrawAll is called. */ Window_List_Type *FirstWindow; /* Draw the whole screen, with menus on it. */ void DrawAll () { static char *greeting = NULL; Window_List_Type *this_window=FirstWindow; if (!greeting) { greeting = malloc(256); sprintf(greeting, _("Welcome to Pdmenu %s by Joey Hess "), VER); } DrawTitle(ScreenTitle); DrawDesktop(); if (strlen(CurrentWindow->menu->helptext)>0) DrawBase(CurrentWindow->menu->helptext); else DrawBase(greeting); /* Follow the linked list, but do not process the last element. */ while (this_window->next) { DrawMenu(this_window->menu,0); this_window=this_window->next; } /* Now draw the last element differently. */ DrawMenu(this_window->menu,1); SLsmg_refresh(); } /* Force a redraw of the screen. Clear screen, then redraw everything. */ void Force_Redraw () { Screen_Reset(); Screen_Init(); DrawAll(); } /* * Pass it a menu, and it will return 1 if it is visible on the screen, * 0 if not */ int IsVisible (Menu_Type *m) { Window_List_Type *this_window=CurrentWindow; while (this_window) { if (this_window->menu == m) return 1; this_window=this_window->last; } return 0; } /* * Call this whenever the screen size changes. It repositions all the windows * on the screen to fit the new screen. * You will typically want to call Force_Redraw() after this function. */ void Resize_Screen () { Window_List_Type *this_window=CurrentWindow; Want_Screen_Resize = 0; SetScreensize(); while (this_window) { this_window->menu->recalc=1; CalcMenu(this_window->menu); this_window=this_window->last; } } /* Add a window to the group onscreen. */ void AddWindow (Menu_Type *m) { if (CurrentWindow) { CurrentWindow->next=malloc(sizeof(Window_List_Type)); CurrentWindow->next->last=CurrentWindow; CurrentWindow=CurrentWindow->next; } else { /* This is the first window we've added. */ CurrentWindow=malloc(sizeof(Window_List_Type)); FirstWindow=CurrentWindow; CurrentWindow->last=NULL; } CurrentWindow->next=NULL; CurrentWindow->menu=m; } /* Exit and remove the current window. */ void ExitWindow () { Window_List_Type *w=CurrentWindow; /* Don't remove the very last window. */ if (CurrentWindow->last) { CurrentWindow=CurrentWindow->last; free(w); CurrentWindow->next=NULL; DrawAll(); } } pdmenu/src/pdstring.h0000644000000000000000000000031012355063701012022 0ustar /* * Copyright (c) 1995-1999 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ char *unescape (char *, char); char *pdstrtok (char *, char); pdmenu/src/slang.h.in0000644000000000000000000000032712355063701011711 0ustar /* * Copyright (c) 1995-1999 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ /* This just points to the right location of slang.h */ #include <@SLANG_H@> pdmenu/src/pdgetline.h0000644000000000000000000000026012355063701012147 0ustar /* * Copyright (c) 1995, 1996, 1997 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ char* pdgetline (FILE *, int); pdmenu/src/pdstring.c0000644000000000000000000000355012355063701012026 0ustar /* Generic string routines. */ /* * Copyright (c) 1995-1999 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ #include /* * Remove all '\' characters in the string s that escape out the passed * character or '\'. * Return a pointer to the result or NULL if the string is empty. */ char *unescape (char *s, char token) { char escaped=0; char *p, *r=s; if (!s) return r; while (*s) { escaped = ((*s == '\\') && !escaped); s++; if (*s && escaped && (*s == token || *s == '\\')) { /* found an escape we should remove */ for (p=s-1; *p ; p++) { *p=*(p+1); } escaped=0; } } if (r[0] != '\0') return r; else return NULL; } /* * This is vaguely like strtok, except '\' can escape out the token, * and you may only pass one token (as a character, not as a string). * * Taken from Mutt, and heavily modified. */ char *pdstrtok (char *s, char token) { static char *p; char *r, *t, *u, escaped; if (s) /* initial call */ p = s; if (!p) return NULL; r = p; t = p; /* * Find the first occurence of the token that is not escaped. To do this, * we find the token, then seek backwards to count how many slashes in a row * are before it. If the number of slashes is even, the token is not * escaped out. This turns out to be about 3 times as fast as running * through the string by hand without strchr. */ while ((t=strchr(t,token)) != NULL) { u=t; escaped=0; while (--u>=p && *u =='\\' ) /* search backwards for slashes. */ escaped = !escaped; if (!escaped) break; else t++; /* increment t so we don't hit this character again. */ } if (t && *t) { /* found the token */ *t = 0; p = ++t; } else /* no token found, so all done */ p = NULL; return(r); } pdmenu/src/mouse.h0000644000000000000000000000055012355063701011326 0ustar /* * GPM Mouse handling routines for pdmenu * by Randolph Chung , modified by Joey. */ #ifdef GPM_SUPPORT int CheckMouse(void); void ClearMouse(void); int InitMouse(void); void EndMouse(); #define MOUSE_NOTHING 0 #define MOUSE_BUTTON_LEFT 1 #define MOUSE_BUTTON_RIGHT 2 #define MOUSE_UP 3 #define MOUSE_DOWN 4 #include #endif pdmenu/src/menu.h0000644000000000000000000000124412355063701011143 0ustar /* * Copyright (c) 1995, 1996, 1997 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ /* This must be long enough for "selbarhi". */ char ScreenObjNames[NUMSCREENPARTS+1][LONGEST_OBJ_NAME+1]; int DESKTOP; int TITLE; int BASE; int MENU; int SELBAR; int SHADOW; int MENU_HI; int SELBAR_HI; int UNSEL_MENU; void DrawMenu(Menu_Type *,int); void SelMenuItem(Menu_Type *,int,int); void FillMenu(Menu_Type *,int); int DoMenu(Menu_Type *,int (),void ()); void CalcMenu(Menu_Type *); Menu_Type *LookupMenu (const char *); void SanityCheckMenus(void); void RemoveMenu(Menu_Type *); #define Q_KEY_EXIT 2 #define QUIT_EXIT 3 pdmenu/src/keyboard.h0000644000000000000000000000023412355063701011775 0ustar /* * Copyright (c) 1995-1999 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ int getch(void); pdmenu/src/pdmenu.h0000644000000000000000000000025412355063701011467 0ustar /* * Copyright (c) 1995, 1996, 1997 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ void Handle_Ctrl_C(void); pdmenu/src/screen.h0000644000000000000000000000134612355063701011461 0ustar /* * Copyright (c) 1995-2001 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ /* The number of parts that make up the screen and have different colors. */ #define NUMSCREENPARTS 9 /* Minimum size of the screen where pdmenu still works */ #define MIN_ROWS 6 #define MIN_COLS 6 /* must be long enough for "brightmagenta", our longest color name */ #define COLORLEN 13 char FG[NUMSCREENPARTS][COLORLEN]; char BG[NUMSCREENPARTS][COLORLEN]; char *ScreenTitle; void DrawTitle(char *); void DrawDesktop(void); void DrawBase(char *); void DrawDialog(char *,int,int,int,int,int); void Screen_Reset(void); void Screen_Init(void); void Screen_Setcolors(void); void SetScreensize(void); pdmenu/src/rc_config.h0000644000000000000000000000314712355063701012134 0ustar /* * This files sets up keywords and so on that are used in the pdmenurc files. */ /* * Copyright (c) 1995-1999 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ /* Delimiter of fields in the rc file */ #define FIELD_DELIM ':' /* Delimeter of flags within feilds in the rd file */ #define FLAG_DELIM ',' /* Put this before the character in a menu item that is to become the hotkey */ #define HOTKEY_SEL_CHAR '_' /* The keywords in a rc file are.. */ #define ADD_MENU_KEYWORD "menu" #define SHOW_MENU_KEYWORD "show" #define EXEC_KEYWORD "exec" #define EXIT_KEYWORD "exit" /* British types may want to change this to colour :-) */ #define COLOR_KEYWORD "color" #define TITLE_KEYWORD "title" #define NOP_KEYWORD "nop" #define READ_KEYWORD "read" #define PREPROC_KEYWORD "preproc" #define REMOVE_KEYWORD "remove" #define GROUP_KEYWORD "group" #define ENDGROUP_KEYWORD "endgroup" #define HELP_TEXT_KEYWORD "helptext" /* The flags that can be used are.. */ #define NOCLEAR_FLAG 'n' #define PAUSE_FLAG 'p' #define DISPLAY_FLAG 'd' #define EDIT_FLAG 'e' #define SETENV_FLAG 's' #define TRUNCATE_FLAG 't' #define MAKEMENU_FLAG 'm' #define COMMAND_FLAG 'c' /* The names of the parts of the screen, for color setting, are */ #define DESKTOP_NAME "desktop" #define TITLE_NAME "title" #define BASE_NAME "base" #define MENU_NAME "menu" #define SELBAR_NAME "selbar" #define SHADOW_NAME "shadow" #define MENU_HI_NAME "menuhot" #define SELBAR_HI_NAME "selbarhot" #define UNSEL_MENU_NAME "unselmenu" /* The longest of the strings above is how many characters? */ #define LONGEST_OBJ_NAME 9 pdmenu/src/pdmenu.c0000644000000000000000000001624712355063701011473 0ustar /* * Copyright (c) 1995-2003 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ #include "global.h" #include "rc.h" #include "screen.h" #include "menu.h" #include "window.h" #include "mouse.h" #include "actions.h" #include "error.h" #ifdef HAVE_GETOPT_H #include #endif #include #include #include #include #include #include "slang.h" #include #include #define _(String) gettext (String) /* Display usage info then quit */ void usage() { printf (_("\ Usage: pdmenu [options] [menufiles ..]\n\ \tmenufiles the rc files to read instead of\n\ \t ~/.pdmenurc or %spdmenurc\n\ \t-h --help display this help\n\ \t-s --superhot enable super hot keys\n\ \t-c --color enable color\n\ \t-u --unpark cursor moves to current selection\n\ \t-q --quit 'q' key does not exit program\n\ \t-mmenuid --menu=menuid display menu with this menuid on startup\n\ \t-v --version show version information\n\ \t-r --retro draw menus using old style\n\ \t-l --lowbit do not use high bit line drawing characters\n\ \t-n --numeric do not use 8 and 2 for moving up and down\n"),ETCDIR); #if defined (HAVE_GETOPT_LONG) #else printf ("%s\n", _("(Long options are disabled.)")); #endif exit(-1); } /* Display version information then quit */ void version() { printf (_("Pdmenu %s GPL Copyright (C) 1995-2002 by Joey Hess \n"),VER); exit(0); } /* * Parse params, Figure out the correct rc file, read it. * Returns a pointer to the menu we should display first. */ Menu_Type *GetConfig (int argc, char **argv) { #ifdef HAVE_ASPRINTF char **s=malloc(sizeof(char *)); #else /* Just long enough for 255 chars of $HOME plus filename. */ char *s=(char *) malloc(258+strlen("pdmenurc")); #endif char *startmenu=NULL; Menu_Type *m; int menu_opt_flag=0; extern int optind; extern char *optarg; #ifdef HAVE_GETOPT_LONG struct option long_options[] = { {"help",0,NULL,'h'}, {"color",0,NULL,'c'}, {"quit",0,NULL,'q'}, {"unpark",0,NULL,'u'}, {"version",0,NULL,'v'}, {"menu",1,NULL,'m'}, {"retro",0,NULL,'r'}, {"superhot",0,NULL,'s'}, {"lowbit",0,NULL,'l'}, {"numeric",0,NULL,'n'}, {0, 0, 0, 0} }; #endif #if defined (HAVE_GETOPT_LONG) || defined (HAVE_GETOPT) int c=0; while (c != -1) { #ifdef HAVE_GETOPT_LONG c=getopt_long(argc,argv,"hscquvm:rln",long_options,NULL); #elif HAVE_GETOPT c=getopt(argc,argv,"hscquvm:rln"); #endif switch (c) { case 'q': /* 'q' does not exit pdmenu. */ Q_Exits=0; break; case 'c': /* Use colors. */ Use_Color=1; break; case 'h': usage(); /* exits program */ case 'u': /* Unpark cursor. */ Unpark_Cursor=1; break; case 'm': /* Display a particular menu on start. */ menu_opt_flag=1; startmenu=malloc(strlen(optarg)+1); strcpy(startmenu,optarg); break; case 'v': version(); /* exits program */ case 'r': Retro=1; break; case 's': Superhot=1; break; case 'l': Lowbit=1; break; case 'n': /* * Override the default values for up and down, so 2 and 8 * can be used for hotkeys instead. */ Numeric=1; break; } } #else optind=1; #endif /* have one of the getopts */ if (optind < argc) { /* we are asked to process a rc file */ while (optind < argc) ReadRc(argv[optind++],RC_FILE); } else { /* fallback rc files */ #ifdef HAVE_ASPRINTF asprintf(s,"%s/.%s",getenv("HOME"),"pdmenurc"); if ((ReadRc(*s,RC_FILE)==0) || (!menus)) { asprintf(s,"%s/%s",ETCDIR,"pdmenurc"); ReadRc(*s,RC_FILE); #else strncpy(s,getenv("HOME"),255); strcat(s,"/."); strcat(s,"pdmenurc"); if ((ReadRc(s,RC_FILE)==0) || (!menus)) { strcpy(s,ETCDIR); strcat(s,"pdmenurc"); ReadRc(s,RC_FILE); #endif } } SanityCheckMenus(); if (!menus) { free(s); Error(_("Unable to find any pdmenurc files, or all pdmenurc files are empty.")); } if (menu_opt_flag) { /* menu to display was specified on the command line. */ m=LookupMenu(startmenu); if (m) { free(s); free(startmenu); return m; } /* Couldn't find the menu if we get to here. */ Error(_("Menu \"%s\" is not defined."),startmenu); exit(1); /* just here to shut up gcc -wall */ } else { /* display first menu we read that still exists */ free(s); /* * Sigh I wish we displayed the last menu to appear, then I wouln't * need this loop. Backwards-compatability sucks.. */ m=menus; while (m->last) m=m->last; return m; } } int main (int argc, char **argv) { Menu_Type *m; int ret; setlocale(LC_ALL, ""); bindtextdomain(PACKAGE,LOCALEDIR); textdomain(PACKAGE); menus=NULL; CurrentWindow=NULL; ScreenTitle=strdup(_("Pdmenu")); /* If COLORTERM is set, use color by default */ Use_Color=!(getenv("COLORTERM")==NULL); Q_Exits=1; Unpark_Cursor=0; /* SLang screen objects and their default colors */ strcpy(ScreenObjNames[1],DESKTOP_NAME); strcpy(FG[0],DESKTOP_FG_DEFAULT); strcpy(BG[0],DESKTOP_BG_DEFAULT); strcpy(ScreenObjNames[6],TITLE_NAME); strcpy(FG[5],TITLE_FG_DEFAULT); strcpy(BG[5],TITLE_BG_DEFAULT); strcpy(ScreenObjNames[3],BASE_NAME); strcpy(FG[2],BASE_FG_DEFAULT); strcpy(BG[2],BASE_BG_DEFAULT); strcpy(ScreenObjNames[4],MENU_NAME); strcpy(FG[3],MENU_FG_DEFAULT); strcpy(BG[3],MENU_BG_DEFAULT); strcpy(ScreenObjNames[5],SELBAR_NAME); strcpy(FG[4],SELBAR_FG_DEFAULT); strcpy(BG[4],SELBAR_BG_DEFAULT); strcpy(ScreenObjNames[2],SHADOW_NAME); strcpy(FG[1],SHADOW_FG_DEFAULT); strcpy(BG[1],SHADOW_BG_DEFAULT); strcpy(ScreenObjNames[7],MENU_HI_NAME); strcpy(FG[6],MENU_HI_FG_DEFAULT); strcpy(BG[6],MENU_HI_BG_DEFAULT); strcpy(ScreenObjNames[8],SELBAR_HI_NAME); strcpy(FG[7],SELBAR_HI_FG_DEFAULT); strcpy(BG[7],SELBAR_HI_BG_DEFAULT); strcpy(ScreenObjNames[9],UNSEL_MENU_NAME); strcpy(FG[8],UNSEL_MENU_FG_DEFAULT); strcpy(BG[8],UNSEL_MENU_BG_DEFAULT); #if (defined(SLANG_VERSION) && (SLANG_VERSION >= 20000)) /* Enable utf-8 in slang. */ SLutf8_enable(-1); #endif /* Parse parameters and load pdmenurc file. */ m=GetConfig(argc,argv); /* color or b&w? Tell slang */ if (Use_Color) { /* color */ DESKTOP=1; TITLE=6; BASE=3; MENU=4; SELBAR=5; SHADOW=2; MENU_HI=7; SELBAR_HI=8; UNSEL_MENU=9; } else { /* b&w: those numbered greater than 1 are inverse. */ DESKTOP=0; TITLE=2; BASE=2; MENU=0; SELBAR=2; SHADOW=0; MENU_HI=2; SELBAR_HI=0; UNSEL_MENU=0; } Screen_Setcolors(); SetScreensize(); #ifdef GPM_SUPPORT gpm_ok=InitMouse(); #endif AddWindow(m); Screen_Init(); DrawAll(); do { ret=DoMenu(m,Pdmenu_Action,Handle_Ctrl_C); if (tcgetpgrp(0) == -1) break; /* Detect tty gone away. */ } while ((ret!=QUIT_EXIT) && !((ret==Q_KEY_EXIT) && (Q_Exits))); #ifdef GPM_SUPPORT EndMouse(); #endif Screen_Reset(); return 0; } pdmenu/src/menutype.h0000644000000000000000000000240412355063701012044 0ustar /* * These types are used throughout pdmenu, in menu definitions. */ /* * Copyright (c) 1995, 1996, 1997 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ /* The structure that holds an indivitual menu item. Can be a linked list. */ typedef struct Menu_Item_Type { signed char hotkey; char *text; char *command; int noclear_flag; int pause_flag; int display_flag; int truncate_flag; int edit_flag; int makemenu_flag; int setenv_flag; int command_flag; char type; #define MENU_EXEC 1 #define MENU_SHOW 2 #define MENU_EXIT 3 #define MENU_NOP 4 #define MENU_GROUP 5 #define MENU_REMOVE 6 #define MENU_HELP_TEXT 7 struct Menu_Item_Type *next; } Menu_Item_Type; /* * The structure that holds a whole menu, and is an element of a linked * list of menus. */ typedef struct Menu_Type { char *name; char *title; char *helptext; Menu_Item_Type **items; int num; int num_avail; /* the number of items space has been allocated for so far */ int selected; int x, y; int dx, dy; int recalc; char mustscroll; /* will we have to handle scrolling for this menu? */ int offset; /* offset we've scrolled to */ struct Menu_Type *next; struct Menu_Type *last; } Menu_Type; pdmenu/src/screen.c0000644000000000000000000001043612355063701011454 0ustar /* * Screen functions for use with slang. * Draw dialogs, init and reset terminal, etc */ /* * Copyright (c) 1995-2003 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ #include "global.h" #include "screen.h" #include "menu.h" #include "error.h" #include #include "slang.h" #include #include #include #include #include #include #define _(String) gettext (String) /* equals 1 if the screen is set up in slang mode */ int screen_is_setup=0; /* Draw the desktop; the background of the screen */ void DrawDesktop () { int x; SLsmg_set_color(DESKTOP); for (x=1;x #include #include #include #include "slang.h" #include "actions.h" #include #include "pdgetline.h" #ifdef SETENV_FLAG_OK #ifndef HAVE_SETENV /* Pull in our own setenv code. */ #include "../contrib/getenv.c" #include "../contrib/setenv.c" #endif #endif #include #define _(String) gettext (String) /* Handle a control c by either exiting pdmenu or doing nothing. */ void Handle_Ctrl_C() { if (Q_Exits) { Screen_Reset(); #ifdef GPM_SUPPORT EndMouse(); #endif exit(0); } } /* Handle a menu action by just quitting it */ int NullAction() { return QUIT_EXIT; } #ifdef SETENV_FLAG_OK /* * Run a command, and examine stdout for var=val lines, and set the * environment of this program appropriately. */ void RunSetenv (char *command) { FILE *pcommand; char *str, *val; /* Get the command output. */ pcommand=popen(command,"r"); str=pdgetline(pcommand,0); pclose(pcommand); if (!str) return; if (strlen(str) > 3 && strncmp(str,"PWD=",3)==0) { /* PWD is a special case */ chdir(str+4); free(str); } else if ((strlen(str) > 1) && ((val=strchr(str, '=')) != NULL)) { *val='\0'; val++; setenv(str,val,1); free(str); } else { free(str); /* Could display an error message here. */ } } #endif /* SETENV_FLAG_OK */ /* * Run a command, and display its output in a window. * If truncate==1, the output will not be wrapped. * This function is a horrible mess and I hope to do away with it one day. */ void RunShow (char *title, char *command, int truncate) { FILE *pcommand; char *realstr=NULL,*str=NULL; int i=0,j,k; /* Display wait text. */ DrawBase(_("Please wait...")); SLsmg_refresh(); /* allocate memory for the window */ menus->next=malloc(sizeof(Menu_Type)); menus->next->last=menus; menus->next->next=NULL; menus=menus->next; /* load up the menu with the appropriate values */ menus->title=malloc(strlen(title)+1); strcpy(menus->title,title); menus->helptext=malloc(128); strcpy(menus->helptext,_("Press Esc to close window.")); menus->name=malloc(1); strcpy(menus->name,""); menus->selected=0; menus->num_avail=MENU_INC; menus->items=malloc(sizeof(Menu_Item_Type *) * MENU_INC); /* Get the command output and create the menu items */ pcommand=popen(command,"r"); while ((str && strlen(str) > 0) || (str=realstr=pdgetline(pcommand,0))) { /* * If we are not truncating, we have to handle wrapping lines that contain * tabs. This adds a lot of complexity and ugliness here. :-( */ if (!truncate) { k=0; for (j=0;j= menus->num_avail) { menus->num_avail+=MENU_INC; menus->items=realloc(menus->items, sizeof(Menu_Item_Type *) * menus->num_avail); } menus->items[i]=malloc(sizeof(Menu_Item_Type)); menus->items[i]->type=MENU_EXIT; menus->items[i]->text=malloc(j+1); strncpy(menus->items[i]->text,str,j); menus->items[i]->text[j]='\0'; menus->items[i]->command=malloc(1); strcpy(menus->items[i]->command,""); menus->items[i]->hotkey=-1; menus->items[i++]->next=NULL; /* keep whittling away at the current string */ str=str+j; /* Set j=0 to indicate we shouldn't add str to the list yet. */ j=0; break; } /* Calculate length of string as it will appear on screen with tabs */ if (str[j] == '\t') { /* Figure out how many characters this tab will take up. */ k+=((j/SLsmg_Tab_Width)+1)*SLsmg_Tab_Width-j-1; } else k++; } /* If j == 0, this is a signal not to add str to the list yet. */ if (j != 0) { if (i >= menus->num_avail) { menus->num_avail+=MENU_INC; menus->items=realloc(menus->items, sizeof(Menu_Item_Type *) * menus->num_avail); } menus->items[i]=malloc(sizeof(Menu_Item_Type)); menus->items[i]->type=MENU_EXIT; menus->items[i]->text=malloc(j+1); strcpy(menus->items[i]->text,str); menus->items[i]->command=malloc(1); strcpy(menus->items[i]->command,""); menus->items[i]->hotkey=-1; menus->items[i++]->next=NULL; free(realstr); str=NULL; } } else { if (i >= menus->num_avail) { menus->num_avail+=MENU_INC; menus->items=realloc(menus->items, sizeof(Menu_Item_Type *) * menus->num_avail); } menus->items[i]=malloc(sizeof(Menu_Item_Type)); menus->items[i]->type=MENU_EXIT; menus->items[i]->text=realstr; menus->items[i]->command=malloc(1); strcpy(menus->items[i]->command,""); menus->items[i]->hotkey=-1; menus->items[i++]->next=NULL; str=NULL; } } pclose(pcommand); menus->num=i; if (i==0) { DrawBase(_("Command returned no output")); SLsmg_refresh(); RemoveMenu(menus); } else { menus->recalc=1; /* display the menu until they hit q or exit */ AddWindow(menus); DrawAll(); DoMenu(menus,NullAction,Handle_Ctrl_C); ExitWindow(); RemoveMenu(menus); } } /* * Change the help text */ void ChangeHelpText (Menu_Type *m, Menu_Item_Type *i) { FILE *pcommand; char *str; if (i->command_flag) { pcommand=popen(i->command,"r"); str=pdgetline(pcommand,0); pclose(pcommand); m->helptext = str; } else { m->helptext = i->command; } DrawAll(); } /* * Run a command from the menus. */ void RunCommand (Menu_Item_Type *i) { char *command; int must_redraw=0; Conditional_String *cs=NULL; Window_List_Type *this_window=CurrentWindow; if (i->command[0] != '\0') { /* don't try to run a null command */ if (i->edit_flag) { /* edit command on fly */ cs=EditTags(i->command); if (cs->ignore) { /* user hit escape */ free(cs->value); free(cs); return; } else { /* user hit enter */ command=malloc(strlen(cs->value)+1); strcpy(command,cs->value); free(cs->value); free(cs); } } else { /* don't edit command on fly */ command=malloc(strlen(i->command)+1); strcpy(command,i->command); } #ifdef SETENV_FLAG_OK if (i->setenv_flag) { /* a setenv command */ RunSetenv(command); } else #endif if (i->makemenu_flag) { /* process command output as rc file */ ReadRc(command,RC_PREPROC); SanityCheckMenus(); /* * make sure that all modified menus currently on screen * get recalced. */ while (this_window) { if (this_window->menu->recalc) { CalcMenu(this_window->menu); must_redraw=1; } this_window=this_window->last; } if (must_redraw) DrawAll(); } else if (i->truncate_flag) { /* display in a window and truncate */ RunShow(i->text,command,1); } else if (i->display_flag) { /* display in a window and wrap. */ RunShow(i->text,command,0); } else { /* normal display */ if (! i->noclear_flag) { /* clear screen */ SLsmg_cls(); SLsmg_normal_video(); Screen_Reset(); #ifdef GPM_SUPPORT EndMouse(); /* return to normal GPM/selection mode */ #endif } /* * This is what the whole pdmenu program comes down to. * The rest is fluff. ;-) */ /* * start: Steve Blott (smblott@gmail.com) * * add capability to exec() (rather than system()) a command, thereby * replacing the current process; if the first word of command is * "exec", then exec() it, otherwise system() it */ char *cp = command; while (isspace(cp[0])) cp++; if ( strncmp(cp, "exec", 4) == 0 && isspace(cp[4]) ) { char *cv[4]; /* command vector */ cv[0] = "sh"; cv[1] = "-c"; cv[2] = cp; cv[3] = 0; execvp(cv[0],cv); /* should not reach here; if the execvp fails, then pdmenu will * continue to run, silently ignoring the failure; if the execvp * succeeds but the subsequent exec fails, then pdmenu will silently * disappear (its process no longer exists), and no feedback will be * received */ } else system(command); if (! i->noclear_flag) { /* redraw screen */ Screen_Init(); if (i->pause_flag) { /* pause 1st */ printf("\n%s",_("Press Enter to return to Pdmenu.")); fflush(stdout); /* make sure above is displayed. */ /* Now wait for the keypress. */ while (1) { int k; k = SLang_getkey(); if (k == '\n' || k == '\r') { break; } } SLang_flush_input(); /* kill any buffered input */ printf("\n"); } #ifdef GPM_SUPPORT gpm_ok=InitMouse(); /* grab mouse pointer again. */ #endif /* * we need to account for the screen size changing behind our backs * while the program was running. */ SetScreensize(); Resize_Screen(); DrawAll(); } } free(command); } } /* Display the submenu pointed to by the passed show: menu item. */ void ShowSubMenu (Menu_Item_Type *i) { int c; Menu_Type *m; /* find matching menu, if any */ if ((m=LookupMenu(i->command)) != NULL) { /* got match -- show it and handle input for it. */ AddWindow(m); DrawAll(); do { c=DoMenu(m,Pdmenu_Action,Handle_Ctrl_C); if ((c==QUIT_EXIT) || (c==Q_KEY_EXIT)) ExitWindow(); } while (c==0); } } /* Remove a menu, given the name of the menu. */ void RemoveMenuByName (char *menuname) { Menu_Type *m; if ((m=LookupMenu(menuname)) != NULL) { RemoveMenu(m); } } /* * Run a menu item, return QUIT_EXIT if it is an exit item, or is a group * containing such an item. */ int RunItem (Menu_Type *m, Menu_Item_Type *i) { switch (i->type) { case MENU_EXEC: RunCommand(i); break; case MENU_SHOW: ShowSubMenu(i); break; case MENU_EXIT: return QUIT_EXIT; case MENU_REMOVE: RemoveMenuByName(i->command); break; case MENU_HELP_TEXT: ChangeHelpText(m, i); break; } if (i->next == NULL) return 0; else return RunItem(m, i->next); /* follow the linked list */ } /* This is called when an item is picked from a menu. */ int Pdmenu_Action (Menu_Type *m) { return RunItem(m, m->items[m->selected]); } pdmenu/src/pdgetline.c0000644000000000000000000000260212355063701012144 0ustar /* * Copyright (c) 1995, 1996, 1997 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ #include #include #include /* * How many characters to read in at a time. Should be greater than the * average line length, otherwise, it doesn't really matter. */ #define BUF_INC 256 /* * This reads in a full line of arbitrary length from the passed file, * allocates a buffer for the data, and returns a pointer to it. * * If allow_cont is set, continuation lines are treated as one line. * * Note that NULL will be returned on eof. * * Note also that any trailing \n on the line will be removed. */ char *pdgetline(FILE *fp, int allow_cont) { char *str=NULL; int strsize=0; if (feof(fp)) return NULL; do { str=realloc(str,strsize+BUF_INC+1); if (! fgets(str + strsize,BUF_INC,fp)) { if (strsize == 0) { free(str); return NULL; /* reached eof with empty string */ } else { str[strsize]='\0'; /* work around a bug (?) in fgets */ break; } } strsize=strlen(str); } while ( /* continuation line */ (allow_cont && strsize>1 && str[strsize-2] == '\\' && (strsize=strsize-2)) || /* long line */ (strsize>0 && str[strsize-1] != '\n') ); /* remove trailing \n */ if (str[strsize-1] == '\n') str[strsize-1]='\0'; return str; } pdmenu/src/keyboard.c0000644000000000000000000000160212355063701011770 0ustar /* * Copyright (c) 1995-1999 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ #include "global.h" #include "slang.h" #include #define TIMEOUT 2 /* 2/10 of a second */ /* Get a key from keyboard, handling escape properly. */ int getch (void) { int ch; if (tcgetpgrp(0) == -1) return 033; /* Detect if the terminal went away. */ while (SLang_input_pending(1000) == 0) continue; ch = SLang_getkey(); if (ch == 033) { /* escape */ if (SLang_input_pending(TIMEOUT) == 0) { return 033; } else { /* If two or more escapes are queued up, assume the first is a * "real" escape, and not part of some escape sequance. */ int ch2 = SLang_getkey(); SLang_ungetkey(ch2); if (ch2 == 033) { return 033; } } } SLang_ungetkey(ch); return SLkp_getkey(); } pdmenu/src/inputbox.c0000644000000000000000000001135312355063701012044 0ustar /* * Copyright (c) 1995-1999 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ #include "global.h" #include "screen.h" #include "menu.h" #include "window.h" #include "mouse.h" #include "keyboard.h" #include "pdmenu.h" #include "inputbox.h" #include "pdstring.h" #include #include #include "slang.h" #include #define _(String) gettext (String) /* * Draw the input box on screen. */ void DrawInputBox (char *title) { /* Make the previous topmost menu be redrawn in unselected menu color. */ if (!Retro) DrawMenu(CurrentWindow->menu,0); /* Draw the input box. */ SLsmg_set_color(MENU); DrawDialog(title,1,(SLtt_Screen_Rows-3)/2,SLtt_Screen_Cols-2,3,1); SLsmg_set_color(SELBAR); } /* * Display an input box with title and text, get input. * ret->ignore is set if the user hits escape. */ Conditional_String *DoInputBox (char *title, char *contents) { int curspos,key,retcount; Conditional_String *ret=malloc(sizeof(Conditional_String)); retcount=SLtt_Screen_Cols; ret->value=malloc(retcount + 1); strcpy(ret->value,contents); #ifdef GPM_SUPPORT if (gpm_ok) EndMouse(); /* let gpm cut and paste work as normal in edit box */ #endif curspos=strlen(ret->value); DrawBase(_("Press Enter when done, or Esc to cancel")); DrawInputBox(title); while (1) { SLsmg_gotorc((SLtt_Screen_Rows-3)/2+1,3); SLsmg_write_nstring(ret->value,SLtt_Screen_Cols-6); SLsmg_gotorc((SLtt_Screen_Rows-3)/2+1,3+curspos); SLsmg_refresh(); key=getch(); switch (key) { case 0: if (Want_Screen_Resize) { Resize_Screen(); /* * If the screen got wider, I need to malloc more memory for * ret->value */ if (retcount < SLtt_Screen_Cols) { retcount=SLtt_Screen_Cols; ret->value=realloc(ret->value,retcount + 1); } /* This isn't done too well -- there's some flicker. */ Force_Redraw(); DrawBase(_("Press Enter when done, or Esc to cancel")); DrawInputBox(title); } break; case '\n': case '\r': DrawAll(); ret->value[curspos]='\0'; #ifdef GPM_SUPPORT /* Start handling our own mouse events again. */ if (gpm_ok) gpm_ok=InitMouse(); #endif ret->ignore=0; return ret; case 12: /* ctrl-l */ case 18: /* ctrl-r */ Force_Redraw(); DrawInputBox(title); break; case SL_KEY_BACKSPACE: /* backspace in my xterm generates 127. :-( */ case 127: /* ctrl-h */ if (curspos>0) ret->value[--curspos]='\0'; break; case 27: /* escape */ DrawAll(); #ifdef GPM_SUPPORT /* Start handling our own mouse events again. */ if (gpm_ok) gpm_ok=InitMouse(); #endif ret->ignore=1; return ret; default: if ((key>=32) && (key<127) && (cursposvalue[curspos++]=key; ret->value[curspos]='\0'; } } } } /* * Process the string, replacing ~title:text~ flags with input from the user. * ret->ignore is set if the user hits escape. */ Conditional_String *EditTags(char *s) { int tagtitlestart,tagvaluestart,i,old_i,ok,retcount=0; char *tagtitle, *input; Conditional_String *cs, *ret=malloc(sizeof(Conditional_String)); ret->value=malloc(strlen(s) + 1); for (i=0;i0) && (s[i-1]!='\\')) || (i==0))) { /* Start of tag (?) */ old_i=i; ok=0; tagtitlestart=i+1; for (i++;iignore) { /* user hit escape */ free(cs->value); free(cs); ret->ignore=1; return ret; } /* * This is safe because ret->value[retcount] = the * beginning of this tag so was allocated. */ ret->value[retcount]='\0'; retcount=retcount+strlen(cs->value); /* FIXME: this is allocating too much */ ret->value=realloc(ret->value,retcount + strlen(s) + 1); strcat(ret->value,cs->value); free(cs->value); free(cs); break; } } break; } } if (ok==0) i=old_i; /* wasn't a tag, after all */ } else ret->value[retcount++]=s[i]; } ret->value[retcount]='\0'; ret->ignore=0; return ret; } pdmenu/src/config.h0000644000000000000000000000117212355063701011444 0ustar /* * General config */ /* * Copyright (c) 1995-1999 Joey Hess (joey@kitenet.net) * All rights reserved. See COPYING for full copyright information (GPL). */ /* * Comment out the following line if you don't want pdmenu to support the * setenv flag ('s') to exec. This will make pdmenu a bit smaller. */ #define SETENV_FLAG_OK /* * Here are some more files you can edit to further configure pdmenu. * You can safely leave these files alone. */ /* Edit this file to change keywords used in the rc file. */ #include "rc_config.h" /* Edit this file to change the default colors pdmenu will use. */ #include "colors.h" pdmenu/contrib/0000755000000000000000000000000012355063701010676 5ustar pdmenu/contrib/setenv.c0000644000000000000000000000746712355063701012364 0ustar /* * Copyright (c) 1987 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)setenv.c 5.6 (Berkeley) 6/4/91"; #endif /* LIBC_SCCS and not lint */ #include #include #include /* * setenv -- * Set the value of the environmental variable "name" to be * "value". If rewrite is set, replace any current value. */ int setenv(name, value, rewrite) register const char *name; register const char *value; int rewrite; { extern char **environ; static int alloced; /* if allocated space before */ register char *C; int l_value, offset; char *_findenv(); if (*value == '=') /* no `=' in value */ ++value; l_value = strlen(value); if ((C = _findenv(name, &offset))) { /* find if already exists */ if (!rewrite) return (0); if (strlen(C) >= l_value) { /* old larger; copy over */ while ((*C++ = *value++)); return (0); } } else { /* create new slot */ register int cnt; register char **P; for (P = environ, cnt = 0; *P; ++P, ++cnt); if (alloced) { /* just increase size */ environ = (char **)realloc((char *)environ, (size_t)(sizeof(char *) * (cnt + 2))); if (!environ) return (-1); } else { /* get new space */ alloced = 1; /* copy old entries into it */ P = (char **)malloc((size_t)(sizeof(char *) * (cnt + 2))); if (!P) return (-1); bcopy(environ, P, cnt * sizeof(char *)); environ = P; } environ[cnt + 1] = NULL; offset = cnt; } for (C = (char *)name; *C && *C != '='; ++C); /* no `=' in name */ if (!(environ[offset] = /* name + `=' + value */ malloc((size_t)((int)(C - name) + l_value + 2)))) return (-1); for (C = environ[offset]; (*C = *name++) && *C != '='; ++C) ; for (*C++ = '='; (*C++ = *value++); ) ; return (0); } /* * unsetenv(name) -- * Delete environmental variable "name". */ void unsetenv(name) const char *name; { extern char **environ; register char **P; int offset; while (_findenv(name, &offset)) /* if set multiple times */ for (P = &environ[offset];; ++P) if (!(*P = *(P + 1))) break; } pdmenu/contrib/getenv.c0000644000000000000000000000551012355063701012333 0ustar /* * Copyright (c) 1987 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getenv.c 5.8 (Berkeley) 2/23/91"; #endif /* LIBC_SCCS and not lint */ #include #include #include /* * getenv -- * Returns ptr to value associated with name, if any, else NULL. */ char * getenv(name) const char *name; { int offset; char *_findenv(); return(_findenv(name, &offset)); } /* * _findenv -- * Returns pointer to value associated with name, if any, else NULL. * Sets offset to be the offset of the name/value combination in the * environmental array, for use by setenv(3) and unsetenv(3). * Explicitly removes '=' in argument name. * * This routine *should* be a static; don't use it. */ char * _findenv(name, offset) register char *name; int *offset; { extern char **environ; register int len; register char **P, *C; for (C = name, len = 0; *C && *C != '='; ++C, ++len); for (P = environ; *P; ++P) if (!strncmp(*P, name, len)) if (*(C = *P + len) == '=') { *offset = P - environ; return(++C); } return(NULL); } pdmenu/.gitignore0000644000000000000000000000000612355063701011222 0ustar *.lsm pdmenu/aclocal.m40000644000000000000000000005243312355063701011105 0ustar # aclocal.m4 generated automatically by aclocal 1.5 # Copyright 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # Macro to add for using GNU gettext. # Ulrich Drepper , 1995. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public # License or the GNU Library General Public License but which still want # to provide support for the GNU gettext functionality. # Please note that the actual code of the GNU gettext library is covered # by the GNU Library General Public License, and the rest of the GNU # gettext package package is covered by the GNU General Public License. # They are *not* in the public domain. # serial 10 dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]). dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). Otherwise, a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. dnl LIBDIR is used to find the intl libraries. If empty, dnl the value `$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_WITH_NLS], [AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT($USE_NLS) AC_SUBST(USE_NLS) BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no INTLLIBS= dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if translation of program messages to the user's native language is requested.]) AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH(included-gettext, [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. CATOBJEXT=NONE dnl Add a version number to the cache macros. define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc]) define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl]) AC_CHECK_HEADER(libintl.h, [AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, [AC_TRY_LINK([#include extern int _nl_msg_cat_cntr;], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr], gt_cv_func_gnugettext_libc=yes, gt_cv_func_gnugettext_libc=no)]) if test "$gt_cv_func_gnugettext_libc" != "yes"; then AC_CACHE_CHECK([for GNU gettext in libintl], gt_cv_func_gnugettext_libintl, [gt_save_LIBS="$LIBS" LIBS="$LIBS -lintl $LIBICONV" AC_TRY_LINK([#include extern int _nl_msg_cat_cntr;], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr], gt_cv_func_gnugettext_libintl=yes, gt_cv_func_gnugettext_libintl=no) LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if test "$gt_cv_func_gnugettext_libc" = "yes" \ || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ && test "$PACKAGE" != gettext; }; then AC_DEFINE(HAVE_GETTEXT, 1, [Define if the GNU gettext() function is already present or preinstalled.]) if test "$gt_cv_func_gnugettext_libintl" = "yes"; then dnl If iconv() is in a separate libiconv library, then anyone dnl linking with libintl{.a,.so} also needs to link with dnl libiconv. INTLLIBS="-lintl $LIBICONV" fi gt_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" AC_CHECK_FUNCS(dcgettext) LIBS="$gt_save_LIBS" dnl Search for GNU msgfmt in the PATH. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) dnl Search for GNU xgettext in the PATH. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :) CATOBJEXT=.gmo fi ]) if test "$CATOBJEXT" = "NONE"; then dnl GNU gettext is not found in the C library. dnl Fall back on GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. INTLOBJS="\$(GETTOBJS)" AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :) AC_SUBST(MSGFMT) BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes CATOBJEXT=.gmo INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. dnl Test whether we really found GNU msgfmt. if test "$GMSGFMT" != ":"; then dnl If it is no GNU msgfmt we define it as : so that the dnl Makefiles still can work. if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then : ; else AC_MSG_RESULT( [found msgfmt program is not GNU msgfmt; ignore it]) GMSGFMT=":" fi fi dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is no GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi dnl We need to process the po/ directory. POSUB=po fi AC_OUTPUT_COMMANDS( [for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" fi ;; esac done]) dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext; then BUILD_INCLUDED_LIBINTL=yes fi dnl intl/plural.c is generated from intl/plural.y. It requires bison, dnl because plural.y uses bison specific features. It requires at least dnl bison-1.26 because earlier versions generate a plural.c that doesn't dnl compile. dnl bison is only needed for the maintainer (who touches plural.y). But in dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put dnl the rule in general Makefile. Now, some people carelessly touch the dnl files or have a broken "make" program, hence the plural.c rule will dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not dnl present or too old. AC_CHECK_PROGS([INTLBISON], [bison]) if test -z "$INTLBISON"; then ac_verc_fail=yes else dnl Found it, now check the version. AC_MSG_CHECKING([version of bison]) changequote(<<,>>)dnl ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) changequote([,])dnl ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; esac AC_MSG_RESULT([$ac_prog_version]) fi if test $ac_verc_fail = yes; then INTLBISON=: fi dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.in. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(BUILD_INCLUDED_LIBINTL) AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(GMOFILES) AC_SUBST(INTLLIBS) AC_SUBST(INTLOBJS) AC_SUBST(POFILES) AC_SUBST(POSUB) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST(DATADIRNAME) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST(INSTOBJEXT) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST(GENCAT) ]) dnl Usage: Just like AM_WITH_NLS, which see. AC_DEFUN([AM_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_ISC_POSIX])dnl AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_OFF_T])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_REQUIRE([jm_GLIBC21])dnl AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ stdlib.h string.h unistd.h sys/param.h]) AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \ getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \ strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) AM_ICONV AM_LANGINFO_CODESET AM_LC_MESSAGES AM_WITH_NLS([$1],[$2],[$3]) if test "x$CATOBJEXT" != "x"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but $(top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], []) AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) ]) # Search path for a program which passes the given test. # Ulrich Drepper , 1996. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public # License or the GNU Library General Public License but which still want # to provide support for the GNU gettext functionality. # Please note that the actual code of the GNU gettext library is covered # by the GNU Library General Public License, and the rest of the GNU # gettext package package is covered by the GNU General Public License. # They are *not* in the public domain. # serial 2 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) #serial 1 # This test replaces the one in autoconf. # Currently this macro should have the same name as the autoconf macro # because gettext's gettext.m4 (distributed in the automake package) # still uses it. Otherwise, the use in gettext.m4 makes autoheader # give these diagnostics: # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX undefine([AC_ISC_POSIX]) AC_DEFUN([AC_ISC_POSIX], [ dnl This test replaces the obsolescent AC_ISC_POSIX kludge. AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) ] ) #serial 2 # Test for the GNU C Library, version 2.1 or newer. # From Bruno Haible. AC_DEFUN([jm_GLIBC21], [ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, ac_cv_gnu_library_2_1, [AC_EGREP_CPP([Lucky GNU user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif ], ac_cv_gnu_library_2_1=yes, ac_cv_gnu_library_2_1=no) ] ) AC_SUBST(GLIBC21) GLIBC21="$ac_cv_gnu_library_2_1" ] ) #serial AM2 dnl From Bruno Haible. AC_DEFUN([AM_ICONV], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_ARG_WITH([libiconv-prefix], [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [ for dir in `echo "$withval" | tr : ' '`; do if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi done ]) AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_func_iconv=yes) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS -liconv" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_lib_iconv=yes am_cv_func_iconv=yes) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [ AC_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([$]{ac_t:- }[$]am_cv_proto_iconv) AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, [Define as const if the declaration of iconv() needs const.]) fi LIBICONV= if test "$am_cv_lib_iconv" = yes; then LIBICONV="-liconv" fi AC_SUBST(LIBICONV) ]) #serial AM1 dnl From Bruno Haible. AC_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, [AC_TRY_LINK([#include ], [char* cs = nl_langinfo(CODESET);], am_cv_langinfo_codeset=yes, am_cv_langinfo_codeset=no) ]) if test $am_cv_langinfo_codeset = yes; then AC_DEFINE(HAVE_LANGINFO_CODESET, 1, [Define if you have and nl_langinfo(CODESET).]) fi ]) # Check whether LC_MESSAGES is available in . # Ulrich Drepper , 1995. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public # License or the GNU Library General Public License but which still want # to provide support for the GNU gettext functionality. # Please note that the actual code of the GNU gettext library is covered # by the GNU Library General Public License, and the rest of the GNU # gettext package package is covered by the GNU General Public License. # They are *not* in the public domain. # serial 2 AC_DEFUN([AM_LC_MESSAGES], [if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi fi]) pdmenu/redhat/0000755000000000000000000000000012427315273010511 5ustar pdmenu/redhat/pdmenu.spec0000644000000000000000000000205412427315273012656 0ustar Summary: A simple text-based menu program Name: pdmenu Packager: jeff.covey@pobox.com Version: 1.3.4 Release: 1 Url: http://kitenet.net/~joey/code/pdmenu/ Copyright: GPL Group: Shells/Menus Buildroot: /tmp Requires: gpm, slang >= 0.99.34 %description A simple full screen menu program, intended to be a comfortable login shell for inexperienced users. %prep %setup -n pdmenu ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man %build make %install make INSTALL_PREFIX=$RPM_BUILD_ROOT install install examples/newbie/modem-check examples/newbie/rpm-info-on-command \ /tmp/usr/lib/pdmenu # What a hack. cp -a examples redhat/examples rm -f redhat/examples/*.in rm -f redhat/examples/newbie/*.in rm -f redhat/examples/newbie/modem-check rm -f redhat/examples/newbie/rpm-info-on-command rm -f redhat/examples/editdir.pl redhat/examples/showdir.pl %files %config /etc/pdmenurc /usr/bin/pdmenu /usr/share/man/man1/pdmenu.1 /usr/share/man/man5/pdmenurc.5 /usr/lib/pdmenu %doc README doc/BUGS doc/TODO doc/ANNOUNCE debian/changelog redhat/examples pdmenu/redhat/pdmenu.spec.in0000644000000000000000000000205412355063701013257 0ustar Summary: A simple text-based menu program Name: pdmenu Packager: jeff.covey@pobox.com Version: @VER@ Release: 1 Url: http://kitenet.net/~joey/code/pdmenu/ Copyright: GPL Group: Shells/Menus Buildroot: /tmp Requires: gpm, slang >= 0.99.34 %description A simple full screen menu program, intended to be a comfortable login shell for inexperienced users. %prep %setup -n pdmenu ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man %build make %install make INSTALL_PREFIX=$RPM_BUILD_ROOT install install examples/newbie/modem-check examples/newbie/rpm-info-on-command \ /tmp/usr/lib/pdmenu # What a hack. cp -a examples redhat/examples rm -f redhat/examples/*.in rm -f redhat/examples/newbie/*.in rm -f redhat/examples/newbie/modem-check rm -f redhat/examples/newbie/rpm-info-on-command rm -f redhat/examples/editdir.pl redhat/examples/showdir.pl %files %config /etc/pdmenurc /usr/bin/pdmenu /usr/share/man/man1/pdmenu.1 /usr/share/man/man5/pdmenurc.5 /usr/lib/pdmenu %doc README doc/BUGS doc/TODO doc/ANNOUNCE debian/changelog redhat/examples pdmenu/.gitattributes0000644000000000000000000000005412355063701012130 0ustar debian/changelog merge=dpkg-mergechangelogs