home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / gdbm-1.7.3-src.lha / gdbm-1.7.3 / configure < prev    next >
Encoding:
Text File  |  1994-06-22  |  41.5 KB  |  1,407 lines

  1. #!/bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf version 1.11 
  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.11"
  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=gdbmdefs.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. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  314. ac_cpp='${CPP}'
  315. ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
  316.  
  317.  
  318.  
  319. if test -z "$CC"; then
  320.   # Extract the first word of `gcc', so it can be a program name with args.
  321.   set ac_dummy gcc; ac_word=$2
  322.   test -n "$silent" || /bin/echo "checking for $ac_word"
  323.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  324.   for ac_dir in $PATH; do
  325.     test -z "$ac_dir" && ac_dir=.
  326.     if test -f $ac_dir/$ac_word; then
  327.       CC="gcc"
  328.       break
  329.     fi
  330.   done
  331.   IFS="$ac_save_ifs"
  332. fi
  333. test -z "$CC" && CC="cc"
  334. test -n "$CC" && test -n "$verbose" && /bin/echo "    setting CC to $CC"
  335.  
  336. # Find out if we are using GNU C, under whatever name.
  337. cat > conftest.c <<EOF
  338. #ifdef __GNUC__
  339.   yes
  340. #endif
  341. EOF
  342. ${CC-cc} -E conftest.c > conftest.out 2>&1
  343. if egrep yes conftest.out >/dev/null 2>&1; then
  344.   GCC=1 # For later tests.
  345. fi
  346. rm -f conftest*
  347.  
  348. test -n "$silent" || /bin/echo "checking how to run the C preprocessor"
  349. if test -z "$CPP"; then
  350.   # This must be in double quotes, not single quotes, because CPP may get
  351.   # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  352.   # make.  It must be expanded now.
  353.   CPP="${CC-cc} -E"
  354.   cat > conftest.${ac_ext} <<EOF
  355. #include "confdefs.h"
  356. #include <stdio.h>
  357. Syntax Error
  358. EOF
  359. # Some shells (Coherent) do redirections in the wrong order, so need
  360. # the parens.
  361. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  362. if test -z "$ac_err"; then
  363.   :
  364. else
  365.   rm -rf conftest*
  366.   CPP="${CC-cc} -E -traditional-cpp"
  367.   cat > conftest.${ac_ext} <<EOF
  368. #include "confdefs.h"
  369. #include <stdio.h>
  370. Syntax Error
  371. EOF
  372. # Some shells (Coherent) do redirections in the wrong order, so need
  373. # the parens.
  374. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  375. if test -z "$ac_err"; then
  376.   :
  377. else
  378.   rm -rf conftest*
  379.   CPP=/lib/cpp
  380. fi
  381. rm -f conftest*
  382. fi
  383. rm -f conftest*
  384. fi
  385. test -n "$verbose" && /bin/echo "    setting CPP to $CPP"
  386.  
  387. # Make sure to not get the incompatible SysV /etc/install and
  388. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  389. # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
  390. # or the AFS install, which mishandles nonexistent args, or
  391. # /usr/ucb/install on SVR4, which tries to use the nonexistent group
  392. # `staff', or /sbin/install on IRIX which has incompatible command-line
  393. # syntax.  Sigh.
  394. #
  395. #     On most BSDish systems install is in /usr/bin, not /usr/ucb
  396. #     anyway.
  397. # This turns out not to be true, so the mere pathname isn't an indication
  398. # of whether the program works.  What we really need is a set of tests for
  399. # the install program to see if it actually works in all the required ways.
  400. #
  401. # Avoid using ./install, which might have been erroneously created
  402. # by make from ./install.sh.
  403. if test -z "${INSTALL}"; then
  404.   test -n "$silent" || /bin/echo "checking for a BSD compatible install"
  405.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  406.   for ac_dir in $PATH; do
  407.     case "$ac_dir" in
  408.     ''|.|/gnu/etc|/sbin|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
  409.     *)
  410.       # OSF1 and SCO ODT 3.0 have their own names for install.
  411.       for ac_prog in installbsd scoinst install; do
  412.         if test -f $ac_dir/$ac_prog; then
  413.       if test $ac_prog = install &&
  414.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  415.         # AIX install.  It has an incompatible calling convention.
  416.         # OSF/1 installbsd also uses dspmsg, but is usable.
  417.         :
  418.       else
  419.         INSTALL="$ac_dir/$ac_prog -c"
  420.         break 2
  421.       fi
  422.     fi
  423.       done
  424.       ;;
  425.     esac
  426.   done
  427.   IFS="$ac_save_ifs"
  428. fi
  429.  
  430. if test -z "$INSTALL"; then
  431.   # As a last resort, use the slow shell script.
  432.   for ac_dir in ${srcdir} ${srcdir}/.. ${srcdir}/../..; do
  433.     if test -f $ac_dir/install.sh; then
  434.       INSTALL="$ac_dir/install.sh -c"; break
  435.     fi
  436.   done
  437. fi
  438. if test -z "$INSTALL"; then
  439.   /bin/echo "configure: can not find install.sh in ${srcdir} or ${srcdir}/.. or ${srcdir}/../.." >&2; exit 1
  440. fi
  441. test -n "$verbose" && /bin/echo "    setting INSTALL to $INSTALL"
  442.  
  443. # Use test -z because SunOS4 sh mishandles ${INSTALL_PROGRAM-'${INSTALL}'}.
  444. # It thinks the first close brace ends the variable substitution.
  445. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  446. test -n "$verbose" && /bin/echo "    setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
  447.  
  448. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  449. test -n "$verbose" && /bin/echo "    setting INSTALL_DATA to $INSTALL_DATA"
  450.  
  451. if test -z "$RANLIB"; then
  452.   # Extract the first word of `ranlib', so it can be a program name with args.
  453.   set ac_dummy ranlib; ac_word=$2
  454.   test -n "$silent" || /bin/echo "checking for $ac_word"
  455.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  456.   for ac_dir in $PATH; do
  457.     test -z "$ac_dir" && ac_dir=.
  458.     if test -f $ac_dir/$ac_word; then
  459.       RANLIB="ranlib"
  460.       break
  461.     fi
  462.   done
  463.   IFS="$ac_save_ifs"
  464. fi
  465. test -z "$RANLIB" && RANLIB=":"
  466. test -n "$RANLIB" && test -n "$verbose" && /bin/echo "    setting RANLIB to $RANLIB"
  467.  
  468. test -n "$silent" || /bin/echo "checking size of int"
  469. cat > conftest.${ac_ext} <<EOF
  470. #include "confdefs.h"
  471. #include <stdio.h>
  472. main()
  473. {
  474.   FILE *f=fopen("conftestval", "w");
  475.   if (!f) exit(1);
  476.   fprintf(f, "%d\n", sizeof(int));
  477.   exit(0);
  478. }
  479. EOF
  480. eval $ac_compile
  481. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  482.   ac_size=`cat conftestval`
  483.  
  484. else
  485.   /bin/echo "configure: can not determine size of int" >&2; exit 1
  486. fi
  487. rm -fr conftest*
  488.  
  489. {
  490. test -n "$verbose" && \
  491. /bin/echo "    defining" SIZEOF_INT to be "$ac_size"
  492. /bin/echo "#define" SIZEOF_INT "$ac_size" >> confdefs.h
  493. DEFS="$DEFS -DSIZEOF_INT=$ac_size"
  494. ac_sed_defs="${ac_sed_defs}\${ac_dA}SIZEOF_INT\${ac_dB}SIZEOF_INT\${ac_dC}$ac_size\${ac_dD}
  495. \${ac_uA}SIZEOF_INT\${ac_uB}SIZEOF_INT\${ac_uC}$ac_size\${ac_uD}
  496. \${ac_eA}SIZEOF_INT\${ac_eB}SIZEOF_INT\${ac_eC}$ac_size\${ac_eD}
  497. "
  498. }
  499.  
  500. test -n "$silent" || /bin/echo "checking size of long"
  501. cat > conftest.${ac_ext} <<EOF
  502. #include "confdefs.h"
  503. #include <stdio.h>
  504. main()
  505. {
  506.   FILE *f=fopen("conftestval", "w");
  507.   if (!f) exit(1);
  508.   fprintf(f, "%d\n", sizeof(long));
  509.   exit(0);
  510. }
  511. EOF
  512. eval $ac_compile
  513. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  514.   ac_size=`cat conftestval`
  515.  
  516. else
  517.   /bin/echo "configure: can not determine size of long" >&2; exit 1
  518. fi
  519. rm -fr conftest*
  520.  
  521. {
  522. test -n "$verbose" && \
  523. /bin/echo "    defining" SIZEOF_LONG to be "$ac_size"
  524. /bin/echo "#define" SIZEOF_LONG "$ac_size" >> confdefs.h
  525. DEFS="$DEFS -DSIZEOF_LONG=$ac_size"
  526. ac_sed_defs="${ac_sed_defs}\${ac_dA}SIZEOF_LONG\${ac_dB}SIZEOF_LONG\${ac_dC}$ac_size\${ac_dD}
  527. \${ac_uA}SIZEOF_LONG\${ac_uB}SIZEOF_LONG\${ac_uC}$ac_size\${ac_uD}
  528. \${ac_eA}SIZEOF_LONG\${ac_eB}SIZEOF_LONG\${ac_eC}$ac_size\${ac_eD}
  529. "
  530. }
  531.  
  532. test -n "$silent" || /bin/echo "checking byte ordering"
  533. cat > conftest.${ac_ext} <<EOF
  534. #include "confdefs.h"
  535. main () {
  536.   /* Are we little or big endian?  From Harbison&Steele.  */
  537.   union
  538.   {
  539.     long l;
  540.     char c[sizeof (long)];
  541.   } u;
  542.   u.l = 1;
  543.   exit (u.c[sizeof (long) - 1] == 1);
  544. }
  545. EOF
  546. eval $ac_compile
  547. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  548.   :
  549. else
  550.   
  551. {
  552. test -n "$verbose" && \
  553. /bin/echo "    defining WORDS_BIGENDIAN"
  554. /bin/echo "#define" WORDS_BIGENDIAN "1" >> confdefs.h
  555. DEFS="$DEFS -DWORDS_BIGENDIAN=1"
  556. ac_sed_defs="${ac_sed_defs}\${ac_dA}WORDS_BIGENDIAN\${ac_dB}WORDS_BIGENDIAN\${ac_dC}1\${ac_dD}
  557. \${ac_uA}WORDS_BIGENDIAN\${ac_uB}WORDS_BIGENDIAN\${ac_uC}1\${ac_uD}
  558. \${ac_eA}WORDS_BIGENDIAN\${ac_eB}WORDS_BIGENDIAN\${ac_eC}1\${ac_eD}
  559. "
  560. }
  561.  
  562. fi
  563. rm -fr conftest*
  564.  
  565. ac_prog='/* Ultrix mips cc rejects this.  */
  566. typedef int charset[2]; const charset x;
  567. /* SunOS 4.1.1 cc rejects this.  */
  568. char const *const *ccp;
  569. char **p;
  570. /* AIX XL C 1.02.0.0 rejects this.
  571.    It does not let you subtract one const X* pointer from another in an arm
  572.    of an if-expression whose if-part is not a constant expression */
  573. const char *g = "string";
  574. ccp = &g + (g ? g-g : 0);
  575. /* HPUX 7.0 cc rejects these. */
  576. ++ccp;
  577. p = (char**) ccp;
  578. ccp = (char const *const *) p;
  579. { /* SCO 3.2v4 cc rejects this.  */
  580.   char *t;
  581.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  582.  
  583.   *t++ = 0;
  584. }
  585. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  586.   int x[] = {25,17};
  587.   const int *foo = &x[0];
  588.   ++foo;
  589. }
  590. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  591.   typedef const int *iptr;
  592.   iptr p = 0;
  593.   ++p;
  594. }
  595. { /* AIX XL C 1.02.0.0 rejects this saying
  596.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  597.   struct s { int j; const int *ap[3]; };
  598.   struct s *b; b->j = 5;
  599. }
  600. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  601.   const int foo = 10;
  602. }'
  603. test -n "$silent" || /bin/echo "checking for lack of working const"
  604. cat > conftest.${ac_ext} <<EOF
  605. #include "confdefs.h"
  606.  
  607. int main() { return 0; }
  608. int t() { $ac_prog; return 0; }
  609. EOF
  610. if eval $ac_compile; then
  611.   :
  612. else
  613.   rm -rf conftest*
  614.   
  615. {
  616. test -n "$verbose" && \
  617. /bin/echo "    defining" const to be empty
  618. /bin/echo "#define" const "" >> confdefs.h
  619. DEFS="$DEFS -Dconst="
  620. ac_sed_defs="${ac_sed_defs}\${ac_dA}const\${ac_dB}const\${ac_dC}\${ac_dD}
  621. \${ac_uA}const\${ac_uB}const\${ac_uC}\${ac_uD}
  622. \${ac_eA}const\${ac_eB}const\${ac_eC}\${ac_eD}
  623. "
  624. }
  625.  
  626. fi
  627. rm -f conftest*
  628.  
  629. for ac_hdr in stdlib.h string.h sys/file.h unistd.h fcntl.h sys/types.h
  630. do
  631. ac_tr_hdr=HAVE_`/bin/echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
  632. test -n "$silent" || /bin/echo "checking for ${ac_hdr}"
  633. cat > conftest.${ac_ext} <<EOF
  634. #include "confdefs.h"
  635. #include <${ac_hdr}>
  636. EOF
  637. # Some shells (Coherent) do redirections in the wrong order, so need
  638. # the parens.
  639. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  640. if test -z "$ac_err"; then
  641.   rm -rf conftest*
  642.   
  643. {
  644. test -n "$verbose" && \
  645. /bin/echo "    defining ${ac_tr_hdr}"
  646. /bin/echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
  647. DEFS="$DEFS -D${ac_tr_hdr}=1"
  648. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
  649. \${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
  650. \${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
  651. "
  652. }
  653.  
  654.  
  655. fi
  656. rm -f conftest*
  657. done
  658.  
  659. for ac_hdr in memory.h
  660. do
  661. ac_tr_hdr=HAVE_`/bin/echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
  662. test -n "$silent" || /bin/echo "checking for ${ac_hdr}"
  663. cat > conftest.${ac_ext} <<EOF
  664. #include "confdefs.h"
  665. #include <${ac_hdr}>
  666. EOF
  667. # Some shells (Coherent) do redirections in the wrong order, so need
  668. # the parens.
  669. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  670. if test -z "$ac_err"; then
  671.   rm -rf conftest*
  672.   
  673. {
  674. test -n "$verbose" && \
  675. /bin/echo "    defining ${ac_tr_hdr}"
  676. /bin/echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
  677. DEFS="$DEFS -D${ac_tr_hdr}=1"
  678. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
  679. \${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
  680. \${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
  681. "
  682. }
  683.  
  684.  
  685. fi
  686. rm -f conftest*
  687. done
  688.  
  689. ac_save_LIBS="${LIBS}"
  690. LIBS="${LIBS} -ldbm"
  691. ac_have_lib=""
  692. test -n "$silent" || /bin/echo "checking for -ldbm"
  693. cat > conftest.${ac_ext} <<EOF
  694. #include "confdefs.h"
  695.  
  696. int main() { return 0; }
  697. int t() { main();; return 0; }
  698. EOF
  699. if eval $ac_compile; then
  700.   rm -rf conftest*
  701.   ac_have_lib="1"
  702.  
  703. fi
  704. rm -f conftest*
  705. LIBS="${ac_save_LIBS}"
  706. if test -n "${ac_have_lib}"; then
  707.    
  708. {
  709. test -n "$verbose" && \
  710. /bin/echo "    defining HAVE_LIBDBM"
  711. /bin/echo "#define" HAVE_LIBDBM "1" >> confdefs.h
  712. DEFS="$DEFS -DHAVE_LIBDBM=1"
  713. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBDBM\${ac_dB}HAVE_LIBDBM\${ac_dC}1\${ac_dD}
  714. \${ac_uA}HAVE_LIBDBM\${ac_uB}HAVE_LIBDBM\${ac_uC}1\${ac_uD}
  715. \${ac_eA}HAVE_LIBDBM\${ac_eB}HAVE_LIBDBM\${ac_eC}1\${ac_eD}
  716. "
  717. }
  718.  
  719.    LIBS="${LIBS} -ldbm"
  720. fi
  721.  
  722. ac_save_LIBS="${LIBS}"
  723. LIBS="${LIBS} -lndbm"
  724. ac_have_lib=""
  725. test -n "$silent" || /bin/echo "checking for -lndbm"
  726. cat > conftest.${ac_ext} <<EOF
  727. #include "confdefs.h"
  728.  
  729. int main() { return 0; }
  730. int t() { main();; return 0; }
  731. EOF
  732. if eval $ac_compile; then
  733.   rm -rf conftest*
  734.   ac_have_lib="1"
  735.  
  736. fi
  737. rm -f conftest*
  738. LIBS="${ac_save_LIBS}"
  739. if test -n "${ac_have_lib}"; then
  740.    
  741. {
  742. test -n "$verbose" && \
  743. /bin/echo "    defining HAVE_LIBNDBM"
  744. /bin/echo "#define" HAVE_LIBNDBM "1" >> confdefs.h
  745. DEFS="$DEFS -DHAVE_LIBNDBM=1"
  746. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBNDBM\${ac_dB}HAVE_LIBNDBM\${ac_dC}1\${ac_dD}
  747. \${ac_uA}HAVE_LIBNDBM\${ac_uB}HAVE_LIBNDBM\${ac_uC}1\${ac_uD}
  748. \${ac_eA}HAVE_LIBNDBM\${ac_eB}HAVE_LIBNDBM\${ac_eC}1\${ac_eD}
  749. "
  750. }
  751.  
  752.    LIBS="${LIBS} -lndbm"
  753. fi
  754.  
  755. for ac_func in rename ftruncate flock bcopy fsync
  756. do
  757. ac_tr_func=HAVE_`/bin/echo $ac_func | tr '[a-z]' '[A-Z]'`
  758. test -n "$silent" || /bin/echo "checking for ${ac_func}"
  759. cat > conftest.${ac_ext} <<EOF
  760. #include "confdefs.h"
  761. #include <ctype.h>
  762. int main() { return 0; }
  763. int t() { 
  764. /* The GNU C library defines this for functions which it implements
  765.     to always fail with ENOSYS.  Some functions are actually named
  766.     something starting with __ and the normal name is an alias.  */
  767. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  768. choke me
  769. #else
  770. /* Override any gcc2 internal prototype to avoid an error.  */
  771. extern char ${ac_func}(); ${ac_func}();
  772. #endif
  773. ; return 0; }
  774. EOF
  775. if eval $ac_compile; then
  776.   rm -rf conftest*
  777.   {
  778. test -n "$verbose" && \
  779. /bin/echo "    defining ${ac_tr_func}"
  780. /bin/echo "#define" ${ac_tr_func} "1" >> confdefs.h
  781. DEFS="$DEFS -D${ac_tr_func}=1"
  782. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
  783. \${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
  784. \${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
  785. "
  786. }
  787.  
  788.  
  789. fi
  790. rm -f conftest*
  791. done
  792.  
  793. for ac_func in getopt
  794. do
  795. test -n "$silent" || /bin/echo "checking for ${ac_func}"
  796. cat > conftest.${ac_ext} <<EOF
  797. #include "confdefs.h"
  798. #include <ctype.h>
  799. int main() { return 0; }
  800. int t() { 
  801. /* The GNU C library defines this for functions which it implements
  802.     to always fail with ENOSYS.  Some functions are actually named
  803.     something starting with __ and the normal name is an alias.  */
  804. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  805. choke me
  806. #else
  807. /* Override any gcc2 internal prototype to avoid an error.  */
  808. extern char ${ac_func}(); ${ac_func}();
  809. #endif
  810. ; return 0; }
  811. EOF
  812. if eval $ac_compile; then
  813.   :
  814. else
  815.   rm -rf conftest*
  816.   LIBOBJS="$LIBOBJS ${ac_func}.o"
  817. test -n "$verbose" && /bin/echo "    using ${ac_func}.o instead"
  818. fi
  819. rm -f conftest*
  820.  
  821. done
  822.  
  823. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  824. # for constant arguments.  Useless!
  825. test -n "$silent" || /bin/echo "checking for working alloca.h"
  826. cat > conftest.${ac_ext} <<EOF
  827. #include "confdefs.h"
  828. #include <alloca.h>
  829. int main() { return 0; }
  830. int t() { char *p = alloca(2 * sizeof(int));; return 0; }
  831. EOF
  832. if eval $ac_compile; then
  833.   rm -rf conftest*
  834.   
  835. {
  836. test -n "$verbose" && \
  837. /bin/echo "    defining HAVE_ALLOCA_H"
  838. /bin/echo "#define" HAVE_ALLOCA_H "1" >> confdefs.h
  839. DEFS="$DEFS -DHAVE_ALLOCA_H=1"
  840. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA_H\${ac_dB}HAVE_ALLOCA_H\${ac_dC}1\${ac_dD}
  841. \${ac_uA}HAVE_ALLOCA_H\${ac_uB}HAVE_ALLOCA_H\${ac_uC}1\${ac_uD}
  842. \${ac_eA}HAVE_ALLOCA_H\${ac_eB}HAVE_ALLOCA_H\${ac_eC}1\${ac_eD}
  843. "
  844. }
  845.  
  846.  
  847. fi
  848. rm -f conftest*
  849.  
  850. ac_decl="#ifdef __GNUC__
  851. #define alloca __builtin_alloca
  852. #else
  853. #if HAVE_ALLOCA_H
  854. #include <alloca.h>
  855. #else
  856. #ifdef _AIX
  857.  #pragma alloca
  858. #else
  859. char *alloca ();
  860. #endif
  861. #endif
  862. #endif
  863. "
  864. test -n "$silent" || /bin/echo "checking for alloca"
  865. cat > conftest.${ac_ext} <<EOF
  866. #include "confdefs.h"
  867. $ac_decl
  868. int main() { return 0; }
  869. int t() { char *p = (char *) alloca(1);; return 0; }
  870. EOF
  871. if eval $ac_compile; then
  872.   rm -rf conftest*
  873.   
  874. {
  875. test -n "$verbose" && \
  876. /bin/echo "    defining HAVE_ALLOCA"
  877. /bin/echo "#define" HAVE_ALLOCA "1" >> confdefs.h
  878. DEFS="$DEFS -DHAVE_ALLOCA=1"
  879. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALLOCA\${ac_dB}HAVE_ALLOCA\${ac_dC}1\${ac_dD}
  880. \${ac_uA}HAVE_ALLOCA\${ac_uB}HAVE_ALLOCA\${ac_uC}1\${ac_uD}
  881. \${ac_eA}HAVE_ALLOCA\${ac_eB}HAVE_ALLOCA\${ac_eC}1\${ac_eD}
  882. "
  883. }
  884.  
  885.  
  886. else
  887.   rm -rf conftest*
  888.   ac_alloca_missing=1
  889. cat > conftest.${ac_ext} <<EOF
  890. #include "confdefs.h"
  891.  
  892. #if defined(CRAY) && ! defined(CRAY2)
  893. winnitude
  894. #else
  895. lossage
  896. #endif
  897.  
  898. EOF
  899. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  900. if egrep "winnitude" conftest.out >/dev/null 2>&1; then
  901.   rm -rf conftest*
  902.   test -n "$silent" || /bin/echo "checking for _getb67"
  903. cat > conftest.${ac_ext} <<EOF
  904. #include "confdefs.h"
  905. #include <ctype.h>
  906. int main() { return 0; }
  907. int t() { 
  908. /* The GNU C library defines this for functions which it implements
  909.     to always fail with ENOSYS.  Some functions are actually named
  910.     something starting with __ and the normal name is an alias.  */
  911. #if defined (__stub__getb67) || defined (__stub____getb67)
  912. choke me
  913. #else
  914. /* Override any gcc2 internal prototype to avoid an error.  */
  915. extern char _getb67(); _getb67();
  916. #endif
  917. ; return 0; }
  918. EOF
  919. if eval $ac_compile; then
  920.   rm -rf conftest*
  921.   {
  922. test -n "$verbose" && \
  923. /bin/echo "    defining" CRAY_STACKSEG_END to be "_getb67"
  924. /bin/echo "#define" CRAY_STACKSEG_END "_getb67" >> confdefs.h
  925. DEFS="$DEFS -DCRAY_STACKSEG_END=_getb67"
  926. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}_getb67\${ac_dD}
  927. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}_getb67\${ac_uD}
  928. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}_getb67\${ac_eD}
  929. "
  930. }
  931.  
  932.  
  933. else
  934.   rm -rf conftest*
  935.   test -n "$silent" || /bin/echo "checking for GETB67"
  936. cat > conftest.${ac_ext} <<EOF
  937. #include "confdefs.h"
  938. #include <ctype.h>
  939. int main() { return 0; }
  940. int t() { 
  941. /* The GNU C library defines this for functions which it implements
  942.     to always fail with ENOSYS.  Some functions are actually named
  943.     something starting with __ and the normal name is an alias.  */
  944. #if defined (__stub_GETB67) || defined (__stub___GETB67)
  945. choke me
  946. #else
  947. /* Override any gcc2 internal prototype to avoid an error.  */
  948. extern char GETB67(); GETB67();
  949. #endif
  950. ; return 0; }
  951. EOF
  952. if eval $ac_compile; then
  953.   rm -rf conftest*
  954.   {
  955. test -n "$verbose" && \
  956. /bin/echo "    defining" CRAY_STACKSEG_END to be "GETB67"
  957. /bin/echo "#define" CRAY_STACKSEG_END "GETB67" >> confdefs.h
  958. DEFS="$DEFS -DCRAY_STACKSEG_END=GETB67"
  959. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}GETB67\${ac_dD}
  960. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}GETB67\${ac_uD}
  961. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}GETB67\${ac_eD}
  962. "
  963. }
  964.  
  965.  
  966. else
  967.   rm -rf conftest*
  968.   test -n "$silent" || /bin/echo "checking for getb67"
  969. cat > conftest.${ac_ext} <<EOF
  970. #include "confdefs.h"
  971. #include <ctype.h>
  972. int main() { return 0; }
  973. int t() { 
  974. /* The GNU C library defines this for functions which it implements
  975.     to always fail with ENOSYS.  Some functions are actually named
  976.     something starting with __ and the normal name is an alias.  */
  977. #if defined (__stub_getb67) || defined (__stub___getb67)
  978. choke me
  979. #else
  980. /* Override any gcc2 internal prototype to avoid an error.  */
  981. extern char getb67(); getb67();
  982. #endif
  983. ; return 0; }
  984. EOF
  985. if eval $ac_compile; then
  986.   rm -rf conftest*
  987.   {
  988. test -n "$verbose" && \
  989. /bin/echo "    defining" CRAY_STACKSEG_END to be "getb67"
  990. /bin/echo "#define" CRAY_STACKSEG_END "getb67" >> confdefs.h
  991. DEFS="$DEFS -DCRAY_STACKSEG_END=getb67"
  992. ac_sed_defs="${ac_sed_defs}\${ac_dA}CRAY_STACKSEG_END\${ac_dB}CRAY_STACKSEG_END\${ac_dC}getb67\${ac_dD}
  993. \${ac_uA}CRAY_STACKSEG_END\${ac_uB}CRAY_STACKSEG_END\${ac_uC}getb67\${ac_uD}
  994. \${ac_eA}CRAY_STACKSEG_END\${ac_eB}CRAY_STACKSEG_END\${ac_eC}getb67\${ac_eD}
  995. "
  996. }
  997.  
  998.  
  999. fi
  1000. rm -f conftest*
  1001.  
  1002. fi
  1003. rm -f conftest*
  1004.  
  1005. fi
  1006. rm -f conftest*
  1007.  
  1008.  
  1009. fi
  1010. rm -f conftest*
  1011.  
  1012.  
  1013. fi
  1014. rm -f conftest*
  1015.  
  1016. if test -n "$ac_alloca_missing"; then
  1017.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  1018.   # that cause trouble.  Some versions do not even contain alloca or
  1019.   # contain a buggy version.  If you still want to use their alloca,
  1020.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  1021.   ALLOCA=alloca.o
  1022.   
  1023. {
  1024. test -n "$verbose" && \
  1025. /bin/echo "    defining C_ALLOCA"
  1026. /bin/echo "#define" C_ALLOCA "1" >> confdefs.h
  1027. DEFS="$DEFS -DC_ALLOCA=1"
  1028. ac_sed_defs="${ac_sed_defs}\${ac_dA}C_ALLOCA\${ac_dB}C_ALLOCA\${ac_dC}1\${ac_dD}
  1029. \${ac_uA}C_ALLOCA\${ac_uB}C_ALLOCA\${ac_uC}1\${ac_uD}
  1030. \${ac_eA}C_ALLOCA\${ac_eB}C_ALLOCA\${ac_eC}1\${ac_eD}
  1031. "
  1032. }
  1033.  
  1034.  
  1035.   test -n "$silent" || /bin/echo "checking stack direction for C alloca"
  1036.   test -n "$silent" || /bin/echo "checking whether cross-compiling"
  1037. # If we cannot run a trivial program, we must be cross compiling.
  1038. cat > conftest.${ac_ext} <<EOF
  1039. #include "confdefs.h"
  1040. main(){exit(0);}
  1041. EOF
  1042. eval $ac_compile
  1043. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1044.   :
  1045. else
  1046.   cross_compiling=1
  1047. fi
  1048. rm -fr conftest*
  1049.  
  1050. if test -n "$cross_compiling"
  1051. then
  1052.   
  1053. {
  1054. test -n "$verbose" && \
  1055. /bin/echo "    defining" STACK_DIRECTION to be "0"
  1056. /bin/echo "#define" STACK_DIRECTION "0" >> confdefs.h
  1057. DEFS="$DEFS -DSTACK_DIRECTION=0"
  1058. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}0\${ac_dD}
  1059. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}0\${ac_uD}
  1060. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}0\${ac_eD}
  1061. "
  1062. }
  1063.  
  1064. else
  1065. cat > conftest.${ac_ext} <<EOF
  1066. #include "confdefs.h"
  1067. find_stack_direction ()
  1068. {
  1069.   static char *addr = 0;
  1070.   auto char dummy;
  1071.   if (addr == 0)
  1072.     {
  1073.       addr = &dummy;
  1074.       return find_stack_direction ();
  1075.     }
  1076.   else
  1077.     return (&dummy > addr) ? 1 : -1;
  1078. }
  1079. main ()
  1080. {
  1081.   exit (find_stack_direction() < 0);
  1082. }
  1083. EOF
  1084. eval $ac_compile
  1085. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1086.   
  1087. {
  1088. test -n "$verbose" && \
  1089. /bin/echo "    defining" STACK_DIRECTION to be "1"
  1090. /bin/echo "#define" STACK_DIRECTION "1" >> confdefs.h
  1091. DEFS="$DEFS -DSTACK_DIRECTION=1"
  1092. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}1\${ac_dD}
  1093. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}1\${ac_uD}
  1094. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}1\${ac_eD}
  1095. "
  1096. }
  1097.  
  1098.  
  1099. else
  1100.   
  1101. {
  1102. test -n "$verbose" && \
  1103. /bin/echo "    defining" STACK_DIRECTION to be "-1"
  1104. /bin/echo "#define" STACK_DIRECTION "-1" >> confdefs.h
  1105. DEFS="$DEFS -DSTACK_DIRECTION=-1"
  1106. ac_sed_defs="${ac_sed_defs}\${ac_dA}STACK_DIRECTION\${ac_dB}STACK_DIRECTION\${ac_dC}-1\${ac_dD}
  1107. \${ac_uA}STACK_DIRECTION\${ac_uB}STACK_DIRECTION\${ac_uC}-1\${ac_uD}
  1108. \${ac_eA}STACK_DIRECTION\${ac_eB}STACK_DIRECTION\${ac_eC}-1\${ac_eD}
  1109. "
  1110. }
  1111.  
  1112. fi
  1113. fi
  1114. rm -fr conftest*
  1115. fi
  1116.  
  1117. test -n "$silent" || /bin/echo "checking for off_t in sys/types.h"
  1118. /bin/echo '#include "confdefs.h"
  1119. #include <sys/types.h>' > conftest.${ac_ext}
  1120. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1121. if egrep "off_t" conftest.out >/dev/null 2>&1; then
  1122.   :
  1123. else
  1124.   rm -rf conftest*
  1125.   
  1126. {
  1127. test -n "$verbose" && \
  1128. /bin/echo "    defining" off_t to be "long"
  1129. /bin/echo "#define" off_t "long" >> confdefs.h
  1130. DEFS="$DEFS -Doff_t=long"
  1131. ac_sed_defs="${ac_sed_defs}\${ac_dA}off_t\${ac_dB}off_t\${ac_dC}long\${ac_dD}
  1132. \${ac_uA}off_t\${ac_uB}off_t\${ac_uC}long\${ac_uD}
  1133. \${ac_eA}off_t\${ac_eB}off_t\${ac_eC}long\${ac_eD}
  1134. "
  1135. }
  1136.  
  1137. fi
  1138. rm -f conftest*
  1139.  
  1140. test -n "$silent" || /bin/echo "checking for st_blksize in struct stat"
  1141. cat > conftest.${ac_ext} <<EOF
  1142. #include "confdefs.h"
  1143. #include <sys/types.h>
  1144. #include <sys/stat.h>
  1145. int main() { return 0; }
  1146. int t() { struct stat s; s.st_blksize;; return 0; }
  1147. EOF
  1148. if eval $ac_compile; then
  1149.   rm -rf conftest*
  1150.   
  1151. {
  1152. test -n "$verbose" && \
  1153. /bin/echo "    defining HAVE_ST_BLKSIZE"
  1154. /bin/echo "#define" HAVE_ST_BLKSIZE "1" >> confdefs.h
  1155. DEFS="$DEFS -DHAVE_ST_BLKSIZE=1"
  1156. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ST_BLKSIZE\${ac_dB}HAVE_ST_BLKSIZE\${ac_dC}1\${ac_dD}
  1157. \${ac_uA}HAVE_ST_BLKSIZE\${ac_uB}HAVE_ST_BLKSIZE\${ac_uC}1\${ac_uD}
  1158. \${ac_eA}HAVE_ST_BLKSIZE\${ac_eB}HAVE_ST_BLKSIZE\${ac_eC}1\${ac_eD}
  1159. "
  1160. }
  1161.  
  1162.  
  1163. fi
  1164. rm -f conftest*
  1165.  
  1166.  
  1167. # The preferred way to propogate these variables is regular @ substitutions.
  1168. if test -n "$prefix"; then
  1169.   ac_prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  1170. else
  1171.   prefix=/usr/local
  1172. fi
  1173. if test -n "$exec_prefix"; then
  1174.   ac_prsub="$ac_prsub
  1175. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
  1176. else
  1177.   exec_prefix='${prefix}' # Let make expand it.
  1178. fi
  1179.  
  1180. # Any assignment to VPATH causes Sun make to only execute
  1181. # the first set of double-colon rules, so remove it if not needed.
  1182. # If there is a colon in the path, we need to keep it.
  1183. if test "x$srcdir" = x.; then
  1184.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1185. fi
  1186.  
  1187. # Quote sed substitution magic chars in DEFS.
  1188. cat >conftest.def <<EOF
  1189. $DEFS
  1190. EOF
  1191. ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
  1192. DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
  1193. rm -f conftest.def
  1194. # Substitute for predefined variables.
  1195.  
  1196. trap 'rm -f config.status; exit 1' 1 2 15
  1197. /bin/echo creating config.status
  1198. # Some systems, like AmigaDOS, won't allow you to remove a script that is
  1199. # being executed, so just move it out of the way instead.
  1200. if test -f config.status; then mv config.status config.status.old; else true; fi
  1201. cat > config.status <<EOF
  1202. #!/bin/sh
  1203. # Generated automatically by configure.
  1204. # Run this file to recreate the current configuration.
  1205. # This directory was configured as follows,
  1206. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1207. #
  1208. # $0 $configure_args
  1209.  
  1210. ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
  1211. for ac_option
  1212. do
  1213.   case "\$ac_option" in
  1214.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1215.     /bin/echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
  1216.     exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
  1217.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1218.     /bin/echo "config.status generated by autoconf version 1.11"
  1219.     exit 0 ;;
  1220.   -help | --help | --hel | --he | --h)
  1221.     /bin/echo "\$ac_cs_usage"; exit 0 ;;
  1222.   *) /bin/echo "\$ac_cs_usage"; exit 1 ;;
  1223.   esac
  1224. done
  1225.  
  1226. trap 'rm -fr Makefile autoconf.h conftest*; exit 1' 1 2 15
  1227. CC='$CC'
  1228. CPP='$CPP'
  1229. INSTALL='$INSTALL'
  1230. INSTALL_PROGRAM='$INSTALL_PROGRAM'
  1231. INSTALL_DATA='$INSTALL_DATA'
  1232. RANLIB='$RANLIB'
  1233. LIBOBJS='$LIBOBJS'
  1234. ALLOCA='$ALLOCA'
  1235. LIBS='$LIBS'
  1236. srcdir='$srcdir'
  1237. top_srcdir='$top_srcdir'
  1238. prefix='$prefix'
  1239. exec_prefix='$exec_prefix'
  1240. ac_prsub='$ac_prsub'
  1241. ac_vpsub='$ac_vpsub'
  1242. extrasub='$extrasub'
  1243. EOF
  1244. cat >> config.status <<\EOF
  1245.  
  1246. ac_given_srcdir=$srcdir
  1247.  
  1248. CONFIG_FILES=${CONFIG_FILES-"Makefile"}
  1249. for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
  1250.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1251.   ac_dir=`/bin/echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1252.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1253.     # The file is in a subdirectory.
  1254.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1255.     ac_dir_suffix="/$ac_dir"
  1256.   else
  1257.     ac_dir_suffix=
  1258.   fi
  1259.  
  1260.   # A "../" for each directory in $ac_dir_suffix.
  1261.   ac_dots=`/bin/echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1262.   case "$ac_given_srcdir" in
  1263.   .)  srcdir=.
  1264.       if test -z "$ac_dir_suffix"; then top_srcdir=.
  1265.       else top_srcdir=`/bin/echo $ac_dots|sed 's%/$%%'`; fi ;;
  1266.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1267.   *) # Relative path.
  1268.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1269.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1270.   esac
  1271.  
  1272.   /bin/echo creating "$ac_file"
  1273.   rm -f "$ac_file"
  1274.   comment_str="Generated automatically from `/bin/echo $ac_file|sed 's|.*/||'`.in by configure."
  1275.   case "$ac_file" in
  1276.     *.c | *.h | *.C | *.cc | *.m )  /bin/echo "/* $comment_str */" > "$ac_file" ;;
  1277.     * )          /bin/echo "# $comment_str"     > "$ac_file" ;;
  1278.   esac
  1279.   sed -e "
  1280. $ac_prsub
  1281. $ac_vpsub
  1282. $extrasub
  1283. s%@CC@%$CC%g
  1284. s%@CPP@%$CPP%g
  1285. s%@INSTALL@%$INSTALL%g
  1286. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1287. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1288. s%@RANLIB@%$RANLIB%g
  1289. s%@LIBOBJS@%$LIBOBJS%g
  1290. s%@ALLOCA@%$ALLOCA%g
  1291. s%@LIBS@%$LIBS%g
  1292. s%@srcdir@%$srcdir%g
  1293. s%@top_srcdir@%$top_srcdir%g
  1294. s%@prefix@%$prefix%g
  1295. s%@exec_prefix@%$exec_prefix%g
  1296. s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
  1297. fi; done
  1298.  
  1299. # These sed commands are put into ac_sed_defs when defining a macro.
  1300. # They are broken into pieces to make the sed script easier to manage.
  1301. # They are passed to sed as "A NAME B NAME C VALUE D", where NAME
  1302. # is the cpp macro being defined and VALUE is the value it is being given.
  1303. # Each defining turns into a single global substitution command.
  1304. # Hopefully no one uses "!" as a variable value.
  1305. # Other candidates for the sed separators, like , and @, do get used.
  1306. #
  1307. # ac_d sets the value in "#define NAME VALUE" lines.
  1308. ac_dA='s!^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  1309. ac_dB='\([     ][     ]*\)[^     ]*!\1#\2'
  1310. ac_dC='\3'
  1311. ac_dD='!g'
  1312. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  1313. ac_uA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1314. ac_uB='\([     ]\)!\1#\2define\3'
  1315. ac_uC=' '
  1316. ac_uD='\4!g'
  1317. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  1318. ac_eA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1319. ac_eB='$!\1#\2define\3'
  1320. ac_eC=' '
  1321. ac_eD='!g'
  1322. rm -f conftest.sed
  1323. EOF
  1324. # Turn off quoting long enough to insert the sed commands.
  1325. rm -f conftest.sh
  1326. cat > conftest.sh <<EOF
  1327. $ac_sed_defs
  1328. EOF
  1329.  
  1330. # Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
  1331. # on the size of here documents.
  1332.  
  1333. # Maximum number of lines to put in a single here document.
  1334. ac_max_sh_lines=9
  1335.  
  1336. while :
  1337. do
  1338.   # wc gives bogus results for an empty file on some AIX systems.
  1339.   ac_lines=`grep -c . conftest.sh`
  1340.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1341.   rm -f conftest.s1 conftest.s2
  1342.   sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -9.
  1343.   sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +10.
  1344.   # Write a limited-size here document to append to conftest.sed.
  1345.   /bin/echo 'cat >> conftest.sed <<CONFEOF' >> config.status
  1346.   cat conftest.s1 >> config.status
  1347.   /bin/echo 'CONFEOF' >> config.status
  1348.   rm -f conftest.s1 conftest.sh
  1349.   mv conftest.s2 conftest.sh
  1350. done
  1351. rm -f conftest.sh
  1352.  
  1353. # Now back to your regularly scheduled config.status.
  1354. cat >> config.status <<\EOF
  1355. # This sed command replaces #undef's with comments.  This is necessary, for
  1356. # example, in the case of _POSIX_SOURCE, which is predefined and required
  1357. # on some systems where configure will not decide to define it in
  1358. # autoconf.h.
  1359. cat >> conftest.sed <<\CONFEOF
  1360. s,^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
  1361. CONFEOF
  1362. rm -f conftest.h
  1363. # Break up the sed commands because old seds have small limits.
  1364. ac_max_sed_lines=20
  1365.  
  1366. CONFIG_HEADERS=${CONFIG_HEADERS-"autoconf.h"}
  1367. for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
  1368.   /bin/echo creating $ac_file
  1369.  
  1370.   cp $ac_given_srcdir/$ac_file.in conftest.h1
  1371.   cp conftest.sed conftest.stm
  1372.   while :
  1373.   do
  1374.     ac_lines=`grep -c . conftest.stm`
  1375.     if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1376.     rm -f conftest.s1 conftest.s2 conftest.h2
  1377.     sed ${ac_max_sed_lines}q conftest.stm > conftest.s1 # Like head -20.
  1378.     sed 1,${ac_max_sed_lines}d conftest.stm > conftest.s2 # Like tail +21.
  1379.     sed -f conftest.s1 < conftest.h1 > conftest.h2
  1380.     rm -f conftest.s1 conftest.h1 conftest.stm
  1381.     mv conftest.h2 conftest.h1
  1382.     mv conftest.s2 conftest.stm
  1383.   done
  1384.   rm -f conftest.stm conftest.h
  1385.   /bin/echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  1386.   cat conftest.h1 >> conftest.h
  1387.   rm -f conftest.h1
  1388.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  1389.     # The file exists and we would not be changing it.
  1390.     /bin/echo "$ac_file is unchanged"
  1391.     rm -f conftest.h
  1392.   else
  1393.     rm -f $ac_file
  1394.     mv conftest.h $ac_file
  1395.   fi
  1396. fi; done
  1397. rm -f conftest.sed
  1398.  
  1399.  
  1400.  
  1401. exit 0
  1402. EOF
  1403. chmod +x config.status
  1404. # Some shells look in PATH for config.status without the "./".
  1405. test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} ./config.status
  1406.  
  1407.