home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / forut062.zip / ForUtil-0.62 / configure.orig < prev    next >
Text File  |  1996-11-10  |  47KB  |  1,713 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.4 
  5. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14.  
  15. # Initialize some variables set by options.
  16. # The variables have the same names as the options, with
  17. # dashes changed to underlines.
  18. build=NONE
  19. cache_file=./config.cache
  20. exec_prefix=NONE
  21. host=NONE
  22. no_create=
  23. nonopt=NONE
  24. no_recursion=
  25. prefix=NONE
  26. program_prefix=NONE
  27. program_suffix=NONE
  28. program_transform_name=s,x,x,
  29. silent=
  30. site=
  31. srcdir=
  32. target=NONE
  33. verbose=
  34. x_includes=NONE
  35. x_libraries=NONE
  36.  
  37. # Initialize some other variables.
  38. subdirs=
  39.  
  40. ac_prev=
  41. for ac_option
  42. do
  43.  
  44.   # If the previous option needs an argument, assign it.
  45.   if test -n "$ac_prev"; then
  46.     eval "$ac_prev=\$ac_option"
  47.     ac_prev=
  48.     continue
  49.   fi
  50.  
  51.   case "$ac_option" in
  52.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  53.   *) ac_optarg= ;;
  54.   esac
  55.  
  56.   # Accept the important Cygnus configure options, so we can diagnose typos.
  57.  
  58.   case "$ac_option" in
  59.  
  60.   -build | --build | --buil | --bui | --bu | --b)
  61.     ac_prev=build ;;
  62.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  63.     build="$ac_optarg" ;;
  64.  
  65.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  66.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  67.     ac_prev=cache_file ;;
  68.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  69.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  70.     cache_file="$ac_optarg" ;;
  71.  
  72.   -disable-* | --disable-*)
  73.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  74.     # Reject names that are not valid shell variable names.
  75.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  76.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  77.     fi
  78.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  79.     eval "enable_${ac_feature}=no" ;;
  80.  
  81.   -enable-* | --enable-*)
  82.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  83.     # Reject names that are not valid shell variable names.
  84.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  85.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  86.     fi
  87.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  88.     case "$ac_option" in
  89.       *=*) ;;
  90.       *) ac_optarg=yes ;;
  91.     esac
  92.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  93.  
  94.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  95.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  96.   | --exec | --exe | --ex)
  97.     ac_prev=exec_prefix ;;
  98.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  99.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  100.   | --exec=* | --exe=* | --ex=*)
  101.     exec_prefix="$ac_optarg" ;;
  102.  
  103.   -gas | --gas | --ga | --g)
  104.     # Obsolete; use --with-gas.
  105.     with_gas=yes ;;
  106.  
  107.   -help | --help | --hel | --he)
  108.     # Omit some internal or obsolete options to make the list less imposing.
  109.     # This message is too long to be a string in the A/UX 3.1 sh.
  110.     cat << EOF
  111. Usage: configure [options] [host]
  112. Options: [defaults in brackets after descriptions]
  113. Configuration:
  114.   --cache-file=FILE       cache test results in FILE
  115.   --help                  print this message
  116.   --no-create             do not create output files
  117.   --quiet, --silent       do not print \`checking...' messages
  118.   --version               print the version of autoconf that created configure
  119. Directory and file names:
  120.   --prefix=PREFIX         install architecture-independent files in PREFIX
  121.                           [$ac_default_prefix]
  122.   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
  123.                           [same as prefix]
  124.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  125.   --program-prefix=PREFIX prepend PREFIX to installed program names
  126.   --program-suffix=SUFFIX append SUFFIX to installed program names
  127.   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  128. Host type:
  129.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  130.   --host=HOST             configure for HOST [guessed]
  131.   --target=TARGET         configure for TARGET [TARGET=HOST]
  132. Features and packages:
  133.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  134.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  135.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  136.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  137.   --x-includes=DIR        X include files are in DIR
  138.   --x-libraries=DIR       X library files are in DIR
  139. --enable and --with options recognized:$ac_help
  140. EOF
  141.     exit 0 ;;
  142.  
  143.   -host | --host | --hos | --ho)
  144.     ac_prev=host ;;
  145.   -host=* | --host=* | --hos=* | --ho=*)
  146.     host="$ac_optarg" ;;
  147.  
  148.   -nfp | --nfp | --nf)
  149.     # Obsolete; use --without-fp.
  150.     with_fp=no ;;
  151.  
  152.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  153.   | --no-cr | --no-c)
  154.     no_create=yes ;;
  155.  
  156.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  157.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  158.     no_recursion=yes ;;
  159.  
  160.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  161.     ac_prev=prefix ;;
  162.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  163.     prefix="$ac_optarg" ;;
  164.  
  165.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  166.   | --program-pre | --program-pr | --program-p)
  167.     ac_prev=program_prefix ;;
  168.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  169.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  170.     program_prefix="$ac_optarg" ;;
  171.  
  172.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  173.   | --program-suf | --program-su | --program-s)
  174.     ac_prev=program_suffix ;;
  175.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  176.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  177.     program_suffix="$ac_optarg" ;;
  178.  
  179.   -program-transform-name | --program-transform-name \
  180.   | --program-transform-nam | --program-transform-na \
  181.   | --program-transform-n | --program-transform- \
  182.   | --program-transform | --program-transfor \
  183.   | --program-transfo | --program-transf \
  184.   | --program-trans | --program-tran \
  185.   | --progr-tra | --program-tr | --program-t)
  186.     ac_prev=program_transform_name ;;
  187.   -program-transform-name=* | --program-transform-name=* \
  188.   | --program-transform-nam=* | --program-transform-na=* \
  189.   | --program-transform-n=* | --program-transform-=* \
  190.   | --program-transform=* | --program-transfor=* \
  191.   | --program-transfo=* | --program-transf=* \
  192.   | --program-trans=* | --program-tran=* \
  193.   | --progr-tra=* | --program-tr=* | --program-t=*)
  194.     program_transform_name="$ac_optarg" ;;
  195.  
  196.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  197.   | -silent | --silent | --silen | --sile | --sil)
  198.     silent=yes ;;
  199.  
  200.   -site | --site | --sit)
  201.     ac_prev=site ;;
  202.   -site=* | --site=* | --sit=*)
  203.     site="$ac_optarg" ;;
  204.  
  205.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  206.     ac_prev=srcdir ;;
  207.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  208.     srcdir="$ac_optarg" ;;
  209.  
  210.   -target | --target | --targe | --targ | --tar | --ta | --t)
  211.     ac_prev=target ;;
  212.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  213.     target="$ac_optarg" ;;
  214.  
  215.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  216.     verbose=yes ;;
  217.  
  218.   -version | --version | --versio | --versi | --vers)
  219.     echo "configure generated by autoconf version 2.4"
  220.     exit 0 ;;
  221.  
  222.   -with-* | --with-*)
  223.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  224.     # Reject names that are not valid shell variable names.
  225.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  226.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  227.     fi
  228.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  229.     case "$ac_option" in
  230.       *=*) ;;
  231.       *) ac_optarg=yes ;;
  232.     esac
  233.     eval "with_${ac_package}='$ac_optarg'" ;;
  234.  
  235.   -without-* | --without-*)
  236.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  237.     # Reject names that are not valid shell variable names.
  238.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  239.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  240.     fi
  241.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  242.     eval "with_${ac_package}=no" ;;
  243.  
  244.   --x)
  245.     # Obsolete; use --with-x.
  246.     with_x=yes ;;
  247.  
  248.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  249.   | --x-incl | --x-inc | --x-in | --x-i)
  250.     ac_prev=x_includes ;;
  251.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  252.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  253.     x_includes="$ac_optarg" ;;
  254.  
  255.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  256.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  257.     ac_prev=x_libraries ;;
  258.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  259.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  260.     x_libraries="$ac_optarg" ;;
  261.  
  262.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  263.     ;;
  264.  
  265.   *) 
  266.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  267.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  268.     fi
  269.     if test "x$nonopt" != xNONE; then
  270.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  271.     fi
  272.     nonopt="$ac_option"
  273.     ;;
  274.  
  275.   esac
  276. done
  277.  
  278. if test -n "$ac_prev"; then
  279.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  280. fi
  281.  
  282. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  283.  
  284. # File descriptor usage:
  285. # 0 standard input
  286. # 1 file creation
  287. # 2 errors and warnings
  288. # 3 some systems may open it to /dev/tty
  289. # 4 used on the Kubota Titan
  290. # 6 checking for... messages and results
  291. # 5 compiler messages saved in config.log
  292. if test "$silent" = yes; then
  293.   exec 6>/dev/null
  294. else
  295.   exec 6>&1
  296. fi
  297. exec 5>./config.log
  298.  
  299. echo "\
  300. This file contains any messages produced by compilers while
  301. running configure, to aid debugging if configure makes a mistake.
  302. " 1>&5
  303.  
  304. # Strip out --no-create and --no-recursion so they do not pile up.
  305. # Also quote any args containing shell metacharacters.
  306. ac_configure_args=
  307. for ac_arg
  308. do
  309.   case "$ac_arg" in
  310.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  311.   | --no-cr | --no-c) ;;
  312.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  313.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  314.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  315.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  316.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  317.   esac
  318. done
  319.  
  320. # NLS nuisances.
  321. # Only set LANG and LC_ALL to C if already set.
  322. # These must not be set unconditionally because not all systems understand
  323. # e.g. LANG=C (notably SCO).
  324. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  325. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  326.  
  327. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  328. rm -rf conftest* confdefs.h
  329. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  330. echo > confdefs.h
  331.  
  332. # A filename unique to this package, relative to the directory that
  333. # configure is in, which we can look for to find out if srcdir is correct.
  334. ac_unique_file=lib/SplitPath.c
  335.  
  336. # Find the source files, if location was not specified.
  337. if test -z "$srcdir"; then
  338.   ac_srcdir_defaulted=yes
  339.   # Try the directory containing this script, then its parent.
  340.   ac_prog=$0
  341.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  342.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  343.   srcdir=$ac_confdir
  344.   if test ! -r $srcdir/$ac_unique_file; then
  345.     srcdir=..
  346.   fi
  347. else
  348.   ac_srcdir_defaulted=no
  349. fi
  350. if test ! -r $srcdir/$ac_unique_file; then
  351.   if test "$ac_srcdir_defaulted" = yes; then
  352.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  353.   else
  354.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  355.   fi
  356. fi
  357. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  358.  
  359. # Prefer explicitly selected file to automatically selected ones.
  360. if test -z "$CONFIG_SITE"; then
  361.   if test "x$prefix" != xNONE; then
  362.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  363.   else
  364.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  365.   fi
  366. fi
  367. for ac_site_file in $CONFIG_SITE; do
  368.   if test -r "$ac_site_file"; then
  369.     echo "loading site script $ac_site_file"
  370.     . "$ac_site_file"
  371.   fi
  372. done
  373.  
  374. if test -r "$cache_file"; then
  375.   echo "loading cache $cache_file"
  376.   . $cache_file
  377. else
  378.   echo "creating cache $cache_file"
  379.   > $cache_file
  380. fi
  381.  
  382. ac_ext=c
  383. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  384. ac_cpp='$CPP $CPPFLAGS'
  385. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
  386. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
  387.  
  388. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  389.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  390.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  391.     ac_n= ac_c='
  392. ' ac_t='    '
  393.   else
  394.     ac_n=-n ac_c= ac_t=
  395.   fi
  396. else
  397.   ac_n= ac_c='\c' ac_t=
  398. fi
  399.  
  400.  
  401.  
  402. # Extract the first word of "gcc", so it can be a program name with args.
  403. set dummy gcc; ac_word=$2
  404. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  405. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  406.   echo $ac_n "(cached) $ac_c" 1>&6
  407. else
  408.   if test -n "$CC"; then
  409.   ac_cv_prog_CC="$CC" # Let the user override the test.
  410. else
  411.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  412.   for ac_dir in $PATH; do
  413.     test -z "$ac_dir" && ac_dir=.
  414.     if test -f $ac_dir/$ac_word; then
  415.       ac_cv_prog_CC="gcc"
  416.       break
  417.     fi
  418.   done
  419.   IFS="$ac_save_ifs"
  420.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  421. fi
  422. fi
  423. CC="$ac_cv_prog_CC"
  424. if test -n "$CC"; then
  425.   echo "$ac_t""$CC" 1>&6
  426. else
  427.   echo "$ac_t""no" 1>&6
  428. fi
  429.  
  430.  
  431. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  432. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  433.   echo $ac_n "(cached) $ac_c" 1>&6
  434. else
  435.   cat > conftest.c <<EOF
  436. #ifdef __GNUC__
  437.   yes;
  438. #endif
  439. EOF
  440. if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  441.   ac_cv_prog_gcc=yes
  442. else
  443.   ac_cv_prog_gcc=no
  444. fi
  445. fi
  446. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  447. if test $ac_cv_prog_gcc = yes; then
  448.   GCC=yes
  449.   if test "${CFLAGS+set}" != set; then
  450.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  451. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  452.   echo $ac_n "(cached) $ac_c" 1>&6
  453. else
  454.   echo 'void f(){}' > conftest.c
  455. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  456.   ac_cv_prog_gcc_g=yes
  457. else
  458.   ac_cv_prog_gcc_g=no
  459. fi
  460. rm -f conftest*
  461.  
  462. fi
  463.     echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  464.     if test $ac_cv_prog_gcc_g = yes; then
  465.       CFLAGS="-g -O"
  466.     else
  467.       CFLAGS="-O"
  468.     fi
  469.   fi
  470. else
  471.   GCC=
  472.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  473. fi
  474.  
  475. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  476. set dummy ${MAKE-make}; ac_make=$2
  477. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  478.   echo $ac_n "(cached) $ac_c" 1>&6
  479. else
  480.   cat > conftestmake <<\EOF
  481. all:
  482.     @echo 'ac_maketemp="${MAKE}"'
  483. EOF
  484. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  485. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  486. if test -n "$ac_maketemp"; then
  487.   eval ac_cv_prog_make_${ac_make}_set=yes
  488. else
  489.   eval ac_cv_prog_make_${ac_make}_set=no
  490. fi
  491. rm -f conftestmake
  492. fi
  493. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  494.   echo "$ac_t""yes" 1>&6
  495.   SET_MAKE=
  496. else
  497.   echo "$ac_t""no" 1>&6
  498.   SET_MAKE="MAKE=${MAKE-make}"
  499. fi
  500.  
  501. # Extract the first word of "ranlib", so it can be a program name with args.
  502. set dummy ranlib; ac_word=$2
  503. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  504. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  505.   echo $ac_n "(cached) $ac_c" 1>&6
  506. else
  507.   if test -n "$RANLIB"; then
  508.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  509. else
  510.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  511.   for ac_dir in $PATH; do
  512.     test -z "$ac_dir" && ac_dir=.
  513.     if test -f $ac_dir/$ac_word; then
  514.       ac_cv_prog_RANLIB="ranlib"
  515.       break
  516.     fi
  517.   done
  518.   IFS="$ac_save_ifs"
  519.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  520. fi
  521. fi
  522. RANLIB="$ac_cv_prog_RANLIB"
  523. if test -n "$RANLIB"; then
  524.   echo "$ac_t""$RANLIB" 1>&6
  525. else
  526.   echo "$ac_t""no" 1>&6
  527. fi
  528.  
  529. # Extract the first word of "flex", so it can be a program name with args.
  530. set dummy flex; ac_word=$2
  531. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  532. if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
  533.   echo $ac_n "(cached) $ac_c" 1>&6
  534. else
  535.   if test -n "$LEX"; then
  536.   ac_cv_prog_LEX="$LEX" # Let the user override the test.
  537. else
  538.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  539.   for ac_dir in $PATH; do
  540.     test -z "$ac_dir" && ac_dir=.
  541.     if test -f $ac_dir/$ac_word; then
  542.       ac_cv_prog_LEX="flex"
  543.       break
  544.     fi
  545.   done
  546.   IFS="$ac_save_ifs"
  547.   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
  548. fi
  549. fi
  550. LEX="$ac_cv_prog_LEX"
  551. if test -n "$LEX"; then
  552.   echo "$ac_t""$LEX" 1>&6
  553. else
  554.   echo "$ac_t""no" 1>&6
  555. fi
  556.  
  557. if test -z "$LEXLIB"
  558. then
  559.   case "$LEX" in
  560.   flex*) ac_lib=fl ;;
  561.   *) ac_lib=l ;;
  562.   esac
  563.   echo $ac_n "checking for -l$ac_lib""... $ac_c" 1>&6
  564. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib'+set}'`\" = set"; then
  565.   echo $ac_n "(cached) $ac_c" 1>&6
  566. else
  567.   ac_save_LIBS="$LIBS"
  568. LIBS="-l$ac_lib  $LIBS"
  569. cat > conftest.$ac_ext <<EOF
  570. #line 571 "configure"
  571. #include "confdefs.h"
  572.  
  573. int main() { return 0; }
  574. int t() {
  575. yywrap()
  576. ; return 0; }
  577. EOF
  578. if eval $ac_link; then
  579.   rm -rf conftest*
  580.   eval "ac_cv_lib_$ac_lib=yes"
  581. else
  582.   rm -rf conftest*
  583.   eval "ac_cv_lib_$ac_lib=no"
  584. fi
  585. rm -f conftest*
  586. LIBS="$ac_save_LIBS"
  587.  
  588. fi
  589. if eval "test \"`echo '$ac_cv_lib_'$ac_lib`\" = yes"; then
  590.   echo "$ac_t""yes" 1>&6
  591.   LEXLIB="-l$ac_lib"
  592. else
  593.   echo "$ac_t""no" 1>&6
  594. fi
  595.  
  596. fi
  597.  
  598. ac_aux_dir=
  599. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  600.   if test -f $ac_dir/install-sh; then
  601.     ac_aux_dir=$ac_dir
  602.     ac_install_sh="$ac_aux_dir/install-sh -c"
  603.     break
  604.   elif test -f $ac_dir/install.sh; then
  605.     ac_aux_dir=$ac_dir
  606.     ac_install_sh="$ac_aux_dir/install.sh -c"
  607.     break
  608.   fi
  609. done
  610. if test -z "$ac_aux_dir"; then
  611.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  612. fi
  613. ac_config_guess=$ac_aux_dir/config.guess
  614. ac_config_sub=$ac_aux_dir/config.sub
  615. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  616.  
  617. # Find a good install program.  We prefer a C program (faster),
  618. # so one script is as good as another.  But avoid the broken or
  619. # incompatible versions:
  620. # SysV /etc/install, /usr/sbin/install
  621. # SunOS /usr/etc/install
  622. # IRIX /sbin/install
  623. # AIX /bin/install
  624. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  625. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  626. # ./install, which can be erroneously created by make from ./install.sh.
  627. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  628. if test -z "$INSTALL"; then
  629. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  630.   echo $ac_n "(cached) $ac_c" 1>&6
  631. else
  632.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  633.   for ac_dir in $PATH; do
  634.     # Account for people who put trailing slashes in PATH elements.
  635.     case "$ac_dir/" in
  636.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  637.     *)
  638.       # OSF1 and SCO ODT 3.0 have their own names for install.
  639.       for ac_prog in ginstall installbsd scoinst install; do
  640.         if test -f $ac_dir/$ac_prog; then
  641.       if test $ac_prog = install &&
  642.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  643.         # AIX install.  It has an incompatible calling convention.
  644.         # OSF/1 installbsd also uses dspmsg, but is usable.
  645.         :
  646.       else
  647.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  648.         break 2
  649.       fi
  650.     fi
  651.       done
  652.       ;;
  653.     esac
  654.   done
  655.   IFS="$ac_save_ifs"
  656.   # As a last resort, use the slow shell script.
  657.   test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
  658. fi
  659.   INSTALL="$ac_cv_path_install"
  660. fi
  661. echo "$ac_t""$INSTALL" 1>&6
  662.  
  663. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  664. # It thinks the first close brace ends the variable substitution.
  665. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  666.  
  667. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  668.  
  669.  
  670. echo $ac_n "checking for -lgdbm""... $ac_c" 1>&6
  671. if eval "test \"`echo '$''{'ac_cv_lib_gdbm'+set}'`\" = set"; then
  672.   echo $ac_n "(cached) $ac_c" 1>&6
  673. else
  674.   ac_save_LIBS="$LIBS"
  675. LIBS="-lgdbm  $LIBS"
  676. cat > conftest.$ac_ext <<EOF
  677. #line 678 "configure"
  678. #include "confdefs.h"
  679.  
  680. int main() { return 0; }
  681. int t() {
  682. gdbm_fetch()
  683. ; return 0; }
  684. EOF
  685. if eval $ac_link; then
  686.   rm -rf conftest*
  687.   eval "ac_cv_lib_gdbm=yes"
  688. else
  689.   rm -rf conftest*
  690.   eval "ac_cv_lib_gdbm=no"
  691. fi
  692. rm -f conftest*
  693. LIBS="$ac_save_LIBS"
  694.  
  695. fi
  696. if eval "test \"`echo '$ac_cv_lib_'gdbm`\" = yes"; then
  697.   echo "$ac_t""yes" 1>&6
  698.     ac_tr_lib=HAVE_LIB`echo gdbm | tr '[a-z]' '[A-Z]'`
  699.   cat >> confdefs.h <<EOF
  700. #define $ac_tr_lib 1
  701. EOF
  702.  
  703.   LIBS="-lgdbm $LIBS"
  704.  
  705. else
  706.   echo "$ac_t""no" 1>&6
  707. echo "configure: warning: You need gdbm in order for the common stuff to work." 1>&2
  708. fi
  709.  
  710.  
  711.  
  712. ac_header_dirent=no
  713. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  714. do
  715. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  716. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  717. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  718.   echo $ac_n "(cached) $ac_c" 1>&6
  719. else
  720.   cat > conftest.$ac_ext <<EOF
  721. #line 722 "configure"
  722. #include "confdefs.h"
  723. #include <sys/types.h>
  724. #include <$ac_hdr>
  725. int main() { return 0; }
  726. int t() {
  727. DIR *dirp = 0;
  728. ; return 0; }
  729. EOF
  730. if eval $ac_compile; then
  731.   rm -rf conftest*
  732.   eval "ac_cv_header_dirent_$ac_safe=yes"
  733. else
  734.   rm -rf conftest*
  735.   eval "ac_cv_header_dirent_$ac_safe=no"
  736. fi
  737. rm -f conftest*
  738.  
  739. fi
  740. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  741.   echo "$ac_t""yes" 1>&6
  742.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  743.   cat >> confdefs.h <<EOF
  744. #define $ac_tr_hdr 1
  745. EOF
  746.  ac_header_dirent=$ac_hdr; break
  747. else
  748.   echo "$ac_t""no" 1>&6
  749. fi
  750. done
  751. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  752. if test $ac_header_dirent = dirent.h; then
  753. echo $ac_n "checking for -ldir""... $ac_c" 1>&6
  754. if eval "test \"`echo '$''{'ac_cv_lib_dir'+set}'`\" = set"; then
  755.   echo $ac_n "(cached) $ac_c" 1>&6
  756. else
  757.   ac_save_LIBS="$LIBS"
  758. LIBS="-ldir  $LIBS"
  759. cat > conftest.$ac_ext <<EOF
  760. #line 761 "configure"
  761. #include "confdefs.h"
  762.  
  763. int main() { return 0; }
  764. int t() {
  765. opendir()
  766. ; return 0; }
  767. EOF
  768. if eval $ac_link; then
  769.   rm -rf conftest*
  770.   eval "ac_cv_lib_dir=yes"
  771. else
  772.   rm -rf conftest*
  773.   eval "ac_cv_lib_dir=no"
  774. fi
  775. rm -f conftest*
  776. LIBS="$ac_save_LIBS"
  777.  
  778. fi
  779. if eval "test \"`echo '$ac_cv_lib_'dir`\" = yes"; then
  780.   echo "$ac_t""yes" 1>&6
  781.   LIBS="$LIBS -ldir"
  782. else
  783.   echo "$ac_t""no" 1>&6
  784. fi
  785.  
  786. else
  787. echo $ac_n "checking for -lx""... $ac_c" 1>&6
  788. if eval "test \"`echo '$''{'ac_cv_lib_x'+set}'`\" = set"; then
  789.   echo $ac_n "(cached) $ac_c" 1>&6
  790. else
  791.   ac_save_LIBS="$LIBS"
  792. LIBS="-lx  $LIBS"
  793. cat > conftest.$ac_ext <<EOF
  794. #line 795 "configure"
  795. #include "confdefs.h"
  796.  
  797. int main() { return 0; }
  798. int t() {
  799. opendir()
  800. ; return 0; }
  801. EOF
  802. if eval $ac_link; then
  803.   rm -rf conftest*
  804.   eval "ac_cv_lib_x=yes"
  805. else
  806.   rm -rf conftest*
  807.   eval "ac_cv_lib_x=no"
  808. fi
  809. rm -f conftest*
  810. LIBS="$ac_save_LIBS"
  811.  
  812. fi
  813. if eval "test \"`echo '$ac_cv_lib_'x`\" = yes"; then
  814.   echo "$ac_t""yes" 1>&6
  815.   LIBS="$LIBS -lx"
  816. else
  817.   echo "$ac_t""no" 1>&6
  818. fi
  819.  
  820. fi
  821.  
  822. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  823. # On Suns, sometimes $CPP names a directory.
  824. if test -n "$CPP" && test -d "$CPP"; then
  825.   CPP=
  826. fi
  827. if test -z "$CPP"; then
  828. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  829.   echo $ac_n "(cached) $ac_c" 1>&6
  830. else
  831.     # This must be in double quotes, not single quotes, because CPP may get
  832.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  833.   CPP="${CC-cc} -E"
  834.   # On the NeXT, cc -E runs the code through the compiler's parser,
  835.   # not just through cpp.
  836.   cat > conftest.$ac_ext <<EOF
  837. #line 838 "configure"
  838. #include "confdefs.h"
  839. #include <assert.h>
  840. Syntax Error
  841. EOF
  842. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  843. ac_err=`grep -v '^ *+' conftest.out`
  844. if test -z "$ac_err"; then
  845.   :
  846. else
  847.   echo "$ac_err" >&5
  848.   rm -rf conftest*
  849.   CPP="${CC-cc} -E -traditional-cpp"
  850.   cat > conftest.$ac_ext <<EOF
  851. #line 852 "configure"
  852. #include "confdefs.h"
  853. #include <assert.h>
  854. Syntax Error
  855. EOF
  856. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  857. ac_err=`grep -v '^ *+' conftest.out`
  858. if test -z "$ac_err"; then
  859.   :
  860. else
  861.   echo "$ac_err" >&5
  862.   rm -rf conftest*
  863.   CPP=/lib/cpp
  864. fi
  865. rm -f conftest*
  866. fi
  867. rm -f conftest*
  868.   ac_cv_prog_CPP="$CPP"
  869. fi
  870.   CPP="$ac_cv_prog_CPP"
  871. else
  872.   ac_cv_prog_CPP="$CPP"
  873. fi
  874. echo "$ac_t""$CPP" 1>&6
  875.  
  876. # If we cannot run a trivial program, we must be cross compiling.
  877. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  878. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  879.   echo $ac_n "(cached) $ac_c" 1>&6
  880. else
  881.   if test "$cross_compiling" = yes; then
  882.   ac_cv_c_cross=yes
  883. else
  884. cat > conftest.$ac_ext <<EOF
  885. #line 886 "configure"
  886. #include "confdefs.h"
  887. main(){return(0);}
  888. EOF
  889. eval $ac_link
  890. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  891.   ac_cv_c_cross=no
  892. else
  893.   ac_cv_c_cross=yes
  894. fi
  895. fi
  896. rm -fr conftest*
  897. fi
  898. cross_compiling=$ac_cv_c_cross
  899. echo "$ac_t""$ac_cv_c_cross" 1>&6
  900.  
  901. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  902. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  903.   echo $ac_n "(cached) $ac_c" 1>&6
  904. else
  905.   cat > conftest.$ac_ext <<EOF
  906. #line 907 "configure"
  907. #include "confdefs.h"
  908. #include <stdlib.h>
  909. #include <stdarg.h>
  910. #include <string.h>
  911. #include <float.h>
  912. EOF
  913. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  914. ac_err=`grep -v '^ *+' conftest.out`
  915. if test -z "$ac_err"; then
  916.   rm -rf conftest*
  917.   ac_cv_header_stdc=yes
  918. else
  919.   echo "$ac_err" >&5
  920.   rm -rf conftest*
  921.   ac_cv_header_stdc=no
  922. fi
  923. rm -f conftest*
  924.  
  925. if test $ac_cv_header_stdc = yes; then
  926.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  927. cat > conftest.$ac_ext <<EOF
  928. #line 929 "configure"
  929. #include "confdefs.h"
  930. #include <string.h>
  931. EOF
  932. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  933.   egrep "memchr" >/dev/null 2>&1; then
  934.   :
  935. else
  936.   rm -rf conftest*
  937.   ac_cv_header_stdc=no
  938. fi
  939. rm -f conftest*
  940.  
  941. fi
  942.  
  943. if test $ac_cv_header_stdc = yes; then
  944.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  945. cat > conftest.$ac_ext <<EOF
  946. #line 947 "configure"
  947. #include "confdefs.h"
  948. #include <stdlib.h>
  949. EOF
  950. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  951.   egrep "free" >/dev/null 2>&1; then
  952.   :
  953. else
  954.   rm -rf conftest*
  955.   ac_cv_header_stdc=no
  956. fi
  957. rm -f conftest*
  958.  
  959. fi
  960.  
  961. if test $ac_cv_header_stdc = yes; then
  962.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  963. if test "$cross_compiling" = yes; then
  964.   ac_cv_header_stdc=no
  965. else
  966. cat > conftest.$ac_ext <<EOF
  967. #line 968 "configure"
  968. #include "confdefs.h"
  969. #include <ctype.h>
  970. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  971. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  972. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  973. int main () { int i; for (i = 0; i < 256; i++)
  974. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  975. exit (0); }
  976.  
  977. EOF
  978. eval $ac_link
  979. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  980.   :
  981. else
  982.   ac_cv_header_stdc=no
  983. fi
  984. fi
  985. rm -fr conftest*
  986. fi
  987. fi
  988. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  989. if test $ac_cv_header_stdc = yes; then
  990.   cat >> confdefs.h <<\EOF
  991. #define STDC_HEADERS 1
  992. EOF
  993.  
  994. fi
  995.  
  996. for ac_hdr in fcntl.h limits.h unistd.h
  997. do
  998. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  999. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1000. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1001.   echo $ac_n "(cached) $ac_c" 1>&6
  1002. else
  1003.   cat > conftest.$ac_ext <<EOF
  1004. #line 1005 "configure"
  1005. #include "confdefs.h"
  1006. #include <$ac_hdr>
  1007. EOF
  1008. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1009. ac_err=`grep -v '^ *+' conftest.out`
  1010. if test -z "$ac_err"; then
  1011.   rm -rf conftest*
  1012.   eval "ac_cv_header_$ac_safe=yes"
  1013. else
  1014.   echo "$ac_err" >&5
  1015.   rm -rf conftest*
  1016.   eval "ac_cv_header_$ac_safe=no"
  1017. fi
  1018. rm -f conftest*
  1019. fi
  1020. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1021.   echo "$ac_t""yes" 1>&6
  1022.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  1023.   cat >> confdefs.h <<EOF
  1024. #define $ac_tr_hdr 1
  1025. EOF
  1026.  
  1027. else
  1028.   echo "$ac_t""no" 1>&6
  1029. fi
  1030. done
  1031.  
  1032.  
  1033. echo $ac_n "checking for inline""... $ac_c" 1>&6
  1034. if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  1035.   echo $ac_n "(cached) $ac_c" 1>&6
  1036. else
  1037.   ac_cv_c_inline=no
  1038. for ac_kw in inline __inline__ __inline; do
  1039.   cat > conftest.$ac_ext <<EOF
  1040. #line 1041 "configure"
  1041. #include "confdefs.h"
  1042.  
  1043. int main() { return 0; }
  1044. int t() {
  1045. } $ac_kw foo() {
  1046. ; return 0; }
  1047. EOF
  1048. if eval $ac_compile; then
  1049.   rm -rf conftest*
  1050.   ac_cv_c_inline=$ac_kw; break
  1051. fi
  1052. rm -f conftest*
  1053.  
  1054. done
  1055.  
  1056. fi
  1057. echo "$ac_t""$ac_cv_c_inline" 1>&6
  1058. case "$ac_cv_c_inline" in
  1059.   inline | yes) ;;
  1060.   no) cat >> confdefs.h <<\EOF
  1061. #define inline 
  1062. EOF
  1063.  ;;
  1064.   *)  cat >> confdefs.h <<EOF
  1065. #define inline $ac_cv_c_inline
  1066. EOF
  1067.  ;;
  1068. esac
  1069.  
  1070. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  1071. if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  1072.   echo $ac_n "(cached) $ac_c" 1>&6
  1073. else
  1074.   cat > conftest.$ac_ext <<EOF
  1075. #line 1076 "configure"
  1076. #include "confdefs.h"
  1077. #include <sys/types.h>
  1078. EOF
  1079. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1080.   egrep "uid_t" >/dev/null 2>&1; then
  1081.   rm -rf conftest*
  1082.   ac_cv_type_uid_t=yes
  1083. else
  1084.   rm -rf conftest*
  1085.   ac_cv_type_uid_t=no
  1086. fi
  1087. rm -f conftest*
  1088.  
  1089. fi
  1090. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  1091. if test $ac_cv_type_uid_t = no; then
  1092.   cat >> confdefs.h <<\EOF
  1093. #define uid_t int
  1094. EOF
  1095.  
  1096.   cat >> confdefs.h <<\EOF
  1097. #define gid_t int
  1098. EOF
  1099.  
  1100. fi
  1101.  
  1102.  
  1103. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  1104. # for constant arguments.  Useless!
  1105. echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
  1106. if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
  1107.   echo $ac_n "(cached) $ac_c" 1>&6
  1108. else
  1109.   cat > conftest.$ac_ext <<EOF
  1110. #line 1111 "configure"
  1111. #include "confdefs.h"
  1112. #include <alloca.h>
  1113. int main() { return 0; }
  1114. int t() {
  1115. char *p = alloca(2 * sizeof(int));
  1116. ; return 0; }
  1117. EOF
  1118. if eval $ac_link; then
  1119.   rm -rf conftest*
  1120.   ac_cv_header_alloca_h=yes
  1121. else
  1122.   rm -rf conftest*
  1123.   ac_cv_header_alloca_h=no
  1124. fi
  1125. rm -f conftest*
  1126.  
  1127. fi
  1128. echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
  1129. if test $ac_cv_header_alloca_h = yes; then
  1130.   cat >> confdefs.h <<\EOF
  1131. #define HAVE_ALLOCA_H 1
  1132. EOF
  1133.  
  1134. fi
  1135.  
  1136. echo $ac_n "checking for alloca""... $ac_c" 1>&6
  1137. if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
  1138.   echo $ac_n "(cached) $ac_c" 1>&6
  1139. else
  1140.   cat > conftest.$ac_ext <<EOF
  1141. #line 1142 "configure"
  1142. #include "confdefs.h"
  1143.  
  1144. #ifdef __GNUC__
  1145. # define alloca __builtin_alloca
  1146. #else
  1147. # if HAVE_ALLOCA_H
  1148. #  include <alloca.h>
  1149. # else
  1150. #  ifdef _AIX
  1151.  #pragma alloca
  1152. #  else
  1153. #   ifndef alloca /* predefined by HP cc +Olibcalls */
  1154. char *alloca ();
  1155. #   endif
  1156. #  endif
  1157. # endif
  1158. #endif
  1159.  
  1160. int main() { return 0; }
  1161. int t() {
  1162. char *p = (char *) alloca(1);
  1163. ; return 0; }
  1164. EOF
  1165. if eval $ac_link; then
  1166.   rm -rf conftest*
  1167.   ac_cv_func_alloca=yes
  1168. else
  1169.   rm -rf conftest*
  1170.   ac_cv_func_alloca=no
  1171. fi
  1172. rm -f conftest*
  1173.  
  1174. fi
  1175. echo "$ac_t""$ac_cv_func_alloca" 1>&6
  1176. if test $ac_cv_func_alloca = yes; then
  1177.   cat >> confdefs.h <<\EOF
  1178. #define HAVE_ALLOCA 1
  1179. EOF
  1180.  
  1181. fi
  1182.  
  1183. if test $ac_cv_func_alloca = no; then
  1184.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  1185.   # that cause trouble.  Some versions do not even contain alloca or
  1186.   # contain a buggy version.  If you still want to use their alloca,
  1187.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  1188.   ALLOCA=alloca.o
  1189.   cat >> confdefs.h <<\EOF
  1190. #define C_ALLOCA 1
  1191. EOF
  1192.  
  1193.  
  1194. echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
  1195. if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
  1196.   echo $ac_n "(cached) $ac_c" 1>&6
  1197. else
  1198.   cat > conftest.$ac_ext <<EOF
  1199. #line 1200 "configure"
  1200. #include "confdefs.h"
  1201. #if defined(CRAY) && ! defined(CRAY2)
  1202. webecray
  1203. #else
  1204. wenotbecray
  1205. #endif
  1206.  
  1207. EOF
  1208. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1209.   egrep "webecray" >/dev/null 2>&1; then
  1210.   rm -rf conftest*
  1211.   ac_cv_os_cray=yes
  1212. else
  1213.   rm -rf conftest*
  1214.   ac_cv_os_cray=no
  1215. fi
  1216. rm -f conftest*
  1217.  
  1218. fi
  1219. echo "$ac_t""$ac_cv_os_cray" 1>&6
  1220. if test $ac_cv_os_cray = yes; then
  1221. for ac_func in _getb67 GETB67 getb67; do
  1222.   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1223. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1224.   echo $ac_n "(cached) $ac_c" 1>&6
  1225. else
  1226.   cat > conftest.$ac_ext <<EOF
  1227. #line 1228 "configure"
  1228. #include "confdefs.h"
  1229. /* System header to define __stub macros and hopefully few prototypes,
  1230.     which can conflict with char $ac_func(); below.  */
  1231. #include <assert.h>
  1232. /* Override any gcc2 internal prototype to avoid an error.  */
  1233. char $ac_func(); 
  1234.  
  1235. int main() { return 0; }
  1236. int t() {
  1237.  
  1238. /* The GNU C library defines this for functions which it implements
  1239.     to always fail with ENOSYS.  Some functions are actually named
  1240.     something starting with __ and the normal name is an alias.  */
  1241. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1242. choke me
  1243. #else
  1244. $ac_func();
  1245. #endif
  1246.  
  1247. ; return 0; }
  1248. EOF
  1249. if eval $ac_link; then
  1250.   rm -rf conftest*
  1251.   eval "ac_cv_func_$ac_func=yes"
  1252. else
  1253.   rm -rf conftest*
  1254.   eval "ac_cv_func_$ac_func=no"
  1255. fi
  1256. rm -f conftest*
  1257.  
  1258. fi
  1259. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1260.   echo "$ac_t""yes" 1>&6
  1261.   cat >> confdefs.h <<EOF
  1262. #define CRAY_STACKSEG_END $ac_func
  1263. EOF
  1264.  
  1265.   break
  1266. else
  1267.   echo "$ac_t""no" 1>&6
  1268. fi
  1269.  
  1270. done
  1271. fi
  1272.  
  1273. echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
  1274. if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
  1275.   echo $ac_n "(cached) $ac_c" 1>&6
  1276. else
  1277.   if test "$cross_compiling" = yes; then
  1278.   ac_cv_c_stack_direction=0
  1279. else
  1280. cat > conftest.$ac_ext <<EOF
  1281. #line 1282 "configure"
  1282. #include "confdefs.h"
  1283. find_stack_direction ()
  1284. {
  1285.   static char *addr = 0;
  1286.   auto char dummy;
  1287.   if (addr == 0)
  1288.     {
  1289.       addr = &dummy;
  1290.       return find_stack_direction ();
  1291.     }
  1292.   else
  1293.     return (&dummy > addr) ? 1 : -1;
  1294. }
  1295. main ()
  1296. {
  1297.   exit (find_stack_direction() < 0);
  1298. }
  1299. EOF
  1300. eval $ac_link
  1301. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1302.   ac_cv_c_stack_direction=1
  1303. else
  1304.   ac_cv_c_stack_direction=-1
  1305. fi
  1306. fi
  1307. rm -fr conftest*
  1308. fi
  1309. echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
  1310. cat >> confdefs.h <<EOF
  1311. #define STACK_DIRECTION $ac_cv_c_stack_direction
  1312. EOF
  1313.  
  1314. fi
  1315.  
  1316. echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
  1317. if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
  1318.   echo $ac_n "(cached) $ac_c" 1>&6
  1319. else
  1320.   if test "$cross_compiling" = yes; then
  1321.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1322. else
  1323. cat > conftest.$ac_ext <<EOF
  1324. #line 1325 "configure"
  1325. #include "confdefs.h"
  1326. #include <sys/types.h>
  1327. #include <$ac_header_dirent>
  1328. int closedir(); main() { exit(closedir(opendir(".")) != 0); }
  1329. EOF
  1330. eval $ac_link
  1331. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1332.   ac_cv_func_closedir_void=no
  1333. else
  1334.   ac_cv_func_closedir_void=yes
  1335. fi
  1336. fi
  1337. rm -fr conftest*
  1338. fi
  1339. echo "$ac_t""$ac_cv_func_closedir_void" 1>&6
  1340. if test $ac_cv_func_closedir_void = yes; then
  1341.   cat >> confdefs.h <<\EOF
  1342. #define CLOSEDIR_VOID 1
  1343. EOF
  1344.  
  1345. fi
  1346.  
  1347. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  1348. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  1349.   echo $ac_n "(cached) $ac_c" 1>&6
  1350. else
  1351.   cat > conftest.$ac_ext <<EOF
  1352. #line 1353 "configure"
  1353. #include "confdefs.h"
  1354. #include <sys/types.h>
  1355. #include <signal.h>
  1356. #ifdef signal
  1357. #undef signal
  1358. #endif
  1359. #ifdef __cplusplus
  1360. extern "C"
  1361. #endif
  1362. void (*signal ()) ();
  1363. int main() { return 0; }
  1364. int t() {
  1365. int i;
  1366. ; return 0; }
  1367. EOF
  1368. if eval $ac_compile; then
  1369.   rm -rf conftest*
  1370.   ac_cv_type_signal=void
  1371. else
  1372.   rm -rf conftest*
  1373.   ac_cv_type_signal=int
  1374. fi
  1375. rm -f conftest*
  1376.  
  1377. fi
  1378. echo "$ac_t""$ac_cv_type_signal" 1>&6
  1379. cat >> confdefs.h <<EOF
  1380. #define RETSIGTYPE $ac_cv_type_signal
  1381. EOF
  1382.  
  1383.  
  1384. for ac_func in getcwd mkdir strerror strstr uname raise atexit
  1385. do
  1386. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1387. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1388.   echo $ac_n "(cached) $ac_c" 1>&6
  1389. else
  1390.   cat > conftest.$ac_ext <<EOF
  1391. #line 1392 "configure"
  1392. #include "confdefs.h"
  1393. /* System header to define __stub macros and hopefully few prototypes,
  1394.     which can conflict with char $ac_func(); below.  */
  1395. #include <assert.h>
  1396. /* Override any gcc2 internal prototype to avoid an error.  */
  1397. char $ac_func(); 
  1398.  
  1399. int main() { return 0; }
  1400. int t() {
  1401.  
  1402. /* The GNU C library defines this for functions which it implements
  1403.     to always fail with ENOSYS.  Some functions are actually named
  1404.     something starting with __ and the normal name is an alias.  */
  1405. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1406. choke me
  1407. #else
  1408. $ac_func();
  1409. #endif
  1410.  
  1411. ; return 0; }
  1412. EOF
  1413. if eval $ac_link; then
  1414.   rm -rf conftest*
  1415.   eval "ac_cv_func_$ac_func=yes"
  1416. else
  1417.   rm -rf conftest*
  1418.   eval "ac_cv_func_$ac_func=no"
  1419. fi
  1420. rm -f conftest*
  1421.  
  1422. fi
  1423. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1424.   echo "$ac_t""yes" 1>&6
  1425.     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  1426.   cat >> confdefs.h <<EOF
  1427. #define $ac_tr_func 1
  1428. EOF
  1429.  
  1430. else
  1431.   echo "$ac_t""no" 1>&6
  1432. fi
  1433. done
  1434.  
  1435.  
  1436. trap '' 1 2 15
  1437. cat > confcache <<\EOF
  1438. # This file is a shell script that caches the results of configure
  1439. # tests run on this system so they can be shared between configure
  1440. # scripts and configure runs.  It is not useful on other systems.
  1441. # If it contains results you don't want to keep, you may remove or edit it.
  1442. #
  1443. # By default, configure uses ./config.cache as the cache file,
  1444. # creating it if it does not exist already.  You can give configure
  1445. # the --cache-file=FILE option to use a different cache file; that is
  1446. # what configure does when it calls configure scripts in
  1447. # subdirectories, so they share the cache.
  1448. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  1449. # config.status only pays attention to the cache file if you give it the
  1450. # --recheck option to rerun configure.
  1451. #
  1452. EOF
  1453. # Ultrix sh set writes to stderr and can't be redirected directly,
  1454. # and sets the high bit in the cache file unless we assign to the vars.
  1455. (set) 2>&1 |
  1456.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  1457.   >> confcache
  1458. if cmp -s $cache_file confcache; then
  1459.   :
  1460. else
  1461.   if test -w $cache_file; then
  1462.     echo "updating cache $cache_file"
  1463.     cat confcache > $cache_file
  1464.   else
  1465.     echo "not updating unwritable cache $cache_file"
  1466.   fi
  1467. fi
  1468. rm -f confcache
  1469.  
  1470. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  1471.  
  1472. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  1473. # Let make expand exec_prefix.
  1474. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1475.  
  1476. # Any assignment to VPATH causes Sun make to only execute
  1477. # the first set of double-colon rules, so remove it if not needed.
  1478. # If there is a colon in the path, we need to keep it.
  1479. if test "x$srcdir" = x.; then
  1480.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1481. fi
  1482.  
  1483. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1484.  
  1485. DEFS=-DHAVE_CONFIG_H
  1486.  
  1487. # Without the "./", some shells look in PATH for config.status.
  1488. : ${CONFIG_STATUS=./config.status}
  1489.  
  1490. echo creating $CONFIG_STATUS
  1491. rm -f $CONFIG_STATUS
  1492. cat > $CONFIG_STATUS <<EOF
  1493. #! /bin/sh
  1494. # Generated automatically by configure.
  1495. # Run this file to recreate the current configuration.
  1496. # This directory was configured as follows,
  1497. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1498. #
  1499. # $0 $ac_configure_args
  1500. #
  1501. # Compiler output produced by configure, useful for debugging
  1502. # configure, is in ./config.log if it exists.
  1503.  
  1504. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1505. for ac_option
  1506. do
  1507.   case "\$ac_option" in
  1508.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1509.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  1510.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  1511.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1512.     echo "$CONFIG_STATUS generated by autoconf version 2.4"
  1513.     exit 0 ;;
  1514.   -help | --help | --hel | --he | --h)
  1515.     echo "\$ac_cs_usage"; exit 0 ;;
  1516.   *) echo "\$ac_cs_usage"; exit 1 ;;
  1517.   esac
  1518. done
  1519.  
  1520. ac_given_srcdir=$srcdir
  1521. ac_given_INSTALL="$INSTALL"
  1522.  
  1523. trap 'rm -fr `echo "Makefile lib/Makefile commons/Makefile ffscan/Makefile fflow/Makefile ftags/Makefile autoconf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  1524.  
  1525. # Protect against being on the right side of a sed subst in config.status. 
  1526. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  1527.  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  1528. $ac_vpsub
  1529. $extrasub
  1530. s%@CFLAGS@%$CFLAGS%g
  1531. s%@CPPFLAGS@%$CPPFLAGS%g
  1532. s%@CXXFLAGS@%$CXXFLAGS%g
  1533. s%@DEFS@%$DEFS%g
  1534. s%@LDFLAGS@%$LDFLAGS%g
  1535. s%@LIBS@%$LIBS%g
  1536. s%@exec_prefix@%$exec_prefix%g
  1537. s%@prefix@%$prefix%g
  1538. s%@program_transform_name@%$program_transform_name%g
  1539. s%@CC@%$CC%g
  1540. s%@SET_MAKE@%$SET_MAKE%g
  1541. s%@RANLIB@%$RANLIB%g
  1542. s%@LEX@%$LEX%g
  1543. s%@LEXLIB@%$LEXLIB%g
  1544. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1545. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1546. s%@CPP@%$CPP%g
  1547. s%@ALLOCA@%$ALLOCA%g
  1548.  
  1549. CEOF
  1550. EOF
  1551. cat >> $CONFIG_STATUS <<EOF
  1552.  
  1553. CONFIG_FILES=\${CONFIG_FILES-"Makefile lib/Makefile commons/Makefile ffscan/Makefile fflow/Makefile ftags/Makefile"}
  1554. EOF
  1555. cat >> $CONFIG_STATUS <<\EOF
  1556. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  1557.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1558.   case "$ac_file" in
  1559.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1560.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1561.   *) ac_file_in="${ac_file}.in" ;;
  1562.   esac
  1563.  
  1564.   # Adjust relative srcdir, etc. for subdirectories.
  1565.  
  1566.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1567.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1568.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1569.     # The file is in a subdirectory.
  1570.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1571.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  1572.     # A "../" for each directory in $ac_dir_suffix.
  1573.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1574.   else
  1575.     ac_dir_suffix= ac_dots=
  1576.   fi
  1577.  
  1578.   case "$ac_given_srcdir" in
  1579.   .)  srcdir=.
  1580.       if test -z "$ac_dots"; then top_srcdir=.
  1581.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  1582.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1583.   *) # Relative path.
  1584.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1585.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1586.   esac
  1587.  
  1588.   case "$ac_given_INSTALL" in
  1589.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  1590.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  1591.   esac
  1592.   echo creating "$ac_file"
  1593.   rm -f "$ac_file"
  1594.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  1595.   case "$ac_file" in
  1596.   *Makefile*) ac_comsub="1i\\
  1597. # $configure_input" ;;
  1598.   *) ac_comsub= ;;
  1599.   esac
  1600.   sed -e "$ac_comsub
  1601. s%@configure_input@%$configure_input%g
  1602. s%@srcdir@%$srcdir%g
  1603. s%@top_srcdir@%$top_srcdir%g
  1604. s%@INSTALL@%$INSTALL%g
  1605. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  1606. fi; done
  1607. rm -f conftest.subs
  1608.  
  1609. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  1610. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  1611. #
  1612. # ac_d sets the value in "#define NAME VALUE" lines.
  1613. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  1614. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  1615. ac_dC='\3'
  1616. ac_dD='%g'
  1617. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  1618. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1619. ac_uB='\([     ]\)%\1#\2define\3'
  1620. ac_uC=' '
  1621. ac_uD='\4%g'
  1622. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  1623. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1624. ac_eB='$%\1#\2define\3'
  1625. ac_eC=' '
  1626. ac_eD='%g'
  1627.  
  1628. CONFIG_HEADERS=${CONFIG_HEADERS-"autoconf.h"}
  1629. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  1630.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1631.   case "$ac_file" in
  1632.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1633.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1634.   *) ac_file_in="${ac_file}.in" ;;
  1635.   esac
  1636.  
  1637.   echo creating $ac_file
  1638.  
  1639.   rm -f conftest.frag conftest.in conftest.out
  1640.   cp $ac_given_srcdir/$ac_file_in conftest.in
  1641.  
  1642. EOF
  1643.  
  1644. # Transform confdefs.h into a sed script conftest.vals that substitutes
  1645. # the proper values into config.h.in to produce config.h.  And first:
  1646. # Protect against being on the right side of a sed subst in config.status. 
  1647. # Protect against being in an unquoted here document in config.status.
  1648. rm -f conftest.vals
  1649. cat > conftest.hdr <<\EOF
  1650. s/[\\&%]/\\&/g
  1651. s%[\\$`]%\\&%g
  1652. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  1653. s%ac_d%ac_u%gp
  1654. s%ac_u%ac_e%gp
  1655. EOF
  1656. sed -n -f conftest.hdr confdefs.h > conftest.vals
  1657. rm -f conftest.hdr
  1658.  
  1659. # This sed command replaces #undef with comments.  This is necessary, for
  1660. # example, in the case of _POSIX_SOURCE, which is predefined and required
  1661. # on some systems where configure will not decide to define it.
  1662. cat >> conftest.vals <<\EOF
  1663. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  1664. EOF
  1665.  
  1666. # Break up conftest.vals because some shells have a limit on
  1667. # the size of here documents, and old seds have small limits too.
  1668. # Maximum number of lines to put in a single here document.
  1669. ac_max_here_lines=12
  1670.  
  1671. rm -f conftest.tail
  1672. while :
  1673. do
  1674.   ac_lines=`grep -c . conftest.vals`
  1675.   # grep -c gives empty output for an empty file on some AIX systems.
  1676.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1677.   # Write a limited-size here document to conftest.frag.
  1678.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  1679.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  1680.   echo 'CEOF
  1681.   sed -f conftest.frag conftest.in > conftest.out
  1682.   rm -f conftest.in
  1683.   mv conftest.out conftest.in
  1684. ' >> $CONFIG_STATUS
  1685.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  1686.   rm -f conftest.vals
  1687.   mv conftest.tail conftest.vals
  1688. done
  1689. rm -f conftest.vals
  1690.  
  1691. cat >> $CONFIG_STATUS <<\EOF
  1692.   rm -f conftest.frag conftest.h
  1693.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  1694.   cat conftest.in >> conftest.h
  1695.   rm -f conftest.in
  1696.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  1697.     echo "$ac_file is unchanged"
  1698.     rm -f conftest.h
  1699.   else
  1700.     rm -f $ac_file
  1701.     mv conftest.h $ac_file
  1702.   fi
  1703. fi; done
  1704.  
  1705.  
  1706.  
  1707. exit 0
  1708. EOF
  1709. chmod +x $CONFIG_STATUS
  1710. rm -fr confdefs* $ac_clean_files
  1711. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  1712.  
  1713.