home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 6 / FreshFish_September1994.bin / bbs / gnu / diffutils-2.6-src.lha / GNU / src / amiga / diffutils-2.6 / configure < prev    next >
Encoding:
Text File  |  1994-04-25  |  49.9 KB  |  1,731 lines

  1. #!/bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf version 1.9 
  4. # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  5.  
  6. # This configure script is free software; you can redistribute it and/or
  7. # modify it under the terms of the GNU General Public License as published
  8. # by the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10.  
  11. # This script is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
  14. # 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. # Save the original args to write them into config.status later.
  21. configure_args="$*"
  22.  
  23. # Only options that might do something get documented.
  24. ac_usage="Usage: configure [options] [host]
  25. Options: [defaults in brackets after descriptions]
  26. --build=BUILD        configure for building on BUILD [BUILD=HOST]
  27. --disable-FEATURE    do not include FEATURE (same as --enable-FEATURE=no)
  28. --enable-FEATURE[=ARG]    include FEATURE [ARG=yes]
  29. --exec-prefix=PREFIX    install host dependent files in PREFIX [/usr/local]
  30. --help            print this message
  31. --host=HOST        configure for HOST [guessed]
  32. --prefix=PREFIX        install host independent files in PREFIX [/usr/local]
  33. --quiet, --silent    do not print \`checking for...' messages
  34. --srcdir=DIR        find the sources in DIR [configure dir or ..]
  35. --target=TARGET        configure for TARGET [TARGET=HOST]
  36. --verbose        print results of checks
  37. --version        print the version of autoconf that created configure
  38. --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  39. --without-PACKAGE    do not use PACKAGE (same as --with-PACKAGE=no)
  40. --x-includes=DIR    X include files are in DIR
  41. --x-libraries=DIR    X library files are in DIR"
  42.  
  43. # Initialize some variables set by options.
  44. # The variables have the same names as the options, with
  45. # dashes changed to underlines.
  46. build=NONE
  47. exec_prefix=
  48. host=NONE
  49. no_create=
  50. nonopt=NONE
  51. norecursion=
  52. prefix=
  53. program_prefix=
  54. program_suffix=
  55. program_transform_name=
  56. silent=
  57. srcdir=
  58. target=NONE
  59. verbose=
  60. x_includes=
  61. x_libraries=
  62.  
  63. ac_prev=
  64. for ac_option
  65. do
  66.  
  67.   # If the previous option needs an argument, assign it.
  68.   if test -n "$ac_prev"; then
  69.     eval "$ac_prev=\$ac_option"
  70.     ac_prev=
  71.     continue
  72.   fi
  73.  
  74.   # Accept (but ignore some of) the important Cygnus configure
  75.   # options, so we can diagnose typos.
  76.  
  77.   case "$ac_option" in
  78.   -*=*) ac_optarg=`/bin/echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  79.   *) ac_optarg= ;;
  80.   esac
  81.  
  82.   case "$ac_option" in
  83.  
  84.   -build | --build | --buil | --bui | --bu | --b)
  85.     ac_prev=build ;;
  86.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  87.     build="$ac_optarg" ;;
  88.  
  89.   -disable-* | --disable-*)
  90.     ac_feature=`/bin/echo $ac_option|sed -e 's/-*disable-//'`
  91.     # Reject names that aren't valid shell variable names.
  92.     if test -n "`/bin/echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  93.       /bin/echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  94.     fi
  95.     ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
  96.     eval "enable_${ac_feature}=no" ;;
  97.  
  98.   -enable-* | --enable-*)
  99.     ac_feature=`/bin/echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  100.     # Reject names that aren't valid shell variable names.
  101.     if test -n "`/bin/echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  102.       /bin/echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  103.     fi
  104.     ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
  105.     case "$ac_option" in
  106.       *=*) ;;
  107.       *) ac_optarg=yes ;;
  108.     esac
  109.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  110.  
  111.   # For backward compatibility, recognize -exec-prefix and --exec_prefix.
  112.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  113.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  114.   | --exec | --exe | --ex)
  115.     ac_prev=exec_prefix ;;
  116.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  117.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  118.   | --exec=* | --exe=* | --ex=*)
  119.     exec_prefix="$ac_optarg" ;;
  120.  
  121.   -gas | --gas | --ga | --g)
  122.     with_gas=yes ;; # Obsolete; use --with-gas.
  123.  
  124.   -help | --help | --hel | --he)
  125.     cat << EOF
  126. $ac_usage
  127. EOF
  128.     exit 0 ;;
  129.  
  130.   -host | --host | --hos | --ho)
  131.     ac_prev=host ;;
  132.   -host=* | --host=* | --hos=* | --ho=*)
  133.     host="$ac_optarg" ;;
  134.  
  135.   -nfp | --nfp | --nf)
  136.     with_fp=no ;; # Obsolete; use --without-fp.
  137.  
  138.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  139.   | --no-cr | --no-c)
  140.     no_create=yes ;;
  141.  
  142.   -norecursion | --norecursion | --norecursio | --norecursi \
  143.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor)
  144.     norecursion=yes ;;
  145.  
  146.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  147.     ac_prev=prefix ;;
  148.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  149.     prefix="$ac_optarg" ;;
  150.  
  151.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  152.   | --program-pre | --program-pr | --program-p)
  153.     ac_prev=program_prefix ;;
  154.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  155.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  156.     program_prefix="$ac_optarg" ;;
  157.  
  158.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  159.   | --program-suf | --program-su | --program-s)
  160.     ac_prev=program_suffix ;;
  161.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  162.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  163.     program_suffix="$ac_optarg" ;;
  164.  
  165.   -program-transform-name | --program-transform-name \
  166.   | --program-transform-nam | --program-transform-na \
  167.   | --program-transform-n | --program-transform- \
  168.   | --program-transform | --program-transfor \
  169.   | --program-transfo | --program-transf \
  170.   | --program-trans | --program-tran \
  171.   | --progr-tra | --program-tr | --program-t)
  172.     ac_prev=program_transform_name ;;
  173.   -program-transform-name=* | --program-transform-name=* \
  174.   | --program-transform-nam=* | --program-transform-na=* \
  175.   | --program-transform-n=* | --program-transform-=* \
  176.   | --program-transform=* | --program-transfor=* \
  177.   | --program-transfo=* | --program-transf=* \
  178.   | --program-trans=* | --program-tran=* \
  179.   | --progr-tra=* | --program-tr=* | --program-t=*)
  180.     program_transform_name="$ac_optarg" ;;
  181.  
  182.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  183.   | -silent | --silent | --silen | --sile | --sil)
  184.     silent=yes ;;
  185.  
  186.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  187.     ac_prev=srcdir ;;
  188.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  189.     srcdir="$ac_optarg" ;;
  190.  
  191.   -target | --target | --targe | --targ | --tar | --ta | --t)
  192.     ac_prev=target ;;
  193.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  194.     target="$ac_optarg" ;;
  195.  
  196.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  197.     verbose=yes ;;
  198.  
  199.   -version | --version | --versio | --versi | --vers)
  200.     /bin/echo "configure generated by autoconf version 1.9"
  201.     exit 0 ;;
  202.  
  203.   -with-* | --with-*)
  204.     ac_package=`/bin/echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  205.     # Reject names that aren't valid shell variable names.
  206.     if test -n "`/bin/echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  207.       /bin/echo "configure: $ac_package: invalid package name" >&2; exit 1
  208.     fi
  209.     ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
  210.     case "$ac_option" in
  211.       *=*) ;;
  212.       *) ac_optarg=yes ;;
  213.     esac
  214.     eval "with_${ac_package}='$ac_optarg'" ;;
  215.  
  216.   -without-* | --without-*)
  217.     ac_package=`/bin/echo $ac_option|sed -e 's/-*without-//'`
  218.     # Reject names that aren't valid shell variable names.
  219.     if test -n "`/bin/echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  220.       /bin/echo "configure: $ac_package: invalid package name" >&2; exit 1
  221.     fi
  222.     ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
  223.     eval "with_${ac_package}=no" ;;
  224.  
  225.   --x) with_x=yes ;; # Obsolete; use --with-x.
  226.  
  227.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  228.   | --x-incl | --x-inc | --x-in | --x-i)
  229.     ac_prev=x_includes ;;
  230.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  231.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  232.     x_includes="$ac_optarg" ;;
  233.  
  234.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  235.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  236.     ac_prev=x_libraries ;;
  237.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  238.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  239.     x_libraries="$ac_optarg" ;;
  240.  
  241.   -*) /bin/echo "configure: $ac_option: invalid option; use --help to show usage" >&2; exit 1
  242.     ;;
  243.  
  244.   *) 
  245.     if test -n "`/bin/echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  246.       /bin/echo "configure: warning: $ac_option: invalid host type" >&2
  247.     fi
  248.     if test "x$nonopt" != xNONE; then
  249.       /bin/echo "configure: can only configure for one host and one target at a time" >&2; exit 1
  250.     fi
  251.     nonopt="$ac_option"
  252.     ;;
  253.  
  254.   esac
  255. done
  256.  
  257. if test -n "$ac_prev"; then
  258.   /bin/echo "configure: missing argument to --`/bin/echo $ac_prev | sed 's/_/-/g'`" >&2; exit 1
  259. fi
  260.  
  261. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  262. trap 'rm -fr confdefs* $ac_clean_files' 0
  263.  
  264. # Save the original args if we used an alternate arg parser.
  265. ac_configure_temp="${configure_args-$*}"
  266. # Strip out --no-create and --norecursion so they don't pile up.
  267. configure_args=
  268. for ac_arg in $ac_configure_temp; do
  269.   case "$ac_arg" in
  270.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  271.   | --no-cr | --no-c) ;;
  272.   -norecursion | --norecursion | --norecursio | --norecursi \
  273.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;;
  274.   *) configure_args="$configure_args $ac_arg" ;;
  275.   esac
  276. done
  277.  
  278. # NLS nuisances.
  279. # These must not be set unconditionally because not all systems understand
  280. # e.g. LANG=C (notably SCO).
  281. if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi
  282. if test "${LANG+set}"   = 'set'; then LANG=C;   export LANG;   fi
  283.  
  284. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  285. rm -rf conftest* confdefs.h
  286. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  287. /bin/echo > confdefs.h
  288.  
  289. # A filename unique to this package, relative to the directory that
  290. # configure is in, which we can look for to find out if srcdir is correct.
  291. ac_unique_file=diff.h
  292.  
  293. # Find the source files, if location was not specified.
  294. if test -z "$srcdir"; then
  295.   ac_srcdir_defaulted=yes
  296.   # Try the directory containing this script, then `..'.
  297.   ac_prog=$0
  298.   ac_confdir=`/bin/echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  299.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  300.   srcdir=$ac_confdir
  301.   if test ! -r $srcdir/$ac_unique_file; then
  302.     srcdir=..
  303.   fi
  304. fi
  305. if test ! -r $srcdir/$ac_unique_file; then
  306.   if test x$ac_srcdir_defaulted = xyes; then
  307.     /bin/echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1
  308.   else
  309.     /bin/echo "configure: can not find sources in ${srcdir}" >&2; exit 1
  310.   fi
  311. fi
  312. ac_ext=c
  313. ac_cpp='${CPP} $CFLAGS'
  314. ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
  315.  
  316.  
  317.  
  318. if test -z "$CC"; then
  319.   # Extract the first word of `gcc', so it can be a program name with args.
  320.   set ac_dummy gcc; ac_word=$2
  321.   test -n "$silent" || /bin/echo "checking for $ac_word"
  322.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  323.   for ac_dir in $PATH; do
  324.     test -z "$ac_dir" && ac_dir=.
  325.     if test -f $ac_dir/$ac_word; then
  326.       CC="gcc"
  327.       break
  328.     fi
  329.   done
  330.   IFS="$ac_save_ifs"
  331. fi
  332. test -z "$CC" && CC="cc"
  333. test -n "$CC" && test -n "$verbose" && /bin/echo "    setting CC to $CC"
  334.  
  335. # Find out if we are using GNU C, under whatever name.
  336. cat > conftest.c <<EOF
  337. #ifdef __GNUC__
  338.   yes
  339. #endif
  340. EOF
  341. ${CC-cc} -E conftest.c > conftest.out 2>&1
  342. if egrep yes conftest.out >/dev/null 2>&1; then
  343.   GCC=1 # For later tests.
  344. fi
  345. rm -f conftest*
  346.  
  347. test -n "$silent" || /bin/echo "checking how to run the C preprocessor"
  348. if test -z "$CPP"; then
  349.   # This must be in double quotes, not single quotes, because CPP may get
  350.   # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  351.   # make.  It must be expanded now.
  352.   CPP="${CC-cc} -E"
  353.   cat > conftest.${ac_ext} <<EOF
  354. #include "confdefs.h"
  355. #include <stdio.h>
  356. Syntax Error
  357. EOF
  358. # Some shells (Coherent) do redirections in the wrong order, so need
  359. # the parens.
  360. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  361. if test -z "$ac_err"; then
  362.   :
  363. else
  364.   rm -rf conftest*
  365.   CPP="${CC-cc} -E -traditional-cpp"
  366.   cat > conftest.${ac_ext} <<EOF
  367. #include "confdefs.h"
  368. #include <stdio.h>
  369. Syntax Error
  370. EOF
  371. # Some shells (Coherent) do redirections in the wrong order, so need
  372. # the parens.
  373. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  374. if test -z "$ac_err"; then
  375.   :
  376. else
  377.   rm -rf conftest*
  378.   CPP=/lib/cpp
  379. fi
  380. rm -f conftest*
  381. fi
  382. rm -f conftest*
  383. fi
  384. test -n "$verbose" && /bin/echo "    setting CPP to $CPP"
  385.  
  386. # Make sure to not get the incompatible SysV /etc/install and
  387. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  388. # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
  389. # or the AFS install, which mishandles nonexistent args, or
  390. # /usr/ucb/install on SVR4, which tries to use the nonexistent group
  391. # `staff', or /sbin/install on IRIX which has incompatible command-line
  392. # syntax.  Sigh.
  393. #
  394. #     On most BSDish systems install is in /usr/bin, not /usr/ucb
  395. #     anyway.
  396. # This turns out not to be true, so the mere pathname isn't an indication
  397. # of whether the program works.  What we really need is a set of tests for
  398. # the install program to see if it actually works in all the required ways.
  399. #
  400. # Avoid using ./install, which might have been erroneously created
  401. # by make from ./install.sh.
  402. if test "z${INSTALL}" = "z" ; then
  403.   test -n "$silent" || /bin/echo "checking for a BSD compatible install"
  404.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  405.   for ac_dir in $PATH; do
  406.     case "$ac_dir" in
  407.     ''|.|/gnu/etc|/sbin|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
  408.     *)
  409.       # OSF1 and SCO ODT 3.0 have their own names for install.
  410.       for ac_prog in installbsd scoinst install; do
  411.         if test -f $ac_dir/$ac_prog; then
  412.       if test $ac_prog = install &&
  413.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  414.         # AIX install.  It has an incompatible calling convention.
  415.         # OSF/1 installbsd also uses dspmsg, but is usable.
  416.         :
  417.       else
  418.         INSTALL="$ac_dir/$ac_prog -c"
  419.         INSTALL_PROGRAM='${INSTALL}'
  420.         INSTALL_DATA='${INSTALL} -m 644'
  421.         break 2
  422.       fi
  423.     fi
  424.       done
  425.       ;;
  426.     esac
  427.   done
  428.   IFS="$ac_save_ifs"
  429. fi
  430. if test -z "$INSTALL"; then
  431.   if test -f ${srcdir}/install.sh; then
  432.     # As a last resort, use the slow shell script.
  433.     INSTALL='@top_srcdir@/install.sh -c'
  434.   else
  435.     /bin/echo "configure: warning: ${srcdir}/install.sh not found; using cp" >&2
  436.     INSTALL=cp
  437.   fi
  438. fi
  439. test -n "$verbose" && /bin/echo "    setting INSTALL to $INSTALL"
  440. # Use test -z because SunOS4 sh mishandles ${INSTALL_PROGRAM-'${INSTALL}'}.
  441. # It thinks the first close brace ends the variable substitution.
  442. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  443. test -n "$verbose" && /bin/echo "    setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
  444. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL}'
  445. test -n "$verbose" && /bin/echo "    setting INSTALL_DATA to $INSTALL_DATA"
  446.  
  447. test -n "$silent" || /bin/echo "checking for minix/config.h"
  448. cat > conftest.${ac_ext} <<EOF
  449. #include "confdefs.h"
  450. #include <minix/config.h>
  451. EOF
  452. # Some shells (Coherent) do redirections in the wrong order, so need
  453. # the parens.
  454. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  455. if test -z "$ac_err"; then
  456.   rm -rf conftest*
  457.   MINIX=1
  458.  
  459. fi
  460. rm -f conftest*
  461.  
  462. # The Minix shell can't assign to the same variable on the same line!
  463. if test -n "$MINIX"; then
  464.   
  465. {
  466. test -n "$verbose" && \
  467. /bin/echo "    defining _POSIX_SOURCE"
  468. /bin/echo "#define" _POSIX_SOURCE "1" >> confdefs.h
  469. DEFS="$DEFS -D_POSIX_SOURCE=1"
  470. ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
  471. \${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
  472. \${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
  473. "
  474. }
  475.  
  476.   
  477. {
  478. test -n "$verbose" && \
  479. /bin/echo "    defining" _POSIX_1_SOURCE to be "2"
  480. /bin/echo "#define" _POSIX_1_SOURCE "2" >> confdefs.h
  481. DEFS="$DEFS -D_POSIX_1_SOURCE=2"
  482. ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_1_SOURCE\${ac_dB}_POSIX_1_SOURCE\${ac_dC}2\${ac_dD}
  483. \${ac_uA}_POSIX_1_SOURCE\${ac_uB}_POSIX_1_SOURCE\${ac_uC}2\${ac_uD}
  484. \${ac_eA}_POSIX_1_SOURCE\${ac_eB}_POSIX_1_SOURCE\${ac_eC}2\${ac_eD}
  485. "
  486. }
  487.  
  488.   
  489. {
  490. test -n "$verbose" && \
  491. /bin/echo "    defining _MINIX"
  492. /bin/echo "#define" _MINIX "1" >> confdefs.h
  493. DEFS="$DEFS -D_MINIX=1"
  494. ac_sed_defs="${ac_sed_defs}\${ac_dA}_MINIX\${ac_dB}_MINIX\${ac_dC}1\${ac_dD}
  495. \${ac_uA}_MINIX\${ac_uB}_MINIX\${ac_uC}1\${ac_uD}
  496. \${ac_eA}_MINIX\${ac_eB}_MINIX\${ac_eC}1\${ac_eD}
  497. "
  498. }
  499.  
  500. fi
  501.  
  502. test -n "$silent" || /bin/echo "checking for POSIXized ISC"
  503. if test -d /gnu/etc/conf/kconfig.d &&
  504.   grep _POSIX_VERSION /gnu/include/sys/unistd.h >/dev/null 2>&1
  505. then
  506.   ISC=1 # If later tests want to check for ISC.
  507.   
  508. {
  509. test -n "$verbose" && \
  510. /bin/echo "    defining _POSIX_SOURCE"
  511. /bin/echo "#define" _POSIX_SOURCE "1" >> confdefs.h
  512. DEFS="$DEFS -D_POSIX_SOURCE=1"
  513. ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
  514. \${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
  515. \${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
  516. "
  517. }
  518.  
  519.   if test -n "$GCC"; then
  520.     CC="$CC -posix"
  521.   else
  522.     CC="$CC -Xp"
  523.   fi
  524. fi
  525.  
  526. test -n "$silent" || /bin/echo "checking for directory library header"
  527. ac_dir_header=
  528. if test -z "$ac_dir_header"; then
  529.   test -n "$silent" || /bin/echo "checking for dirent.h"
  530. cat > conftest.${ac_ext} <<EOF
  531. #include "confdefs.h"
  532. #include <sys/types.h>
  533. #include <dirent.h>
  534. int main() { return 0; }
  535. int t() { DIR *dirp = 0;; return 0; }
  536. EOF
  537. if eval $ac_compile; then
  538.   rm -rf conftest*
  539.   
  540. {
  541. test -n "$verbose" && \
  542. /bin/echo "    defining DIRENT"
  543. /bin/echo "#define" DIRENT "1" >> confdefs.h
  544. DEFS="$DEFS -DDIRENT=1"
  545. ac_sed_defs="${ac_sed_defs}\${ac_dA}DIRENT\${ac_dB}DIRENT\${ac_dC}1\${ac_dD}
  546. \${ac_uA}DIRENT\${ac_uB}DIRENT\${ac_uC}1\${ac_uD}
  547. \${ac_eA}DIRENT\${ac_eB}DIRENT\${ac_eC}1\${ac_eD}
  548. "
  549. }
  550.  ac_dir_header=dirent.h
  551.  
  552. fi
  553. rm -f conftest*
  554. fi
  555. if test -z "$ac_dir_header"; then
  556.   test -n "$silent" || /bin/echo "checking for sys/ndir.h"
  557. cat > conftest.${ac_ext} <<EOF
  558. #include "confdefs.h"
  559. #include <sys/types.h>
  560. #include <sys/ndir.h>
  561. int main() { return 0; }
  562. int t() { DIR *dirp = 0;; return 0; }
  563. EOF
  564. if eval $ac_compile; then
  565.   rm -rf conftest*
  566.   
  567. {
  568. test -n "$verbose" && \
  569. /bin/echo "    defining SYSNDIR"
  570. /bin/echo "#define" SYSNDIR "1" >> confdefs.h
  571. DEFS="$DEFS -DSYSNDIR=1"
  572. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSNDIR\${ac_dB}SYSNDIR\${ac_dC}1\${ac_dD}
  573. \${ac_uA}SYSNDIR\${ac_uB}SYSNDIR\${ac_uC}1\${ac_uD}
  574. \${ac_eA}SYSNDIR\${ac_eB}SYSNDIR\${ac_eC}1\${ac_eD}
  575. "
  576. }
  577.  ac_dir_header=sys/ndir.h
  578.  
  579. fi
  580. rm -f conftest*
  581. fi
  582. if test -z "$ac_dir_header"; then
  583.   test -n "$silent" || /bin/echo "checking for sys/dir.h"
  584. cat > conftest.${ac_ext} <<EOF
  585. #include "confdefs.h"
  586. #include <sys/types.h>
  587. #include <sys/dir.h>
  588. int main() { return 0; }
  589. int t() { DIR *dirp = 0;; return 0; }
  590. EOF
  591. if eval $ac_compile; then
  592.   rm -rf conftest*
  593.   
  594. {
  595. test -n "$verbose" && \
  596. /bin/echo "    defining SYSDIR"
  597. /bin/echo "#define" SYSDIR "1" >> confdefs.h
  598. DEFS="$DEFS -DSYSDIR=1"
  599. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSDIR\${ac_dB}SYSDIR\${ac_dC}1\${ac_dD}
  600. \${ac_uA}SYSDIR\${ac_uB}SYSDIR\${ac_uC}1\${ac_uD}
  601. \${ac_eA}SYSDIR\${ac_eB}SYSDIR\${ac_eC}1\${ac_eD}
  602. "
  603. }
  604.  ac_dir_header=sys/dir.h
  605.  
  606. fi
  607. rm -f conftest*
  608. fi
  609. if test -z "$ac_dir_header"; then
  610.   test -n "$silent" || /bin/echo "checking for ndir.h"
  611. cat > conftest.${ac_ext} <<EOF
  612. #include "confdefs.h"
  613. #include <sys/types.h>
  614. #include <ndir.h>
  615. int main() { return 0; }
  616. int t() { DIR *dirp = 0;; return 0; }
  617. EOF
  618. if eval $ac_compile; then
  619.   rm -rf conftest*
  620.   
  621. {
  622. test -n "$verbose" && \
  623. /bin/echo "    defining NDIR"
  624. /bin/echo "#define" NDIR "1" >> confdefs.h
  625. DEFS="$DEFS -DNDIR=1"
  626. ac_sed_defs="${ac_sed_defs}\${ac_dA}NDIR\${ac_dB}NDIR\${ac_dC}1\${ac_dD}
  627. \${ac_uA}NDIR\${ac_uB}NDIR\${ac_uC}1\${ac_uD}
  628. \${ac_eA}NDIR\${ac_eB}NDIR\${ac_eC}1\${ac_eD}
  629. "
  630. }
  631.  ac_dir_header=ndir.h
  632.  
  633. fi
  634. rm -f conftest*
  635. fi
  636.  
  637. test -n "$silent" || /bin/echo "checking for closedir return value"
  638. cat > conftest.${ac_ext} <<EOF
  639. #include "confdefs.h"
  640. #include <sys/types.h>
  641. #include <$ac_dir_header>
  642. int closedir(); main() { exit(closedir(opendir(".")) != 0); }
  643. EOF
  644. eval $ac_compile
  645. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  646.   :
  647. else
  648.   
  649. {
  650. test -n "$verbose" && \
  651. /bin/echo "    defining VOID_CLOSEDIR"
  652. /bin/echo "#define" VOID_CLOSEDIR "1" >> confdefs.h
  653. DEFS="$DEFS -DVOID_CLOSEDIR=1"
  654. ac_sed_defs="${ac_sed_defs}\${ac_dA}VOID_CLOSEDIR\${ac_dB}VOID_CLOSEDIR\${ac_dC}1\${ac_dD}
  655. \${ac_uA}VOID_CLOSEDIR\${ac_uB}VOID_CLOSEDIR\${ac_uC}1\${ac_uD}
  656. \${ac_eA}VOID_CLOSEDIR\${ac_eB}VOID_CLOSEDIR\${ac_eC}1\${ac_eD}
  657. "
  658. }
  659.  
  660. fi
  661. rm -fr conftest*
  662.  
  663. ac_prog='/* Ultrix mips cc rejects this.  */
  664. typedef int charset[2]; const charset x;
  665. /* SunOS 4.1.1 cc rejects this.  */
  666. char const *const *ccp;
  667. char **p;
  668. /* AIX XL C 1.02.0.0 rejects this.
  669.    It does not let you subtract one const X* pointer from another in an arm
  670.    of an if-expression whose if-part is not a constant expression */
  671. const char *g = "string";
  672. ccp = &g + (g ? g-g : 0);
  673. /* HPUX 7.0 cc rejects these. */
  674. ++ccp;
  675. p = (char**) ccp;
  676. ccp = (char const *const *) p;
  677. { /* SCO 3.2v4 cc rejects this.  */
  678.   char *t;
  679.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  680.  
  681.   *t++ = 0;
  682. }
  683. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  684.   int x[] = {25,17};
  685.   const int *foo = &x[0];
  686.   ++foo;
  687. }
  688. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  689.   typedef const int *iptr;
  690.   iptr p = 0;
  691.   ++p;
  692. }
  693. { /* AIX XL C 1.02.0.0 rejects this saying
  694.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  695.   struct s { int j; const int *ap[3]; };
  696.   struct s *b; b->j = 5;
  697. }
  698. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  699.   const int foo = 10;
  700. }'
  701. test -n "$silent" || /bin/echo "checking for lack of working const"
  702. cat > conftest.${ac_ext} <<EOF
  703. #include "confdefs.h"
  704.  
  705. int main() { return 0; }
  706. int t() { $ac_prog; return 0; }
  707. EOF
  708. if eval $ac_compile; then
  709.   :
  710. else
  711.   rm -rf conftest*
  712.   
  713. {
  714. test -n "$verbose" && \
  715. /bin/echo "    defining" const to be empty
  716. /bin/echo "#define" const "" >> confdefs.h
  717. DEFS="$DEFS -Dconst="
  718. ac_sed_defs="${ac_sed_defs}\${ac_dA}const\${ac_dB}const\${ac_dC}\${ac_dD}
  719. \${ac_uA}const\${ac_uB}const\${ac_uC}\${ac_uD}
  720. \${ac_eA}const\${ac_eB}const\${ac_eC}\${ac_eD}
  721. "
  722. }
  723.  
  724. fi
  725. rm -f conftest*
  726.  
  727. test -n "$silent" || /bin/echo "checking for ANSI C header files"
  728. cat > conftest.${ac_ext} <<EOF
  729. #include "confdefs.h"
  730. #include <stdlib.h>
  731. #include <stdarg.h>
  732. #include <string.h>
  733. #include <float.h>
  734. EOF
  735. # Some shells (Coherent) do redirections in the wrong order, so need
  736. # the parens.
  737. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  738. if test -z "$ac_err"; then
  739.   rm -rf conftest*
  740.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  741. /bin/echo '#include "confdefs.h"
  742. #include <string.h>' > conftest.${ac_ext}
  743. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  744. if egrep "memchr" conftest.out >/dev/null 2>&1; then
  745.   rm -rf conftest*
  746.   # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  747. cat > conftest.${ac_ext} <<EOF
  748. #include "confdefs.h"
  749. #include <ctype.h>
  750. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  751. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  752. #define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
  753. int main () { int i; for (i = 0; i < 256; i++)
  754. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  755. exit (0); }
  756.  
  757. EOF
  758. eval $ac_compile
  759. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  760.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  761. /bin/echo '#include "confdefs.h"
  762. #include <stdlib.h>' > conftest.${ac_ext}
  763. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  764. if egrep "free" conftest.out >/dev/null 2>&1; then
  765.   rm -rf conftest*
  766.   
  767. {
  768. test -n "$verbose" && \
  769. /bin/echo "    defining STDC_HEADERS"
  770. /bin/echo "#define" STDC_HEADERS "1" >> confdefs.h
  771. DEFS="$DEFS -DSTDC_HEADERS=1"
  772. ac_sed_defs="${ac_sed_defs}\${ac_dA}STDC_HEADERS\${ac_dB}STDC_HEADERS\${ac_dC}1\${ac_dD}
  773. \${ac_uA}STDC_HEADERS\${ac_uB}STDC_HEADERS\${ac_uC}1\${ac_uD}
  774. \${ac_eA}STDC_HEADERS\${ac_eB}STDC_HEADERS\${ac_eC}1\${ac_eD}
  775. "
  776. }
  777.  
  778.  
  779. fi
  780. rm -f conftest*
  781.  
  782.  
  783. fi
  784. rm -fr conftest*
  785.  
  786. fi
  787. rm -f conftest*
  788.  
  789.  
  790. fi
  791. rm -f conftest*
  792.  
  793. for ac_hdr in unistd.h fcntl.h limits.h stdlib.h string.h sys/wait.h time.h
  794. do
  795. ac_tr_hdr=HAVE_`/bin/echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
  796. test -n "$silent" || /bin/echo "checking for ${ac_hdr}"
  797. cat > conftest.${ac_ext} <<EOF
  798. #include "confdefs.h"
  799. #include <${ac_hdr}>
  800. EOF
  801. # Some shells (Coherent) do redirections in the wrong order, so need
  802. # the parens.
  803. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  804. if test -z "$ac_err"; then
  805.   rm -rf conftest*
  806.   
  807. {
  808. test -n "$verbose" && \
  809. /bin/echo "    defining ${ac_tr_hdr}"
  810. /bin/echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
  811. DEFS="$DEFS -D${ac_tr_hdr}=1"
  812. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
  813. \${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
  814. \${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
  815. "
  816. }
  817.  
  818.  
  819. fi
  820. rm -f conftest*
  821. done
  822.  
  823. test -n "$silent" || /bin/echo "checking for pid_t in sys/types.h"
  824. /bin/echo '#include "confdefs.h"
  825. #include <sys/types.h>' > conftest.${ac_ext}
  826. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  827. if egrep "pid_t" conftest.out >/dev/null 2>&1; then
  828.   :
  829. else
  830.   rm -rf conftest*
  831.   
  832. {
  833. test -n "$verbose" && \
  834. /bin/echo "    defining" pid_t to be "int"
  835. /bin/echo "#define" pid_t "int" >> confdefs.h
  836. DEFS="$DEFS -Dpid_t=int"
  837. ac_sed_defs="${ac_sed_defs}\${ac_dA}pid_t\${ac_dB}pid_t\${ac_dC}int\${ac_dD}
  838. \${ac_uA}pid_t\${ac_uB}pid_t\${ac_uC}int\${ac_uD}
  839. \${ac_eA}pid_t\${ac_eB}pid_t\${ac_eC}int\${ac_eD}
  840. "
  841. }
  842.  
  843. fi
  844. rm -f conftest*
  845.  
  846. test -n "$silent" || /bin/echo "checking for return type of signal handlers"
  847. cat > conftest.${ac_ext} <<EOF
  848. #include "confdefs.h"
  849. #include <sys/types.h>
  850. #include <signal.h>
  851. #ifdef signal
  852. #undef signal
  853. #endif
  854. extern void (*signal ()) ();
  855. int main() { return 0; }
  856. int t() { int i;; return 0; }
  857. EOF
  858. if eval $ac_compile; then
  859.   rm -rf conftest*
  860.   
  861. {
  862. test -n "$verbose" && \
  863. /bin/echo "    defining" RETSIGTYPE to be "void"
  864. /bin/echo "#define" RETSIGTYPE "void" >> confdefs.h
  865. DEFS="$DEFS -DRETSIGTYPE=void"
  866. ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}void\${ac_dD}
  867. \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}void\${ac_uD}
  868. \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}void\${ac_eD}
  869. "
  870. }
  871.  
  872.  
  873. else
  874.   rm -rf conftest*
  875.   
  876. {
  877. test -n "$verbose" && \
  878. /bin/echo "    defining" RETSIGTYPE to be "int"
  879. /bin/echo "#define" RETSIGTYPE "int" >> confdefs.h
  880. DEFS="$DEFS -DRETSIGTYPE=int"
  881. ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}int\${ac_dD}
  882. \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}int\${ac_uD}
  883. \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}int\${ac_eD}
  884. "
  885. }
  886.  
  887. fi
  888. rm -f conftest*
  889.  
  890.  
  891. for ac_func in dup2 memchr sigaction strerror waitpid
  892. do
  893. ac_tr_func=HAVE_`/bin/echo $ac_func | tr '[a-z]' '[A-Z]'`
  894. test -n "$silent" || /bin/echo "checking for ${ac_func}"
  895. cat > conftest.${ac_ext} <<EOF
  896. #include "confdefs.h"
  897. #include <ctype.h>
  898. int main() { return 0; }
  899. int t() { 
  900. /* The GNU C library defines this for functions which it implements
  901.     to always fail with ENOSYS.  Some functions are actually named
  902.     something starting with __ and the normal name is an alias.  */
  903. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  904. choke me
  905. #else
  906. /* Override any gcc2 internal prototype to avoid an error.  */
  907. extern char ${ac_func}(); ${ac_func}();
  908. #endif
  909. ; return 0; }
  910. EOF
  911. if eval $ac_compile; then
  912.   rm -rf conftest*
  913.   {
  914. test -n "$verbose" && \
  915. /bin/echo "    defining ${ac_tr_func}"
  916. /bin/echo "#define" ${ac_tr_func} "1" >> confdefs.h
  917. DEFS="$DEFS -D${ac_tr_func}=1"
  918. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
  919. \${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
  920. \${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
  921. "
  922. }
  923.  
  924.  
  925. fi
  926. rm -f conftest*
  927. done
  928.  
  929. test -n "$silent" || /bin/echo "checking for vfork.h"
  930. cat > conftest.${ac_ext} <<EOF
  931. #include "confdefs.h"
  932. #include <vfork.h>
  933. EOF
  934. # Some shells (Coherent) do redirections in the wrong order, so need
  935. # the parens.
  936. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  937. if test -z "$ac_err"; then
  938.   rm -rf conftest*
  939.   
  940. {
  941. test -n "$verbose" && \
  942. /bin/echo "    defining HAVE_VFORK_H"
  943. /bin/echo "#define" HAVE_VFORK_H "1" >> confdefs.h
  944. DEFS="$DEFS -DHAVE_VFORK_H=1"
  945. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_VFORK_H\${ac_dB}HAVE_VFORK_H\${ac_dC}1\${ac_dD}
  946. \${ac_uA}HAVE_VFORK_H\${ac_uB}HAVE_VFORK_H\${ac_uC}1\${ac_uD}
  947. \${ac_eA}HAVE_VFORK_H\${ac_eB}HAVE_VFORK_H\${ac_eC}1\${ac_eD}
  948. "
  949. }
  950.  
  951.  
  952. fi
  953. rm -f conftest*
  954.  
  955. test -n "$silent" || /bin/echo "checking for working vfork"
  956.  
  957. cat > conftest.${ac_ext} <<EOF
  958. #include "confdefs.h"
  959. /* Thanks to Paul Eggert for this test.  */
  960. #include <stdio.h>
  961. #include <sys/types.h>
  962. #include <sys/stat.h>
  963. #include <signal.h>
  964. #ifdef HAVE_UNISTD_H
  965. #include <unistd.h>
  966. #endif
  967. #ifdef HAVE_VFORK_H
  968. #include <vfork.h>
  969. #endif
  970. static int signalled;
  971. static RETSIGTYPE catch (s) int s; { signalled = 1; }
  972. main() {
  973.   pid_t parent = getpid ();
  974.   pid_t child;
  975.  
  976.   signal (SIGINT, catch);
  977.  
  978.   child = vfork ();
  979.  
  980.   if (child == 0) {
  981.     /* On sparc systems, changes by the child to local and incoming
  982.        argument registers are propagated back to the parent.
  983.        The compiler is told about this with #include <vfork.h>,
  984.        but some compilers (e.g. gcc -O) don't grok <vfork.h>.
  985.        Test for this by using lots of local variables, at least
  986.        as many local variables as main has allocated so far
  987.        including compiler temporaries.  4 locals are enough for
  988.        gcc 1.40.3 on a sparc, but we use 8 to be safe.
  989.        A buggy compiler should reuse the register of parent
  990.        for one of the local variables, since it will think that
  991.        parent can't possibly be used any more in this routine.
  992.        Assigning to the local variable will thus munge parent
  993.        in the parent process.  */
  994.     pid_t
  995.       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
  996.       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
  997.     /* Convince the compiler that p..p7 are live; otherwise, it might
  998.        use the same hardware register for all 8 local variables.  */
  999.     if (p != p1 || p != p2 || p != p3 || p != p4
  1000.     || p != p5 || p != p6 || p != p7)
  1001.       _exit(1);
  1002.  
  1003.     /* On some systems (e.g. SunOS 5.2), if the parent is catching
  1004.        a signal, the child ignores the signal before execing,
  1005.        and the parent later receives that signal, the parent dumps core.
  1006.        Test for this by ignoring SIGINT in the child.  */
  1007.     signal (SIGINT, SIG_IGN);
  1008.  
  1009.     /* On some systems (e.g. IRIX 3.3),
  1010.        vfork doesn't separate parent from child file descriptors.
  1011.        If the child closes a descriptor before it execs or exits,
  1012.        this munges the parent's descriptor as well.
  1013.        Test for this by closing stdout in the child.  */
  1014.     _exit(close(fileno(stdout)) != 0);
  1015.   } else {
  1016.     int status;
  1017.     struct stat st;
  1018.  
  1019.     while (wait(&status) != child)
  1020.       ;
  1021.     exit(
  1022.      /* Was there some problem with vforking?  */
  1023.      child < 0
  1024.  
  1025.      /* Did the child fail?  (This shouldn't happen.)  */
  1026.      || status
  1027.  
  1028.      /* Did the vfork/compiler bug occur?  */
  1029.      || parent != getpid()
  1030.  
  1031.      /* Did the signal handling bug occur?  */
  1032.      || kill(parent, SIGINT) != 0
  1033.      || signalled != 1
  1034.  
  1035.      /* Did the file descriptor bug occur?  */
  1036.      || fstat(fileno(stdout), &st) != 0
  1037.      );
  1038.   }
  1039. }
  1040. EOF
  1041. eval $ac_compile
  1042. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1043.   :
  1044. else
  1045.   
  1046. {
  1047. test -n "$verbose" && \
  1048. /bin/echo "    defining" vfork to be "fork"
  1049. /bin/echo "#define" vfork "fork" >> confdefs.h
  1050. DEFS="$DEFS -Dvfork=fork"
  1051. ac_sed_defs="${ac_sed_defs}\${ac_dA}vfork\${ac_dB}vfork\${ac_dC}fork\${ac_dD}
  1052. \${ac_uA}vfork\${ac_uB}vfork\${ac_uC}fork\${ac_uD}
  1053. \${ac_eA}vfork\${ac_eB}vfork\${ac_eC}fork\${ac_eD}
  1054. "
  1055. }
  1056.  
  1057. fi
  1058. rm -fr conftest*
  1059.  
  1060. test -n "$silent" || /bin/echo "checking for vprintf"
  1061. cat > conftest.${ac_ext} <<EOF
  1062. #include "confdefs.h"
  1063.  
  1064. int main() { return 0; }
  1065. int t() { vprintf();; return 0; }
  1066. EOF
  1067. if eval $ac_compile; then
  1068.   rm -rf conftest*
  1069.   
  1070. {
  1071. test -n "$verbose" && \
  1072. /bin/echo "    defining HAVE_VPRINTF"
  1073. /bin/echo "#define" HAVE_VPRINTF "1" >> confdefs.h
  1074. DEFS="$DEFS -DHAVE_VPRINTF=1"
  1075. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_VPRINTF\${ac_dB}HAVE_VPRINTF\${ac_dC}1\${ac_dD}
  1076. \${ac_uA}HAVE_VPRINTF\${ac_uB}HAVE_VPRINTF\${ac_uC}1\${ac_uD}
  1077. \${ac_eA}HAVE_VPRINTF\${ac_eB}HAVE_VPRINTF\${ac_eC}1\${ac_eD}
  1078. "
  1079. }
  1080.  
  1081.  
  1082. else
  1083.   rm -rf conftest*
  1084.   ac_vprintf_missing=1
  1085. fi
  1086. rm -f conftest*
  1087.  
  1088. if test -n "$ac_vprintf_missing"; then
  1089. test -n "$silent" || /bin/echo "checking for _doprnt"
  1090. cat > conftest.${ac_ext} <<EOF
  1091. #include "confdefs.h"
  1092.  
  1093. int main() { return 0; }
  1094. int t() { _doprnt();; return 0; }
  1095. EOF
  1096. if eval $ac_compile; then
  1097.   rm -rf conftest*
  1098.   
  1099. {
  1100. test -n "$verbose" && \
  1101. /bin/echo "    defining HAVE_DOPRNT"
  1102. /bin/echo "#define" HAVE_DOPRNT "1" >> confdefs.h
  1103. DEFS="$DEFS -DHAVE_DOPRNT=1"
  1104. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_DOPRNT\${ac_dB}HAVE_DOPRNT\${ac_dC}1\${ac_dD}
  1105. \${ac_uA}HAVE_DOPRNT\${ac_uB}HAVE_DOPRNT\${ac_uC}1\${ac_uD}
  1106. \${ac_eA}HAVE_DOPRNT\${ac_eB}HAVE_DOPRNT\${ac_eC}1\${ac_eD}
  1107. "
  1108. }
  1109.  
  1110.  
  1111. fi
  1112. rm -f conftest*
  1113.  
  1114. fi
  1115.  
  1116. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  1117. # for constant arguments.  Useless!
  1118. test -n "$silent" || /bin/echo "checking for working alloca.h"
  1119. cat > conftest.${ac_ext} <<EOF
  1120. #include "confdefs.h"
  1121. #include <alloca.h>
  1122. int main() { return 0; }
  1123. int t() { char *p = alloca(2 * sizeof(int));; return 0; }
  1124. EOF
  1125. if eval $ac_compile; then
  1126.   rm -rf conftest*
  1127.   
  1128. {
  1129. test -n "$verbose" && \
  1130. /bin/echo "    defining HAVE_ALLOCA_H"
  1131. /bin/echo "#define" HAVE_ALLOCA_H "1" >> confdefs.h
  1132. DEFS="$DEFS -DHAVE_ALLOCA_H=1"
  1133. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA_H\${ac_dB}HAVE_ALLOCA_H\${ac_dC}1\${ac_dD}
  1134. \${ac_uA}HAVE_ALLOCA_H\${ac_uB}HAVE_ALLOCA_H\${ac_uC}1\${ac_uD}
  1135. \${ac_eA}HAVE_ALLOCA_H\${ac_eB}HAVE_ALLOCA_H\${ac_eC}1\${ac_eD}
  1136. "
  1137. }
  1138.  
  1139.  
  1140. fi
  1141. rm -f conftest*
  1142.  
  1143. ac_decl="#ifdef __GNUC__
  1144. #define alloca __builtin_alloca
  1145. #else
  1146. #if HAVE_ALLOCA_H
  1147. #include <alloca.h>
  1148. #else
  1149. #ifdef _AIX
  1150.  #pragma alloca
  1151. #else
  1152. char *alloca ();
  1153. #endif
  1154. #endif
  1155. #endif
  1156. "
  1157. test -n "$silent" || /bin/echo "checking for alloca"
  1158. cat > conftest.${ac_ext} <<EOF
  1159. #include "confdefs.h"
  1160. $ac_decl
  1161. int main() { return 0; }
  1162. int t() { char *p = (char *) alloca(1);; return 0; }
  1163. EOF
  1164. if eval $ac_compile; then
  1165.   rm -rf conftest*
  1166.   
  1167. {
  1168. test -n "$verbose" && \
  1169. /bin/echo "    defining HAVE_ALLOCA"
  1170. /bin/echo "#define" HAVE_ALLOCA "1" >> confdefs.h
  1171. DEFS="$DEFS -DHAVE_ALLOCA=1"
  1172. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA\${ac_dB}HAVE_ALLOCA\${ac_dC}1\${ac_dD}
  1173. \${ac_uA}HAVE_ALLOCA\${ac_uB}HAVE_ALLOCA\${ac_uC}1\${ac_uD}
  1174. \${ac_eA}HAVE_ALLOCA\${ac_eB}HAVE_ALLOCA\${ac_eC}1\${ac_eD}
  1175. "
  1176. }
  1177.  
  1178.  
  1179. else
  1180.   rm -rf conftest*
  1181.   ac_alloca_missing=1
  1182. cat > conftest.${ac_ext} <<EOF
  1183. #include "confdefs.h"
  1184.  
  1185. #if defined(CRAY) && ! defined(CRAY2)
  1186. winnitude
  1187. #else
  1188. lossage
  1189. #endif
  1190.  
  1191. EOF
  1192. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1193. if egrep "winnitude" conftest.out >/dev/null 2>&1; then
  1194.   rm -rf conftest*
  1195.   test -n "$silent" || /bin/echo "checking for _getb67"
  1196. cat > conftest.${ac_ext} <<EOF
  1197. #include "confdefs.h"
  1198. #include <ctype.h>
  1199. int main() { return 0; }
  1200. int t() { 
  1201. /* The GNU C library defines this for functions which it implements
  1202.     to always fail with ENOSYS.  Some functions are actually named
  1203.     something starting with __ and the normal name is an alias.  */
  1204. #if defined (__stub__getb67) || defined (__stub____getb67)
  1205. choke me
  1206. #else
  1207. /* Override any gcc2 internal prototype to avoid an error.  */
  1208. extern char _getb67(); _getb67();
  1209. #endif
  1210. ; return 0; }
  1211. EOF
  1212. if eval $ac_compile; then
  1213.   rm -rf conftest*
  1214.   {
  1215. test -n "$verbose" && \
  1216. /bin/echo "    defining" CRAY_STACKSEG_END to be "_getb67"
  1217. /bin/echo "#define" CRAY_STACKSEG_END "_getb67" >> confdefs.h
  1218. DEFS="$DEFS -DCRAY_STACKSEG_END=_getb67"
  1219. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}_getb67\${ac_dD}
  1220. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}_getb67\${ac_uD}
  1221. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}_getb67\${ac_eD}
  1222. "
  1223. }
  1224.  
  1225.  
  1226. else
  1227.   rm -rf conftest*
  1228.   test -n "$silent" || /bin/echo "checking for GETB67"
  1229. cat > conftest.${ac_ext} <<EOF
  1230. #include "confdefs.h"
  1231. #include <ctype.h>
  1232. int main() { return 0; }
  1233. int t() { 
  1234. /* The GNU C library defines this for functions which it implements
  1235.     to always fail with ENOSYS.  Some functions are actually named
  1236.     something starting with __ and the normal name is an alias.  */
  1237. #if defined (__stub_GETB67) || defined (__stub___GETB67)
  1238. choke me
  1239. #else
  1240. /* Override any gcc2 internal prototype to avoid an error.  */
  1241. extern char GETB67(); GETB67();
  1242. #endif
  1243. ; return 0; }
  1244. EOF
  1245. if eval $ac_compile; then
  1246.   rm -rf conftest*
  1247.   {
  1248. test -n "$verbose" && \
  1249. /bin/echo "    defining" CRAY_STACKSEG_END to be "GETB67"
  1250. /bin/echo "#define" CRAY_STACKSEG_END "GETB67" >> confdefs.h
  1251. DEFS="$DEFS -DCRAY_STACKSEG_END=GETB67"
  1252. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}GETB67\${ac_dD}
  1253. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}GETB67\${ac_uD}
  1254. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}GETB67\${ac_eD}
  1255. "
  1256. }
  1257.  
  1258.  
  1259. else
  1260.   rm -rf conftest*
  1261.   test -n "$silent" || /bin/echo "checking for getb67"
  1262. cat > conftest.${ac_ext} <<EOF
  1263. #include "confdefs.h"
  1264. #include <ctype.h>
  1265. int main() { return 0; }
  1266. int t() { 
  1267. /* The GNU C library defines this for functions which it implements
  1268.     to always fail with ENOSYS.  Some functions are actually named
  1269.     something starting with __ and the normal name is an alias.  */
  1270. #if defined (__stub_getb67) || defined (__stub___getb67)
  1271. choke me
  1272. #else
  1273. /* Override any gcc2 internal prototype to avoid an error.  */
  1274. extern char getb67(); getb67();
  1275. #endif
  1276. ; return 0; }
  1277. EOF
  1278. if eval $ac_compile; then
  1279.   rm -rf conftest*
  1280.   {
  1281. test -n "$verbose" && \
  1282. /bin/echo "    defining" CRAY_STACKSEG_END to be "getb67"
  1283. /bin/echo "#define" CRAY_STACKSEG_END "getb67" >> confdefs.h
  1284. DEFS="$DEFS -DCRAY_STACKSEG_END=getb67"
  1285. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}getb67\${ac_dD}
  1286. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}getb67\${ac_uD}
  1287. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}getb67\${ac_eD}
  1288. "
  1289. }
  1290.  
  1291.  
  1292. fi
  1293. rm -f conftest*
  1294.  
  1295. fi
  1296. rm -f conftest*
  1297.  
  1298. fi
  1299. rm -f conftest*
  1300.  
  1301.  
  1302. fi
  1303. rm -f conftest*
  1304.  
  1305.  
  1306. fi
  1307. rm -f conftest*
  1308.  
  1309. if test -n "$ac_alloca_missing"; then
  1310.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  1311.   # that cause trouble.  Some versions do not even contain alloca or
  1312.   # contain a buggy version.  If you still want to use their alloca,
  1313.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  1314.   ALLOCA=alloca.o
  1315.   
  1316. {
  1317. test -n "$verbose" && \
  1318. /bin/echo "    defining C_ALLOCA"
  1319. /bin/echo "#define" C_ALLOCA "1" >> confdefs.h
  1320. DEFS="$DEFS -DC_ALLOCA=1"
  1321. ac_sed_defs="${ac_sed_defs}\${ac_dA}C_ALLOCA\${ac_dB}C_ALLOCA\${ac_dC}1\${ac_dD}
  1322. \${ac_uA}C_ALLOCA\${ac_uB}C_ALLOCA\${ac_uC}1\${ac_uD}
  1323. \${ac_eA}C_ALLOCA\${ac_eB}C_ALLOCA\${ac_eC}1\${ac_eD}
  1324. "
  1325. }
  1326.  
  1327.  
  1328.   test -n "$silent" || /bin/echo "checking stack direction for C alloca"
  1329.   test -n "$silent" || /bin/echo "checking whether cross-compiling"
  1330. # If we cannot run a trivial program, we must be cross compiling.
  1331. cat > conftest.${ac_ext} <<EOF
  1332. #include "confdefs.h"
  1333. main(){exit(0);}
  1334. EOF
  1335. eval $ac_compile
  1336. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1337.   :
  1338. else
  1339.   cross_compiling=1
  1340. fi
  1341. rm -fr conftest*
  1342.  
  1343. if test -n "$cross_compiling"
  1344. then
  1345.   
  1346. {
  1347. test -n "$verbose" && \
  1348. /bin/echo "    defining" STACK_DIRECTION to be "0"
  1349. /bin/echo "#define" STACK_DIRECTION "0" >> confdefs.h
  1350. DEFS="$DEFS -DSTACK_DIRECTION=0"
  1351. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}0\${ac_dD}
  1352. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}0\${ac_uD}
  1353. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}0\${ac_eD}
  1354. "
  1355. }
  1356.  
  1357. else
  1358. cat > conftest.${ac_ext} <<EOF
  1359. #include "confdefs.h"
  1360. find_stack_direction ()
  1361. {
  1362.   static char *addr = 0;
  1363.   auto char dummy;
  1364.   if (addr == 0)
  1365.     {
  1366.       addr = &dummy;
  1367.       return find_stack_direction ();
  1368.     }
  1369.   else
  1370.     return (&dummy > addr) ? 1 : -1;
  1371. }
  1372. main ()
  1373. {
  1374.   exit (find_stack_direction() < 0);
  1375. }
  1376. EOF
  1377. eval $ac_compile
  1378. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1379.   
  1380. {
  1381. test -n "$verbose" && \
  1382. /bin/echo "    defining" STACK_DIRECTION to be "1"
  1383. /bin/echo "#define" STACK_DIRECTION "1" >> confdefs.h
  1384. DEFS="$DEFS -DSTACK_DIRECTION=1"
  1385. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}1\${ac_dD}
  1386. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}1\${ac_uD}
  1387. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}1\${ac_eD}
  1388. "
  1389. }
  1390.  
  1391.  
  1392. else
  1393.   
  1394. {
  1395. test -n "$verbose" && \
  1396. /bin/echo "    defining" STACK_DIRECTION to be "-1"
  1397. /bin/echo "#define" STACK_DIRECTION "-1" >> confdefs.h
  1398. DEFS="$DEFS -DSTACK_DIRECTION=-1"
  1399. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}-1\${ac_dD}
  1400. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}-1\${ac_uD}
  1401. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}-1\${ac_eD}
  1402. "
  1403. }
  1404.  
  1405. fi
  1406. fi
  1407. rm -fr conftest*
  1408. fi
  1409.  
  1410. test -n "$silent" || /bin/echo "checking for st_blksize in struct stat"
  1411. cat > conftest.${ac_ext} <<EOF
  1412. #include "confdefs.h"
  1413. #include <sys/types.h>
  1414. #include <sys/stat.h>
  1415. int main() { return 0; }
  1416. int t() { struct stat s; s.st_blksize;; return 0; }
  1417. EOF
  1418. if eval $ac_compile; then
  1419.   rm -rf conftest*
  1420.   
  1421. {
  1422. test -n "$verbose" && \
  1423. /bin/echo "    defining HAVE_ST_BLKSIZE"
  1424. /bin/echo "#define" HAVE_ST_BLKSIZE "1" >> confdefs.h
  1425. DEFS="$DEFS -DHAVE_ST_BLKSIZE=1"
  1426. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ST_BLKSIZE\${ac_dB}HAVE_ST_BLKSIZE\${ac_dC}1\${ac_dD}
  1427. \${ac_uA}HAVE_ST_BLKSIZE\${ac_uB}HAVE_ST_BLKSIZE\${ac_uC}1\${ac_uD}
  1428. \${ac_eA}HAVE_ST_BLKSIZE\${ac_eB}HAVE_ST_BLKSIZE\${ac_eC}1\${ac_eD}
  1429. "
  1430. }
  1431.  
  1432.  
  1433. fi
  1434. rm -f conftest*
  1435.  
  1436. test -n "$silent" || /bin/echo "checking for broken stat file mode macros"
  1437. cat > conftest.${ac_ext} <<EOF
  1438. #include "confdefs.h"
  1439. #include <sys/types.h>
  1440. #include <sys/stat.h>
  1441. #ifdef S_ISBLK
  1442. #if S_ISBLK (S_IFDIR)
  1443. You lose.
  1444. #endif
  1445. #ifdef S_IFCHR
  1446. #if S_ISBLK (S_IFCHR)
  1447. You lose.
  1448. #endif
  1449. #endif /* S_IFCHR */
  1450. #endif /* S_ISBLK */
  1451. #ifdef S_ISLNK
  1452. #if S_ISLNK (S_IFREG)
  1453. You lose.
  1454. #endif
  1455. #endif /* S_ISLNK */
  1456. #ifdef S_ISSOCK
  1457. #if S_ISSOCK (S_IFREG)
  1458. You lose.
  1459. #endif
  1460. #endif /* S_ISSOCK */
  1461.  
  1462. EOF
  1463. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1464. if egrep "You lose" conftest.out >/dev/null 2>&1; then
  1465.   rm -rf conftest*
  1466.   
  1467. {
  1468. test -n "$verbose" && \
  1469. /bin/echo "    defining STAT_MACROS_BROKEN"
  1470. /bin/echo "#define" STAT_MACROS_BROKEN "1" >> confdefs.h
  1471. DEFS="$DEFS -DSTAT_MACROS_BROKEN=1"
  1472. ac_sed_defs="${ac_sed_defs}\${ac_dA}STAT_MACROS_BROKEN\${ac_dB}STAT_MACROS_BROKEN\${ac_dC}1\${ac_dD}
  1473. \${ac_uA}STAT_MACROS_BROKEN\${ac_uB}STAT_MACROS_BROKEN\${ac_uC}1\${ac_uD}
  1474. \${ac_eA}STAT_MACROS_BROKEN\${ac_eB}STAT_MACROS_BROKEN\${ac_eC}1\${ac_eD}
  1475. "
  1476. }
  1477.  
  1478.  
  1479. fi
  1480. rm -f conftest*
  1481.  
  1482. test -n "$silent" || /bin/echo "checking for Xenix"
  1483. cat > conftest.${ac_ext} <<EOF
  1484. #include "confdefs.h"
  1485. #if defined(M_XENIX) && !defined(M_UNIX)
  1486.   yes
  1487. #endif
  1488.  
  1489. EOF
  1490. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1491. if egrep "yes" conftest.out >/dev/null 2>&1; then
  1492.   rm -rf conftest*
  1493.   XENIX=1
  1494.  
  1495. fi
  1496. rm -f conftest*
  1497.  
  1498. if test -n "$XENIX"; then
  1499.   LIBS="$LIBS -lx"
  1500.   case "$DEFS" in
  1501.   *SYSNDIR*) ;;
  1502.   *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx.
  1503.   esac
  1504. fi
  1505.  
  1506. # Set default prefixes.
  1507. if test -n "$prefix"; then
  1508.   test -z "$exec_prefix" && exec_prefix='${prefix}' # Let make expand it.
  1509.   ac_prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  1510. fi
  1511. if test -n "$exec_prefix"; then
  1512.   ac_prsub="$ac_prsub
  1513. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
  1514. fi
  1515. # Any assignment to VPATH causes Sun make to only execute
  1516. # the first set of double-colon rules, so remove it if not needed.
  1517. # If there is a colon in the path, we need to keep it.
  1518. if test "x$srcdir" = x.; then
  1519.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1520. fi
  1521.  
  1522. # Quote sed substitution magic chars in DEFS.
  1523. cat >conftest.def <<EOF
  1524. $DEFS
  1525. EOF
  1526. ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
  1527. DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
  1528. rm -f conftest.def
  1529. # Substitute for predefined variables.
  1530.  
  1531. trap 'rm -f config.status; exit 1' 1 2 15
  1532. /bin/echo creating config.status
  1533. rm -f config.status
  1534. cat > config.status <<EOF
  1535. #!/bin/sh
  1536. # Generated automatically by configure.
  1537. # Run this file to recreate the current configuration.
  1538. # This directory was configured as follows,
  1539. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1540. #
  1541. # $0 $configure_args
  1542.  
  1543. ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
  1544. for ac_option
  1545. do
  1546.   case "\$ac_option" in
  1547.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1548.     /bin/echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
  1549.     exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
  1550.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1551.     /bin/echo "config.status generated by autoconf version 1.9"
  1552.     exit 0 ;;
  1553.   -help | --help | --hel | --he | --h)
  1554.     /bin/echo "\$ac_cs_usage"; exit 0 ;;
  1555.   *) /bin/echo "\$ac_cs_usage"; exit 1 ;;
  1556.   esac
  1557. done
  1558.  
  1559. trap 'rm -fr Makefile config.h conftest*; exit 1' 1 2 15
  1560. CC='$CC'
  1561. CPP='$CPP'
  1562. INSTALL='$INSTALL'
  1563. INSTALL_PROGRAM='$INSTALL_PROGRAM'
  1564. INSTALL_DATA='$INSTALL_DATA'
  1565. ALLOCA='$ALLOCA'
  1566. LIBS='$LIBS'
  1567. srcdir='$srcdir'
  1568. top_srcdir='$top_srcdir'
  1569. prefix='$prefix'
  1570. exec_prefix='$exec_prefix'
  1571. ac_prsub='$ac_prsub'
  1572. ac_vpsub='$ac_vpsub'
  1573. extrasub='$extrasub'
  1574. EOF
  1575. cat >> config.status <<\EOF
  1576.  
  1577. ac_given_srcdir=$srcdir
  1578.  
  1579. CONFIG_FILES=${CONFIG_FILES-"Makefile"}
  1580. for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
  1581.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1582.   ac_dir=`/bin/echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1583.   if test "$ac_dir" != "$ac_file"; then
  1584.     # The file is in a subdirectory.
  1585.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1586.     ac_dir_suffix="/$ac_dir"
  1587.   else
  1588.     ac_dir_suffix=
  1589.   fi
  1590.  
  1591.   # A "../" for each directory in $ac_dir_suffix.
  1592.   ac_dots=`/bin/echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1593.   case "$ac_given_srcdir" in
  1594.   .)  srcdir=.; top_srcdir="$ac_dots." ;;
  1595.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1596.   *) # Relative path.
  1597.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1598.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1599.   esac
  1600.  
  1601.   /bin/echo creating "$ac_file"
  1602.   rm -f "$ac_file"
  1603.   comment_str="Generated automatically from `/bin/echo $ac_file|sed 's|.*/||'`.in by configure."
  1604.   case "$ac_file" in
  1605.     *.c | *.h | *.C | *.cc | *.m )  /bin/echo "/* $comment_str */" > "$ac_file" ;;
  1606.     * )          /bin/echo "# $comment_str"     > "$ac_file" ;;
  1607.   esac
  1608.   sed -e "
  1609. $ac_prsub
  1610. $ac_vpsub
  1611. $extrasub
  1612. s%@CC@%$CC%g
  1613. s%@CPP@%$CPP%g
  1614. s%@INSTALL@%$INSTALL%g
  1615. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1616. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1617. s%@ALLOCA@%$ALLOCA%g
  1618. s%@LIBS@%$LIBS%g
  1619. s%@srcdir@%$srcdir%g
  1620. s%@top_srcdir@%$top_srcdir%g
  1621. s%@prefix@%$prefix%g
  1622. s%@exec_prefix@%$exec_prefix%g
  1623. s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
  1624. fi; done
  1625.  
  1626. # These sed commands are put into ac_sed_defs when defining a macro.
  1627. # They are broken into pieces to make the sed script easier to manage.
  1628. # They are passed to sed as "A NAME B NAME C VALUE D", where NAME
  1629. # is the cpp macro being defined and VALUE is the value it is being given.
  1630. # Each defining turns into a single global substitution command.
  1631. # Hopefully no one uses "!" as a variable value.
  1632. # Other candidates for the sed separators, like , and @, do get used.
  1633. #
  1634. # ac_d sets the value in "#define NAME VALUE" lines.
  1635. ac_dA='s!^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  1636. ac_dB='\([     ][     ]*\)[^     ]*!\1#\2'
  1637. ac_dC='\3'
  1638. ac_dD='!g'
  1639. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  1640. ac_uA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1641. ac_uB='\([     ]\)!\1#\2define\3'
  1642. ac_uC=' '
  1643. ac_uD='\4!g'
  1644. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  1645. ac_eA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1646. ac_eB='$!\1#\2define\3'
  1647. ac_eC=' '
  1648. ac_eD='!g'
  1649. rm -f conftest.sed
  1650. EOF
  1651. # Turn off quoting long enough to insert the sed commands.
  1652. rm -f conftest.sh
  1653. cat > conftest.sh <<EOF
  1654. $ac_sed_defs
  1655. EOF
  1656.  
  1657. # Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
  1658. # on the size of here documents.
  1659.  
  1660. # Maximum number of lines to put in a single here document.
  1661. ac_max_sh_lines=9
  1662.  
  1663. while :
  1664. do
  1665.   # wc gives bogus results for an empty file on some AIX systems.
  1666.   ac_lines=`grep -c . conftest.sh`
  1667.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1668.   rm -f conftest.s1 conftest.s2
  1669.   sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -20.
  1670.   sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +21.
  1671.   # Write a limited-size here document to append to conftest.sed.
  1672.   /bin/echo 'cat >> conftest.sed <<CONFEOF' >> config.status
  1673.   cat conftest.s1 >> config.status
  1674.   /bin/echo 'CONFEOF' >> config.status
  1675.   rm -f conftest.s1 conftest.sh
  1676.   mv conftest.s2 conftest.sh
  1677. done
  1678. rm -f conftest.sh
  1679.  
  1680. # Now back to your regularly scheduled config.status.
  1681. cat >> config.status <<\EOF
  1682. # This sed command replaces #undef's with comments.  This is necessary, for
  1683. # example, in the case of _POSIX_SOURCE, which is predefined and required
  1684. # on some systems where configure will not decide to define it in
  1685. # config.h.
  1686. cat >> conftest.sed <<\CONFEOF
  1687. s,^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
  1688. CONFEOF
  1689. rm -f conftest.h
  1690. # Break up the sed commands because old seds have small limits.
  1691. ac_max_sed_lines=20
  1692.  
  1693. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  1694. for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
  1695.   /bin/echo creating $ac_file
  1696.  
  1697.   cp $ac_given_srcdir/$ac_file.in conftest.h1
  1698.   while :
  1699.   do
  1700.     ac_lines=`grep -c . conftest.sed`
  1701.     if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1702.     rm -f conftest.s1 conftest.s2 conftest.h2
  1703.     sed ${ac_max_sed_lines}q conftest.sed > conftest.s1 # Like head -20.
  1704.     sed 1,${ac_max_sed_lines}d conftest.sed > conftest.s2 # Like tail +21.
  1705.     sed -f conftest.s1 < conftest.h1 > conftest.h2
  1706.     rm -f conftest.s1 conftest.h1 conftest.sed
  1707.     mv conftest.h2 conftest.h1
  1708.     mv conftest.s2 conftest.sed
  1709.   done
  1710.   rm -f conftest.sed conftest.h
  1711.   /bin/echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  1712.   cat conftest.h1 >> conftest.h
  1713.   rm -f conftest.h1
  1714.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  1715.     # The file exists and we would not be changing it.
  1716.     /bin/echo "$ac_file is unchanged"
  1717.     rm -f conftest.h
  1718.   else
  1719.     rm -f $ac_file
  1720.     mv conftest.h $ac_file
  1721.   fi
  1722. fi; done
  1723.  
  1724.  
  1725.  
  1726. exit 0
  1727. EOF
  1728. chmod +x config.status
  1729. test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} config.status
  1730.  
  1731.