home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gnufind.zip / configure < prev    next >
Text File  |  1994-11-04  |  70KB  |  2,775 lines

  1. #!/bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.1 
  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. ac_help="$ac_help
  15.   --enable-id-cache       cache all UIDs & GIDs; avoid if using NIS or Hesiod"
  16. ac_help="$ac_help
  17.   --with-afs              support -fstype afs"
  18.  
  19. # Initialize some variables set by options.
  20. # The variables have the same names as the options, with
  21. # dashes changed to underlines.
  22. build=NONE
  23. cache_file=./config.cache
  24. exec_prefix=NONE
  25. host=NONE
  26. no_create=
  27. nonopt=NONE
  28. no_recursion=
  29. prefix=NONE
  30. program_prefix=NONE
  31. program_suffix=NONE
  32. program_transform_name=s,x,x,
  33. silent=
  34. site=
  35. srcdir=
  36. target=NONE
  37. verbose=
  38. x_includes=NONE
  39. x_libraries=NONE
  40.  
  41. # Initialize some other variables.
  42. subdirs=
  43.  
  44. ac_prev=
  45. for ac_option
  46. do
  47.  
  48.   # If the previous option needs an argument, assign it.
  49.   if test -n "$ac_prev"; then
  50.     eval "$ac_prev=\$ac_option"
  51.     ac_prev=
  52.     continue
  53.   fi
  54.  
  55.   case "$ac_option" in
  56.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  57.   *) ac_optarg= ;;
  58.   esac
  59.  
  60.   # Accept the important Cygnus configure options, so we can diagnose typos.
  61.  
  62.   case "$ac_option" in
  63.  
  64.   -build | --build | --buil | --bui | --bu | --b)
  65.     ac_prev=build ;;
  66.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  67.     build="$ac_optarg" ;;
  68.  
  69.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  70.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  71.     ac_prev=cache_file ;;
  72.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  73.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  74.     cache_file="$ac_optarg" ;;
  75.  
  76.   -disable-* | --disable-*)
  77.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  78.     # Reject names that are not valid shell variable names.
  79.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  80.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  81.     fi
  82.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  83.     eval "enable_${ac_feature}=no" ;;
  84.  
  85.   -enable-* | --enable-*)
  86.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  87.     # Reject names that are not valid shell variable names.
  88.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  89.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  90.     fi
  91.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  92.     case "$ac_option" in
  93.       *=*) ;;
  94.       *) ac_optarg=yes ;;
  95.     esac
  96.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  97.  
  98.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  99.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  100.   | --exec | --exe | --ex)
  101.     ac_prev=exec_prefix ;;
  102.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  103.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  104.   | --exec=* | --exe=* | --ex=*)
  105.     exec_prefix="$ac_optarg" ;;
  106.  
  107.   -gas | --gas | --ga | --g)
  108.     # Obsolete; use --with-gas.
  109.     with_gas=yes ;;
  110.  
  111.   -help | --help | --hel | --he)
  112.     # Omit some internal or obsolete options to make the list less imposing.
  113.     # This message is too long to be a string in the A/UX 3.1 sh.
  114.     cat << EOF
  115. Usage: configure [options] [host]
  116. Options: [defaults in brackets after descriptions]
  117. Configuration:
  118.   --cache-file=FILE       cache test results in FILE
  119.   --help                  print this message
  120.   --no-create             do not create output files
  121.   --quiet, --silent       do not print \`checking...' messages
  122.   --version               print the version of autoconf that created configure
  123. Directory and file names:
  124.   --prefix=PREFIX         install architecture-independent files in PREFIX
  125.                           [$ac_default_prefix]
  126.   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
  127.                           [same as prefix]
  128.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  129.   --program-prefix=PREFIX prepend PREFIX to installed program names
  130.   --program-suffix=SUFFIX append SUFFIX to installed program names
  131.   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  132. Host type:
  133.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  134.   --host=HOST             configure for HOST [guessed]
  135.   --target=TARGET         configure for TARGET [TARGET=HOST]
  136. Features and packages:
  137.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  138.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  139.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  140.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  141.   --x-includes=DIR        X include files are in DIR
  142.   --x-libraries=DIR       X library files are in DIR
  143. --enable and --with options recognized:$ac_help
  144. EOF
  145.     exit 0 ;;
  146.  
  147.   -host | --host | --hos | --ho)
  148.     ac_prev=host ;;
  149.   -host=* | --host=* | --hos=* | --ho=*)
  150.     host="$ac_optarg" ;;
  151.  
  152.   -nfp | --nfp | --nf)
  153.     # Obsolete; use --without-fp.
  154.     with_fp=no ;;
  155.  
  156.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  157.   | --no-cr | --no-c)
  158.     no_create=yes ;;
  159.  
  160.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  161.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  162.     no_recursion=yes ;;
  163.  
  164.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  165.     ac_prev=prefix ;;
  166.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  167.     prefix="$ac_optarg" ;;
  168.  
  169.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  170.   | --program-pre | --program-pr | --program-p)
  171.     ac_prev=program_prefix ;;
  172.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  173.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  174.     program_prefix="$ac_optarg" ;;
  175.  
  176.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  177.   | --program-suf | --program-su | --program-s)
  178.     ac_prev=program_suffix ;;
  179.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  180.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  181.     program_suffix="$ac_optarg" ;;
  182.  
  183.   -program-transform-name | --program-transform-name \
  184.   | --program-transform-nam | --program-transform-na \
  185.   | --program-transform-n | --program-transform- \
  186.   | --program-transform | --program-transfor \
  187.   | --program-transfo | --program-transf \
  188.   | --program-trans | --program-tran \
  189.   | --progr-tra | --program-tr | --program-t)
  190.     ac_prev=program_transform_name ;;
  191.   -program-transform-name=* | --program-transform-name=* \
  192.   | --program-transform-nam=* | --program-transform-na=* \
  193.   | --program-transform-n=* | --program-transform-=* \
  194.   | --program-transform=* | --program-transfor=* \
  195.   | --program-transfo=* | --program-transf=* \
  196.   | --program-trans=* | --program-tran=* \
  197.   | --progr-tra=* | --program-tr=* | --program-t=*)
  198.     program_transform_name="$ac_optarg" ;;
  199.  
  200.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  201.   | -silent | --silent | --silen | --sile | --sil)
  202.     silent=yes ;;
  203.  
  204.   -site | --site | --sit)
  205.     ac_prev=site ;;
  206.   -site=* | --site=* | --sit=*)
  207.     site="$ac_optarg" ;;
  208.  
  209.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  210.     ac_prev=srcdir ;;
  211.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  212.     srcdir="$ac_optarg" ;;
  213.  
  214.   -target | --target | --targe | --targ | --tar | --ta | --t)
  215.     ac_prev=target ;;
  216.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  217.     target="$ac_optarg" ;;
  218.  
  219.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  220.     verbose=yes ;;
  221.  
  222.   -version | --version | --versio | --versi | --vers)
  223.     echo "configure generated by autoconf version 2.1"
  224.     exit 0 ;;
  225.  
  226.   -with-* | --with-*)
  227.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  228.     # Reject names that are not valid shell variable names.
  229.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  230.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  231.     fi
  232.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  233.     case "$ac_option" in
  234.       *=*) ;;
  235.       *) ac_optarg=yes ;;
  236.     esac
  237.     eval "with_${ac_package}='$ac_optarg'" ;;
  238.  
  239.   -without-* | --without-*)
  240.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  241.     # Reject names that are not valid shell variable names.
  242.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  243.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  244.     fi
  245.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  246.     eval "with_${ac_package}=no" ;;
  247.  
  248.   --x)
  249.     # Obsolete; use --with-x.
  250.     with_x=yes ;;
  251.  
  252.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  253.   | --x-incl | --x-inc | --x-in | --x-i)
  254.     ac_prev=x_includes ;;
  255.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  256.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  257.     x_includes="$ac_optarg" ;;
  258.  
  259.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  260.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  261.     ac_prev=x_libraries ;;
  262.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  263.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  264.     x_libraries="$ac_optarg" ;;
  265.  
  266.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  267.     ;;
  268.  
  269.   *) 
  270.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  271.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  272.     fi
  273.     if test "x$nonopt" != xNONE; then
  274.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  275.     fi
  276.     nonopt="$ac_option"
  277.     ;;
  278.  
  279.   esac
  280. done
  281.  
  282. if test -n "$ac_prev"; then
  283.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  284. fi
  285.  
  286. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  287.  
  288. # File descriptor usage:
  289. # 0 unused; standard input
  290. # 1 file creation
  291. # 2 errors and warnings
  292. # 3 unused; some systems may open it to /dev/tty
  293. # 4 checking for... messages and results
  294. # 5 compiler messages saved in config.log
  295. if test "$silent" = yes; then
  296.   exec 4>/dev/null
  297. else
  298.   exec 4>&1
  299. fi
  300. exec 5>./config.log
  301.  
  302. echo "\
  303. This file contains any messages produced by compilers while
  304. running configure, to aid debugging if configure makes a mistake.
  305. " 1>&5
  306.  
  307. # Strip out --no-create and --no-recursion so they do not pile up.
  308. # Also quote any args containing shell metacharacters.
  309. ac_configure_args=
  310. for ac_arg
  311. do
  312.   case "$ac_arg" in
  313.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  314.   | --no-cr | --no-c) ;;
  315.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  316.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  317.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  318.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  319.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  320.   esac
  321. done
  322.  
  323. # NLS nuisances.
  324. # Only set LANG and LC_ALL to C if already set.
  325. # These must not be set unconditionally because not all systems understand
  326. # e.g. LANG=C (notably SCO).
  327. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  328. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  329.  
  330. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  331. rm -rf conftest* confdefs.h
  332. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  333. echo > confdefs.h
  334.  
  335. # A filename unique to this package, relative to the directory that
  336. # configure is in, which we can look for to find out if srcdir is correct.
  337. ac_unique_file=find/pred.c
  338.  
  339. # Find the source files, if location was not specified.
  340. if test -z "$srcdir"; then
  341.   ac_srcdir_defaulted=yes
  342.   # Try the directory containing this script, then its parent.
  343.   ac_prog=$0
  344.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  345.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  346.   srcdir=$ac_confdir
  347.   if test ! -r $srcdir/$ac_unique_file; then
  348.     srcdir=..
  349.   fi
  350. else
  351.   ac_srcdir_defaulted=no
  352. fi
  353. if test ! -r $srcdir/$ac_unique_file; then
  354.   if test "$ac_srcdir_defaulted" = yes; then
  355.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  356.   else
  357.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  358.   fi
  359. fi
  360. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  361.  
  362. # Prefer explicitly selected file to automatically selected ones.
  363. if test -z "$CONFIG_SITE"; then
  364.   if test "x$prefix" != xNONE; then
  365.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  366.   else
  367.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  368.   fi
  369. fi
  370. for ac_site_file in $CONFIG_SITE; do
  371.   if test -r "$ac_site_file"; then
  372.     echo "loading site script $ac_site_file"
  373.     . "$ac_site_file"
  374.   fi
  375. done
  376.  
  377. if test -r "$cache_file"; then
  378.   echo "loading cache $cache_file"
  379.   . $cache_file
  380. else
  381.   echo "creating cache $cache_file"
  382.   > $cache_file
  383. fi
  384.  
  385. ac_ext=c
  386. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  387. ac_cpp='$CPP $CPPFLAGS'
  388. ac_compile='${CC-cc} $CFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&5 2>&5'
  389. ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5'
  390.  
  391. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  392.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  393.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  394.     ac_n= ac_c='
  395. ' ac_t='    '
  396.   else
  397.     ac_n=-n ac_c= ac_t=
  398.   fi
  399. else
  400.   ac_n= ac_c='\c' ac_t=
  401. fi
  402.  
  403.  
  404.  
  405.  
  406. # Check whether --enable-id-cache or --disable-id-cache was given.
  407. enableval="$enable_id_cache"
  408. if test -n "$enableval"; then
  409.   cat >> confdefs.h <<\EOF
  410. #define CACHE_IDS 1
  411. EOF
  412.  
  413. fi
  414.  
  415. # Check whether --with-afs or --without-afs was given.
  416. withval="$with_afs"
  417. if test -n "$withval"; then
  418.     cat >> confdefs.h <<\EOF
  419. #define AFS 1
  420. EOF
  421.  
  422.   CPPFLAGS="$CPPFLAGS -I/usr/afsws/include"
  423.   LIBS="$LIBS -L/usr/afsws/lib -L/usr/afsws/lib/afs -lsys -lrx -llwp"
  424. fi
  425.  
  426. if test "$program_transform_name" = s,x,x,; then
  427.   program_transform_name=
  428. else
  429.   # Double any \ or $.
  430.   echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
  431.   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
  432.   rm -f conftestsed
  433. fi
  434. test "$program_prefix" != NONE &&
  435.   program_transform_name="s,^,${program_prefix},; $program_transform_name"
  436. # Use a double $ so make ignores it.
  437. test "$program_suffix" != NONE &&
  438.   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
  439.  
  440. # sed with no file args requires a program.
  441. test "$program_transform_name" = "" && program_transform_name="s,x,x,"
  442.  
  443.  
  444. # Extract the first word of "gcc", so it can be a program name with args.
  445. set dummy gcc; ac_word=$2
  446. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  447. if eval "test \"`echo '${'ac_cv_prog_CC'+set}'`\" = set"; then
  448.   echo $ac_n "(cached) $ac_c" 1>&4
  449. else
  450.   if test -n "$CC"; then
  451.   ac_cv_prog_CC="$CC" # Let the user override the test.
  452. else
  453.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  454.   for ac_dir in $PATH; do
  455.     test -z "$ac_dir" && ac_dir=.
  456.     if test -f $ac_dir/$ac_word; then
  457.       ac_cv_prog_CC="gcc"
  458.       break
  459.     fi
  460.   done
  461.   IFS="$ac_save_ifs"
  462.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  463. fi
  464. fi
  465. CC="$ac_cv_prog_CC"
  466. if test -n "$CC"; then
  467.   echo "$ac_t""$CC" 1>&4
  468. else
  469.   echo "$ac_t""no" 1>&4
  470. fi
  471.  
  472.  
  473. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&4
  474. if eval "test \"`echo '${'ac_cv_prog_gcc'+set}'`\" = set"; then
  475.   echo $ac_n "(cached) $ac_c" 1>&4
  476. else
  477.   cat > conftest.c <<EOF
  478. #ifdef __GNUC__
  479.   yes;
  480. #endif
  481. EOF
  482. if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  483.   ac_cv_prog_gcc=yes
  484. else
  485.   ac_cv_prog_gcc=no
  486. fi
  487. fi
  488. echo "$ac_t""$ac_cv_prog_gcc" 1>&4
  489. if test $ac_cv_prog_gcc = yes; then
  490.   GCC=yes
  491.   if test "${CFLAGS+set}" != set; then
  492.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&4
  493. if eval "test \"`echo '${'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  494.   echo $ac_n "(cached) $ac_c" 1>&4
  495. else
  496.   echo 'void f(){}' > conftest.c
  497. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  498.   ac_cv_prog_gcc_g=yes
  499. else
  500.   ac_cv_prog_gcc_g=no
  501. fi
  502. rm -f conftest*
  503.  
  504. fi
  505.     echo "$ac_t""$ac_cv_prog_gcc_g" 1>&4
  506.     if test $ac_cv_prog_gcc_g = yes; then
  507.       CFLAGS="-g -O"
  508.     else
  509.       CFLAGS="-O"
  510.     fi
  511.   fi
  512. else
  513.   GCC=
  514.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  515. fi
  516.  
  517. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&4
  518. # On Suns, sometimes $CPP names a directory.
  519. if test -n "$CPP" && test -d "$CPP"; then
  520.   CPP=
  521. fi
  522. if test -z "$CPP"; then
  523. if eval "test \"`echo '${'ac_cv_prog_CPP'+set}'`\" = set"; then
  524.   echo $ac_n "(cached) $ac_c" 1>&4
  525. else
  526.     # This must be in double quotes, not single quotes, because CPP may get
  527.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  528.   CPP="${CC-cc} -E"
  529.   # On the NeXT, cc -E runs the code through the compiler's parser,
  530.   # not just through cpp.
  531.   cat > conftest.$ac_ext <<EOF
  532. #line 533 "configure"
  533. #include "confdefs.h"
  534. #include <assert.h>
  535. Syntax Error
  536. EOF
  537. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  538. ac_err=`grep -v '^ *+' conftest.out`
  539. if test -z "$ac_err"; then
  540.   :
  541. else
  542.   echo "$ac_err" >&5
  543.   rm -rf conftest*
  544.   CPP="${CC-cc} -E -traditional-cpp"
  545.   cat > conftest.$ac_ext <<EOF
  546. #line 547 "configure"
  547. #include "confdefs.h"
  548. #include <assert.h>
  549. Syntax Error
  550. EOF
  551. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  552. ac_err=`grep -v '^ *+' conftest.out`
  553. if test -z "$ac_err"; then
  554.   :
  555. else
  556.   echo "$ac_err" >&5
  557.   rm -rf conftest*
  558.   CPP=/lib/cpp
  559. fi
  560. rm -f conftest*
  561. fi
  562. rm -f conftest*
  563.   ac_cv_prog_CPP="$CPP"
  564. fi
  565. fi
  566. CPP="$ac_cv_prog_CPP"
  567. echo "$ac_t""$CPP" 1>&4
  568.  
  569. ac_aux_dir=
  570. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  571.   if test -f $ac_dir/install-sh; then
  572.     ac_aux_dir=$ac_dir
  573.     ac_install_sh="$ac_aux_dir/install-sh -c"
  574.     break
  575.   elif test -f $ac_dir/install.sh; then
  576.     ac_aux_dir=$ac_dir
  577.     ac_install_sh="$ac_aux_dir/install.sh -c"
  578.     break
  579.   fi
  580. done
  581. if test -z "$ac_aux_dir"; then
  582.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  583. fi
  584. ac_config_guess=$ac_aux_dir/config.guess
  585. ac_config_sub=$ac_aux_dir/config.sub
  586. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  587.  
  588. # Find a good install program.  We prefer a C program (faster),
  589. # so one script is as good as another.  But avoid the broken or
  590. # incompatible versions:
  591. # SysV /etc/install, /usr/sbin/install
  592. # SunOS /usr/etc/install
  593. # IRIX /sbin/install
  594. # AIX /bin/install
  595. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  596. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  597. # ./install, which can be erroneously created by make from ./install.sh.
  598. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&4
  599. if test -z "$INSTALL"; then
  600. if eval "test \"`echo '${'ac_cv_path_install'+set}'`\" = set"; then
  601.   echo $ac_n "(cached) $ac_c" 1>&4
  602. else
  603.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  604.   for ac_dir in $PATH; do
  605.     case "$ac_dir" in
  606.     ''|.|/etc|/usr/sbin|/usr/etc|/sbin|/usr/afsws/bin|/usr/ucb) ;;
  607.     *)
  608.       # OSF1 and SCO ODT 3.0 have their own names for install.
  609.       for ac_prog in ginstall installbsd scoinst install; do
  610.         if test -f $ac_dir/$ac_prog; then
  611.       if test $ac_prog = install &&
  612.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  613.         # AIX install.  It has an incompatible calling convention.
  614.         # OSF/1 installbsd also uses dspmsg, but is usable.
  615.         :
  616.       else
  617.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  618.         break 2
  619.       fi
  620.     fi
  621.       done
  622.       ;;
  623.     esac
  624.   done
  625.   IFS="$ac_save_ifs"
  626.   # As a last resort, use the slow shell script.
  627.   test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
  628. fi
  629.   INSTALL="$ac_cv_path_install"
  630. fi
  631. echo "$ac_t""$INSTALL" 1>&4
  632.  
  633. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  634. # It thinks the first close brace ends the variable substitution.
  635. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  636.  
  637. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  638.  
  639. # Extract the first word of "ranlib", so it can be a program name with args.
  640. set dummy ranlib; ac_word=$2
  641. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  642. if eval "test \"`echo '${'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  643.   echo $ac_n "(cached) $ac_c" 1>&4
  644. else
  645.   if test -n "$RANLIB"; then
  646.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  647. else
  648.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  649.   for ac_dir in $PATH; do
  650.     test -z "$ac_dir" && ac_dir=.
  651.     if test -f $ac_dir/$ac_word; then
  652.       ac_cv_prog_RANLIB="ranlib"
  653.       break
  654.     fi
  655.   done
  656.   IFS="$ac_save_ifs"
  657.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  658. fi
  659. fi
  660. RANLIB="$ac_cv_prog_RANLIB"
  661. if test -n "$RANLIB"; then
  662.   echo "$ac_t""$RANLIB" 1>&4
  663. else
  664.   echo "$ac_t""no" 1>&4
  665. fi
  666.  
  667. echo $ac_n "checking whether ${MAKE-make} sets \$MAKE""... $ac_c" 1>&4
  668. set dummy ${MAKE-make}; ac_make=$2
  669. if eval "test \"`echo '${'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  670.   echo $ac_n "(cached) $ac_c" 1>&4
  671. else
  672.   cat > conftestmake <<\EOF
  673. all:
  674.     @echo 'ac_maketemp="${MAKE}"'
  675. EOF
  676. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  677. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  678. if test -n "$ac_maketemp"; then
  679.   eval ac_cv_prog_make_${ac_make}_set=yes
  680. else
  681.   eval ac_cv_prog_make_${ac_make}_set=no
  682. fi
  683. rm -f conftestmake
  684. fi
  685. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  686.   echo "$ac_t""yes" 1>&4
  687.   SET_MAKE=
  688. else
  689.   echo "$ac_t""no" 1>&4
  690.   SET_MAKE="MAKE=${MAKE-make}"
  691. fi
  692.  
  693.  
  694. echo $ac_n "checking for AIX""... $ac_c" 1>&4
  695. cat > conftest.$ac_ext <<EOF
  696. #line 697 "configure"
  697. #include "confdefs.h"
  698. #ifdef _AIX
  699.   yes
  700. #endif
  701.  
  702. EOF
  703. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  704.   egrep "yes" >/dev/null 2>&1; then
  705.   rm -rf conftest*
  706.   echo "$ac_t""yes" 1>&4; cat >> confdefs.h <<\EOF
  707. #define _ALL_SOURCE 1
  708. EOF
  709.  
  710. else
  711.   rm -rf conftest*
  712.   echo "$ac_t""no" 1>&4
  713. fi
  714. rm -f conftest*
  715.  
  716.  
  717. ac_safe=`echo "minix/config.h" | tr './\055' '___'`
  718. echo $ac_n "checking for minix/config.h""... $ac_c" 1>&4
  719. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  720.   echo $ac_n "(cached) $ac_c" 1>&4
  721. else
  722.   cat > conftest.$ac_ext <<EOF
  723. #line 724 "configure"
  724. #include "confdefs.h"
  725. #include <minix/config.h>
  726. EOF
  727. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  728. ac_err=`grep -v '^ *+' conftest.out`
  729. if test -z "$ac_err"; then
  730.   rm -rf conftest*
  731.   eval "ac_cv_header_$ac_safe=yes"
  732. else
  733.   echo "$ac_err" >&5
  734.   rm -rf conftest*
  735.   eval "ac_cv_header_$ac_safe=no"
  736. fi
  737. rm -f conftest*
  738. fi
  739. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  740.   echo "$ac_t""yes" 1>&4
  741.   MINIX=yes
  742. else
  743.   echo "$ac_t""no" 1>&4
  744. MINIX=
  745. fi
  746.  
  747. if test "$MINIX" = yes; then
  748.   cat >> confdefs.h <<\EOF
  749. #define _POSIX_SOURCE 1
  750. EOF
  751.  
  752.   cat >> confdefs.h <<\EOF
  753. #define _POSIX_1_SOURCE 2
  754. EOF
  755.  
  756.   cat >> confdefs.h <<\EOF
  757. #define _MINIX 1
  758. EOF
  759.  
  760. fi
  761.  
  762. echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&4
  763. if test -d /etc/conf/kconfig.d &&
  764.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  765. then
  766.   echo "$ac_t""yes" 1>&4
  767.   ISC=yes # If later tests want to check for ISC.
  768.   cat >> confdefs.h <<\EOF
  769. #define _POSIX_SOURCE 1
  770. EOF
  771.  
  772.   if test "$GCC" = yes; then
  773.     CC="$CC -posix"
  774.   else
  775.     CC="$CC -Xp"
  776.   fi
  777. else
  778.   echo "$ac_t""no" 1>&4
  779.   ISC=
  780. fi
  781.  
  782.  
  783. echo $ac_n "checking for -lsun""... $ac_c" 1>&4
  784. if eval "test \"`echo '${'ac_cv_lib_sun'+set}'`\" = set"; then
  785.   echo $ac_n "(cached) $ac_c" 1>&4
  786. else
  787.   ac_save_LIBS="$LIBS"
  788. LIBS="$LIBS -lsun "
  789. cat > conftest.$ac_ext <<EOF
  790. #line 791 "configure"
  791. #include "confdefs.h"
  792.  
  793. int main() { return 0; }
  794. int t() {
  795. getpwnam()
  796. ; return 0; }
  797. EOF
  798. if eval $ac_link; then
  799.   rm -rf conftest*
  800.   eval "ac_cv_lib_sun=yes"
  801. else
  802.   rm -rf conftest*
  803.   eval "ac_cv_lib_sun=no"
  804. fi
  805. rm -f conftest*
  806. LIBS="$ac_save_LIBS"
  807.  
  808. fi
  809. if eval "test \"`echo '$ac_cv_lib_'sun`\" = yes"; then
  810.   echo "$ac_t""yes" 1>&4
  811.     ac_tr_lib=HAVE_LIB`echo sun | tr '[a-z]' '[A-Z]'`
  812.   cat >> confdefs.h <<EOF
  813. #define $ac_tr_lib 1
  814. EOF
  815.  
  816.   LIBS="$LIBS -lsun"
  817.  
  818. else
  819.   echo "$ac_t""no" 1>&4
  820. fi
  821.  
  822.  
  823. for ac_hdr in fcntl.h string.h limits.h unistd.h
  824. do
  825. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  826. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
  827. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  828.   echo $ac_n "(cached) $ac_c" 1>&4
  829. else
  830.   cat > conftest.$ac_ext <<EOF
  831. #line 832 "configure"
  832. #include "confdefs.h"
  833. #include <$ac_hdr>
  834. EOF
  835. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  836. ac_err=`grep -v '^ *+' conftest.out`
  837. if test -z "$ac_err"; then
  838.   rm -rf conftest*
  839.   eval "ac_cv_header_$ac_safe=yes"
  840. else
  841.   echo "$ac_err" >&5
  842.   rm -rf conftest*
  843.   eval "ac_cv_header_$ac_safe=no"
  844. fi
  845. rm -f conftest*
  846. fi
  847. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  848.   echo "$ac_t""yes" 1>&4
  849.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  850.   cat >> confdefs.h <<EOF
  851. #define $ac_tr_hdr 1
  852. EOF
  853.  
  854. else
  855.   echo "$ac_t""no" 1>&4
  856. fi
  857. done
  858.  
  859. # If we cannot run a trivial program, we must be cross compiling.
  860. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&4
  861. if eval "test \"`echo '${'ac_cv_c_cross'+set}'`\" = set"; then
  862.   echo $ac_n "(cached) $ac_c" 1>&4
  863. else
  864.   if test "$cross_compiling" = yes; then
  865.   ac_cv_cross=yes
  866. else
  867. cat > conftest.$ac_ext <<EOF
  868. #line 869 "configure"
  869. #include "confdefs.h"
  870. main(){return(0);}
  871. EOF
  872. eval $ac_link
  873. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  874.   ac_cv_c_cross=no
  875. else
  876.   ac_cv_c_cross=yes
  877. fi
  878. fi
  879. rm -fr conftest*
  880. fi
  881. cross_compiling=$ac_cv_c_cross
  882. echo "$ac_t""$ac_cv_c_cross" 1>&4
  883.  
  884. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&4
  885. if eval "test \"`echo '${'ac_cv_header_stdc'+set}'`\" = set"; then
  886.   echo $ac_n "(cached) $ac_c" 1>&4
  887. else
  888.   cat > conftest.$ac_ext <<EOF
  889. #line 890 "configure"
  890. #include "confdefs.h"
  891. #include <stdlib.h>
  892. #include <stdarg.h>
  893. #include <string.h>
  894. #include <float.h>
  895. EOF
  896. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  897. ac_err=`grep -v '^ *+' conftest.out`
  898. if test -z "$ac_err"; then
  899.   rm -rf conftest*
  900.   ac_cv_header_stdc=yes
  901. else
  902.   echo "$ac_err" >&5
  903.   rm -rf conftest*
  904.   ac_cv_header_stdc=no
  905. fi
  906. rm -f conftest*
  907.  
  908. if test $ac_cv_header_stdc = yes; then
  909.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  910. cat > conftest.$ac_ext <<EOF
  911. #line 912 "configure"
  912. #include "confdefs.h"
  913. #include <string.h>
  914. EOF
  915. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  916.   egrep "memchr" >/dev/null 2>&1; then
  917.   :
  918. else
  919.   rm -rf conftest*
  920.   ac_cv_header_stdc=no
  921. fi
  922. rm -f conftest*
  923.  
  924. fi
  925.  
  926. if test $ac_cv_header_stdc = yes; then
  927.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  928. cat > conftest.$ac_ext <<EOF
  929. #line 930 "configure"
  930. #include "confdefs.h"
  931. #include <stdlib.h>
  932. EOF
  933. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  934.   egrep "free" >/dev/null 2>&1; then
  935.   :
  936. else
  937.   rm -rf conftest*
  938.   ac_cv_header_stdc=no
  939. fi
  940. rm -f conftest*
  941.  
  942. fi
  943.  
  944. if test $ac_cv_header_stdc = yes; then
  945.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  946. if test "$cross_compiling" = yes; then
  947.   ac_cv_header_stdc=no
  948. else
  949. cat > conftest.$ac_ext <<EOF
  950. #line 951 "configure"
  951. #include "confdefs.h"
  952. #include <ctype.h>
  953. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  954. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  955. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  956. int main () { int i; for (i = 0; i < 256; i++)
  957. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  958. exit (0); }
  959.  
  960. EOF
  961. eval $ac_link
  962. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  963.   :
  964. else
  965.   ac_cv_header_stdc=no
  966. fi
  967. fi
  968. rm -fr conftest*
  969. fi
  970. fi
  971. echo "$ac_t""$ac_cv_header_stdc" 1>&4
  972. if test $ac_cv_header_stdc = yes; then
  973.   cat >> confdefs.h <<\EOF
  974. #define STDC_HEADERS 1
  975. EOF
  976.  
  977. fi
  978.  
  979. echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&4
  980. if eval "test \"`echo '${'ac_cv_header_sys_types_h_makedev'+set}'`\" = set"; then
  981.   echo $ac_n "(cached) $ac_c" 1>&4
  982. else
  983.   cat > conftest.$ac_ext <<EOF
  984. #line 985 "configure"
  985. #include "confdefs.h"
  986. #include <sys/types.h>
  987. int main() { return 0; }
  988. int t() {
  989. return makedev(0, 0);
  990. ; return 0; }
  991. EOF
  992. if eval $ac_link; then
  993.   rm -rf conftest*
  994.   ac_cv_header_sys_types_h_makedev=yes
  995. else
  996.   rm -rf conftest*
  997.   ac_cv_header_sys_types_h_makedev=no
  998. fi
  999. rm -f conftest*
  1000.  
  1001.  
  1002. fi
  1003. echo "$ac_t""$ac_cv_header_sys_types_h_makedev" 1>&4
  1004.  
  1005. if test $ac_cv_header_sys_types_h_makedev = no; then
  1006. ac_safe=`echo "sys/mkdev.h" | tr './\055' '___'`
  1007. echo $ac_n "checking for sys/mkdev.h""... $ac_c" 1>&4
  1008. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1009.   echo $ac_n "(cached) $ac_c" 1>&4
  1010. else
  1011.   cat > conftest.$ac_ext <<EOF
  1012. #line 1013 "configure"
  1013. #include "confdefs.h"
  1014. #include <sys/mkdev.h>
  1015. EOF
  1016. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1017. ac_err=`grep -v '^ *+' conftest.out`
  1018. if test -z "$ac_err"; then
  1019.   rm -rf conftest*
  1020.   eval "ac_cv_header_$ac_safe=yes"
  1021. else
  1022.   echo "$ac_err" >&5
  1023.   rm -rf conftest*
  1024.   eval "ac_cv_header_$ac_safe=no"
  1025. fi
  1026. rm -f conftest*
  1027. fi
  1028. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1029.   echo "$ac_t""yes" 1>&4
  1030.   cat >> confdefs.h <<\EOF
  1031. #define MAJOR_IN_MKDEV 1
  1032. EOF
  1033.  
  1034. else
  1035.   echo "$ac_t""no" 1>&4
  1036. fi
  1037.  
  1038.  
  1039.   if test $ac_cv_header_sys_mkdev_h = no; then
  1040. ac_safe=`echo "sys/sysmacros.h" | tr './\055' '___'`
  1041. echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&4
  1042. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1043.   echo $ac_n "(cached) $ac_c" 1>&4
  1044. else
  1045.   cat > conftest.$ac_ext <<EOF
  1046. #line 1047 "configure"
  1047. #include "confdefs.h"
  1048. #include <sys/sysmacros.h>
  1049. EOF
  1050. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1051. ac_err=`grep -v '^ *+' conftest.out`
  1052. if test -z "$ac_err"; then
  1053.   rm -rf conftest*
  1054.   eval "ac_cv_header_$ac_safe=yes"
  1055. else
  1056.   echo "$ac_err" >&5
  1057.   rm -rf conftest*
  1058.   eval "ac_cv_header_$ac_safe=no"
  1059. fi
  1060. rm -f conftest*
  1061. fi
  1062. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1063.   echo "$ac_t""yes" 1>&4
  1064.   cat >> confdefs.h <<\EOF
  1065. #define MAJOR_IN_SYSMACROS 1
  1066. EOF
  1067.  
  1068. else
  1069.   echo "$ac_t""no" 1>&4
  1070. fi
  1071.  
  1072.   fi
  1073. fi
  1074.  
  1075. ac_header_dirent=no
  1076. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  1077. do
  1078. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1079. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&4
  1080. if eval "test \"`echo '${'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  1081.   echo $ac_n "(cached) $ac_c" 1>&4
  1082. else
  1083.   cat > conftest.$ac_ext <<EOF
  1084. #line 1085 "configure"
  1085. #include "confdefs.h"
  1086. #include <sys/types.h>
  1087. #include <$ac_hdr>
  1088. int main() { return 0; }
  1089. int t() {
  1090. DIR *dirp = 0;
  1091. ; return 0; }
  1092. EOF
  1093. if eval $ac_compile; then
  1094.   rm -rf conftest*
  1095.   eval "ac_cv_header_dirent_$ac_safe=yes"
  1096. else
  1097.   rm -rf conftest*
  1098.   eval "ac_cv_header_dirent_$ac_safe=no"
  1099. fi
  1100. rm -f conftest*
  1101.  
  1102. fi
  1103. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  1104.   echo "$ac_t""yes" 1>&4
  1105.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  1106.   cat >> confdefs.h <<EOF
  1107. #define $ac_tr_hdr 1
  1108. EOF
  1109.  ac_header_dirent=$ac_hdr; break
  1110. else
  1111.   echo "$ac_t""no" 1>&4
  1112. fi
  1113. done
  1114. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  1115. if test $ac_header_dirent = dirent.h; then
  1116. echo $ac_n "checking for -ldir""... $ac_c" 1>&4
  1117. if eval "test \"`echo '${'ac_cv_lib_dir'+set}'`\" = set"; then
  1118.   echo $ac_n "(cached) $ac_c" 1>&4
  1119. else
  1120.   ac_save_LIBS="$LIBS"
  1121. LIBS="$LIBS -ldir "
  1122. cat > conftest.$ac_ext <<EOF
  1123. #line 1124 "configure"
  1124. #include "confdefs.h"
  1125.  
  1126. int main() { return 0; }
  1127. int t() {
  1128. opendir()
  1129. ; return 0; }
  1130. EOF
  1131. if eval $ac_link; then
  1132.   rm -rf conftest*
  1133.   eval "ac_cv_lib_dir=yes"
  1134. else
  1135.   rm -rf conftest*
  1136.   eval "ac_cv_lib_dir=no"
  1137. fi
  1138. rm -f conftest*
  1139. LIBS="$ac_save_LIBS"
  1140.  
  1141. fi
  1142. if eval "test \"`echo '$ac_cv_lib_'dir`\" = yes"; then
  1143.   echo "$ac_t""yes" 1>&4
  1144.   LIBS="$LIBS -ldir"
  1145. else
  1146.   echo "$ac_t""no" 1>&4
  1147. fi
  1148.  
  1149. else
  1150. echo $ac_n "checking for -lx""... $ac_c" 1>&4
  1151. if eval "test \"`echo '${'ac_cv_lib_x'+set}'`\" = set"; then
  1152.   echo $ac_n "(cached) $ac_c" 1>&4
  1153. else
  1154.   ac_save_LIBS="$LIBS"
  1155. LIBS="$LIBS -lx "
  1156. cat > conftest.$ac_ext <<EOF
  1157. #line 1158 "configure"
  1158. #include "confdefs.h"
  1159.  
  1160. int main() { return 0; }
  1161. int t() {
  1162. opendir()
  1163. ; return 0; }
  1164. EOF
  1165. if eval $ac_link; then
  1166.   rm -rf conftest*
  1167.   eval "ac_cv_lib_x=yes"
  1168. else
  1169.   rm -rf conftest*
  1170.   eval "ac_cv_lib_x=no"
  1171. fi
  1172. rm -f conftest*
  1173. LIBS="$ac_save_LIBS"
  1174.  
  1175. fi
  1176. if eval "test \"`echo '$ac_cv_lib_'x`\" = yes"; then
  1177.   echo "$ac_t""yes" 1>&4
  1178.   LIBS="$LIBS -lx"
  1179. else
  1180.   echo "$ac_t""no" 1>&4
  1181. fi
  1182.  
  1183. fi
  1184.  
  1185. echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&4
  1186. if eval "test \"`echo '${'ac_cv_header_stat_broken'+set}'`\" = set"; then
  1187.   echo $ac_n "(cached) $ac_c" 1>&4
  1188. else
  1189.   cat > conftest.$ac_ext <<EOF
  1190. #line 1191 "configure"
  1191. #include "confdefs.h"
  1192. #include <sys/types.h>
  1193. #include <sys/stat.h>
  1194. #ifdef S_ISBLK
  1195. # if S_ISBLK (S_IFDIR)
  1196. You lose.
  1197. # endif
  1198. # ifdef S_IFCHR
  1199. #  if S_ISBLK (S_IFCHR)
  1200. You lose.
  1201. #  endif
  1202. # endif
  1203. #endif
  1204.  
  1205. #ifdef S_ISLNK
  1206. # if S_ISLNK (S_IFREG)
  1207. You lose.
  1208. # endif
  1209. #endif
  1210.  
  1211. #ifdef S_ISSOCK
  1212. # if S_ISSOCK (S_IFREG)
  1213. You lose.
  1214. # endif
  1215. #endif
  1216.  
  1217. EOF
  1218. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1219.   egrep "You lose" >/dev/null 2>&1; then
  1220.   rm -rf conftest*
  1221.   ac_cv_header_stat_broken=yes
  1222. else
  1223.   rm -rf conftest*
  1224.   ac_cv_header_stat_broken=no
  1225. fi
  1226. rm -f conftest*
  1227.  
  1228. fi
  1229. echo "$ac_t""$ac_cv_header_stat_broken" 1>&4
  1230. if test $ac_cv_header_stat_broken = yes; then
  1231.   cat >> confdefs.h <<\EOF
  1232. #define STAT_MACROS_BROKEN 1
  1233. EOF
  1234.  
  1235. fi
  1236.  
  1237. echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&4
  1238. if eval "test \"`echo '${'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
  1239.   echo $ac_n "(cached) $ac_c" 1>&4
  1240. else
  1241.   cat > conftest.$ac_ext <<EOF
  1242. #line 1243 "configure"
  1243. #include "confdefs.h"
  1244. #include <sys/types.h>
  1245. #include <sys/wait.h>
  1246. #ifndef WEXITSTATUS
  1247. #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
  1248. #endif
  1249. #ifndef WIFEXITED
  1250. #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
  1251. #endif
  1252. int main() { return 0; }
  1253. int t() {
  1254. int s;
  1255. wait (&s);
  1256. s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  1257. ; return 0; }
  1258. EOF
  1259. if eval $ac_compile; then
  1260.   rm -rf conftest*
  1261.   ac_cv_header_sys_wait_h=yes
  1262. else
  1263.   rm -rf conftest*
  1264.   ac_cv_header_sys_wait_h=no
  1265. fi
  1266. rm -f conftest*
  1267.  
  1268. fi
  1269. echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&4
  1270. if test $ac_cv_header_sys_wait_h = yes; then
  1271.   cat >> confdefs.h <<\EOF
  1272. #define HAVE_SYS_WAIT_H 1
  1273. EOF
  1274.  
  1275. fi
  1276.  
  1277.  
  1278. echo $ac_n "checking how to get filesystem type""... $ac_c" 1>&4
  1279. fstype=no
  1280. # The order of these tests is important.
  1281. cat > conftest.$ac_ext <<EOF
  1282. #line 1283 "configure"
  1283. #include "confdefs.h"
  1284. #include <sys/statvfs.h>
  1285. #include <sys/fstyp.h>
  1286. EOF
  1287. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1288. ac_err=`grep -v '^ *+' conftest.out`
  1289. if test -z "$ac_err"; then
  1290.   rm -rf conftest*
  1291.   cat >> confdefs.h <<\EOF
  1292. #define FSTYPE_STATVFS 1
  1293. EOF
  1294.  fstype=SVR4
  1295. else
  1296.   echo "$ac_err" >&5
  1297. fi
  1298. rm -f conftest*
  1299. if test $fstype = no; then
  1300. cat > conftest.$ac_ext <<EOF
  1301. #line 1302 "configure"
  1302. #include "confdefs.h"
  1303. #include <sys/statfs.h>
  1304. #include <sys/fstyp.h>
  1305. EOF
  1306. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1307. ac_err=`grep -v '^ *+' conftest.out`
  1308. if test -z "$ac_err"; then
  1309.   rm -rf conftest*
  1310.   cat >> confdefs.h <<\EOF
  1311. #define FSTYPE_USG_STATFS 1
  1312. EOF
  1313.  fstype=SVR3
  1314. else
  1315.   echo "$ac_err" >&5
  1316. fi
  1317. rm -f conftest*
  1318. fi
  1319. if test $fstype = no; then
  1320. cat > conftest.$ac_ext <<EOF
  1321. #line 1322 "configure"
  1322. #include "confdefs.h"
  1323. #include <sys/statfs.h>
  1324. #include <sys/vmount.h>
  1325. EOF
  1326. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1327. ac_err=`grep -v '^ *+' conftest.out`
  1328. if test -z "$ac_err"; then
  1329.   rm -rf conftest*
  1330.   cat >> confdefs.h <<\EOF
  1331. #define FSTYPE_AIX_STATFS 1
  1332. EOF
  1333.  fstype=AIX
  1334. else
  1335.   echo "$ac_err" >&5
  1336. fi
  1337. rm -f conftest*
  1338. fi
  1339. if test $fstype = no; then  
  1340. cat > conftest.$ac_ext <<EOF
  1341. #line 1342 "configure"
  1342. #include "confdefs.h"
  1343. #include <mntent.h>
  1344. EOF
  1345. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1346. ac_err=`grep -v '^ *+' conftest.out`
  1347. if test -z "$ac_err"; then
  1348.   rm -rf conftest*
  1349.   cat >> confdefs.h <<\EOF
  1350. #define FSTYPE_MNTENT 1
  1351. EOF
  1352.  fstype=4.3BSD
  1353. else
  1354.   echo "$ac_err" >&5
  1355. fi
  1356. rm -f conftest*
  1357. fi
  1358. if test $fstype = no; then  
  1359. cat > conftest.$ac_ext <<EOF
  1360. #line 1361 "configure"
  1361. #include "confdefs.h"
  1362. #include <sys/mount.h>
  1363. EOF
  1364. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1365.   egrep "f_type;" >/dev/null 2>&1; then
  1366.   rm -rf conftest*
  1367.   cat >> confdefs.h <<\EOF
  1368. #define FSTYPE_STATFS 1
  1369. EOF
  1370.  fstype=4.4BSD/OSF1
  1371. fi
  1372. rm -f conftest*
  1373.  
  1374. fi
  1375. if test $fstype = no; then  
  1376. cat > conftest.$ac_ext <<EOF
  1377. #line 1378 "configure"
  1378. #include "confdefs.h"
  1379. #include <sys/mount.h>
  1380. #include <sys/fs_types.h>
  1381. EOF
  1382. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1383. ac_err=`grep -v '^ *+' conftest.out`
  1384. if test -z "$ac_err"; then
  1385.   rm -rf conftest*
  1386.   cat >> confdefs.h <<\EOF
  1387. #define FSTYPE_GETMNT 1
  1388. EOF
  1389.  fstype=Ultrix
  1390. else
  1391.   echo "$ac_err" >&5
  1392. fi
  1393. rm -f conftest*
  1394. fi
  1395. echo "$ac_t""$fstype" 1>&4
  1396.  
  1397.  
  1398. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&4
  1399. if eval "test \"`echo '${'ac_cv_type_uid_t'+set}'`\" = set"; then
  1400.   echo $ac_n "(cached) $ac_c" 1>&4
  1401. else
  1402.   cat > conftest.$ac_ext <<EOF
  1403. #line 1404 "configure"
  1404. #include "confdefs.h"
  1405. #include <sys/types.h>
  1406. EOF
  1407. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1408.   egrep "uid_t" >/dev/null 2>&1; then
  1409.   rm -rf conftest*
  1410.   ac_cv_type_uid_t=yes
  1411. else
  1412.   rm -rf conftest*
  1413.   ac_cv_type_uid_t=no
  1414. fi
  1415. rm -f conftest*
  1416.  
  1417. fi
  1418. echo "$ac_t""$ac_cv_type_uid_t" 1>&4
  1419. if test $ac_cv_type_uid_t = no; then
  1420.   cat >> confdefs.h <<\EOF
  1421. #define uid_t int
  1422. EOF
  1423.  
  1424.   cat >> confdefs.h <<\EOF
  1425. #define gid_t int
  1426. EOF
  1427.  
  1428. fi
  1429.  
  1430. echo $ac_n "checking for size_t""... $ac_c" 1>&4
  1431. if eval "test \"`echo '${'ac_cv_type_size_t'+set}'`\" = set"; then
  1432.   echo $ac_n "(cached) $ac_c" 1>&4
  1433. else
  1434.   cat > conftest.$ac_ext <<EOF
  1435. #line 1436 "configure"
  1436. #include "confdefs.h"
  1437. #include <sys/types.h>
  1438. #if STDC_HEADERS
  1439. #include <stdlib.h>
  1440. #endif
  1441. EOF
  1442. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1443.   egrep "size_t" >/dev/null 2>&1; then
  1444.   rm -rf conftest*
  1445.   ac_cv_type_size_t=yes
  1446. else
  1447.   rm -rf conftest*
  1448.   ac_cv_type_size_t=no
  1449. fi
  1450. rm -f conftest*
  1451.  
  1452. fi
  1453. echo "$ac_t""$ac_cv_type_size_t" 1>&4
  1454. if test $ac_cv_type_size_t = no; then
  1455.   cat >> confdefs.h <<\EOF
  1456. #define size_t unsigned
  1457. EOF
  1458.  
  1459. fi
  1460.  
  1461. echo $ac_n "checking for pid_t""... $ac_c" 1>&4
  1462. if eval "test \"`echo '${'ac_cv_type_pid_t'+set}'`\" = set"; then
  1463.   echo $ac_n "(cached) $ac_c" 1>&4
  1464. else
  1465.   cat > conftest.$ac_ext <<EOF
  1466. #line 1467 "configure"
  1467. #include "confdefs.h"
  1468. #include <sys/types.h>
  1469. #if STDC_HEADERS
  1470. #include <stdlib.h>
  1471. #endif
  1472. EOF
  1473. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1474.   egrep "pid_t" >/dev/null 2>&1; then
  1475.   rm -rf conftest*
  1476.   ac_cv_type_pid_t=yes
  1477. else
  1478.   rm -rf conftest*
  1479.   ac_cv_type_pid_t=no
  1480. fi
  1481. rm -f conftest*
  1482.  
  1483. fi
  1484. echo "$ac_t""$ac_cv_type_pid_t" 1>&4
  1485. if test $ac_cv_type_pid_t = no; then
  1486.   cat >> confdefs.h <<\EOF
  1487. #define pid_t int
  1488. EOF
  1489.  
  1490. fi
  1491.  
  1492. echo $ac_n "checking for ino_t""... $ac_c" 1>&4
  1493. if eval "test \"`echo '${'ac_cv_type_ino_t'+set}'`\" = set"; then
  1494.   echo $ac_n "(cached) $ac_c" 1>&4
  1495. else
  1496.   cat > conftest.$ac_ext <<EOF
  1497. #line 1498 "configure"
  1498. #include "confdefs.h"
  1499. #include <sys/types.h>
  1500. #if STDC_HEADERS
  1501. #include <stdlib.h>
  1502. #endif
  1503. EOF
  1504. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1505.   egrep "ino_t" >/dev/null 2>&1; then
  1506.   rm -rf conftest*
  1507.   ac_cv_type_ino_t=yes
  1508. else
  1509.   rm -rf conftest*
  1510.   ac_cv_type_ino_t=no
  1511. fi
  1512. rm -f conftest*
  1513.  
  1514. fi
  1515. echo "$ac_t""$ac_cv_type_ino_t" 1>&4
  1516. if test $ac_cv_type_ino_t = no; then
  1517.   cat >> confdefs.h <<\EOF
  1518. #define ino_t unsigned long
  1519. EOF
  1520.  
  1521. fi
  1522.  
  1523. echo $ac_n "checking for dev_t""... $ac_c" 1>&4
  1524. if eval "test \"`echo '${'ac_cv_type_dev_t'+set}'`\" = set"; then
  1525.   echo $ac_n "(cached) $ac_c" 1>&4
  1526. else
  1527.   cat > conftest.$ac_ext <<EOF
  1528. #line 1529 "configure"
  1529. #include "confdefs.h"
  1530. #include <sys/types.h>
  1531. #if STDC_HEADERS
  1532. #include <stdlib.h>
  1533. #endif
  1534. EOF
  1535. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1536.   egrep "dev_t" >/dev/null 2>&1; then
  1537.   rm -rf conftest*
  1538.   ac_cv_type_dev_t=yes
  1539. else
  1540.   rm -rf conftest*
  1541.   ac_cv_type_dev_t=no
  1542. fi
  1543. rm -f conftest*
  1544.  
  1545. fi
  1546. echo "$ac_t""$ac_cv_type_dev_t" 1>&4
  1547. if test $ac_cv_type_dev_t = no; then
  1548.   cat >> confdefs.h <<\EOF
  1549. #define dev_t unsigned long
  1550. EOF
  1551.  
  1552. fi
  1553.  
  1554. echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&4
  1555. if eval "test \"`echo '${'ac_cv_struct_st_blocks'+set}'`\" = set"; then
  1556.   echo $ac_n "(cached) $ac_c" 1>&4
  1557. else
  1558.   cat > conftest.$ac_ext <<EOF
  1559. #line 1560 "configure"
  1560. #include "confdefs.h"
  1561. #include <sys/types.h>
  1562. #include <sys/stat.h>
  1563. int main() { return 0; }
  1564. int t() {
  1565. struct stat s; s.st_blocks;
  1566. ; return 0; }
  1567. EOF
  1568. if eval $ac_compile; then
  1569.   rm -rf conftest*
  1570.   ac_cv_struct_st_blocks=yes
  1571. else
  1572.   rm -rf conftest*
  1573.   ac_cv_struct_st_blocks=no
  1574. fi
  1575. rm -f conftest*
  1576.  
  1577. fi
  1578. echo "$ac_t""$ac_cv_struct_st_blocks" 1>&4
  1579. if test $ac_cv_struct_st_blocks = yes; then
  1580.   cat >> confdefs.h <<\EOF
  1581. #define HAVE_ST_BLOCKS 1
  1582. EOF
  1583.  
  1584. else
  1585.   LIBOBJS="$LIBOBJS fileblocks.o"
  1586. fi
  1587.  
  1588. echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&4
  1589. if eval "test \"`echo '${'ac_cv_struct_st_rdev'+set}'`\" = set"; then
  1590.   echo $ac_n "(cached) $ac_c" 1>&4
  1591. else
  1592.   cat > conftest.$ac_ext <<EOF
  1593. #line 1594 "configure"
  1594. #include "confdefs.h"
  1595. #include <sys/types.h>
  1596. #include <sys/stat.h>
  1597. int main() { return 0; }
  1598. int t() {
  1599. struct stat s; s.st_rdev;
  1600. ; return 0; }
  1601. EOF
  1602. if eval $ac_compile; then
  1603.   rm -rf conftest*
  1604.   ac_cv_struct_st_rdev=yes
  1605. else
  1606.   rm -rf conftest*
  1607.   ac_cv_struct_st_rdev=no
  1608. fi
  1609. rm -f conftest*
  1610.  
  1611. fi
  1612. echo "$ac_t""$ac_cv_struct_st_rdev" 1>&4
  1613. if test $ac_cv_struct_st_rdev = yes; then
  1614.   cat >> confdefs.h <<\EOF
  1615. #define HAVE_ST_RDEV 1
  1616. EOF
  1617.  
  1618. fi
  1619.  
  1620. echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&4
  1621. if eval "test \"`echo '${'ac_cv_struct_tm'+set}'`\" = set"; then
  1622.   echo $ac_n "(cached) $ac_c" 1>&4
  1623. else
  1624.   cat > conftest.$ac_ext <<EOF
  1625. #line 1626 "configure"
  1626. #include "confdefs.h"
  1627. #include <sys/types.h>
  1628. #include <time.h>
  1629. int main() { return 0; }
  1630. int t() {
  1631. struct tm *tp; tp->tm_sec;
  1632. ; return 0; }
  1633. EOF
  1634. if eval $ac_compile; then
  1635.   rm -rf conftest*
  1636.   ac_cv_struct_tm=time.h
  1637. else
  1638.   rm -rf conftest*
  1639.   ac_cv_struct_tm=sys/time.h
  1640. fi
  1641. rm -f conftest*
  1642.  
  1643. fi
  1644. echo "$ac_t""$ac_cv_struct_tm" 1>&4
  1645. if test $ac_cv_struct_tm = sys/time.h; then
  1646.   cat >> confdefs.h <<\EOF
  1647. #define TM_IN_SYS_TIME 1
  1648. EOF
  1649.  
  1650. fi
  1651.  
  1652. echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&4
  1653. if eval "test \"`echo '${'ac_cv_struct_tm_zone'+set}'`\" = set"; then
  1654.   echo $ac_n "(cached) $ac_c" 1>&4
  1655. else
  1656.   cat > conftest.$ac_ext <<EOF
  1657. #line 1658 "configure"
  1658. #include "confdefs.h"
  1659. #include <sys/types.h>
  1660. #include <$ac_cv_struct_tm>
  1661. int main() { return 0; }
  1662. int t() {
  1663. struct tm tm; tm.tm_zone;
  1664. ; return 0; }
  1665. EOF
  1666. if eval $ac_compile; then
  1667.   rm -rf conftest*
  1668.   ac_cv_struct_tm_zone=yes
  1669. else
  1670.   rm -rf conftest*
  1671.   ac_cv_struct_tm_zone=no
  1672. fi
  1673. rm -f conftest*
  1674.  
  1675. fi
  1676. echo "$ac_t""$ac_cv_struct_tm_zone" 1>&4
  1677. if test "$ac_cv_struct_tm_zone" = yes; then
  1678.   cat >> confdefs.h <<\EOF
  1679. #define HAVE_TM_ZONE 1
  1680. EOF
  1681.  
  1682. else
  1683.   echo $ac_n "checking for tzname""... $ac_c" 1>&4
  1684. if eval "test \"`echo '${'ac_cv_var_tzname'+set}'`\" = set"; then
  1685.   echo $ac_n "(cached) $ac_c" 1>&4
  1686. else
  1687.   cat > conftest.$ac_ext <<EOF
  1688. #line 1689 "configure"
  1689. #include "confdefs.h"
  1690. #include <time.h>
  1691. #ifndef tzname /* For SGI.  */
  1692. extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
  1693. #endif
  1694. int main() { return 0; }
  1695. int t() {
  1696. atoi(*tzname);
  1697. ; return 0; }
  1698. EOF
  1699. if eval $ac_link; then
  1700.   rm -rf conftest*
  1701.   ac_cv_var_tzname=yes
  1702. else
  1703.   rm -rf conftest*
  1704.   ac_cv_var_tzname=no
  1705. fi
  1706. rm -f conftest*
  1707.  
  1708. fi
  1709.   echo "$ac_t""$ac_cv_var_tzname" 1>&4
  1710.   if test $ac_cv_var_tzname = yes; then
  1711.     cat >> confdefs.h <<\EOF
  1712. #define HAVE_TZNAME 1
  1713. EOF
  1714.  
  1715.   fi
  1716. fi
  1717.  
  1718. echo $ac_n "checking for working const""... $ac_c" 1>&4
  1719. if eval "test \"`echo '${'ac_cv_c_const'+set}'`\" = set"; then
  1720.   echo $ac_n "(cached) $ac_c" 1>&4
  1721. else
  1722.   cat > conftest.$ac_ext <<EOF
  1723. #line 1724 "configure"
  1724. #include "confdefs.h"
  1725.  
  1726. int main() { return 0; }
  1727. int t() {
  1728.  
  1729. /* Ultrix mips cc rejects this.  */
  1730. typedef int charset[2]; const charset x;
  1731. /* SunOS 4.1.1 cc rejects this.  */
  1732. char const *const *ccp;
  1733. char **p;
  1734. /* NEC SVR4.0.2 mips cc rejects this.  */
  1735. struct point {int x, y;};
  1736. static struct point const zero;
  1737. /* AIX XL C 1.02.0.0 rejects this.
  1738.    It does not let you subtract one const X* pointer from another in an arm
  1739.    of an if-expression whose if-part is not a constant expression */
  1740. const char *g = "string";
  1741. ccp = &g + (g ? g-g : 0);
  1742. /* HPUX 7.0 cc rejects these. */
  1743. ++ccp;
  1744. p = (char**) ccp;
  1745. ccp = (char const *const *) p;
  1746. { /* SCO 3.2v4 cc rejects this.  */
  1747.   char *t;
  1748.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  1749.  
  1750.   *t++ = 0;
  1751. }
  1752. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1753.   int x[] = {25, 17};
  1754.   const int *foo = &x[0];
  1755.   ++foo;
  1756. }
  1757. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1758.   typedef const int *iptr;
  1759.   iptr p = 0;
  1760.   ++p;
  1761. }
  1762. { /* AIX XL C 1.02.0.0 rejects this saying
  1763.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1764.   struct s { int j; const int *ap[3]; };
  1765.   struct s *b; b->j = 5;
  1766. }
  1767. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1768.   const int foo = 10;
  1769. }
  1770.  
  1771. ; return 0; }
  1772. EOF
  1773. if eval $ac_compile; then
  1774.   rm -rf conftest*
  1775.   ac_cv_c_const=yes
  1776. else
  1777.   rm -rf conftest*
  1778.   ac_cv_c_const=no
  1779. fi
  1780. rm -f conftest*
  1781.  
  1782. fi
  1783. echo "$ac_t""$ac_cv_c_const" 1>&4
  1784. if test $ac_cv_c_const = no; then
  1785.   cat >> confdefs.h <<\EOF
  1786. #define const 
  1787. EOF
  1788.  
  1789. fi
  1790.  
  1791.  
  1792.  
  1793. for ac_func in memcmp memset mktime stpcpy strdup strftime strspn strstr strtol
  1794. do
  1795. echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
  1796. if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1797.   echo $ac_n "(cached) $ac_c" 1>&4
  1798. else
  1799.   cat > conftest.$ac_ext <<EOF
  1800. #line 1801 "configure"
  1801. #include "confdefs.h"
  1802. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1803. /* Override any gcc2 internal prototype to avoid an error.  */
  1804. char $ac_func(); 
  1805.  
  1806. int main() { return 0; }
  1807. int t() {
  1808.  
  1809. /* The GNU C library defines this for functions which it implements
  1810.     to always fail with ENOSYS.  Some functions are actually named
  1811.     something starting with __ and the normal name is an alias.  */
  1812. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1813. choke me
  1814. #else
  1815. $ac_func();
  1816. #endif
  1817.  
  1818. ; return 0; }
  1819. EOF
  1820. if eval $ac_link; then
  1821.   rm -rf conftest*
  1822.   eval "ac_cv_func_$ac_func=yes"
  1823. else
  1824.   rm -rf conftest*
  1825.   eval "ac_cv_func_$ac_func=no"
  1826. fi
  1827. rm -f conftest*
  1828.  
  1829. fi
  1830. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1831.   echo "$ac_t""yes" 1>&4
  1832.   :
  1833. else
  1834.   echo "$ac_t""no" 1>&4
  1835. LIBOBJS="$LIBOBJS ${ac_func}.o"
  1836. fi
  1837.  
  1838. done
  1839.  
  1840. for ac_func in fchdir getcwd strerror
  1841. do
  1842. echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
  1843. if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1844.   echo $ac_n "(cached) $ac_c" 1>&4
  1845. else
  1846.   cat > conftest.$ac_ext <<EOF
  1847. #line 1848 "configure"
  1848. #include "confdefs.h"
  1849. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1850. /* Override any gcc2 internal prototype to avoid an error.  */
  1851. char $ac_func(); 
  1852.  
  1853. int main() { return 0; }
  1854. int t() {
  1855.  
  1856. /* The GNU C library defines this for functions which it implements
  1857.     to always fail with ENOSYS.  Some functions are actually named
  1858.     something starting with __ and the normal name is an alias.  */
  1859. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1860. choke me
  1861. #else
  1862. $ac_func();
  1863. #endif
  1864.  
  1865. ; return 0; }
  1866. EOF
  1867. if eval $ac_link; then
  1868.   rm -rf conftest*
  1869.   eval "ac_cv_func_$ac_func=yes"
  1870. else
  1871.   rm -rf conftest*
  1872.   eval "ac_cv_func_$ac_func=no"
  1873. fi
  1874. rm -f conftest*
  1875.  
  1876. fi
  1877. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1878.   echo "$ac_t""yes" 1>&4
  1879.     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  1880.   cat >> confdefs.h <<EOF
  1881. #define $ac_tr_func 1
  1882. EOF
  1883.  
  1884. else
  1885.   echo "$ac_t""no" 1>&4
  1886. fi
  1887. done
  1888.  
  1889. # strftime is in -lintl on SCO UNIX.
  1890. echo $ac_n "checking for -lintl""... $ac_c" 1>&4
  1891. if eval "test \"`echo '${'ac_cv_lib_intl'+set}'`\" = set"; then
  1892.   echo $ac_n "(cached) $ac_c" 1>&4
  1893. else
  1894.   ac_save_LIBS="$LIBS"
  1895. LIBS="$LIBS -lintl "
  1896. cat > conftest.$ac_ext <<EOF
  1897. #line 1898 "configure"
  1898. #include "confdefs.h"
  1899.  
  1900. int main() { return 0; }
  1901. int t() {
  1902. strftime()
  1903. ; return 0; }
  1904. EOF
  1905. if eval $ac_link; then
  1906.   rm -rf conftest*
  1907.   eval "ac_cv_lib_intl=yes"
  1908. else
  1909.   rm -rf conftest*
  1910.   eval "ac_cv_lib_intl=no"
  1911. fi
  1912. rm -f conftest*
  1913. LIBS="$ac_save_LIBS"
  1914.  
  1915. fi
  1916. if eval "test \"`echo '$ac_cv_lib_'intl`\" = yes"; then
  1917.   echo "$ac_t""yes" 1>&4
  1918.   LIBS="$LIBS -lintl"
  1919. else
  1920.   echo "$ac_t""no" 1>&4
  1921. fi
  1922.  
  1923. echo $ac_n "checking for strftime""... $ac_c" 1>&4
  1924. if eval "test \"`echo '${'ac_cv_func_strftime'+set}'`\" = set"; then
  1925.   echo $ac_n "(cached) $ac_c" 1>&4
  1926. else
  1927.   cat > conftest.$ac_ext <<EOF
  1928. #line 1929 "configure"
  1929. #include "confdefs.h"
  1930. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1931. /* Override any gcc2 internal prototype to avoid an error.  */
  1932. char strftime(); 
  1933.  
  1934. int main() { return 0; }
  1935. int t() {
  1936.  
  1937. /* The GNU C library defines this for functions which it implements
  1938.     to always fail with ENOSYS.  Some functions are actually named
  1939.     something starting with __ and the normal name is an alias.  */
  1940. #if defined (__stub_strftime) || defined (__stub___strftime)
  1941. choke me
  1942. #else
  1943. strftime();
  1944. #endif
  1945.  
  1946. ; return 0; }
  1947. EOF
  1948. if eval $ac_link; then
  1949.   rm -rf conftest*
  1950.   eval "ac_cv_func_strftime=yes"
  1951. else
  1952.   rm -rf conftest*
  1953.   eval "ac_cv_func_strftime=no"
  1954. fi
  1955. rm -f conftest*
  1956.  
  1957. fi
  1958. if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
  1959.   echo "$ac_t""yes" 1>&4
  1960.   cat >> confdefs.h <<\EOF
  1961. #define HAVE_STRFTIME 1
  1962. EOF
  1963.  
  1964. else
  1965.   echo "$ac_t""no" 1>&4
  1966. fi
  1967.  
  1968. echo $ac_n "checking for vprintf""... $ac_c" 1>&4
  1969. if eval "test \"`echo '${'ac_cv_func_vprintf'+set}'`\" = set"; then
  1970.   echo $ac_n "(cached) $ac_c" 1>&4
  1971. else
  1972.   cat > conftest.$ac_ext <<EOF
  1973. #line 1974 "configure"
  1974. #include "confdefs.h"
  1975. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1976. /* Override any gcc2 internal prototype to avoid an error.  */
  1977. char vprintf(); 
  1978.  
  1979. int main() { return 0; }
  1980. int t() {
  1981.  
  1982. /* The GNU C library defines this for functions which it implements
  1983.     to always fail with ENOSYS.  Some functions are actually named
  1984.     something starting with __ and the normal name is an alias.  */
  1985. #if defined (__stub_vprintf) || defined (__stub___vprintf)
  1986. choke me
  1987. #else
  1988. vprintf();
  1989. #endif
  1990.  
  1991. ; return 0; }
  1992. EOF
  1993. if eval $ac_link; then
  1994.   rm -rf conftest*
  1995.   eval "ac_cv_func_vprintf=yes"
  1996. else
  1997.   rm -rf conftest*
  1998.   eval "ac_cv_func_vprintf=no"
  1999. fi
  2000. rm -f conftest*
  2001.  
  2002. fi
  2003. if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
  2004.   echo "$ac_t""yes" 1>&4
  2005.   cat >> confdefs.h <<\EOF
  2006. #define HAVE_VPRINTF 1
  2007. EOF
  2008.  
  2009. else
  2010.   echo "$ac_t""no" 1>&4
  2011. fi
  2012.  
  2013. if test "$ac_cv_func_vprintf" != yes; then
  2014. echo $ac_n "checking for _doprnt""... $ac_c" 1>&4
  2015. if eval "test \"`echo '${'ac_cv_func__doprnt'+set}'`\" = set"; then
  2016.   echo $ac_n "(cached) $ac_c" 1>&4
  2017. else
  2018.   cat > conftest.$ac_ext <<EOF
  2019. #line 2020 "configure"
  2020. #include "confdefs.h"
  2021. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  2022. /* Override any gcc2 internal prototype to avoid an error.  */
  2023. char _doprnt(); 
  2024.  
  2025. int main() { return 0; }
  2026. int t() {
  2027.  
  2028. /* The GNU C library defines this for functions which it implements
  2029.     to always fail with ENOSYS.  Some functions are actually named
  2030.     something starting with __ and the normal name is an alias.  */
  2031. #if defined (__stub__doprnt) || defined (__stub____doprnt)
  2032. choke me
  2033. #else
  2034. _doprnt();
  2035. #endif
  2036.  
  2037. ; return 0; }
  2038. EOF
  2039. if eval $ac_link; then
  2040.   rm -rf conftest*
  2041.   eval "ac_cv_func__doprnt=yes"
  2042. else
  2043.   rm -rf conftest*
  2044.   eval "ac_cv_func__doprnt=no"
  2045. fi
  2046. rm -f conftest*
  2047.  
  2048. fi
  2049. if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
  2050.   echo "$ac_t""yes" 1>&4
  2051.   cat >> confdefs.h <<\EOF
  2052. #define HAVE_DOPRNT 1
  2053. EOF
  2054.  
  2055. else
  2056.   echo "$ac_t""no" 1>&4
  2057. fi
  2058.  
  2059. fi
  2060.  
  2061. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  2062. # for constant arguments.  Useless!
  2063. echo $ac_n "checking for working alloca.h""... $ac_c" 1>&4
  2064. if eval "test \"`echo '${'ac_cv_header_alloca_h'+set}'`\" = set"; then
  2065.   echo $ac_n "(cached) $ac_c" 1>&4
  2066. else
  2067.   cat > conftest.$ac_ext <<EOF
  2068. #line 2069 "configure"
  2069. #include "confdefs.h"
  2070. #include <alloca.h>
  2071. int main() { return 0; }
  2072. int t() {
  2073. char *p = alloca(2 * sizeof(int));
  2074. ; return 0; }
  2075. EOF
  2076. if eval $ac_link; then
  2077.   rm -rf conftest*
  2078.   ac_cv_header_alloca_h=yes
  2079. else
  2080.   rm -rf conftest*
  2081.   ac_cv_header_alloca_h=no
  2082. fi
  2083. rm -f conftest*
  2084.  
  2085. fi
  2086. echo "$ac_t""$ac_cv_header_alloca_h" 1>&4
  2087. if test $ac_cv_header_alloca_h = yes; then
  2088.   cat >> confdefs.h <<\EOF
  2089. #define HAVE_ALLOCA_H 1
  2090. EOF
  2091.  
  2092. fi
  2093.  
  2094. echo $ac_n "checking for alloca""... $ac_c" 1>&4
  2095. if eval "test \"`echo '${'ac_cv_func_alloca'+set}'`\" = set"; then
  2096.   echo $ac_n "(cached) $ac_c" 1>&4
  2097. else
  2098.   cat > conftest.$ac_ext <<EOF
  2099. #line 2100 "configure"
  2100. #include "confdefs.h"
  2101.  
  2102. #ifdef __GNUC__
  2103. # define alloca __builtin_alloca
  2104. #else
  2105. # if HAVE_ALLOCA_H
  2106. #  include <alloca.h>
  2107. # else
  2108. #  ifdef _AIX
  2109.  #pragma alloca
  2110. #  else
  2111. #   ifndef alloca /* predefined by HP cc +Olibcalls */
  2112. char *alloca ();
  2113. #   endif
  2114. #  endif
  2115. # endif
  2116. #endif
  2117.  
  2118. int main() { return 0; }
  2119. int t() {
  2120. char *p = (char *) alloca(1);
  2121. ; return 0; }
  2122. EOF
  2123. if eval $ac_link; then
  2124.   rm -rf conftest*
  2125.   ac_cv_func_alloca=yes
  2126. else
  2127.   rm -rf conftest*
  2128.   ac_cv_func_alloca=no
  2129. fi
  2130. rm -f conftest*
  2131.  
  2132. fi
  2133. echo "$ac_t""$ac_cv_func_alloca" 1>&4
  2134. if test $ac_cv_func_alloca = yes; then
  2135.   cat >> confdefs.h <<\EOF
  2136. #define HAVE_ALLOCA 1
  2137. EOF
  2138.  
  2139. fi
  2140.  
  2141. if test $ac_cv_func_alloca = no; then
  2142.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  2143.   # that cause trouble.  Some versions do not even contain alloca or
  2144.   # contain a buggy version.  If you still want to use their alloca,
  2145.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  2146.   ALLOCA=alloca.o
  2147.   cat >> confdefs.h <<\EOF
  2148. #define C_ALLOCA 1
  2149. EOF
  2150.  
  2151.  
  2152. echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&4
  2153. if eval "test \"`echo '${'ac_cv_os_cray'+set}'`\" = set"; then
  2154.   echo $ac_n "(cached) $ac_c" 1>&4
  2155. else
  2156.   cat > conftest.$ac_ext <<EOF
  2157. #line 2158 "configure"
  2158. #include "confdefs.h"
  2159. #if defined(CRAY) && ! defined(CRAY2)
  2160. webecray
  2161. #else
  2162. wenotbecray
  2163. #endif
  2164.  
  2165. EOF
  2166. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2167.   egrep "webecray" >/dev/null 2>&1; then
  2168.   rm -rf conftest*
  2169.   ac_cv_os_cray=yes
  2170. else
  2171.   rm -rf conftest*
  2172.   ac_cv_os_cray=no
  2173. fi
  2174. rm -f conftest*
  2175.  
  2176. fi
  2177. echo "$ac_t""$ac_cv_os_cray" 1>&4
  2178. if test $ac_cv_os_cray = yes; then
  2179. echo $ac_n "checking for _getb67""... $ac_c" 1>&4
  2180. if eval "test \"`echo '${'ac_cv_func__getb67'+set}'`\" = set"; then
  2181.   echo $ac_n "(cached) $ac_c" 1>&4
  2182. else
  2183.   cat > conftest.$ac_ext <<EOF
  2184. #line 2185 "configure"
  2185. #include "confdefs.h"
  2186. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  2187. /* Override any gcc2 internal prototype to avoid an error.  */
  2188. char _getb67(); 
  2189.  
  2190. int main() { return 0; }
  2191. int t() {
  2192.  
  2193. /* The GNU C library defines this for functions which it implements
  2194.     to always fail with ENOSYS.  Some functions are actually named
  2195.     something starting with __ and the normal name is an alias.  */
  2196. #if defined (__stub__getb67) || defined (__stub____getb67)
  2197. choke me
  2198. #else
  2199. _getb67();
  2200. #endif
  2201.  
  2202. ; return 0; }
  2203. EOF
  2204. if eval $ac_link; then
  2205.   rm -rf conftest*
  2206.   eval "ac_cv_func__getb67=yes"
  2207. else
  2208.   rm -rf conftest*
  2209.   eval "ac_cv_func__getb67=no"
  2210. fi
  2211. rm -f conftest*
  2212.  
  2213. fi
  2214. if eval "test \"`echo '$ac_cv_func_'_getb67`\" = yes"; then
  2215.   echo "$ac_t""yes" 1>&4
  2216.   cat >> confdefs.h <<\EOF
  2217. #define CRAY_STACKSEG_END _getb67
  2218. EOF
  2219.  
  2220. else
  2221.   echo "$ac_t""no" 1>&4
  2222. echo $ac_n "checking for GETB67""... $ac_c" 1>&4
  2223. if eval "test \"`echo '${'ac_cv_func_GETB67'+set}'`\" = set"; then
  2224.   echo $ac_n "(cached) $ac_c" 1>&4
  2225. else
  2226.   cat > conftest.$ac_ext <<EOF
  2227. #line 2228 "configure"
  2228. #include "confdefs.h"
  2229. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  2230. /* Override any gcc2 internal prototype to avoid an error.  */
  2231. char GETB67(); 
  2232.  
  2233. int main() { return 0; }
  2234. int t() {
  2235.  
  2236. /* The GNU C library defines this for functions which it implements
  2237.     to always fail with ENOSYS.  Some functions are actually named
  2238.     something starting with __ and the normal name is an alias.  */
  2239. #if defined (__stub_GETB67) || defined (__stub___GETB67)
  2240. choke me
  2241. #else
  2242. GETB67();
  2243. #endif
  2244.  
  2245. ; return 0; }
  2246. EOF
  2247. if eval $ac_link; then
  2248.   rm -rf conftest*
  2249.   eval "ac_cv_func_GETB67=yes"
  2250. else
  2251.   rm -rf conftest*
  2252.   eval "ac_cv_func_GETB67=no"
  2253. fi
  2254. rm -f conftest*
  2255.  
  2256. fi
  2257. if eval "test \"`echo '$ac_cv_func_'GETB67`\" = yes"; then
  2258.   echo "$ac_t""yes" 1>&4
  2259.   cat >> confdefs.h <<\EOF
  2260. #define CRAY_STACKSEG_END GETB67
  2261. EOF
  2262.  
  2263. else
  2264.   echo "$ac_t""no" 1>&4
  2265. echo $ac_n "checking for getb67""... $ac_c" 1>&4
  2266. if eval "test \"`echo '${'ac_cv_func_getb67'+set}'`\" = set"; then
  2267.   echo $ac_n "(cached) $ac_c" 1>&4
  2268. else
  2269.   cat > conftest.$ac_ext <<EOF
  2270. #line 2271 "configure"
  2271. #include "confdefs.h"
  2272. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  2273. /* Override any gcc2 internal prototype to avoid an error.  */
  2274. char getb67(); 
  2275.  
  2276. int main() { return 0; }
  2277. int t() {
  2278.  
  2279. /* The GNU C library defines this for functions which it implements
  2280.     to always fail with ENOSYS.  Some functions are actually named
  2281.     something starting with __ and the normal name is an alias.  */
  2282. #if defined (__stub_getb67) || defined (__stub___getb67)
  2283. choke me
  2284. #else
  2285. getb67();
  2286. #endif
  2287.  
  2288. ; return 0; }
  2289. EOF
  2290. if eval $ac_link; then
  2291.   rm -rf conftest*
  2292.   eval "ac_cv_func_getb67=yes"
  2293. else
  2294.   rm -rf conftest*
  2295.   eval "ac_cv_func_getb67=no"
  2296. fi
  2297. rm -f conftest*
  2298.  
  2299. fi
  2300. if eval "test \"`echo '$ac_cv_func_'getb67`\" = yes"; then
  2301.   echo "$ac_t""yes" 1>&4
  2302.   cat >> confdefs.h <<\EOF
  2303. #define CRAY_STACKSEG_END getb67
  2304. EOF
  2305.  
  2306. else
  2307.   echo "$ac_t""no" 1>&4
  2308. fi
  2309.  
  2310. fi
  2311.  
  2312. fi
  2313.  
  2314. fi
  2315.  
  2316. echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&4
  2317. if eval "test \"`echo '${'ac_cv_c_stack_direction'+set}'`\" = set"; then
  2318.   echo $ac_n "(cached) $ac_c" 1>&4
  2319. else
  2320.   if test "$cross_compiling" = yes; then
  2321.   ac_cv_c_stack_direction=0
  2322. else
  2323. cat > conftest.$ac_ext <<EOF
  2324. #line 2325 "configure"
  2325. #include "confdefs.h"
  2326. find_stack_direction ()
  2327. {
  2328.   static char *addr = 0;
  2329.   auto char dummy;
  2330.   if (addr == 0)
  2331.     {
  2332.       addr = &dummy;
  2333.       return find_stack_direction ();
  2334.     }
  2335.   else
  2336.     return (&dummy > addr) ? 1 : -1;
  2337. }
  2338. main ()
  2339. {
  2340.   exit (find_stack_direction() < 0);
  2341. }
  2342. EOF
  2343. eval $ac_link
  2344. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2345.   ac_cv_c_stack_direction=1
  2346. else
  2347.   ac_cv_c_stack_direction=-1
  2348. fi
  2349. fi
  2350. rm -fr conftest*
  2351. fi
  2352. echo "$ac_t""$ac_cv_c_stack_direction" 1>&4
  2353. cat >> confdefs.h <<EOF
  2354. #define STACK_DIRECTION $ac_cv_c_stack_direction
  2355. EOF
  2356.  
  2357. fi
  2358.  
  2359. # getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX.
  2360. echo $ac_n "checking for -lsun""... $ac_c" 1>&4
  2361. if eval "test \"`echo '${'ac_cv_lib_sun'+set}'`\" = set"; then
  2362.   echo $ac_n "(cached) $ac_c" 1>&4
  2363. else
  2364.   ac_save_LIBS="$LIBS"
  2365. LIBS="$LIBS -lsun "
  2366. cat > conftest.$ac_ext <<EOF
  2367. #line 2368 "configure"
  2368. #include "confdefs.h"
  2369.  
  2370. int main() { return 0; }
  2371. int t() {
  2372. getmntent()
  2373. ; return 0; }
  2374. EOF
  2375. if eval $ac_link; then
  2376.   rm -rf conftest*
  2377.   eval "ac_cv_lib_sun=yes"
  2378. else
  2379.   rm -rf conftest*
  2380.   eval "ac_cv_lib_sun=no"
  2381. fi
  2382. rm -f conftest*
  2383. LIBS="$ac_save_LIBS"
  2384.  
  2385. fi
  2386. if eval "test \"`echo '$ac_cv_lib_'sun`\" = yes"; then
  2387.   echo "$ac_t""yes" 1>&4
  2388.   LIBS="$LIBS -lsun"
  2389. else
  2390.   echo "$ac_t""no" 1>&4
  2391. echo $ac_n "checking for -lseq""... $ac_c" 1>&4
  2392. if eval "test \"`echo '${'ac_cv_lib_seq'+set}'`\" = set"; then
  2393.   echo $ac_n "(cached) $ac_c" 1>&4
  2394. else
  2395.   ac_save_LIBS="$LIBS"
  2396. LIBS="$LIBS -lseq "
  2397. cat > conftest.$ac_ext <<EOF
  2398. #line 2399 "configure"
  2399. #include "confdefs.h"
  2400.  
  2401. int main() { return 0; }
  2402. int t() {
  2403. getmntent()
  2404. ; return 0; }
  2405. EOF
  2406. if eval $ac_link; then
  2407.   rm -rf conftest*
  2408.   eval "ac_cv_lib_seq=yes"
  2409. else
  2410.   rm -rf conftest*
  2411.   eval "ac_cv_lib_seq=no"
  2412. fi
  2413. rm -f conftest*
  2414. LIBS="$ac_save_LIBS"
  2415.  
  2416. fi
  2417. if eval "test \"`echo '$ac_cv_lib_'seq`\" = yes"; then
  2418.   echo "$ac_t""yes" 1>&4
  2419.   LIBS="$LIBS -lseq"
  2420. else
  2421.   echo "$ac_t""no" 1>&4
  2422. fi
  2423.  
  2424. fi
  2425.  
  2426. echo $ac_n "checking for getmntent""... $ac_c" 1>&4
  2427. if eval "test \"`echo '${'ac_cv_func_getmntent'+set}'`\" = set"; then
  2428.   echo $ac_n "(cached) $ac_c" 1>&4
  2429. else
  2430.   cat > conftest.$ac_ext <<EOF
  2431. #line 2432 "configure"
  2432. #include "confdefs.h"
  2433. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  2434. /* Override any gcc2 internal prototype to avoid an error.  */
  2435. char getmntent(); 
  2436.  
  2437. int main() { return 0; }
  2438. int t() {
  2439.  
  2440. /* The GNU C library defines this for functions which it implements
  2441.     to always fail with ENOSYS.  Some functions are actually named
  2442.     something starting with __ and the normal name is an alias.  */
  2443. #if defined (__stub_getmntent) || defined (__stub___getmntent)
  2444. choke me
  2445. #else
  2446. getmntent();
  2447. #endif
  2448.  
  2449. ; return 0; }
  2450. EOF
  2451. if eval $ac_link; then
  2452.   rm -rf conftest*
  2453.   eval "ac_cv_func_getmntent=yes"
  2454. else
  2455.   rm -rf conftest*
  2456.   eval "ac_cv_func_getmntent=no"
  2457. fi
  2458. rm -f conftest*
  2459.  
  2460. fi
  2461. if eval "test \"`echo '$ac_cv_func_'getmntent`\" = yes"; then
  2462.   echo "$ac_t""yes" 1>&4
  2463.   cat >> confdefs.h <<\EOF
  2464. #define HAVE_GETMNTENT 1
  2465. EOF
  2466.  
  2467. else
  2468.   echo "$ac_t""no" 1>&4
  2469. fi
  2470.  
  2471. echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&4
  2472. if eval "test \"`echo '${'ac_cv_func_closedir_void'+set}'`\" = set"; then
  2473.   echo $ac_n "(cached) $ac_c" 1>&4
  2474. else
  2475.   if test "$cross_compiling" = yes; then
  2476.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2477. else
  2478. cat > conftest.$ac_ext <<EOF
  2479. #line 2480 "configure"
  2480. #include "confdefs.h"
  2481. #include <sys/types.h>
  2482. #include <$ac_header_dirent>
  2483. int closedir(); main() { exit(closedir(opendir(".")) != 0); }
  2484. EOF
  2485. eval $ac_link
  2486. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2487.   ac_cv_func_closedir_void=no
  2488. else
  2489.   ac_cv_func_closedir_void=yes
  2490. fi
  2491. fi
  2492. rm -fr conftest*
  2493. fi
  2494. echo "$ac_t""$ac_cv_func_closedir_void" 1>&4
  2495. if test $ac_cv_func_closedir_void = yes; then
  2496.   cat >> confdefs.h <<\EOF
  2497. #define CLOSEDIR_VOID 1
  2498. EOF
  2499.  
  2500. fi
  2501.  
  2502.  
  2503. trap '' 1 2 15
  2504. if test -w $cache_file; then
  2505. echo "updating cache $cache_file"
  2506. cat > $cache_file <<\EOF
  2507. # This file is a shell script that caches the results of configure
  2508. # tests run on this system so they can be shared between configure
  2509. # scripts and configure runs.  It is not useful on other systems.
  2510. # If it contains results you don't want to keep, you may remove or edit it.
  2511. #
  2512. # By default, configure uses ./config.cache as the cache file,
  2513. # creating it if it does not exist already.  You can give configure
  2514. # the --cache-file=FILE option to use a different cache file; that is
  2515. # what configure does when it calls configure scripts in
  2516. # subdirectories, so they share the cache.
  2517. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2518. # config.status only pays attention to the cache file if you give it the
  2519. # --recheck option to rerun configure.
  2520. #
  2521. EOF
  2522. # Ultrix sh set writes to stderr and can't be redirected directly.
  2523. (set) 2>&1 |
  2524.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \
  2525.   >> $cache_file
  2526. else
  2527. echo "not updating unwritable cache $cache_file"
  2528. fi
  2529.  
  2530. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  2531.  
  2532. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  2533. # Let make expand exec_prefix.
  2534. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  2535.  
  2536. # Any assignment to VPATH causes Sun make to only execute
  2537. # the first set of double-colon rules, so remove it if not needed.
  2538. # If there is a colon in the path, we need to keep it.
  2539. if test "x$srcdir" = x.; then
  2540.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2541. fi
  2542.  
  2543. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  2544.  
  2545. DEFS=-DHAVE_CONFIG_H
  2546.  
  2547. # Without the "./", some shells look in PATH for config.status.
  2548. : ${CONFIG_STATUS=./config.status}
  2549.  
  2550. echo creating $CONFIG_STATUS
  2551. rm -f $CONFIG_STATUS
  2552. cat > $CONFIG_STATUS <<EOF
  2553. #!/bin/sh
  2554. # Generated automatically by configure.
  2555. # Run this file to recreate the current configuration.
  2556. # This directory was configured as follows,
  2557. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2558. #
  2559. # $0 $ac_configure_args
  2560. #
  2561. # Compiler output produced by configure, useful for debugging
  2562. # configure, is in ./config.log if it exists.
  2563.  
  2564. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  2565. for ac_option
  2566. do
  2567.   case "\$ac_option" in
  2568.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2569.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  2570.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  2571.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2572.     echo "$CONFIG_STATUS generated by autoconf version 2.1"
  2573.     exit 0 ;;
  2574.   -help | --help | --hel | --he | --h)
  2575.     echo "\$ac_cs_usage"; exit 0 ;;
  2576.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2577.   esac
  2578. done
  2579.  
  2580. ac_given_srcdir=$srcdir
  2581. ac_given_INSTALL="$INSTALL"
  2582.  
  2583. trap 'rm -fr Makefile lib/Makefile find/Makefile xargs/Makefile \
  2584. locate/Makefile doc/Makefile testsuite/Makefile config.h conftest*; exit 1' 1 2 15
  2585.  
  2586. # Protect against being on the right side of a sed subst in config.status. 
  2587. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  2588.  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  2589. $ac_vpsub
  2590. $extrasub
  2591. s%@CFLAGS@%$CFLAGS%g
  2592. s%@CPPFLAGS@%$CPPFLAGS%g
  2593. s%@CXXFLAGS@%$CXXFLAGS%g
  2594. s%@DEFS@%$DEFS%g
  2595. s%@LDFLAGS@%$LDFLAGS%g
  2596. s%@LIBS@%$LIBS%g
  2597. s%@exec_prefix@%$exec_prefix%g
  2598. s%@prefix@%$prefix%g
  2599. s%@program_transform_name@%$program_transform_name%g
  2600. s%@INCLUDES@%$INCLUDES%g
  2601. s%@CC@%$CC%g
  2602. s%@CPP@%$CPP%g
  2603. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  2604. s%@INSTALL_DATA@%$INSTALL_DATA%g
  2605. s%@RANLIB@%$RANLIB%g
  2606. s%@SET_MAKE@%$SET_MAKE%g
  2607. s%@LIBOBJS@%$LIBOBJS%g
  2608. s%@ALLOCA@%$ALLOCA%g
  2609.  
  2610. CEOF
  2611. EOF
  2612. cat >> $CONFIG_STATUS <<EOF
  2613.  
  2614. CONFIG_FILES=\${CONFIG_FILES-"Makefile lib/Makefile find/Makefile xargs/Makefile \
  2615. locate/Makefile doc/Makefile testsuite/Makefile"}
  2616. EOF
  2617. cat >> $CONFIG_STATUS <<\EOF
  2618. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2619.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  2620.   case "$ac_file" in
  2621.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  2622.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2623.   *) ac_file_in="${ac_file}.in" ;;
  2624.   esac
  2625.  
  2626.   # Adjust relative srcdir, etc. for subdirectories.
  2627.  
  2628.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2629.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2630.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2631.     # The file is in a subdirectory.
  2632.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2633.     ac_dir_suffix="/$ac_dir"
  2634.     # A "../" for each directory in $ac_dir_suffix.
  2635.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2636.   else
  2637.     ac_dir_suffix= ac_dots=
  2638.   fi
  2639.  
  2640.   case "$ac_given_srcdir" in
  2641.   .)  srcdir=.
  2642.       if test -z "$ac_dots"; then top_srcdir=.
  2643.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2644.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2645.   *) # Relative path.
  2646.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2647.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2648.   esac
  2649.  
  2650.   case "$ac_given_INSTALL" in
  2651.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  2652.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  2653.   esac
  2654.   echo creating "$ac_file"
  2655.   rm -f "$ac_file"
  2656.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  2657.   case "$ac_file" in
  2658.   *Makefile*) ac_comsub="1i\\
  2659. # $configure_input" ;;
  2660.   *) ac_comsub= ;;
  2661.   esac
  2662.   sed -e "$ac_comsub
  2663. s%@configure_input@%$configure_input%g
  2664. s%@srcdir@%$srcdir%g
  2665. s%@top_srcdir@%$top_srcdir%g
  2666. s%@INSTALL@%$INSTALL%g
  2667. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  2668. fi; done
  2669. rm -f conftest.subs
  2670.  
  2671. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  2672. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  2673. #
  2674. # ac_d sets the value in "#define NAME VALUE" lines.
  2675. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  2676. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  2677. ac_dC='\3'
  2678. ac_dD='%g'
  2679. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2680. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2681. ac_uB='\([     ]\)%\1#\2define\3'
  2682. ac_uC=' '
  2683. ac_uD='\4%g'
  2684. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2685. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2686. ac_eB='$%\1#\2define\3'
  2687. ac_eC=' '
  2688. ac_eD='%g'
  2689.  
  2690. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  2691. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  2692.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  2693.   case "$ac_file" in
  2694.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  2695.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2696.   *) ac_file_in="${ac_file}.in" ;;
  2697.   esac
  2698.  
  2699.   echo creating $ac_file
  2700.  
  2701.   rm -f conftest.frag conftest.in conftest.out
  2702.   cp $ac_given_srcdir/$ac_file_in conftest.in
  2703.  
  2704. EOF
  2705.  
  2706. # Transform confdefs.h into a sed script conftest.vals that substitutes
  2707. # the proper values into config.h.in to produce config.h.  And first:
  2708. # Protect against being on the right side of a sed subst in config.status. 
  2709. # Protect against being in an unquoted here document in config.status.
  2710. rm -f conftest.vals
  2711. cat > conftest.hdr <<\EOF
  2712. s/[\\&%]/\\&/g
  2713. s%[\\$`]%\\&%g
  2714. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  2715. s%ac_d%ac_u%gp
  2716. s%ac_u%ac_e%gp
  2717. EOF
  2718. sed -n -f conftest.hdr confdefs.h > conftest.vals
  2719. rm -f conftest.hdr
  2720.  
  2721. # This sed command replaces #undef with comments.  This is necessary, for
  2722. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2723. # on some systems where configure will not decide to define it.
  2724. cat >> conftest.vals <<\EOF
  2725. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  2726. EOF
  2727.  
  2728. # Break up conftest.vals because some shells have a limit on
  2729. # the size of here documents, and old seds have small limits too.
  2730. # Maximum number of lines to put in a single here document.
  2731. ac_max_here_lines=12
  2732.  
  2733. rm -f conftest.tail
  2734. while :
  2735. do
  2736.   ac_lines=`grep -c . conftest.vals`
  2737.   # grep -c gives empty output for an empty file on some AIX systems.
  2738.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2739.   # Write a limited-size here document to conftest.frag.
  2740.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  2741.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  2742.   echo 'CEOF
  2743.   sed -f conftest.frag conftest.in > conftest.out
  2744.   rm -f conftest.in
  2745.   mv conftest.out conftest.in
  2746. ' >> $CONFIG_STATUS
  2747.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  2748.   rm -f conftest.vals
  2749.   mv conftest.tail conftest.vals
  2750. done
  2751. rm -f conftest.vals
  2752.  
  2753. cat >> $CONFIG_STATUS <<\EOF
  2754.   rm -f conftest.frag conftest.h
  2755.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  2756.   cat conftest.in >> conftest.h
  2757.   rm -f conftest.in
  2758.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  2759.     echo "$ac_file is unchanged"
  2760.     rm -f conftest.h
  2761.   else
  2762.     rm -f $ac_file
  2763.     mv conftest.h $ac_file
  2764.   fi
  2765. fi; done
  2766.  
  2767.  
  2768. date > stamp-h
  2769. exit 0
  2770. EOF
  2771. chmod +x $CONFIG_STATUS
  2772. rm -fr confdefs* $ac_clean_files
  2773. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS
  2774.  
  2775.