home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / gzip-1.2.4.tar.gz / gzip-1.2.4.tar / gzip-1.2.4 / configure < prev    next >
Text File  |  1993-07-07  |  19KB  |  827 lines

  1. #!/bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf.
  4. # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  5.  
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10.  
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. # GNU General Public License for more details.
  15.  
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. # Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] [--no-create]
  21. #        [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE] [TARGET]
  22. # Ignores all args except --srcdir, --prefix, --exec-prefix, --no-create, and
  23. # --with-PACKAGE unless this script has special code to handle it.
  24.  
  25.  
  26. for arg
  27. do
  28.   # Handle --exec-prefix with a space before the argument.
  29.   if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
  30.   # Handle --host with a space before the argument.
  31.   elif test x$next_host = xyes; then next_host=
  32.   # Handle --prefix with a space before the argument.
  33.   elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
  34.   # Handle --srcdir with a space before the argument.
  35.   elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
  36.   else
  37.     case $arg in
  38.      # For backward compatibility, also recognize exact --exec_prefix.
  39.      -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
  40.     exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  41.      -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
  42.     next_exec_prefix=yes ;;
  43.  
  44.      -gas | --gas | --ga | --g) ;;
  45.  
  46.      -host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
  47.      -host | --host | --hos | --ho | --h)
  48.     next_host=yes ;;
  49.  
  50.      -nfp | --nfp | --nf) ;;
  51.  
  52.      -no-create | --no-create | --no-creat | --no-crea | --no-cre | --no-cr | --no-c | --no- | --no)
  53.         no_create=1 ;;
  54.  
  55.      -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  56.     prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  57.      -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  58.     next_prefix=yes ;;
  59.  
  60.      -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
  61.     srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  62.      -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
  63.     next_srcdir=yes ;;
  64.  
  65.      -with-* | --with-*)
  66.        package=`echo $arg|sed 's/-*with-//'`
  67.        # Delete all the valid chars; see if any are left.
  68.        if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then
  69.          echo "configure: $package: invalid package name" >&2; exit 1
  70.        fi
  71.        eval "with_`echo $package|sed s/-/_/g`=1" ;;
  72.  
  73.      -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v)
  74.        verbose=yes ;;
  75.  
  76.      *) ;;
  77.     esac
  78.   fi
  79. done
  80.  
  81. trap 'rm -f conftest* core; exit 1' 1 3 15
  82.  
  83. # Needed for some versions of `tr' so that character classes in `[]' work.
  84. if test "${LANG+set}" = "set" ; then
  85.    LANG=C
  86.    LC_ALL=C
  87.    export LANG LC_ALL
  88. fi
  89.  
  90. rm -f conftest*
  91. compile='${CC-cc} $CFLAGS $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1'
  92.  
  93. # A filename unique to this package, relative to the directory that
  94. # configure is in, which we can look for to find out if srcdir is correct.
  95. unique_file=gzip.c
  96.  
  97. # Find the source files, if location was not specified.
  98. if test -z "$srcdir"; then
  99.   srcdirdefaulted=yes
  100.   # Try the directory containing this script, then `..'.
  101.   prog=$0
  102.   confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
  103.   test "X$confdir" = "X$prog" && confdir=.
  104.   srcdir=$confdir
  105.   if test ! -r $srcdir/$unique_file; then
  106.     srcdir=..
  107.   fi
  108. fi
  109. if test ! -r $srcdir/$unique_file; then
  110.   if test x$srcdirdefaulted = xyes; then
  111.     echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
  112.   else
  113.     echo "configure: Can not find sources in \`${srcdir}'." 1>&2
  114.   fi
  115.   exit 1
  116. fi
  117. # Preserve a srcdir of `.' to avoid automounter screwups with pwd.
  118. # But we can't avoid them for `..', to make subdirectories work.
  119. case $srcdir in
  120.   .|/*|~*) ;;
  121.   *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
  122. esac
  123.  
  124. if test -z "$CC"; then
  125.   # Extract the first word of `gcc', so it can be a program name with args.
  126.   set dummy gcc; word=$2
  127.   echo checking for $word
  128.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  129.   for dir in $PATH; do
  130.     test -z "$dir" && dir=.
  131.     if test -f $dir/$word; then
  132.       CC="gcc"
  133.       break
  134.     fi
  135.   done
  136.   IFS="$saveifs"
  137. fi
  138. test -z "$CC" && CC="cc"
  139. test -n "$CC" -a -n "$verbose" && echo "    setting CC to $CC"
  140.  
  141. # Find out if we are using GNU C, under whatever name.
  142. cat > conftest.c <<EOF
  143. #ifdef __GNUC__
  144.   yes
  145. #endif
  146. EOF
  147. ${CC-cc} -E conftest.c > conftest.out 2>&1
  148. if egrep yes conftest.out >/dev/null 2>&1; then
  149.   GCC=1 # For later tests.
  150.   CFLAGS="${CFLAGS--O}"
  151. fi
  152. rm -f conftest*
  153.  
  154. echo checking how to run the C preprocessor
  155. if test -z "$CPP"; then
  156.   CPP='${CC-cc} -E'
  157.   cat > conftest.c <<EOF
  158. #include <stdio.h>
  159. EOF
  160. err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"`
  161. if test -z "$err"; then
  162.   :
  163. else
  164.   CPP=/lib/cpp
  165. fi
  166. rm -f conftest*
  167. fi
  168.  
  169. echo checking for underline in external names
  170. test -z "$ASCPP" -a -f /lib/cpp && ASCPP=/lib/cpp
  171. test -z "$ASCPP" && ASCPP="$CC -E"
  172. cat > conftest.c <<EOF
  173. int foo() {return 0;}
  174. EOF
  175. eval "$CC -c conftest.c > /dev/null 2>&1"
  176. if nm conftest.o | grep _foo > /dev/null 2>&1 ; then
  177.   :
  178. else
  179.   ASCPP="${ASCPP} -DNO_UNDERLINE"
  180. fi
  181. rm -f _match.o conftest.c conftest.o
  182. if echo "$DEFS" | grep NO_ASM >/dev/null; then
  183.   :
  184. else
  185.   echo checking for assembler
  186.   OBJA=""
  187.   if eval "$ASCPP $srcdir/match.S > _match.s 2>/dev/null"; then
  188.     if test ! -s _match.s || grep error < _match.s > /dev/null; then
  189.       :
  190.     elif eval "$CC -c _match.s >/dev/null 2>&1" && test -f _match.o; then
  191.       DEFS="${DEFS} -DASMV"
  192.       OBJA=match.o
  193.     fi
  194.   fi
  195.   rm -f _match.s _match.o
  196. fi
  197. # Make sure to not get the incompatible SysV /etc/install and
  198. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  199. # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
  200. # or the AFS install, which mishandles nonexistent args, or
  201. # /usr/ucb/install on SVR4, which tries to use the nonexistent group
  202. # `staff'.  On most BSDish systems install is in /usr/bin, not /usr/ucb
  203. # anyway.  Sigh.
  204. if test "z${INSTALL}" = "z" ; then
  205.   echo checking for install
  206.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  207.   for dir in $PATH; do
  208.     test -z "$dir" && dir=.
  209.     case $dir in
  210.     /etc|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
  211.     *)
  212.       if test -f $dir/installbsd; then
  213.     INSTALL="$dir/installbsd -c" # OSF1
  214.     INSTALL_PROGRAM='$(INSTALL)'
  215.     INSTALL_DATA='$(INSTALL) -m 644'
  216.     break
  217.       fi
  218.       if test -f $dir/install; then
  219.     if grep dspmsg $dir/install >/dev/null 2>&1; then
  220.       : # AIX
  221.     else
  222.       INSTALL="$dir/install -c"
  223.       INSTALL_PROGRAM='$(INSTALL)'
  224.       INSTALL_DATA='$(INSTALL) -m 644'
  225.       break
  226.     fi
  227.       fi
  228.       ;;
  229.     esac
  230.   done
  231.   IFS="$saveifs"
  232. fi
  233. INSTALL=${INSTALL-cp}
  234. INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}
  235. INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}
  236.  
  237. echo checking for AIX
  238. cat > conftest.c <<EOF
  239. #ifdef _AIX
  240.   yes
  241. #endif
  242.  
  243. EOF
  244. eval "$CPP \$DEFS conftest.c > conftest.out 2>&1"
  245. if egrep "yes" conftest.out >/dev/null 2>&1; then
  246.   {
  247. test -n "$verbose" && \
  248. echo '    defining' _ALL_SOURCE
  249. DEFS="$DEFS -D_ALL_SOURCE=1"
  250. }
  251.  
  252. fi
  253. rm -f conftest*
  254.  
  255.  
  256. echo checking for minix/config.h
  257. cat > conftest.c <<EOF
  258. #include <minix/config.h>
  259. EOF
  260. err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"`
  261. if test -z "$err"; then
  262.   MINIX=1
  263. fi
  264. rm -f conftest*
  265.  
  266. # The Minix shell can't assign to the same variable on the same line!
  267. if test -n "$MINIX"; then
  268.   {
  269. test -n "$verbose" && \
  270. echo '    defining' _POSIX_SOURCE
  271. DEFS="$DEFS -D_POSIX_SOURCE=1"
  272. }
  273.  
  274.   {
  275. test -n "$verbose" && \
  276. echo '    defining' _POSIX_1_SOURCE to be '2'
  277. DEFS="$DEFS -D_POSIX_1_SOURCE=2"
  278. }
  279.  
  280.   {
  281. test -n "$verbose" && \
  282. echo '    defining' _MINIX
  283. DEFS="$DEFS -D_MINIX=1"
  284. }
  285.  
  286. fi
  287.  
  288. echo checking for POSIXized ISC
  289. if test -d /etc/conf/kconfig.d &&
  290.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  291. then
  292.   ISC=1 # If later tests want to check for ISC.
  293.   {
  294. test -n "$verbose" && \
  295. echo '    defining' _POSIX_SOURCE
  296. DEFS="$DEFS -D_POSIX_SOURCE=1"
  297. }
  298.  
  299.   if test -n "$GCC"; then
  300.     CC="$CC -posix"
  301.   else
  302.     CC="$CC -Xp"
  303.   fi
  304. fi
  305.  
  306. echo checking for DYNIX/ptx libseq
  307. cat > conftest.c <<EOF
  308. #if defined(_SEQUENT_)
  309.   yes
  310. #endif
  311.  
  312. EOF
  313. eval "$CPP \$DEFS conftest.c > conftest.out 2>&1"
  314. if egrep "yes" conftest.out >/dev/null 2>&1; then
  315.   SEQUENT=1
  316. fi
  317. rm -f conftest*
  318.  
  319. test -n "$SEQUENT" && test -f /usr/lib/libseq.a &&
  320.   LIBS="$LIBS -lseq"
  321.  
  322. echo checking for ANSI C header files
  323. cat > conftest.c <<EOF
  324. #include <stdlib.h>
  325. #include <stdarg.h>
  326. #include <string.h>
  327. #include <float.h>
  328. EOF
  329. err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"`
  330. if test -z "$err"; then
  331.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  332. echo '#include <string.h>' > conftest.c
  333. eval "$CPP \$DEFS conftest.c > conftest.out 2>&1"
  334. if egrep "memchr" conftest.out >/dev/null 2>&1; then
  335.   # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  336. cat > conftest.c <<EOF
  337. #include <ctype.h>
  338. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  339. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  340. #define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
  341. int main () { int i; for (i = 0; i < 256; i++)
  342. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  343. exit (0); }
  344.  
  345. EOF
  346. eval $compile
  347. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  348.   {
  349. test -n "$verbose" && \
  350. echo '    defining' STDC_HEADERS
  351. DEFS="$DEFS -DSTDC_HEADERS=1"
  352. }
  353.  
  354. fi
  355. rm -f conftest*
  356. fi
  357. rm -f conftest*
  358.  
  359. fi
  360. rm -f conftest*
  361.  
  362. echo checking for string.h
  363. cat > conftest.c <<EOF
  364. #include <string.h>
  365. EOF
  366. err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"`
  367. if test -z "$err"; then
  368.   :
  369. else
  370.   {
  371. test -n "$verbose" && \
  372. echo '    defining' NO_STRING_H
  373. DEFS="$DEFS -DNO_STRING_H=1"
  374. }
  375.  
  376. fi
  377. rm -f conftest*
  378.  
  379. echo checking for stdlib.h
  380. cat > conftest.c <<EOF
  381. #include <stdlib.h>
  382. EOF
  383. err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"`
  384. if test -z "$err"; then
  385.   :
  386. else
  387.   {
  388. test -n "$verbose" && \
  389. echo '    defining' NO_STDLIB_H
  390. DEFS="$DEFS -DNO_STDLIB_H=1"
  391. }
  392.  
  393. fi
  394. rm -f conftest*
  395.  
  396. echo checking for memory.h
  397. cat > conftest.c <<EOF
  398. #include <memory.h>
  399. EOF
  400. err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"`
  401. if test -z "$err"; then
  402.   :
  403. else
  404.   {
  405. test -n "$verbose" && \
  406. echo '    defining' NO_MEMORY_H
  407. DEFS="$DEFS -DNO_MEMORY_H=1"
  408. }
  409.  
  410. fi
  411. rm -f conftest*
  412.  
  413. echo checking for fcntl.h
  414. cat > conftest.c <<EOF
  415. #include <fcntl.h>
  416. EOF
  417. err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"`
  418. if test -z "$err"; then
  419.   :
  420. else
  421.   {
  422. test -n "$verbose" && \
  423. echo '    defining' NO_FCNTL_H
  424. DEFS="$DEFS -DNO_FCNTL_H=1"
  425. }
  426.  
  427. fi
  428. rm -f conftest*
  429.  
  430. echo checking for time.h
  431. cat > conftest.c <<EOF
  432. #include <time.h>
  433. EOF
  434. err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"`
  435. if test -z "$err"; then
  436.   :
  437. else
  438.   {
  439. test -n "$verbose" && \
  440. echo '    defining' NO_TIME_H
  441. DEFS="$DEFS -DNO_TIME_H=1"
  442. }
  443.  
  444. fi
  445. rm -f conftest*
  446.  
  447. for hdr in unistd.h
  448. do
  449. trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
  450. echo checking for ${hdr}
  451. cat > conftest.c <<EOF
  452. #include <${hdr}>
  453. EOF
  454. err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"`
  455. if test -z "$err"; then
  456.   {
  457. test -n "$verbose" && \
  458. echo '    defining' ${trhdr}
  459. DEFS="$DEFS -D${trhdr}=1"
  460. }
  461.  
  462. fi
  463. rm -f conftest*
  464. done
  465.  
  466. utime=0
  467. echo checking for utime.h
  468. cat > conftest.c <<EOF
  469. #include <utime.h>
  470. EOF
  471. err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"`
  472. if test -z "$err"; then
  473.   utime=1 
  474. else
  475.   {
  476. test -n "$verbose" && \
  477. echo '    defining' NO_UTIME_H
  478. DEFS="$DEFS -DNO_UTIME_H=1"
  479. }
  480.  
  481. fi
  482. rm -f conftest*
  483.  
  484. if test $utime -eq 0; then
  485.   for hdr in sys/utime.h
  486. do
  487. trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
  488. echo checking for ${hdr}
  489. cat > conftest.c <<EOF
  490. #include <${hdr}>
  491. EOF
  492. err=`eval "($CPP \$DEFS conftest.c >/dev/null) 2>&1"`
  493. if test -z "$err"; then
  494.   {
  495. test -n "$verbose" && \
  496. echo '    defining' ${trhdr}
  497. DEFS="$DEFS -D${trhdr}=1"
  498. }
  499.  
  500. fi
  501. rm -f conftest*
  502. done
  503.  
  504. fi
  505. echo checking for directory library header
  506. dirheader=
  507. if test -z "$dirheader"; then
  508.   echo checking for dirent.h
  509. cat > conftest.c <<EOF
  510. #include <sys/types.h>
  511. #include <dirent.h>
  512. int main() { exit(0); }
  513. int t() { DIR *dirp = opendir ("/"); }
  514. EOF
  515. if eval $compile; then
  516.   {
  517. test -n "$verbose" && \
  518. echo '    defining' DIRENT
  519. DEFS="$DEFS -DDIRENT=1"
  520. }
  521.  dirheader=dirent.h
  522. fi
  523. rm -f conftest*
  524. fi
  525. if test -z "$dirheader"; then
  526.   echo checking for sys/ndir.h
  527. cat > conftest.c <<EOF
  528. #include <sys/types.h>
  529. #include <sys/ndir.h>
  530. int main() { exit(0); }
  531. int t() { DIR *dirp = opendir ("/"); }
  532. EOF
  533. if eval $compile; then
  534.   {
  535. test -n "$verbose" && \
  536. echo '    defining' SYSNDIR
  537. DEFS="$DEFS -DSYSNDIR=1"
  538. }
  539.  dirheader=sys/ndir.h
  540. fi
  541. rm -f conftest*
  542. fi
  543. if test -z "$dirheader"; then
  544.   echo checking for sys/dir.h
  545. cat > conftest.c <<EOF
  546. #include <sys/types.h>
  547. #include <sys/dir.h>
  548. int main() { exit(0); }
  549. int t() { DIR *dirp = opendir ("/"); }
  550. EOF
  551. if eval $compile; then
  552.   {
  553. test -n "$verbose" && \
  554. echo '    defining' SYSDIR
  555. DEFS="$DEFS -DSYSDIR=1"
  556. }
  557.  dirheader=sys/dir.h
  558. fi
  559. rm -f conftest*
  560. fi
  561. if test -z "$dirheader"; then
  562.   echo checking for ndir.h
  563. cat > conftest.c <<EOF
  564. #include <sys/types.h>
  565. #include <ndir.h>
  566. int main() { exit(0); }
  567. int t() { DIR *dirp = opendir ("/"); }
  568. EOF
  569. if eval $compile; then
  570.   {
  571. test -n "$verbose" && \
  572. echo '    defining' NDIR
  573. DEFS="$DEFS -DNDIR=1"
  574. }
  575.  dirheader=ndir.h
  576. fi
  577. rm -f conftest*
  578. fi
  579.  
  580. echo checking for closedir return value
  581. cat > conftest.c <<EOF
  582. #include <sys/types.h>
  583. #include <$dirheader>
  584. int closedir(); main() { exit(closedir(opendir(".")) != 0); }
  585. EOF
  586. eval $compile
  587. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  588.   :
  589. else
  590.   {
  591. test -n "$verbose" && \
  592. echo '    defining' VOID_CLOSEDIR
  593. DEFS="$DEFS -DVOID_CLOSEDIR=1"
  594. }
  595.  
  596. fi
  597. rm -f conftest*
  598.  
  599. echo checking for Xenix
  600. cat > conftest.c <<EOF
  601. #if defined(M_XENIX) && !defined(M_UNIX)
  602.   yes
  603. #endif
  604.  
  605. EOF
  606. eval "$CPP \$DEFS conftest.c > conftest.out 2>&1"
  607. if egrep "yes" conftest.out >/dev/null 2>&1; then
  608.   XENIX=1
  609. fi
  610. rm -f conftest*
  611.  
  612. if test -n "$XENIX"; then
  613.   LIBS="$LIBS -lx"
  614.   case "$DEFS" in
  615.   *SYSNDIR*) ;;
  616.   *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx.
  617.   esac
  618. fi
  619.  
  620. echo checking for return type of signal handlers
  621. cat > conftest.c <<EOF
  622. #include <sys/types.h>
  623. #include <signal.h>
  624. #ifdef signal
  625. #undef signal
  626. #endif
  627. extern void (*signal ()) ();
  628. int main() { exit(0); }
  629. int t() { int i; }
  630. EOF
  631. if eval $compile; then
  632.   :
  633. else
  634.   {
  635. test -n "$verbose" && \
  636. echo '    defining' RETSIGTYPE to be 'int'
  637. DEFS="$DEFS -DRETSIGTYPE=int"
  638. }
  639.  
  640. fi
  641. rm -f conftest*
  642.  
  643.  
  644. echo checking for size_t in sys/types.h
  645. echo '#include <sys/types.h>' > conftest.c
  646. eval "$CPP \$DEFS conftest.c > conftest.out 2>&1"
  647. if egrep "size_t" conftest.out >/dev/null 2>&1; then
  648.   :
  649. else
  650.   {
  651. test -n "$verbose" && \
  652. echo '    defining' size_t to be 'unsigned'
  653. DEFS="$DEFS -Dsize_t=unsigned"
  654. }
  655.  
  656. fi
  657. rm -f conftest*
  658.  
  659. echo '#include <sys/types.h>' > conftest.c
  660. eval "$CPP \$DEFS conftest.c > conftest.out 2>&1"
  661. if egrep "off_t" conftest.out >/dev/null 2>&1; then
  662.   :
  663. else
  664.   {
  665. test -n "$verbose" && \
  666. echo '    defining' NO_OFF_T
  667. DEFS="$DEFS -DNO_OFF_T=1"
  668. }
  669.  
  670. fi
  671. rm -f conftest*
  672.  
  673. echo "checking if \`#!' works in shell scripts"
  674. cat <<'__EOF__' > conftest.csh
  675. #!/bin/csh -f
  676. setenv SHELL /bin/csh
  677. # Avoid tcsh bug 'Bad Hertz Value':
  678. setenv HZ 60
  679. # Make sure foo doesn't get exported into the environment
  680. # Astoundingly, some versions of csh don't have unsetenv.
  681. if (${?foo}) unsetenv foo >& /dev/null
  682. if (${?foo}) unset foo
  683. set output="`./conftest.sh`"
  684. if ( "$output" == "foo=bar" ) then
  685.    exit 0
  686. endif
  687. exit 1
  688. __EOF__
  689. cat <<'__EOF__' > conftest.sh
  690. #!/bin/sh
  691. set foo=bar
  692. echo "$*"
  693. __EOF__
  694. chmod 777 conftest.csh conftest.sh
  695. (csh -f ./conftest.csh) 2> /dev/null
  696. if test $? = 0 ; then
  697.    :; SEDCMD="1d"
  698. else
  699.    :; SEDCMD=""
  700. fi
  701. rm -f conftest.csh conftest.sh
  702.  
  703. if test -z "$prefix"
  704. then
  705.   echo checking for gzip to derive installation directory prefix
  706.   IFS="${IFS=     }"; saveifs="$IFS"; IFS="$IFS:"
  707.   for dir in $PATH; do
  708.     test -z "$dir" && dir=.
  709.     if test $dir != . && test -f $dir/gzip; then
  710.       # Not all systems have dirname.
  711.       prefix=`echo $dir|sed 's%/[^/][^/]*$%%'`
  712.       break
  713.     fi
  714.   done
  715.   IFS="$saveifs"
  716.   echo "    chose installation directory prefix ${prefix}"
  717. fi
  718.  
  719. if test -z "$G" -a -n "$prefix" -a -f $prefix/bin/gznew; then
  720.   G=g
  721. fi
  722. if test -z "$ZCAT"; then
  723.   if test -n "$prefix" -a -f $prefix/bin/gzcat; then
  724.     ZCAT=gzcat
  725.   else
  726.     ZCAT=${G}zcat
  727.   fi
  728. fi
  729. if test -n "$prefix"; then
  730.   test -z "$exec_prefix" && exec_prefix='${prefix}'
  731.   prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  732. fi
  733. if test -n "$exec_prefix"; then
  734.   prsub="$prsub
  735. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%\
  736. exec_prefix\\1=\\2$exec_prefix%"
  737. fi
  738. cat >conftest.def <<EOF
  739. $DEFS
  740. EOF
  741. escape_ampersand_and_backslash='s%[&\\]%\\&%g'
  742. DEFS=`sed "$escape_ampersand_and_backslash" <conftest.def`
  743. rm -f conftest.def
  744.  
  745. trap 'rm -f config.status; exit 1' 1 3 15
  746. echo creating config.status
  747. rm -f config.status
  748. cat > config.status <<EOF
  749. #!/bin/sh
  750. # Generated automatically by configure.
  751. # Run this file to recreate the current configuration.
  752. # This directory was configured as follows,
  753. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  754. #
  755. # $0 $*
  756.  
  757. for arg
  758. do
  759.   case "\$arg" in
  760.     -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  761.     exec /bin/sh $0 $* ;;
  762.     *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
  763.   esac
  764. done
  765.  
  766. trap 'rm -f Makefile; exit 1' 1 3 15
  767. CC='$CC'
  768. CPP='$CPP'
  769. INSTALL='$INSTALL'
  770. INSTALL_PROGRAM='$INSTALL_PROGRAM'
  771. INSTALL_DATA='$INSTALL_DATA'
  772. ZCAT='$ZCAT'
  773. G='$G'
  774. CFLAGS='$CFLAGS'
  775. ASCPP='$ASCPP'
  776. OBJA='$OBJA'
  777. SEDCMD='$SEDCMD'
  778. LIBS='$LIBS'
  779. srcdir='$srcdir'
  780. DEFS='$DEFS'
  781. prefix='$prefix'
  782. exec_prefix='$exec_prefix'
  783. prsub='$prsub'
  784. EOF
  785. cat >> config.status <<\EOF
  786.  
  787. top_srcdir=$srcdir
  788.  
  789. # Allow make-time overrides of the generated file list.
  790. test -n "$gen_files" || gen_files="Makefile"
  791.  
  792. for file in .. $gen_files; do if [ "x$file" != "x.." ]; then
  793.   srcdir=$top_srcdir
  794.   # Remove last slash and all that follows it.  Not all systems have dirname.
  795.   dir=`echo $file|sed 's%/[^/][^/]*$%%'`
  796.   if test "$dir" != "$file"; then
  797.     test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
  798.     test ! -d $dir && mkdir $dir
  799.   fi
  800.   echo creating $file
  801.   rm -f $file
  802.   echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file
  803.   sed -e "
  804. $prsub
  805. s%@CC@%$CC%g
  806. s%@CPP@%$CPP%g
  807. s%@INSTALL@%$INSTALL%g
  808. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  809. s%@INSTALL_DATA@%$INSTALL_DATA%g
  810. s%@ZCAT@%$ZCAT%g
  811. s%@G@%$G%g
  812. s%@CFLAGS@%$CFLAGS%g
  813. s%@ASCPP@%$ASCPP%g
  814. s%@OBJA@%$OBJA%g
  815. s%@SEDCMD@%$SEDCMD%g
  816. s%@LIBS@%$LIBS%g
  817. s%@srcdir@%$srcdir%g
  818. s%@DEFS@%$DEFS%
  819. " $top_srcdir/${file}.in >> $file
  820. fi; done
  821.  
  822. exit 0
  823. EOF
  824. chmod +x config.status
  825. test -n "$no_create" || ./config.status
  826.  
  827.