home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gnusutil.zip / configure < prev    next >
Text File  |  1994-10-08  |  76KB  |  3,012 lines

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