home *** CD-ROM | disk | FTP | other *** search
/ Openstep 4.2 (Developer) / Openstep Developer 4.2.iso / NextDeveloper / Source / GNU / make / make-3.74 / configure < prev    next >
Encoding:
Text File  |  1995-08-01  |  76.5 KB  |  2,992 lines

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