home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / patch-2.1-src.lha / patch-2.1 / configure < prev    next >
Encoding:
Text File  |  1994-04-26  |  46.0 KB  |  1,571 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=patch.c
  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. test -n "$silent" || /bin/echo "checking for AIX"
  387. cat > conftest.${ac_ext} <<EOF
  388. #include "confdefs.h"
  389. #ifdef _AIX
  390.   yes
  391. #endif
  392.  
  393. EOF
  394. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  395. if egrep "yes" conftest.out >/dev/null 2>&1; then
  396.   rm -rf conftest*
  397.   
  398. {
  399. test -n "$verbose" && \
  400. /bin/echo "    defining _ALL_SOURCE"
  401. /bin/echo "#define" _ALL_SOURCE "1" >> confdefs.h
  402. DEFS="$DEFS -D_ALL_SOURCE=1"
  403. ac_sed_defs="${ac_sed_defs}\${ac_dA}_ALL_SOURCE\${ac_dB}_ALL_SOURCE\${ac_dC}1\${ac_dD}
  404. \${ac_uA}_ALL_SOURCE\${ac_uB}_ALL_SOURCE\${ac_uC}1\${ac_uD}
  405. \${ac_eA}_ALL_SOURCE\${ac_eB}_ALL_SOURCE\${ac_eC}1\${ac_eD}
  406. "
  407. }
  408.  
  409.  
  410. fi
  411. rm -f conftest*
  412.  
  413.  
  414. test -n "$silent" || /bin/echo "checking for minix/config.h"
  415. cat > conftest.${ac_ext} <<EOF
  416. #include "confdefs.h"
  417. #include <minix/config.h>
  418. EOF
  419. # Some shells (Coherent) do redirections in the wrong order, so need
  420. # the parens.
  421. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  422. if test -z "$ac_err"; then
  423.   rm -rf conftest*
  424.   MINIX=1
  425.  
  426. fi
  427. rm -f conftest*
  428.  
  429. # The Minix shell can't assign to the same variable on the same line!
  430. if test -n "$MINIX"; then
  431.   
  432. {
  433. test -n "$verbose" && \
  434. /bin/echo "    defining _POSIX_SOURCE"
  435. /bin/echo "#define" _POSIX_SOURCE "1" >> confdefs.h
  436. DEFS="$DEFS -D_POSIX_SOURCE=1"
  437. ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
  438. \${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
  439. \${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
  440. "
  441. }
  442.  
  443.   
  444. {
  445. test -n "$verbose" && \
  446. /bin/echo "    defining" _POSIX_1_SOURCE to be "2"
  447. /bin/echo "#define" _POSIX_1_SOURCE "2" >> confdefs.h
  448. DEFS="$DEFS -D_POSIX_1_SOURCE=2"
  449. ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_1_SOURCE\${ac_dB}_POSIX_1_SOURCE\${ac_dC}2\${ac_dD}
  450. \${ac_uA}_POSIX_1_SOURCE\${ac_uB}_POSIX_1_SOURCE\${ac_uC}2\${ac_uD}
  451. \${ac_eA}_POSIX_1_SOURCE\${ac_eB}_POSIX_1_SOURCE\${ac_eC}2\${ac_eD}
  452. "
  453. }
  454.  
  455.   
  456. {
  457. test -n "$verbose" && \
  458. /bin/echo "    defining _MINIX"
  459. /bin/echo "#define" _MINIX "1" >> confdefs.h
  460. DEFS="$DEFS -D_MINIX=1"
  461. ac_sed_defs="${ac_sed_defs}\${ac_dA}_MINIX\${ac_dB}_MINIX\${ac_dC}1\${ac_dD}
  462. \${ac_uA}_MINIX\${ac_uB}_MINIX\${ac_uC}1\${ac_uD}
  463. \${ac_eA}_MINIX\${ac_eB}_MINIX\${ac_eC}1\${ac_eD}
  464. "
  465. }
  466.  
  467. fi
  468.  
  469. test -n "$silent" || /bin/echo "checking for POSIXized ISC"
  470. if test -d /gnu/etc/conf/kconfig.d &&
  471.   grep _POSIX_VERSION /gnu/include/sys/unistd.h >/dev/null 2>&1
  472. then
  473.   ISC=1 # If later tests want to check for ISC.
  474.   
  475. {
  476. test -n "$verbose" && \
  477. /bin/echo "    defining _POSIX_SOURCE"
  478. /bin/echo "#define" _POSIX_SOURCE "1" >> confdefs.h
  479. DEFS="$DEFS -D_POSIX_SOURCE=1"
  480. ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
  481. \${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
  482. \${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
  483. "
  484. }
  485.  
  486.   if test -n "$GCC"; then
  487.     CC="$CC -posix"
  488.   else
  489.     CC="$CC -Xp"
  490.   fi
  491. fi
  492.  
  493. ac_prog='/* Ultrix mips cc rejects this.  */
  494. typedef int charset[2]; const charset x;
  495. /* SunOS 4.1.1 cc rejects this.  */
  496. char const *const *ccp;
  497. char **p;
  498. /* AIX XL C 1.02.0.0 rejects this.
  499.    It does not let you subtract one const X* pointer from another in an arm
  500.    of an if-expression whose if-part is not a constant expression */
  501. const char *g = "string";
  502. ccp = &g + (g ? g-g : 0);
  503. /* HPUX 7.0 cc rejects these. */
  504. ++ccp;
  505. p = (char**) ccp;
  506. ccp = (char const *const *) p;
  507. { /* SCO 3.2v4 cc rejects this.  */
  508.   char *t;
  509.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  510.  
  511.   *t++ = 0;
  512. }
  513. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  514.   int x[] = {25,17};
  515.   const int *foo = &x[0];
  516.   ++foo;
  517. }
  518. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  519.   typedef const int *iptr;
  520.   iptr p = 0;
  521.   ++p;
  522. }
  523. { /* AIX XL C 1.02.0.0 rejects this saying
  524.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  525.   struct s { int j; const int *ap[3]; };
  526.   struct s *b; b->j = 5;
  527. }
  528. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  529.   const int foo = 10;
  530. }'
  531. test -n "$silent" || /bin/echo "checking for lack of working const"
  532. cat > conftest.${ac_ext} <<EOF
  533. #include "confdefs.h"
  534.  
  535. int main() { return 0; }
  536. int t() { $ac_prog; return 0; }
  537. EOF
  538. if eval $ac_compile; then
  539.   :
  540. else
  541.   rm -rf conftest*
  542.   
  543. {
  544. test -n "$verbose" && \
  545. /bin/echo "    defining" const to be empty
  546. /bin/echo "#define" const "" >> confdefs.h
  547. DEFS="$DEFS -Dconst="
  548. ac_sed_defs="${ac_sed_defs}\${ac_dA}const\${ac_dB}const\${ac_dC}\${ac_dD}
  549. \${ac_uA}const\${ac_uB}const\${ac_uC}\${ac_uD}
  550. \${ac_eA}const\${ac_eB}const\${ac_eC}\${ac_eD}
  551. "
  552. }
  553.  
  554. fi
  555. rm -f conftest*
  556.  
  557. # Make sure to not get the incompatible SysV /etc/install and
  558. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  559. # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
  560. # or the AFS install, which mishandles nonexistent args, or
  561. # /usr/ucb/install on SVR4, which tries to use the nonexistent group
  562. # `staff', or /sbin/install on IRIX which has incompatible command-line
  563. # syntax.  Sigh.
  564. #
  565. #     On most BSDish systems install is in /usr/bin, not /usr/ucb
  566. #     anyway.
  567. # This turns out not to be true, so the mere pathname isn't an indication
  568. # of whether the program works.  What we really need is a set of tests for
  569. # the install program to see if it actually works in all the required ways.
  570. #
  571. # Avoid using ./install, which might have been erroneously created
  572. # by make from ./install.sh.
  573. if test "z${INSTALL}" = "z" ; then
  574.   test -n "$silent" || /bin/echo "checking for a BSD compatible install"
  575.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  576.   for ac_dir in $PATH; do
  577.     case "$ac_dir" in
  578.     ''|.|/gnu/etc|/sbin|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
  579.     *)
  580.       # OSF1 and SCO ODT 3.0 have their own names for install.
  581.       for ac_prog in installbsd scoinst install; do
  582.         if test -f $ac_dir/$ac_prog; then
  583.       if test $ac_prog = install &&
  584.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  585.         # AIX install.  It has an incompatible calling convention.
  586.         # OSF/1 installbsd also uses dspmsg, but is usable.
  587.         :
  588.       else
  589.         INSTALL="$ac_dir/$ac_prog -c"
  590.         INSTALL_PROGRAM='${INSTALL}'
  591.         INSTALL_DATA='${INSTALL} -m 644'
  592.         break 2
  593.       fi
  594.     fi
  595.       done
  596.       ;;
  597.     esac
  598.   done
  599.   IFS="$ac_save_ifs"
  600. fi
  601. if test -z "$INSTALL"; then
  602.   if test -f ${srcdir}/install.sh; then
  603.     # As a last resort, use the slow shell script.
  604.     INSTALL='@top_srcdir@/install.sh -c'
  605.   else
  606.     /bin/echo "configure: warning: ${srcdir}/install.sh not found; using cp" >&2
  607.     INSTALL=cp
  608.   fi
  609. fi
  610. test -n "$verbose" && /bin/echo "    setting INSTALL to $INSTALL"
  611. # Use test -z because SunOS4 sh mishandles ${INSTALL_PROGRAM-'${INSTALL}'}.
  612. # It thinks the first close brace ends the variable substitution.
  613. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  614. test -n "$verbose" && /bin/echo "    setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
  615. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL}'
  616. test -n "$verbose" && /bin/echo "    setting INSTALL_DATA to $INSTALL_DATA"
  617.  
  618. test -n "$silent" || /bin/echo "checking for directory library header"
  619. ac_dir_header=
  620. if test -z "$ac_dir_header"; then
  621.   test -n "$silent" || /bin/echo "checking for dirent.h"
  622. cat > conftest.${ac_ext} <<EOF
  623. #include "confdefs.h"
  624. #include <sys/types.h>
  625. #include <dirent.h>
  626. int main() { return 0; }
  627. int t() { DIR *dirp = 0;; return 0; }
  628. EOF
  629. if eval $ac_compile; then
  630.   rm -rf conftest*
  631.   
  632. {
  633. test -n "$verbose" && \
  634. /bin/echo "    defining DIRENT"
  635. /bin/echo "#define" DIRENT "1" >> confdefs.h
  636. DEFS="$DEFS -DDIRENT=1"
  637. ac_sed_defs="${ac_sed_defs}\${ac_dA}DIRENT\${ac_dB}DIRENT\${ac_dC}1\${ac_dD}
  638. \${ac_uA}DIRENT\${ac_uB}DIRENT\${ac_uC}1\${ac_uD}
  639. \${ac_eA}DIRENT\${ac_eB}DIRENT\${ac_eC}1\${ac_eD}
  640. "
  641. }
  642.  ac_dir_header=dirent.h
  643.  
  644. fi
  645. rm -f conftest*
  646. fi
  647. if test -z "$ac_dir_header"; then
  648.   test -n "$silent" || /bin/echo "checking for sys/ndir.h"
  649. cat > conftest.${ac_ext} <<EOF
  650. #include "confdefs.h"
  651. #include <sys/types.h>
  652. #include <sys/ndir.h>
  653. int main() { return 0; }
  654. int t() { DIR *dirp = 0;; return 0; }
  655. EOF
  656. if eval $ac_compile; then
  657.   rm -rf conftest*
  658.   
  659. {
  660. test -n "$verbose" && \
  661. /bin/echo "    defining SYSNDIR"
  662. /bin/echo "#define" SYSNDIR "1" >> confdefs.h
  663. DEFS="$DEFS -DSYSNDIR=1"
  664. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSNDIR\${ac_dB}SYSNDIR\${ac_dC}1\${ac_dD}
  665. \${ac_uA}SYSNDIR\${ac_uB}SYSNDIR\${ac_uC}1\${ac_uD}
  666. \${ac_eA}SYSNDIR\${ac_eB}SYSNDIR\${ac_eC}1\${ac_eD}
  667. "
  668. }
  669.  ac_dir_header=sys/ndir.h
  670.  
  671. fi
  672. rm -f conftest*
  673. fi
  674. if test -z "$ac_dir_header"; then
  675.   test -n "$silent" || /bin/echo "checking for sys/dir.h"
  676. cat > conftest.${ac_ext} <<EOF
  677. #include "confdefs.h"
  678. #include <sys/types.h>
  679. #include <sys/dir.h>
  680. int main() { return 0; }
  681. int t() { DIR *dirp = 0;; return 0; }
  682. EOF
  683. if eval $ac_compile; then
  684.   rm -rf conftest*
  685.   
  686. {
  687. test -n "$verbose" && \
  688. /bin/echo "    defining SYSDIR"
  689. /bin/echo "#define" SYSDIR "1" >> confdefs.h
  690. DEFS="$DEFS -DSYSDIR=1"
  691. ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSDIR\${ac_dB}SYSDIR\${ac_dC}1\${ac_dD}
  692. \${ac_uA}SYSDIR\${ac_uB}SYSDIR\${ac_uC}1\${ac_uD}
  693. \${ac_eA}SYSDIR\${ac_eB}SYSDIR\${ac_eC}1\${ac_eD}
  694. "
  695. }
  696.  ac_dir_header=sys/dir.h
  697.  
  698. fi
  699. rm -f conftest*
  700. fi
  701. if test -z "$ac_dir_header"; then
  702.   test -n "$silent" || /bin/echo "checking for ndir.h"
  703. cat > conftest.${ac_ext} <<EOF
  704. #include "confdefs.h"
  705. #include <sys/types.h>
  706. #include <ndir.h>
  707. int main() { return 0; }
  708. int t() { DIR *dirp = 0;; return 0; }
  709. EOF
  710. if eval $ac_compile; then
  711.   rm -rf conftest*
  712.   
  713. {
  714. test -n "$verbose" && \
  715. /bin/echo "    defining NDIR"
  716. /bin/echo "#define" NDIR "1" >> confdefs.h
  717. DEFS="$DEFS -DNDIR=1"
  718. ac_sed_defs="${ac_sed_defs}\${ac_dA}NDIR\${ac_dB}NDIR\${ac_dC}1\${ac_dD}
  719. \${ac_uA}NDIR\${ac_uB}NDIR\${ac_uC}1\${ac_uD}
  720. \${ac_eA}NDIR\${ac_eB}NDIR\${ac_eC}1\${ac_eD}
  721. "
  722. }
  723.  ac_dir_header=ndir.h
  724.  
  725. fi
  726. rm -f conftest*
  727. fi
  728.  
  729. test -n "$silent" || /bin/echo "checking for closedir return value"
  730. cat > conftest.${ac_ext} <<EOF
  731. #include "confdefs.h"
  732. #include <sys/types.h>
  733. #include <$ac_dir_header>
  734. int closedir(); main() { exit(closedir(opendir(".")) != 0); }
  735. EOF
  736. eval $ac_compile
  737. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  738.   :
  739. else
  740.   
  741. {
  742. test -n "$verbose" && \
  743. /bin/echo "    defining VOID_CLOSEDIR"
  744. /bin/echo "#define" VOID_CLOSEDIR "1" >> confdefs.h
  745. DEFS="$DEFS -DVOID_CLOSEDIR=1"
  746. ac_sed_defs="${ac_sed_defs}\${ac_dA}VOID_CLOSEDIR\${ac_dB}VOID_CLOSEDIR\${ac_dC}1\${ac_dD}
  747. \${ac_uA}VOID_CLOSEDIR\${ac_uB}VOID_CLOSEDIR\${ac_uC}1\${ac_uD}
  748. \${ac_eA}VOID_CLOSEDIR\${ac_eB}VOID_CLOSEDIR\${ac_eC}1\${ac_eD}
  749. "
  750. }
  751.  
  752. fi
  753. rm -fr conftest*
  754.  
  755. test -n "$silent" || /bin/echo "checking for return type of signal handlers"
  756. cat > conftest.${ac_ext} <<EOF
  757. #include "confdefs.h"
  758. #include <sys/types.h>
  759. #include <signal.h>
  760. #ifdef signal
  761. #undef signal
  762. #endif
  763. extern void (*signal ()) ();
  764. int main() { return 0; }
  765. int t() { int i;; return 0; }
  766. EOF
  767. if eval $ac_compile; then
  768.   rm -rf conftest*
  769.   
  770. {
  771. test -n "$verbose" && \
  772. /bin/echo "    defining" RETSIGTYPE to be "void"
  773. /bin/echo "#define" RETSIGTYPE "void" >> confdefs.h
  774. DEFS="$DEFS -DRETSIGTYPE=void"
  775. ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}void\${ac_dD}
  776. \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}void\${ac_uD}
  777. \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}void\${ac_eD}
  778. "
  779. }
  780.  
  781.  
  782. else
  783.   rm -rf conftest*
  784.   
  785. {
  786. test -n "$verbose" && \
  787. /bin/echo "    defining" RETSIGTYPE to be "int"
  788. /bin/echo "#define" RETSIGTYPE "int" >> confdefs.h
  789. DEFS="$DEFS -DRETSIGTYPE=int"
  790. ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}int\${ac_dD}
  791. \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}int\${ac_uD}
  792. \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}int\${ac_eD}
  793. "
  794. }
  795.  
  796. fi
  797. rm -f conftest*
  798.  
  799.  
  800. test -n "$silent" || /bin/echo "checking for ANSI C header files"
  801. cat > conftest.${ac_ext} <<EOF
  802. #include "confdefs.h"
  803. #include <stdlib.h>
  804. #include <stdarg.h>
  805. #include <string.h>
  806. #include <float.h>
  807. EOF
  808. # Some shells (Coherent) do redirections in the wrong order, so need
  809. # the parens.
  810. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  811. if test -z "$ac_err"; then
  812.   rm -rf conftest*
  813.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  814. /bin/echo '#include "confdefs.h"
  815. #include <string.h>' > conftest.${ac_ext}
  816. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  817. if egrep "memchr" conftest.out >/dev/null 2>&1; then
  818.   rm -rf conftest*
  819.   # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  820. cat > conftest.${ac_ext} <<EOF
  821. #include "confdefs.h"
  822. #include <ctype.h>
  823. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  824. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  825. #define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
  826. int main () { int i; for (i = 0; i < 256; i++)
  827. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  828. exit (0); }
  829.  
  830. EOF
  831. eval $ac_compile
  832. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  833.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  834. /bin/echo '#include "confdefs.h"
  835. #include <stdlib.h>' > conftest.${ac_ext}
  836. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  837. if egrep "free" conftest.out >/dev/null 2>&1; then
  838.   rm -rf conftest*
  839.   
  840. {
  841. test -n "$verbose" && \
  842. /bin/echo "    defining STDC_HEADERS"
  843. /bin/echo "#define" STDC_HEADERS "1" >> confdefs.h
  844. DEFS="$DEFS -DSTDC_HEADERS=1"
  845. ac_sed_defs="${ac_sed_defs}\${ac_dA}STDC_HEADERS\${ac_dB}STDC_HEADERS\${ac_dC}1\${ac_dD}
  846. \${ac_uA}STDC_HEADERS\${ac_uB}STDC_HEADERS\${ac_uC}1\${ac_uD}
  847. \${ac_eA}STDC_HEADERS\${ac_eB}STDC_HEADERS\${ac_eC}1\${ac_eD}
  848. "
  849. }
  850.  
  851.  
  852. fi
  853. rm -f conftest*
  854.  
  855.  
  856. fi
  857. rm -fr conftest*
  858.  
  859. fi
  860. rm -f conftest*
  861.  
  862.  
  863. fi
  864. rm -f conftest*
  865.  
  866. for ac_hdr in unistd.h
  867. do
  868. ac_tr_hdr=HAVE_`/bin/echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
  869. test -n "$silent" || /bin/echo "checking for ${ac_hdr}"
  870. cat > conftest.${ac_ext} <<EOF
  871. #include "confdefs.h"
  872. #include <${ac_hdr}>
  873. EOF
  874. # Some shells (Coherent) do redirections in the wrong order, so need
  875. # the parens.
  876. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  877. if test -z "$ac_err"; then
  878.   rm -rf conftest*
  879.   
  880. {
  881. test -n "$verbose" && \
  882. /bin/echo "    defining ${ac_tr_hdr}"
  883. /bin/echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
  884. DEFS="$DEFS -D${ac_tr_hdr}=1"
  885. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
  886. \${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
  887. \${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
  888. "
  889. }
  890.  
  891.  
  892. fi
  893. rm -f conftest*
  894. done
  895.  
  896. for ac_hdr in string.h fcntl.h
  897. do
  898. ac_tr_hdr=HAVE_`/bin/echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
  899. test -n "$silent" || /bin/echo "checking for ${ac_hdr}"
  900. cat > conftest.${ac_ext} <<EOF
  901. #include "confdefs.h"
  902. #include <${ac_hdr}>
  903. EOF
  904. # Some shells (Coherent) do redirections in the wrong order, so need
  905. # the parens.
  906. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  907. if test -z "$ac_err"; then
  908.   rm -rf conftest*
  909.   
  910. {
  911. test -n "$verbose" && \
  912. /bin/echo "    defining ${ac_tr_hdr}"
  913. /bin/echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
  914. DEFS="$DEFS -D${ac_tr_hdr}=1"
  915. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
  916. \${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
  917. \${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
  918. "
  919. }
  920.  
  921.  
  922. fi
  923. rm -f conftest*
  924. done
  925.  
  926. for ac_func in rename
  927. do
  928. test -n "$silent" || /bin/echo "checking for ${ac_func}"
  929. cat > conftest.${ac_ext} <<EOF
  930. #include "confdefs.h"
  931. #include <ctype.h>
  932. int main() { return 0; }
  933. int t() { 
  934. /* The GNU C library defines this for functions which it implements
  935.     to always fail with ENOSYS.  Some functions are actually named
  936.     something starting with __ and the normal name is an alias.  */
  937. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  938. choke me
  939. #else
  940. /* Override any gcc2 internal prototype to avoid an error.  */
  941. extern char ${ac_func}(); ${ac_func}();
  942. #endif
  943. ; return 0; }
  944. EOF
  945. if eval $ac_compile; then
  946.   :
  947. else
  948.   rm -rf conftest*
  949.   LIBOBJS="$LIBOBJS ${ac_func}.o"
  950. test -n "$verbose" && /bin/echo "    using ${ac_func}.o instead"
  951. fi
  952. rm -f conftest*
  953.  
  954. done
  955.  
  956. for ac_func in pathconf strerror
  957. do
  958. ac_tr_func=HAVE_`/bin/echo $ac_func | tr '[a-z]' '[A-Z]'`
  959. test -n "$silent" || /bin/echo "checking for ${ac_func}"
  960. cat > conftest.${ac_ext} <<EOF
  961. #include "confdefs.h"
  962. #include <ctype.h>
  963. int main() { return 0; }
  964. int t() { 
  965. /* The GNU C library defines this for functions which it implements
  966.     to always fail with ENOSYS.  Some functions are actually named
  967.     something starting with __ and the normal name is an alias.  */
  968. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  969. choke me
  970. #else
  971. /* Override any gcc2 internal prototype to avoid an error.  */
  972. extern char ${ac_func}(); ${ac_func}();
  973. #endif
  974. ; return 0; }
  975. EOF
  976. if eval $ac_compile; then
  977.   rm -rf conftest*
  978.   {
  979. test -n "$verbose" && \
  980. /bin/echo "    defining ${ac_tr_func}"
  981. /bin/echo "#define" ${ac_tr_func} "1" >> confdefs.h
  982. DEFS="$DEFS -D${ac_tr_func}=1"
  983. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
  984. \${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
  985. \${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
  986. "
  987. }
  988.  
  989.  
  990. fi
  991. rm -f conftest*
  992. done
  993.  
  994. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  995. # for constant arguments.  Useless!
  996. test -n "$silent" || /bin/echo "checking for working alloca.h"
  997. cat > conftest.${ac_ext} <<EOF
  998. #include "confdefs.h"
  999. #include <alloca.h>
  1000. int main() { return 0; }
  1001. int t() { char *p = alloca(2 * sizeof(int));; return 0; }
  1002. EOF
  1003. if eval $ac_compile; then
  1004.   rm -rf conftest*
  1005.   
  1006. {
  1007. test -n "$verbose" && \
  1008. /bin/echo "    defining HAVE_ALLOCA_H"
  1009. /bin/echo "#define" HAVE_ALLOCA_H "1" >> confdefs.h
  1010. DEFS="$DEFS -DHAVE_ALLOCA_H=1"
  1011. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA_H\${ac_dB}HAVE_ALLOCA_H\${ac_dC}1\${ac_dD}
  1012. \${ac_uA}HAVE_ALLOCA_H\${ac_uB}HAVE_ALLOCA_H\${ac_uC}1\${ac_uD}
  1013. \${ac_eA}HAVE_ALLOCA_H\${ac_eB}HAVE_ALLOCA_H\${ac_eC}1\${ac_eD}
  1014. "
  1015. }
  1016.  
  1017.  
  1018. fi
  1019. rm -f conftest*
  1020.  
  1021. ac_decl="#ifdef __GNUC__
  1022. #define alloca __builtin_alloca
  1023. #else
  1024. #if HAVE_ALLOCA_H
  1025. #include <alloca.h>
  1026. #else
  1027. #ifdef _AIX
  1028.  #pragma alloca
  1029. #else
  1030. char *alloca ();
  1031. #endif
  1032. #endif
  1033. #endif
  1034. "
  1035. test -n "$silent" || /bin/echo "checking for alloca"
  1036. cat > conftest.${ac_ext} <<EOF
  1037. #include "confdefs.h"
  1038. $ac_decl
  1039. int main() { return 0; }
  1040. int t() { char *p = (char *) alloca(1);; return 0; }
  1041. EOF
  1042. if eval $ac_compile; then
  1043.   rm -rf conftest*
  1044.   
  1045. {
  1046. test -n "$verbose" && \
  1047. /bin/echo "    defining HAVE_ALLOCA"
  1048. /bin/echo "#define" HAVE_ALLOCA "1" >> confdefs.h
  1049. DEFS="$DEFS -DHAVE_ALLOCA=1"
  1050. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA\${ac_dB}HAVE_ALLOCA\${ac_dC}1\${ac_dD}
  1051. \${ac_uA}HAVE_ALLOCA\${ac_uB}HAVE_ALLOCA\${ac_uC}1\${ac_uD}
  1052. \${ac_eA}HAVE_ALLOCA\${ac_eB}HAVE_ALLOCA\${ac_eC}1\${ac_eD}
  1053. "
  1054. }
  1055.  
  1056.  
  1057. else
  1058.   rm -rf conftest*
  1059.   ac_alloca_missing=1
  1060. cat > conftest.${ac_ext} <<EOF
  1061. #include "confdefs.h"
  1062.  
  1063. #if defined(CRAY) && ! defined(CRAY2)
  1064. winnitude
  1065. #else
  1066. lossage
  1067. #endif
  1068.  
  1069. EOF
  1070. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1071. if egrep "winnitude" conftest.out >/dev/null 2>&1; then
  1072.   rm -rf conftest*
  1073.   test -n "$silent" || /bin/echo "checking for _getb67"
  1074. cat > conftest.${ac_ext} <<EOF
  1075. #include "confdefs.h"
  1076. #include <ctype.h>
  1077. int main() { return 0; }
  1078. int t() { 
  1079. /* The GNU C library defines this for functions which it implements
  1080.     to always fail with ENOSYS.  Some functions are actually named
  1081.     something starting with __ and the normal name is an alias.  */
  1082. #if defined (__stub__getb67) || defined (__stub____getb67)
  1083. choke me
  1084. #else
  1085. /* Override any gcc2 internal prototype to avoid an error.  */
  1086. extern char _getb67(); _getb67();
  1087. #endif
  1088. ; return 0; }
  1089. EOF
  1090. if eval $ac_compile; then
  1091.   rm -rf conftest*
  1092.   {
  1093. test -n "$verbose" && \
  1094. /bin/echo "    defining" CRAY_STACKSEG_END to be "_getb67"
  1095. /bin/echo "#define" CRAY_STACKSEG_END "_getb67" >> confdefs.h
  1096. DEFS="$DEFS -DCRAY_STACKSEG_END=_getb67"
  1097. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}_getb67\${ac_dD}
  1098. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}_getb67\${ac_uD}
  1099. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}_getb67\${ac_eD}
  1100. "
  1101. }
  1102.  
  1103.  
  1104. else
  1105.   rm -rf conftest*
  1106.   test -n "$silent" || /bin/echo "checking for GETB67"
  1107. cat > conftest.${ac_ext} <<EOF
  1108. #include "confdefs.h"
  1109. #include <ctype.h>
  1110. int main() { return 0; }
  1111. int t() { 
  1112. /* The GNU C library defines this for functions which it implements
  1113.     to always fail with ENOSYS.  Some functions are actually named
  1114.     something starting with __ and the normal name is an alias.  */
  1115. #if defined (__stub_GETB67) || defined (__stub___GETB67)
  1116. choke me
  1117. #else
  1118. /* Override any gcc2 internal prototype to avoid an error.  */
  1119. extern char GETB67(); GETB67();
  1120. #endif
  1121. ; return 0; }
  1122. EOF
  1123. if eval $ac_compile; then
  1124.   rm -rf conftest*
  1125.   {
  1126. test -n "$verbose" && \
  1127. /bin/echo "    defining" CRAY_STACKSEG_END to be "GETB67"
  1128. /bin/echo "#define" CRAY_STACKSEG_END "GETB67" >> confdefs.h
  1129. DEFS="$DEFS -DCRAY_STACKSEG_END=GETB67"
  1130. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}GETB67\${ac_dD}
  1131. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}GETB67\${ac_uD}
  1132. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}GETB67\${ac_eD}
  1133. "
  1134. }
  1135.  
  1136.  
  1137. else
  1138.   rm -rf conftest*
  1139.   test -n "$silent" || /bin/echo "checking for getb67"
  1140. cat > conftest.${ac_ext} <<EOF
  1141. #include "confdefs.h"
  1142. #include <ctype.h>
  1143. int main() { return 0; }
  1144. int t() { 
  1145. /* The GNU C library defines this for functions which it implements
  1146.     to always fail with ENOSYS.  Some functions are actually named
  1147.     something starting with __ and the normal name is an alias.  */
  1148. #if defined (__stub_getb67) || defined (__stub___getb67)
  1149. choke me
  1150. #else
  1151. /* Override any gcc2 internal prototype to avoid an error.  */
  1152. extern char getb67(); getb67();
  1153. #endif
  1154. ; return 0; }
  1155. EOF
  1156. if eval $ac_compile; then
  1157.   rm -rf conftest*
  1158.   {
  1159. test -n "$verbose" && \
  1160. /bin/echo "    defining" CRAY_STACKSEG_END to be "getb67"
  1161. /bin/echo "#define" CRAY_STACKSEG_END "getb67" >> confdefs.h
  1162. DEFS="$DEFS -DCRAY_STACKSEG_END=getb67"
  1163. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}getb67\${ac_dD}
  1164. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}getb67\${ac_uD}
  1165. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}getb67\${ac_eD}
  1166. "
  1167. }
  1168.  
  1169.  
  1170. fi
  1171. rm -f conftest*
  1172.  
  1173. fi
  1174. rm -f conftest*
  1175.  
  1176. fi
  1177. rm -f conftest*
  1178.  
  1179.  
  1180. fi
  1181. rm -f conftest*
  1182.  
  1183.  
  1184. fi
  1185. rm -f conftest*
  1186.  
  1187. if test -n "$ac_alloca_missing"; then
  1188.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  1189.   # that cause trouble.  Some versions do not even contain alloca or
  1190.   # contain a buggy version.  If you still want to use their alloca,
  1191.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  1192.   ALLOCA=alloca.o
  1193.   
  1194. {
  1195. test -n "$verbose" && \
  1196. /bin/echo "    defining C_ALLOCA"
  1197. /bin/echo "#define" C_ALLOCA "1" >> confdefs.h
  1198. DEFS="$DEFS -DC_ALLOCA=1"
  1199. ac_sed_defs="${ac_sed_defs}\${ac_dA}C_ALLOCA\${ac_dB}C_ALLOCA\${ac_dC}1\${ac_dD}
  1200. \${ac_uA}C_ALLOCA\${ac_uB}C_ALLOCA\${ac_uC}1\${ac_uD}
  1201. \${ac_eA}C_ALLOCA\${ac_eB}C_ALLOCA\${ac_eC}1\${ac_eD}
  1202. "
  1203. }
  1204.  
  1205.  
  1206.   test -n "$silent" || /bin/echo "checking stack direction for C alloca"
  1207.   test -n "$silent" || /bin/echo "checking whether cross-compiling"
  1208. # If we cannot run a trivial program, we must be cross compiling.
  1209. cat > conftest.${ac_ext} <<EOF
  1210. #include "confdefs.h"
  1211. main(){exit(0);}
  1212. EOF
  1213. eval $ac_compile
  1214. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1215.   :
  1216. else
  1217.   cross_compiling=1
  1218. fi
  1219. rm -fr conftest*
  1220.  
  1221. if test -n "$cross_compiling"
  1222. then
  1223.   
  1224. {
  1225. test -n "$verbose" && \
  1226. /bin/echo "    defining" STACK_DIRECTION to be "0"
  1227. /bin/echo "#define" STACK_DIRECTION "0" >> confdefs.h
  1228. DEFS="$DEFS -DSTACK_DIRECTION=0"
  1229. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}0\${ac_dD}
  1230. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}0\${ac_uD}
  1231. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}0\${ac_eD}
  1232. "
  1233. }
  1234.  
  1235. else
  1236. cat > conftest.${ac_ext} <<EOF
  1237. #include "confdefs.h"
  1238. find_stack_direction ()
  1239. {
  1240.   static char *addr = 0;
  1241.   auto char dummy;
  1242.   if (addr == 0)
  1243.     {
  1244.       addr = &dummy;
  1245.       return find_stack_direction ();
  1246.     }
  1247.   else
  1248.     return (&dummy > addr) ? 1 : -1;
  1249. }
  1250. main ()
  1251. {
  1252.   exit (find_stack_direction() < 0);
  1253. }
  1254. EOF
  1255. eval $ac_compile
  1256. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1257.   
  1258. {
  1259. test -n "$verbose" && \
  1260. /bin/echo "    defining" STACK_DIRECTION to be "1"
  1261. /bin/echo "#define" STACK_DIRECTION "1" >> confdefs.h
  1262. DEFS="$DEFS -DSTACK_DIRECTION=1"
  1263. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}1\${ac_dD}
  1264. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}1\${ac_uD}
  1265. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}1\${ac_eD}
  1266. "
  1267. }
  1268.  
  1269.  
  1270. else
  1271.   
  1272. {
  1273. test -n "$verbose" && \
  1274. /bin/echo "    defining" STACK_DIRECTION to be "-1"
  1275. /bin/echo "#define" STACK_DIRECTION "-1" >> confdefs.h
  1276. DEFS="$DEFS -DSTACK_DIRECTION=-1"
  1277. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}-1\${ac_dD}
  1278. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}-1\${ac_uD}
  1279. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}-1\${ac_eD}
  1280. "
  1281. }
  1282.  
  1283. fi
  1284. fi
  1285. rm -fr conftest*
  1286. fi
  1287.  
  1288. test -n "$silent" || /bin/echo "checking for long file names"
  1289. ac_some_dir_failed=false
  1290. # Test for long file names in all the places we know might matter:
  1291. #      .        the current directory, where building will happen
  1292. #      /tmp        where it might want to write temporary files
  1293. #      /var/tmp        likewise
  1294. #      /usr/tmp        likewise
  1295. #      $prefix/lib    where we will be installing things
  1296. #      $exec_prefix/lib    likewise
  1297. # eval it to expand exec_prefix.
  1298. for ac_dir in `eval /bin/echo . /tmp $prefix/lib $exec_prefix/lib` ; do
  1299.   test -d $ac_dir || continue
  1300.   test -w $ac_dir || continue # It's less confusing to not echo anything here.
  1301.   (/bin/echo 1 > $ac_dir/conftest9012345) 2>/dev/null
  1302.   (/bin/echo 2 > $ac_dir/conftest9012346) 2>/dev/null
  1303.   val=`cat $ac_dir/conftest9012345 2>/dev/null`
  1304.   test -f $ac_dir/conftest9012345 && test "$val" = 1 || ac_some_dir_failed=true
  1305.   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2> /dev/null
  1306. done
  1307. $ac_some_dir_failed || 
  1308. {
  1309. test -n "$verbose" && \
  1310. /bin/echo "    defining HAVE_LONG_FILE_NAMES"
  1311. /bin/echo "#define" HAVE_LONG_FILE_NAMES "1" >> confdefs.h
  1312. DEFS="$DEFS -DHAVE_LONG_FILE_NAMES=1"
  1313. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LONG_FILE_NAMES\${ac_dB}HAVE_LONG_FILE_NAMES\${ac_dC}1\${ac_dD}
  1314. \${ac_uA}HAVE_LONG_FILE_NAMES\${ac_uB}HAVE_LONG_FILE_NAMES\${ac_uC}1\${ac_uD}
  1315. \${ac_eA}HAVE_LONG_FILE_NAMES\${ac_eB}HAVE_LONG_FILE_NAMES\${ac_eC}1\${ac_eD}
  1316. "
  1317. }
  1318.  
  1319.  
  1320. test -n "$silent" || /bin/echo "checking for Xenix"
  1321. cat > conftest.${ac_ext} <<EOF
  1322. #include "confdefs.h"
  1323. #if defined(M_XENIX) && !defined(M_UNIX)
  1324.   yes
  1325. #endif
  1326.  
  1327. EOF
  1328. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1329. if egrep "yes" conftest.out >/dev/null 2>&1; then
  1330.   rm -rf conftest*
  1331.   XENIX=1
  1332.  
  1333. fi
  1334. rm -f conftest*
  1335.  
  1336. if test -n "$XENIX"; then
  1337.   LIBS="$LIBS -lx"
  1338.   case "$DEFS" in
  1339.   *SYSNDIR*) ;;
  1340.   *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx.
  1341.   esac
  1342. fi
  1343.  
  1344. # Set default prefixes.
  1345. if test -n "$prefix"; then
  1346.   test -z "$exec_prefix" && exec_prefix='${prefix}' # Let make expand it.
  1347.   ac_prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  1348. fi
  1349. if test -n "$exec_prefix"; then
  1350.   ac_prsub="$ac_prsub
  1351. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
  1352. fi
  1353. # Any assignment to VPATH causes Sun make to only execute
  1354. # the first set of double-colon rules, so remove it if not needed.
  1355. # If there is a colon in the path, we need to keep it.
  1356. if test "x$srcdir" = x.; then
  1357.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1358. fi
  1359.  
  1360. # Quote sed substitution magic chars in DEFS.
  1361. cat >conftest.def <<EOF
  1362. $DEFS
  1363. EOF
  1364. ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
  1365. DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
  1366. rm -f conftest.def
  1367. # Substitute for predefined variables.
  1368.  
  1369. trap 'rm -f config.status; exit 1' 1 2 15
  1370. /bin/echo creating config.status
  1371. rm -f config.status
  1372. cat > config.status <<EOF
  1373. #!/bin/sh
  1374. # Generated automatically by configure.
  1375. # Run this file to recreate the current configuration.
  1376. # This directory was configured as follows,
  1377. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1378. #
  1379. # $0 $configure_args
  1380.  
  1381. ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
  1382. for ac_option
  1383. do
  1384.   case "\$ac_option" in
  1385.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1386.     /bin/echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
  1387.     exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
  1388.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1389.     /bin/echo "config.status generated by autoconf version 1.9"
  1390.     exit 0 ;;
  1391.   -help | --help | --hel | --he | --h)
  1392.     /bin/echo "\$ac_cs_usage"; exit 0 ;;
  1393.   *) /bin/echo "\$ac_cs_usage"; exit 1 ;;
  1394.   esac
  1395. done
  1396.  
  1397. trap 'rm -fr Makefile config.h conftest*; exit 1' 1 2 15
  1398. CC='$CC'
  1399. CPP='$CPP'
  1400. INSTALL='$INSTALL'
  1401. INSTALL_PROGRAM='$INSTALL_PROGRAM'
  1402. INSTALL_DATA='$INSTALL_DATA'
  1403. LIBOBJS='$LIBOBJS'
  1404. ALLOCA='$ALLOCA'
  1405. LIBS='$LIBS'
  1406. srcdir='$srcdir'
  1407. top_srcdir='$top_srcdir'
  1408. prefix='$prefix'
  1409. exec_prefix='$exec_prefix'
  1410. ac_prsub='$ac_prsub'
  1411. ac_vpsub='$ac_vpsub'
  1412. extrasub='$extrasub'
  1413. EOF
  1414. cat >> config.status <<\EOF
  1415.  
  1416. ac_given_srcdir=$srcdir
  1417.  
  1418. CONFIG_FILES=${CONFIG_FILES-"Makefile"}
  1419. for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
  1420.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1421.   ac_dir=`/bin/echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1422.   if test "$ac_dir" != "$ac_file"; then
  1423.     # The file is in a subdirectory.
  1424.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1425.     ac_dir_suffix="/$ac_dir"
  1426.   else
  1427.     ac_dir_suffix=
  1428.   fi
  1429.  
  1430.   # A "../" for each directory in $ac_dir_suffix.
  1431.   ac_dots=`/bin/echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1432.   case "$ac_given_srcdir" in
  1433.   .)  srcdir=.; top_srcdir="$ac_dots." ;;
  1434.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1435.   *) # Relative path.
  1436.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1437.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1438.   esac
  1439.  
  1440.   /bin/echo creating "$ac_file"
  1441.   rm -f "$ac_file"
  1442.   comment_str="Generated automatically from `/bin/echo $ac_file|sed 's|.*/||'`.in by configure."
  1443.   case "$ac_file" in
  1444.     *.c | *.h | *.C | *.cc | *.m )  /bin/echo "/* $comment_str */" > "$ac_file" ;;
  1445.     * )          /bin/echo "# $comment_str"     > "$ac_file" ;;
  1446.   esac
  1447.   sed -e "
  1448. $ac_prsub
  1449. $ac_vpsub
  1450. $extrasub
  1451. s%@CC@%$CC%g
  1452. s%@CPP@%$CPP%g
  1453. s%@INSTALL@%$INSTALL%g
  1454. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1455. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1456. s%@LIBOBJS@%$LIBOBJS%g
  1457. s%@ALLOCA@%$ALLOCA%g
  1458. s%@LIBS@%$LIBS%g
  1459. s%@srcdir@%$srcdir%g
  1460. s%@top_srcdir@%$top_srcdir%g
  1461. s%@prefix@%$prefix%g
  1462. s%@exec_prefix@%$exec_prefix%g
  1463. s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
  1464. fi; done
  1465.  
  1466. # These sed commands are put into ac_sed_defs when defining a macro.
  1467. # They are broken into pieces to make the sed script easier to manage.
  1468. # They are passed to sed as "A NAME B NAME C VALUE D", where NAME
  1469. # is the cpp macro being defined and VALUE is the value it is being given.
  1470. # Each defining turns into a single global substitution command.
  1471. # Hopefully no one uses "!" as a variable value.
  1472. # Other candidates for the sed separators, like , and @, do get used.
  1473. #
  1474. # ac_d sets the value in "#define NAME VALUE" lines.
  1475. ac_dA='s!^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  1476. ac_dB='\([     ][     ]*\)[^     ]*!\1#\2'
  1477. ac_dC='\3'
  1478. ac_dD='!g'
  1479. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  1480. ac_uA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1481. ac_uB='\([     ]\)!\1#\2define\3'
  1482. ac_uC=' '
  1483. ac_uD='\4!g'
  1484. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  1485. ac_eA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1486. ac_eB='$!\1#\2define\3'
  1487. ac_eC=' '
  1488. ac_eD='!g'
  1489. rm -f conftest.sed
  1490. EOF
  1491. # Turn off quoting long enough to insert the sed commands.
  1492. rm -f conftest.sh
  1493. cat > conftest.sh <<EOF
  1494. $ac_sed_defs
  1495. EOF
  1496.  
  1497. # Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
  1498. # on the size of here documents.
  1499.  
  1500. # Maximum number of lines to put in a single here document.
  1501. ac_max_sh_lines=9
  1502.  
  1503. while :
  1504. do
  1505.   # wc gives bogus results for an empty file on some AIX systems.
  1506.   ac_lines=`grep -c . conftest.sh`
  1507.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1508.   rm -f conftest.s1 conftest.s2
  1509.   sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -20.
  1510.   sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +21.
  1511.   # Write a limited-size here document to append to conftest.sed.
  1512.   /bin/echo 'cat >> conftest.sed <<CONFEOF' >> config.status
  1513.   cat conftest.s1 >> config.status
  1514.   /bin/echo 'CONFEOF' >> config.status
  1515.   rm -f conftest.s1 conftest.sh
  1516.   mv conftest.s2 conftest.sh
  1517. done
  1518. rm -f conftest.sh
  1519.  
  1520. # Now back to your regularly scheduled config.status.
  1521. cat >> config.status <<\EOF
  1522. # This sed command replaces #undef's with comments.  This is necessary, for
  1523. # example, in the case of _POSIX_SOURCE, which is predefined and required
  1524. # on some systems where configure will not decide to define it in
  1525. # config.h.
  1526. cat >> conftest.sed <<\CONFEOF
  1527. s,^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
  1528. CONFEOF
  1529. rm -f conftest.h
  1530. # Break up the sed commands because old seds have small limits.
  1531. ac_max_sed_lines=20
  1532.  
  1533. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  1534. for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
  1535.   /bin/echo creating $ac_file
  1536.  
  1537.   cp $ac_given_srcdir/$ac_file.in conftest.h1
  1538.   while :
  1539.   do
  1540.     ac_lines=`grep -c . conftest.sed`
  1541.     if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1542.     rm -f conftest.s1 conftest.s2 conftest.h2
  1543.     sed ${ac_max_sed_lines}q conftest.sed > conftest.s1 # Like head -20.
  1544.     sed 1,${ac_max_sed_lines}d conftest.sed > conftest.s2 # Like tail +21.
  1545.     sed -f conftest.s1 < conftest.h1 > conftest.h2
  1546.     rm -f conftest.s1 conftest.h1 conftest.sed
  1547.     mv conftest.h2 conftest.h1
  1548.     mv conftest.s2 conftest.sed
  1549.   done
  1550.   rm -f conftest.sed conftest.h
  1551.   /bin/echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  1552.   cat conftest.h1 >> conftest.h
  1553.   rm -f conftest.h1
  1554.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  1555.     # The file exists and we would not be changing it.
  1556.     /bin/echo "$ac_file is unchanged"
  1557.     rm -f conftest.h
  1558.   else
  1559.     rm -f $ac_file
  1560.     mv conftest.h $ac_file
  1561.   fi
  1562. fi; done
  1563.  
  1564.  
  1565.  
  1566. exit 0
  1567. EOF
  1568. chmod +x config.status
  1569. test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} config.status
  1570.  
  1571.