home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / diffutils-2.7-src.lha / diffutils-2.7 / configure < prev    next >
Encoding:
Text File  |  1994-11-12  |  57.5 KB  |  2,166 lines

  1. #!/bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.1 
  5. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/gnu
  13. # Any additions from configure.in:
  14.  
  15. # Initialize some variables set by options.
  16. # The variables have the same names as the options, with
  17. # dashes changed to underlines.
  18. build=NONE
  19. cache_file=./config.cache
  20. exec_prefix=NONE
  21. host=NONE
  22. no_create=
  23. nonopt=NONE
  24. no_recursion=
  25. prefix=NONE
  26. program_prefix=NONE
  27. program_suffix=NONE
  28. program_transform_name=s,x,x,
  29. silent=
  30. site=
  31. srcdir=
  32. target=NONE
  33. verbose=
  34. x_includes=NONE
  35. x_libraries=NONE
  36.  
  37. # Initialize some other variables.
  38. subdirs=
  39.  
  40. ac_prev=
  41. for ac_option
  42. do
  43.  
  44.   # If the previous option needs an argument, assign it.
  45.   if test -n "$ac_prev"; then
  46.     eval "$ac_prev=\$ac_option"
  47.     ac_prev=
  48.     continue
  49.   fi
  50.  
  51.   case "$ac_option" in
  52.   -*=*) ac_optarg=`/bin/echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  53.   *) ac_optarg= ;;
  54.   esac
  55.  
  56.   # Accept the important Cygnus configure options, so we can diagnose typos.
  57.  
  58.   case "$ac_option" in
  59.  
  60.   -build | --build | --buil | --bui | --bu | --b)
  61.     ac_prev=build ;;
  62.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  63.     build="$ac_optarg" ;;
  64.  
  65.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  66.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  67.     ac_prev=cache_file ;;
  68.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  69.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  70.     cache_file="$ac_optarg" ;;
  71.  
  72.   -disable-* | --disable-*)
  73.     ac_feature=`/bin/echo $ac_option|sed -e 's/-*disable-//'`
  74.     # Reject names that are not valid shell variable names.
  75.     if test -n "`/bin/echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  76.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  77.     fi
  78.     ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
  79.     eval "enable_${ac_feature}=no" ;;
  80.  
  81.   -enable-* | --enable-*)
  82.     ac_feature=`/bin/echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  83.     # Reject names that are not valid shell variable names.
  84.     if test -n "`/bin/echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  85.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  86.     fi
  87.     ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
  88.     case "$ac_option" in
  89.       *=*) ;;
  90.       *) ac_optarg=yes ;;
  91.     esac
  92.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  93.  
  94.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  95.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  96.   | --exec | --exe | --ex)
  97.     ac_prev=exec_prefix ;;
  98.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  99.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  100.   | --exec=* | --exe=* | --ex=*)
  101.     exec_prefix="$ac_optarg" ;;
  102.  
  103.   -gas | --gas | --ga | --g)
  104.     # Obsolete; use --with-gas.
  105.     with_gas=yes ;;
  106.  
  107.   -help | --help | --hel | --he)
  108.     # Omit some internal or obsolete options to make the list less imposing.
  109.     # This message is too long to be a string in the A/UX 3.1 sh.
  110.     cat << EOF
  111. Usage: configure [options] [host]
  112. Options: [defaults in brackets after descriptions]
  113. Configuration:
  114.   --cache-file=FILE       cache test results in FILE
  115.   --help                  print this message
  116.   --no-create             do not create output files
  117.   --quiet, --silent       do not print \`checking...' messages
  118.   --version               print the version of autoconf that created configure
  119. Directory and file names:
  120.   --prefix=PREFIX         install architecture-independent files in PREFIX
  121.                           [$ac_default_prefix]
  122.   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
  123.                           [same as prefix]
  124.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  125.   --program-prefix=PREFIX prepend PREFIX to installed program names
  126.   --program-suffix=SUFFIX append SUFFIX to installed program names
  127.   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  128. Host type:
  129.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  130.   --host=HOST             configure for HOST [guessed]
  131.   --target=TARGET         configure for TARGET [TARGET=HOST]
  132. Features and packages:
  133.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  134.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  135.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  136.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  137.   --x-includes=DIR        X include files are in DIR
  138.   --x-libraries=DIR       X library files are in DIR
  139. --enable and --with options recognized:$ac_help
  140. EOF
  141.     exit 0 ;;
  142.  
  143.   -host | --host | --hos | --ho)
  144.     ac_prev=host ;;
  145.   -host=* | --host=* | --hos=* | --ho=*)
  146.     host="$ac_optarg" ;;
  147.  
  148.   -nfp | --nfp | --nf)
  149.     # Obsolete; use --without-fp.
  150.     with_fp=no ;;
  151.  
  152.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  153.   | --no-cr | --no-c)
  154.     no_create=yes ;;
  155.  
  156.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  157.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  158.     no_recursion=yes ;;
  159.  
  160.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  161.     ac_prev=prefix ;;
  162.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  163.     prefix="$ac_optarg" ;;
  164.  
  165.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  166.   | --program-pre | --program-pr | --program-p)
  167.     ac_prev=program_prefix ;;
  168.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  169.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  170.     program_prefix="$ac_optarg" ;;
  171.  
  172.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  173.   | --program-suf | --program-su | --program-s)
  174.     ac_prev=program_suffix ;;
  175.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  176.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  177.     program_suffix="$ac_optarg" ;;
  178.  
  179.   -program-transform-name | --program-transform-name \
  180.   | --program-transform-nam | --program-transform-na \
  181.   | --program-transform-n | --program-transform- \
  182.   | --program-transform | --program-transfor \
  183.   | --program-transfo | --program-transf \
  184.   | --program-trans | --program-tran \
  185.   | --progr-tra | --program-tr | --program-t)
  186.     ac_prev=program_transform_name ;;
  187.   -program-transform-name=* | --program-transform-name=* \
  188.   | --program-transform-nam=* | --program-transform-na=* \
  189.   | --program-transform-n=* | --program-transform-=* \
  190.   | --program-transform=* | --program-transfor=* \
  191.   | --program-transfo=* | --program-transf=* \
  192.   | --program-trans=* | --program-tran=* \
  193.   | --progr-tra=* | --program-tr=* | --program-t=*)
  194.     program_transform_name="$ac_optarg" ;;
  195.  
  196.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  197.   | -silent | --silent | --silen | --sile | --sil)
  198.     silent=yes ;;
  199.  
  200.   -site | --site | --sit)
  201.     ac_prev=site ;;
  202.   -site=* | --site=* | --sit=*)
  203.     site="$ac_optarg" ;;
  204.  
  205.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  206.     ac_prev=srcdir ;;
  207.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  208.     srcdir="$ac_optarg" ;;
  209.  
  210.   -target | --target | --targe | --targ | --tar | --ta | --t)
  211.     ac_prev=target ;;
  212.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  213.     target="$ac_optarg" ;;
  214.  
  215.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  216.     verbose=yes ;;
  217.  
  218.   -version | --version | --versio | --versi | --vers)
  219.     echo "configure generated by autoconf version 2.1"
  220.     exit 0 ;;
  221.  
  222.   -with-* | --with-*)
  223.     ac_package=`/bin/echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  224.     # Reject names that are not valid shell variable names.
  225.     if test -n "`/bin/echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  226.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  227.     fi
  228.     ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
  229.     case "$ac_option" in
  230.       *=*) ;;
  231.       *) ac_optarg=yes ;;
  232.     esac
  233.     eval "with_${ac_package}='$ac_optarg'" ;;
  234.  
  235.   -without-* | --without-*)
  236.     ac_package=`/bin/echo $ac_option|sed -e 's/-*without-//'`
  237.     # Reject names that are not valid shell variable names.
  238.     if test -n "`/bin/echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  239.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  240.     fi
  241.     ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
  242.     eval "with_${ac_package}=no" ;;
  243.  
  244.   --x)
  245.     # Obsolete; use --with-x.
  246.     with_x=yes ;;
  247.  
  248.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  249.   | --x-incl | --x-inc | --x-in | --x-i)
  250.     ac_prev=x_includes ;;
  251.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  252.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  253.     x_includes="$ac_optarg" ;;
  254.  
  255.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  256.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  257.     ac_prev=x_libraries ;;
  258.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  259.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  260.     x_libraries="$ac_optarg" ;;
  261.  
  262.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  263.     ;;
  264.  
  265.   *) 
  266.     if test -n "`/bin/echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  267.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  268.     fi
  269.     if test "x$nonopt" != xNONE; then
  270.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  271.     fi
  272.     nonopt="$ac_option"
  273.     ;;
  274.  
  275.   esac
  276. done
  277.  
  278. if test -n "$ac_prev"; then
  279.   { echo "configure: error: missing argument to --`/bin/echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  280. fi
  281.  
  282. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  283.  
  284. # File descriptor usage:
  285. # 0 unused; standard input
  286. # 1 file creation
  287. # 2 errors and warnings
  288. # 3 unused; some systems may open it to /dev/tty
  289. # 4 checking for... messages and results
  290. # 5 compiler messages saved in config.log
  291. if test "$silent" = yes; then
  292.   exec 4>/dev/null
  293. else
  294.   exec 4>&1
  295. fi
  296. exec 5>./config.log
  297.  
  298. echo "\
  299. This file contains any messages produced by compilers while
  300. running configure, to aid debugging if configure makes a mistake.
  301. " 1>&5
  302.  
  303. # Strip out --no-create and --no-recursion so they do not pile up.
  304. # Also quote any args containing shell metacharacters.
  305. ac_configure_args=
  306. for ac_arg
  307. do
  308.   case "$ac_arg" in
  309.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  310.   | --no-cr | --no-c) ;;
  311.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  312.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  313.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  314.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  315.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  316.   esac
  317. done
  318.  
  319. # NLS nuisances.
  320. # Only set LANG and LC_ALL to C if already set.
  321. # These must not be set unconditionally because not all systems understand
  322. # e.g. LANG=C (notably SCO).
  323. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  324. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  325.  
  326. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  327. rm -rf conftest* confdefs.h
  328. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  329. /bin/echo > confdefs.h
  330.  
  331. # A filename unique to this package, relative to the directory that
  332. # configure is in, which we can look for to find out if srcdir is correct.
  333. ac_unique_file=diff.h
  334.  
  335. # Find the source files, if location was not specified.
  336. if test -z "$srcdir"; then
  337.   ac_srcdir_defaulted=yes
  338.   # Try the directory containing this script, then its parent.
  339.   ac_prog=$0
  340.   ac_confdir=`/bin/echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  341.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  342.   srcdir=$ac_confdir
  343.   if test ! -r $srcdir/$ac_unique_file; then
  344.     srcdir=..
  345.   fi
  346. else
  347.   ac_srcdir_defaulted=no
  348. fi
  349. if test ! -r $srcdir/$ac_unique_file; then
  350.   if test "$ac_srcdir_defaulted" = yes; then
  351.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  352.   else
  353.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  354.   fi
  355. fi
  356. srcdir=`/bin/echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  357.  
  358. # Prefer explicitly selected file to automatically selected ones.
  359. if test -z "$CONFIG_SITE"; then
  360.   if test "x$prefix" != xNONE; then
  361.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  362.   else
  363.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  364.   fi
  365. fi
  366. for ac_site_file in $CONFIG_SITE; do
  367.   if test -r "$ac_site_file"; then
  368.     echo "loading site script $ac_site_file"
  369.     . "$ac_site_file"
  370.   fi
  371. done
  372.  
  373. if test -r "$cache_file"; then
  374.   echo "loading cache $cache_file"
  375.   . $cache_file
  376. else
  377.   echo "creating cache $cache_file"
  378.   > $cache_file
  379. fi
  380.  
  381. ac_ext=c
  382. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  383. ac_cpp='$CPP $CPPFLAGS'
  384. ac_compile='${CC-cc} $CFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&5 2>&5'
  385. ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5'
  386.  
  387. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  388.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  389.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  390.     ac_n= ac_c='
  391. ' ac_t='    '
  392.   else
  393.     ac_n=-n ac_c= ac_t=
  394.   fi
  395. else
  396.   ac_n= ac_c='\c' ac_t=
  397. fi
  398.  
  399.  
  400.  
  401. if test "$program_transform_name" = s,x,x,; then
  402.   program_transform_name=
  403. else
  404.   # Double any \ or $.
  405.   echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
  406.   program_transform_name="`/bin/echo $program_transform_name|sed -f conftestsed`"
  407.   rm -f conftestsed
  408. fi
  409. test "$program_prefix" != NONE &&
  410.   program_transform_name="s,^,${program_prefix},; $program_transform_name"
  411. # Use a double $ so make ignores it.
  412. test "$program_suffix" != NONE &&
  413.   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
  414.  
  415. # sed with no file args requires a program.
  416. test "$program_transform_name" = "" && program_transform_name="s,x,x,"
  417.  
  418. # Extract the first word of "gcc", so it can be a program name with args.
  419. set dummy gcc; ac_word=$2
  420. /bin/echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  421. if eval "test \"`echo '${'ac_cv_prog_CC'+set}'`\" = set"; then
  422.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  423. else
  424.   if test -n "$CC"; then
  425.   ac_cv_prog_CC="$CC" # Let the user override the test.
  426. else
  427.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  428.   for ac_dir in $PATH; do
  429.     test -z "$ac_dir" && ac_dir=.
  430.     if test -f $ac_dir/$ac_word; then
  431.       ac_cv_prog_CC="gcc"
  432.       break
  433.     fi
  434.   done
  435.   IFS="$ac_save_ifs"
  436.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  437. fi
  438. fi
  439. CC="$ac_cv_prog_CC"
  440. if test -n "$CC"; then
  441.   /bin/echo "$ac_t""$CC" 1>&4
  442. else
  443.   /bin/echo "$ac_t""no" 1>&4
  444. fi
  445.  
  446.  
  447. /bin/echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&4
  448. if eval "test \"`echo '${'ac_cv_prog_gcc'+set}'`\" = set"; then
  449.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  450. else
  451.   cat > conftest.c <<EOF
  452. #ifdef __GNUC__
  453.   yes;
  454. #endif
  455. EOF
  456. if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  457.   ac_cv_prog_gcc=yes
  458. else
  459.   ac_cv_prog_gcc=no
  460. fi
  461. fi
  462. /bin/echo "$ac_t""$ac_cv_prog_gcc" 1>&4
  463. if test $ac_cv_prog_gcc = yes; then
  464.   GCC=yes
  465.   if test "${CFLAGS+set}" != set; then
  466.     /bin/echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&4
  467. if eval "test \"`echo '${'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  468.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  469. else
  470.   echo 'void f(){}' > conftest.c
  471. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  472.   ac_cv_prog_gcc_g=yes
  473. else
  474.   ac_cv_prog_gcc_g=no
  475. fi
  476. rm -f conftest*
  477.  
  478. fi
  479.     /bin/echo "$ac_t""$ac_cv_prog_gcc_g" 1>&4
  480.     if test $ac_cv_prog_gcc_g = yes; then
  481.       # Amiga hack - suppress automatically using -g for now
  482.       # Also default to using -O2
  483.       CFLAGS="-O2"
  484.     else
  485.       CFLAGS="-O2"
  486.     fi
  487.   fi
  488. else
  489.   GCC=
  490.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  491. fi
  492.  
  493. /bin/echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&4
  494. # On Suns, sometimes $CPP names a directory.
  495. if test -n "$CPP" && test -d "$CPP"; then
  496.   CPP=
  497. fi
  498. if test -z "$CPP"; then
  499. if eval "test \"`echo '${'ac_cv_prog_CPP'+set}'`\" = set"; then
  500.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  501. else
  502.     # This must be in double quotes, not single quotes, because CPP may get
  503.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  504.   CPP="${CC-cc} -E"
  505.   # On the NeXT, cc -E runs the code through the compiler's parser,
  506.   # not just through cpp.
  507.   cat > conftest.$ac_ext <<EOF
  508. #line 509 "configure"
  509. #include "confdefs.h"
  510. #include <assert.h>
  511. Syntax Error
  512. EOF
  513. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  514. ac_err=`grep -v '^ *+' conftest.out`
  515. if test -z "$ac_err"; then
  516.   :
  517. else
  518.   /bin/echo "$ac_err" >&5
  519.   rm -rf conftest*
  520.   CPP="${CC-cc} -E -traditional-cpp"
  521.   cat > conftest.$ac_ext <<EOF
  522. #line 523 "configure"
  523. #include "confdefs.h"
  524. #include <assert.h>
  525. Syntax Error
  526. EOF
  527. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  528. ac_err=`grep -v '^ *+' conftest.out`
  529. if test -z "$ac_err"; then
  530.   :
  531. else
  532.   /bin/echo "$ac_err" >&5
  533.   rm -rf conftest*
  534.   CPP=/lib/cpp
  535. fi
  536. rm -f conftest*
  537. fi
  538. rm -f conftest*
  539.   ac_cv_prog_CPP="$CPP"
  540. fi
  541. fi
  542. CPP="$ac_cv_prog_CPP"
  543. /bin/echo "$ac_t""$CPP" 1>&4
  544.  
  545. ac_aux_dir=
  546. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  547.   if test -f $ac_dir/install-sh; then
  548.     ac_aux_dir=$ac_dir
  549.     ac_install_sh="$ac_aux_dir/install-sh -c"
  550.     break
  551.   elif test -f $ac_dir/install.sh; then
  552.     ac_aux_dir=$ac_dir
  553.     ac_install_sh="$ac_aux_dir/install.sh -c"
  554.     break
  555.   fi
  556. done
  557. if test -z "$ac_aux_dir"; then
  558.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  559. fi
  560. ac_config_guess=$ac_aux_dir/config.guess
  561. ac_config_sub=$ac_aux_dir/config.sub
  562. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  563.  
  564. # Find a good install program.  We prefer a C program (faster),
  565. # so one script is as good as another.  But avoid the broken or
  566. # incompatible versions:
  567. # SysV /etc/install, /usr/sbin/install
  568. # SunOS /usr/etc/install
  569. # IRIX /sbin/install
  570. # AIX /bin/install
  571. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  572. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  573. # ./install, which can be erroneously created by make from ./install.sh.
  574. /bin/echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&4
  575. if test -z "$INSTALL"; then
  576. if eval "test \"`echo '${'ac_cv_path_install'+set}'`\" = set"; then
  577.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  578. else
  579.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  580.   for ac_dir in $PATH; do
  581.     case "$ac_dir" in
  582.     ''|.|/gnu/etc) ;;
  583.     *)
  584.       # OSF1 and SCO ODT 3.0 have their own names for install.
  585.       for ac_prog in ginstall installbsd scoinst install; do
  586.         if test -f $ac_dir/$ac_prog; then
  587.       if test $ac_prog = install &&
  588.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  589.         # AIX install.  It has an incompatible calling convention.
  590.         # OSF/1 installbsd also uses dspmsg, but is usable.
  591.         :
  592.       else
  593.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  594.         break 2
  595.       fi
  596.     fi
  597.       done
  598.       ;;
  599.     esac
  600.   done
  601.   IFS="$ac_save_ifs"
  602.   # As a last resort, use the slow shell script.
  603.   test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
  604. fi
  605.   INSTALL="$ac_cv_path_install"
  606. fi
  607. /bin/echo "$ac_t""$INSTALL" 1>&4
  608.  
  609. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  610. # It thinks the first close brace ends the variable substitution.
  611. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  612.  
  613. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  614.  
  615. /bin/echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&4
  616. if test -d /gnu/etc/conf/kconfig.d &&
  617.   grep _POSIX_VERSION /gnu/include/sys/unistd.h >/dev/null 2>&1
  618. then
  619.   /bin/echo "$ac_t""yes" 1>&4
  620.   ISC=yes # If later tests want to check for ISC.
  621.   cat >> confdefs.h <<\EOF
  622. #define _POSIX_SOURCE 1
  623. EOF
  624.  
  625.   if test "$GCC" = yes; then
  626.     CC="$CC -posix"
  627.   else
  628.     CC="$CC -Xp"
  629.   fi
  630. else
  631.   /bin/echo "$ac_t""no" 1>&4
  632.   ISC=
  633. fi
  634.  
  635. ac_safe=`/bin/echo "minix/config.h" | tr './\055' '___'`
  636. /bin/echo $ac_n "checking for minix/config.h""... $ac_c" 1>&4
  637. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  638.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  639. else
  640.   cat > conftest.$ac_ext <<EOF
  641. #line 642 "configure"
  642. #include "confdefs.h"
  643. #include <minix/config.h>
  644. EOF
  645. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  646. ac_err=`grep -v '^ *+' conftest.out`
  647. if test -z "$ac_err"; then
  648.   rm -rf conftest*
  649.   eval "ac_cv_header_$ac_safe=yes"
  650. else
  651.   /bin/echo "$ac_err" >&5
  652.   rm -rf conftest*
  653.   eval "ac_cv_header_$ac_safe=no"
  654. fi
  655. rm -f conftest*
  656. fi
  657. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  658.   /bin/echo "$ac_t""yes" 1>&4
  659.   MINIX=yes
  660. else
  661.   /bin/echo "$ac_t""no" 1>&4
  662. MINIX=
  663. fi
  664.  
  665. if test "$MINIX" = yes; then
  666.   cat >> confdefs.h <<\EOF
  667. #define _POSIX_SOURCE 1
  668. EOF
  669.  
  670.   cat >> confdefs.h <<\EOF
  671. #define _POSIX_1_SOURCE 2
  672. EOF
  673.  
  674.   cat >> confdefs.h <<\EOF
  675. #define _MINIX 1
  676. EOF
  677.  
  678. fi
  679.  
  680. /bin/echo $ac_n "checking for working const""... $ac_c" 1>&4
  681. if eval "test \"`echo '${'ac_cv_c_const'+set}'`\" = set"; then
  682.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  683. else
  684.   cat > conftest.$ac_ext <<EOF
  685. #line 686 "configure"
  686. #include "confdefs.h"
  687.  
  688. int main() { return 0; }
  689. int t() {
  690.  
  691. /* Ultrix mips cc rejects this.  */
  692. typedef int charset[2]; const charset x;
  693. /* SunOS 4.1.1 cc rejects this.  */
  694. char const *const *ccp;
  695. char **p;
  696. /* NEC SVR4.0.2 mips cc rejects this.  */
  697. struct point {int x, y;};
  698. static struct point const zero;
  699. /* AIX XL C 1.02.0.0 rejects this.
  700.    It does not let you subtract one const X* pointer from another in an arm
  701.    of an if-expression whose if-part is not a constant expression */
  702. const char *g = "string";
  703. ccp = &g + (g ? g-g : 0);
  704. /* HPUX 7.0 cc rejects these. */
  705. ++ccp;
  706. p = (char**) ccp;
  707. ccp = (char const *const *) p;
  708. { /* SCO 3.2v4 cc rejects this.  */
  709.   char *t;
  710.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  711.  
  712.   *t++ = 0;
  713. }
  714. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  715.   int x[] = {25, 17};
  716.   const int *foo = &x[0];
  717.   ++foo;
  718. }
  719. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  720.   typedef const int *iptr;
  721.   iptr p = 0;
  722.   ++p;
  723. }
  724. { /* AIX XL C 1.02.0.0 rejects this saying
  725.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  726.   struct s { int j; const int *ap[3]; };
  727.   struct s *b; b->j = 5;
  728. }
  729. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  730.   const int foo = 10;
  731. }
  732.  
  733. ; return 0; }
  734. EOF
  735. if eval $ac_compile; then
  736.   rm -rf conftest*
  737.   ac_cv_c_const=yes
  738. else
  739.   rm -rf conftest*
  740.   ac_cv_c_const=no
  741. fi
  742. rm -f conftest*
  743.  
  744. fi
  745. /bin/echo "$ac_t""$ac_cv_c_const" 1>&4
  746. if test $ac_cv_c_const = no; then
  747.   cat >> confdefs.h <<\EOF
  748. #define const 
  749. EOF
  750.  
  751. fi
  752.  
  753. # If we cannot run a trivial program, we must be cross compiling.
  754. /bin/echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&4
  755. if eval "test \"`echo '${'ac_cv_c_cross'+set}'`\" = set"; then
  756.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  757. else
  758.   if test "$cross_compiling" = yes; then
  759.   ac_cv_cross=yes
  760. else
  761. cat > conftest.$ac_ext <<EOF
  762. #line 763 "configure"
  763. #include "confdefs.h"
  764. main(){return(0);}
  765. EOF
  766. eval $ac_link
  767. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  768.   ac_cv_c_cross=no
  769. else
  770.   ac_cv_c_cross=yes
  771. fi
  772. fi
  773. rm -fr conftest*
  774. fi
  775. cross_compiling=$ac_cv_c_cross
  776. /bin/echo "$ac_t""$ac_cv_c_cross" 1>&4
  777.  
  778. /bin/echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&4
  779. if eval "test \"`echo '${'ac_cv_header_stdc'+set}'`\" = set"; then
  780.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  781. else
  782.   cat > conftest.$ac_ext <<EOF
  783. #line 784 "configure"
  784. #include "confdefs.h"
  785. #include <stdlib.h>
  786. #include <stdarg.h>
  787. #include <string.h>
  788. #include <float.h>
  789. EOF
  790. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  791. ac_err=`grep -v '^ *+' conftest.out`
  792. if test -z "$ac_err"; then
  793.   rm -rf conftest*
  794.   ac_cv_header_stdc=yes
  795. else
  796.   /bin/echo "$ac_err" >&5
  797.   rm -rf conftest*
  798.   ac_cv_header_stdc=no
  799. fi
  800. rm -f conftest*
  801.  
  802. if test $ac_cv_header_stdc = yes; then
  803.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  804. cat > conftest.$ac_ext <<EOF
  805. #line 806 "configure"
  806. #include "confdefs.h"
  807. #include <string.h>
  808. EOF
  809. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  810.   egrep "memchr" >/dev/null 2>&1; then
  811.   :
  812. else
  813.   rm -rf conftest*
  814.   ac_cv_header_stdc=no
  815. fi
  816. rm -f conftest*
  817.  
  818. fi
  819.  
  820. if test $ac_cv_header_stdc = yes; then
  821.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  822. cat > conftest.$ac_ext <<EOF
  823. #line 824 "configure"
  824. #include "confdefs.h"
  825. #include <stdlib.h>
  826. EOF
  827. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  828.   egrep "free" >/dev/null 2>&1; then
  829.   :
  830. else
  831.   rm -rf conftest*
  832.   ac_cv_header_stdc=no
  833. fi
  834. rm -f conftest*
  835.  
  836. fi
  837.  
  838. if test $ac_cv_header_stdc = yes; then
  839.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  840. if test "$cross_compiling" = yes; then
  841.   ac_cv_header_stdc=no
  842. else
  843. cat > conftest.$ac_ext <<EOF
  844. #line 845 "configure"
  845. #include "confdefs.h"
  846. #include <ctype.h>
  847. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  848. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  849. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  850. int main () { int i; for (i = 0; i < 256; i++)
  851. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  852. exit (0); }
  853.  
  854. EOF
  855. eval $ac_link
  856. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  857.   :
  858. else
  859.   ac_cv_header_stdc=no
  860. fi
  861. fi
  862. rm -fr conftest*
  863. fi
  864. fi
  865. /bin/echo "$ac_t""$ac_cv_header_stdc" 1>&4
  866. if test $ac_cv_header_stdc = yes; then
  867.   cat >> confdefs.h <<\EOF
  868. #define STDC_HEADERS 1
  869. EOF
  870.  
  871. fi
  872.  
  873. for ac_hdr in unistd.h fcntl.h limits.h stdlib.h string.h sys/file.h time.h
  874. do
  875. ac_safe=`/bin/echo "$ac_hdr" | tr './\055' '___'`
  876. /bin/echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
  877. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  878.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  879. else
  880.   cat > conftest.$ac_ext <<EOF
  881. #line 882 "configure"
  882. #include "confdefs.h"
  883. #include <$ac_hdr>
  884. EOF
  885. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  886. ac_err=`grep -v '^ *+' conftest.out`
  887. if test -z "$ac_err"; then
  888.   rm -rf conftest*
  889.   eval "ac_cv_header_$ac_safe=yes"
  890. else
  891.   /bin/echo "$ac_err" >&5
  892.   rm -rf conftest*
  893.   eval "ac_cv_header_$ac_safe=no"
  894. fi
  895. rm -f conftest*
  896. fi
  897. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  898.   /bin/echo "$ac_t""yes" 1>&4
  899.     ac_tr_hdr=HAVE_`/bin/echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  900.   cat >> confdefs.h <<EOF
  901. #define $ac_tr_hdr 1
  902. EOF
  903.  
  904. else
  905.   /bin/echo "$ac_t""no" 1>&4
  906. fi
  907. done
  908.  
  909. ac_header_dirent=no
  910. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  911. do
  912. ac_safe=`/bin/echo "$ac_hdr" | tr './\055' '___'`
  913. /bin/echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&4
  914. if eval "test \"`echo '${'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  915.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  916. else
  917.   cat > conftest.$ac_ext <<EOF
  918. #line 919 "configure"
  919. #include "confdefs.h"
  920. #include <sys/types.h>
  921. #include <$ac_hdr>
  922. int main() { return 0; }
  923. int t() {
  924. DIR *dirp = 0;
  925. ; return 0; }
  926. EOF
  927. if eval $ac_compile; then
  928.   rm -rf conftest*
  929.   eval "ac_cv_header_dirent_$ac_safe=yes"
  930. else
  931.   rm -rf conftest*
  932.   eval "ac_cv_header_dirent_$ac_safe=no"
  933. fi
  934. rm -f conftest*
  935.  
  936. fi
  937. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  938.   /bin/echo "$ac_t""yes" 1>&4
  939.     ac_tr_hdr=HAVE_`/bin/echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  940.   cat >> confdefs.h <<EOF
  941. #define $ac_tr_hdr 1
  942. EOF
  943.  ac_header_dirent=$ac_hdr; break
  944. else
  945.   /bin/echo "$ac_t""no" 1>&4
  946. fi
  947. done
  948. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  949. if test $ac_header_dirent = dirent.h; then
  950. /bin/echo $ac_n "checking for -ldir""... $ac_c" 1>&4
  951. if eval "test \"`echo '${'ac_cv_lib_dir'+set}'`\" = set"; then
  952.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  953. else
  954.   ac_save_LIBS="$LIBS"
  955. LIBS="$LIBS -ldir "
  956. cat > conftest.$ac_ext <<EOF
  957. #line 958 "configure"
  958. #include "confdefs.h"
  959.  
  960. int main() { return 0; }
  961. int t() {
  962. opendir()
  963. ; return 0; }
  964. EOF
  965. if eval $ac_link; then
  966.   rm -rf conftest*
  967.   eval "ac_cv_lib_dir=yes"
  968. else
  969.   rm -rf conftest*
  970.   eval "ac_cv_lib_dir=no"
  971. fi
  972. rm -f conftest*
  973. LIBS="$ac_save_LIBS"
  974.  
  975. fi
  976. if eval "test \"`echo '$ac_cv_lib_'dir`\" = yes"; then
  977.   /bin/echo "$ac_t""yes" 1>&4
  978.   LIBS="$LIBS -ldir"
  979. else
  980.   /bin/echo "$ac_t""no" 1>&4
  981. fi
  982.  
  983. else
  984. /bin/echo $ac_n "checking for -lx""... $ac_c" 1>&4
  985. if eval "test \"`echo '${'ac_cv_lib_x'+set}'`\" = set"; then
  986.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  987. else
  988.   ac_save_LIBS="$LIBS"
  989. LIBS="$LIBS -lx "
  990. cat > conftest.$ac_ext <<EOF
  991. #line 992 "configure"
  992. #include "confdefs.h"
  993.  
  994. int main() { return 0; }
  995. int t() {
  996. opendir()
  997. ; return 0; }
  998. EOF
  999. if eval $ac_link; then
  1000.   rm -rf conftest*
  1001.   eval "ac_cv_lib_x=yes"
  1002. else
  1003.   rm -rf conftest*
  1004.   eval "ac_cv_lib_x=no"
  1005. fi
  1006. rm -f conftest*
  1007. LIBS="$ac_save_LIBS"
  1008.  
  1009. fi
  1010. if eval "test \"`echo '$ac_cv_lib_'x`\" = yes"; then
  1011.   /bin/echo "$ac_t""yes" 1>&4
  1012.   LIBS="$LIBS -lx"
  1013. else
  1014.   /bin/echo "$ac_t""no" 1>&4
  1015. fi
  1016.  
  1017. fi
  1018.  
  1019. /bin/echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&4
  1020. if eval "test \"`echo '${'ac_cv_header_stat_broken'+set}'`\" = set"; then
  1021.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1022. else
  1023.   cat > conftest.$ac_ext <<EOF
  1024. #line 1025 "configure"
  1025. #include "confdefs.h"
  1026. #include <sys/types.h>
  1027. #include <sys/stat.h>
  1028. #ifdef S_ISBLK
  1029. # if S_ISBLK (S_IFDIR)
  1030. You lose.
  1031. # endif
  1032. # ifdef S_IFCHR
  1033. #  if S_ISBLK (S_IFCHR)
  1034. You lose.
  1035. #  endif
  1036. # endif
  1037. #endif
  1038.  
  1039. #ifdef S_ISLNK
  1040. # if S_ISLNK (S_IFREG)
  1041. You lose.
  1042. # endif
  1043. #endif
  1044.  
  1045. #ifdef S_ISSOCK
  1046. # if S_ISSOCK (S_IFREG)
  1047. You lose.
  1048. # endif
  1049. #endif
  1050.  
  1051. EOF
  1052. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1053.   egrep "You lose" >/dev/null 2>&1; then
  1054.   rm -rf conftest*
  1055.   ac_cv_header_stat_broken=yes
  1056. else
  1057.   rm -rf conftest*
  1058.   ac_cv_header_stat_broken=no
  1059. fi
  1060. rm -f conftest*
  1061.  
  1062. fi
  1063. /bin/echo "$ac_t""$ac_cv_header_stat_broken" 1>&4
  1064. if test $ac_cv_header_stat_broken = yes; then
  1065.   cat >> confdefs.h <<\EOF
  1066. #define STAT_MACROS_BROKEN 1
  1067. EOF
  1068.  
  1069. fi
  1070.  
  1071. /bin/echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&4
  1072. if eval "test \"`echo '${'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
  1073.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1074. else
  1075.   cat > conftest.$ac_ext <<EOF
  1076. #line 1077 "configure"
  1077. #include "confdefs.h"
  1078. #include <sys/types.h>
  1079. #include <sys/wait.h>
  1080. #ifndef WEXITSTATUS
  1081. #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
  1082. #endif
  1083. #ifndef WIFEXITED
  1084. #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
  1085. #endif
  1086. int main() { return 0; }
  1087. int t() {
  1088. int s;
  1089. wait (&s);
  1090. s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  1091. ; return 0; }
  1092. EOF
  1093. if eval $ac_compile; then
  1094.   rm -rf conftest*
  1095.   ac_cv_header_sys_wait_h=yes
  1096. else
  1097.   rm -rf conftest*
  1098.   ac_cv_header_sys_wait_h=no
  1099. fi
  1100. rm -f conftest*
  1101.  
  1102. fi
  1103. /bin/echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&4
  1104. if test $ac_cv_header_sys_wait_h = yes; then
  1105.   cat >> confdefs.h <<\EOF
  1106. #define HAVE_SYS_WAIT_H 1
  1107. EOF
  1108.  
  1109. fi
  1110.  
  1111. /bin/echo $ac_n "checking for pid_t""... $ac_c" 1>&4
  1112. if eval "test \"`echo '${'ac_cv_type_pid_t'+set}'`\" = set"; then
  1113.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1114. else
  1115.   cat > conftest.$ac_ext <<EOF
  1116. #line 1117 "configure"
  1117. #include "confdefs.h"
  1118. #include <sys/types.h>
  1119. #if STDC_HEADERS
  1120. #include <stdlib.h>
  1121. #endif
  1122. EOF
  1123. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1124.   egrep "pid_t" >/dev/null 2>&1; then
  1125.   rm -rf conftest*
  1126.   ac_cv_type_pid_t=yes
  1127. else
  1128.   rm -rf conftest*
  1129.   ac_cv_type_pid_t=no
  1130. fi
  1131. rm -f conftest*
  1132.  
  1133. fi
  1134. /bin/echo "$ac_t""$ac_cv_type_pid_t" 1>&4
  1135. if test $ac_cv_type_pid_t = no; then
  1136.   cat >> confdefs.h <<\EOF
  1137. #define pid_t int
  1138. EOF
  1139.  
  1140. fi
  1141.  
  1142. /bin/echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&4
  1143. if eval "test \"`echo '${'ac_cv_type_signal'+set}'`\" = set"; then
  1144.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1145. else
  1146.   cat > conftest.$ac_ext <<EOF
  1147. #line 1148 "configure"
  1148. #include "confdefs.h"
  1149. #include <sys/types.h>
  1150. #include <signal.h>
  1151. #ifdef signal
  1152. #undef signal
  1153. #endif
  1154. extern void (*signal ()) ();
  1155. int main() { return 0; }
  1156. int t() {
  1157. int i;
  1158. ; return 0; }
  1159. EOF
  1160. if eval $ac_compile; then
  1161.   rm -rf conftest*
  1162.   ac_cv_type_signal=void
  1163. else
  1164.   rm -rf conftest*
  1165.   ac_cv_type_signal=int
  1166. fi
  1167. rm -f conftest*
  1168.  
  1169. fi
  1170. /bin/echo "$ac_t""$ac_cv_type_signal" 1>&4
  1171. cat >> confdefs.h <<EOF
  1172. #define RETSIGTYPE $ac_cv_type_signal
  1173. EOF
  1174.  
  1175.  
  1176. for ac_func in dup2 memchr sigaction strchr strerror tmpnam
  1177. do
  1178. /bin/echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
  1179. if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1180.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1181. else
  1182.   cat > conftest.$ac_ext <<EOF
  1183. #line 1184 "configure"
  1184. #include "confdefs.h"
  1185. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1186. /* Override any gcc2 internal prototype to avoid an error.  */
  1187. char $ac_func(); 
  1188.  
  1189. int main() { return 0; }
  1190. int t() {
  1191.  
  1192. /* The GNU C library defines this for functions which it implements
  1193.     to always fail with ENOSYS.  Some functions are actually named
  1194.     something starting with __ and the normal name is an alias.  */
  1195. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1196. choke me
  1197. #else
  1198. $ac_func();
  1199. #endif
  1200.  
  1201. ; return 0; }
  1202. EOF
  1203. if eval $ac_link; then
  1204.   rm -rf conftest*
  1205.   eval "ac_cv_func_$ac_func=yes"
  1206. else
  1207.   rm -rf conftest*
  1208.   eval "ac_cv_func_$ac_func=no"
  1209. fi
  1210. rm -f conftest*
  1211.  
  1212. fi
  1213. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1214.   /bin/echo "$ac_t""yes" 1>&4
  1215.     ac_tr_func=HAVE_`/bin/echo $ac_func | tr '[a-z]' '[A-Z]'`
  1216.   cat >> confdefs.h <<EOF
  1217. #define $ac_tr_func 1
  1218. EOF
  1219.  
  1220. else
  1221.   /bin/echo "$ac_t""no" 1>&4
  1222. fi
  1223. done
  1224.  
  1225. for ac_func in memchr waitpid
  1226. do
  1227. /bin/echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
  1228. if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1229.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1230. else
  1231.   cat > conftest.$ac_ext <<EOF
  1232. #line 1233 "configure"
  1233. #include "confdefs.h"
  1234. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1235. /* Override any gcc2 internal prototype to avoid an error.  */
  1236. char $ac_func(); 
  1237.  
  1238. int main() { return 0; }
  1239. int t() {
  1240.  
  1241. /* The GNU C library defines this for functions which it implements
  1242.     to always fail with ENOSYS.  Some functions are actually named
  1243.     something starting with __ and the normal name is an alias.  */
  1244. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1245. choke me
  1246. #else
  1247. $ac_func();
  1248. #endif
  1249.  
  1250. ; return 0; }
  1251. EOF
  1252. if eval $ac_link; then
  1253.   rm -rf conftest*
  1254.   eval "ac_cv_func_$ac_func=yes"
  1255. else
  1256.   rm -rf conftest*
  1257.   eval "ac_cv_func_$ac_func=no"
  1258. fi
  1259. rm -f conftest*
  1260.  
  1261. fi
  1262. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1263.   /bin/echo "$ac_t""yes" 1>&4
  1264.   :
  1265. else
  1266.   /bin/echo "$ac_t""no" 1>&4
  1267. LIBOBJS="$LIBOBJS ${ac_func}.o"
  1268. fi
  1269.  
  1270. done
  1271.  
  1272. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  1273. # for constant arguments.  Useless!
  1274. /bin/echo $ac_n "checking for working alloca.h""... $ac_c" 1>&4
  1275. if eval "test \"`echo '${'ac_cv_header_alloca_h'+set}'`\" = set"; then
  1276.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1277. else
  1278.   cat > conftest.$ac_ext <<EOF
  1279. #line 1280 "configure"
  1280. #include "confdefs.h"
  1281. #include <alloca.h>
  1282. int main() { return 0; }
  1283. int t() {
  1284. char *p = alloca(2 * sizeof(int));
  1285. ; return 0; }
  1286. EOF
  1287. if eval $ac_link; then
  1288.   rm -rf conftest*
  1289.   ac_cv_header_alloca_h=yes
  1290. else
  1291.   rm -rf conftest*
  1292.   ac_cv_header_alloca_h=no
  1293. fi
  1294. rm -f conftest*
  1295.  
  1296. fi
  1297. /bin/echo "$ac_t""$ac_cv_header_alloca_h" 1>&4
  1298. if test $ac_cv_header_alloca_h = yes; then
  1299.   cat >> confdefs.h <<\EOF
  1300. #define HAVE_ALLOCA_H 1
  1301. EOF
  1302.  
  1303. fi
  1304.  
  1305. /bin/echo $ac_n "checking for alloca""... $ac_c" 1>&4
  1306. if eval "test \"`echo '${'ac_cv_func_alloca'+set}'`\" = set"; then
  1307.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1308. else
  1309.   cat > conftest.$ac_ext <<EOF
  1310. #line 1311 "configure"
  1311. #include "confdefs.h"
  1312.  
  1313. #ifdef __GNUC__
  1314. # define alloca __builtin_alloca
  1315. #else
  1316. # if HAVE_ALLOCA_H
  1317. #  include <alloca.h>
  1318. # else
  1319. #  ifdef _AIX
  1320.  #pragma alloca
  1321. #  else
  1322. #   ifndef alloca /* predefined by HP cc +Olibcalls */
  1323. char *alloca ();
  1324. #   endif
  1325. #  endif
  1326. # endif
  1327. #endif
  1328.  
  1329. int main() { return 0; }
  1330. int t() {
  1331. char *p = (char *) alloca(1);
  1332. ; return 0; }
  1333. EOF
  1334. if eval $ac_link; then
  1335.   rm -rf conftest*
  1336.   ac_cv_func_alloca=yes
  1337. else
  1338.   rm -rf conftest*
  1339.   ac_cv_func_alloca=no
  1340. fi
  1341. rm -f conftest*
  1342.  
  1343. fi
  1344. /bin/echo "$ac_t""$ac_cv_func_alloca" 1>&4
  1345. if test $ac_cv_func_alloca = yes; then
  1346.   cat >> confdefs.h <<\EOF
  1347. #define HAVE_ALLOCA 1
  1348. EOF
  1349.  
  1350. fi
  1351.  
  1352. if test $ac_cv_func_alloca = no; then
  1353.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  1354.   # that cause trouble.  Some versions do not even contain alloca or
  1355.   # contain a buggy version.  If you still want to use their alloca,
  1356.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  1357.   ALLOCA=alloca.o
  1358.   cat >> confdefs.h <<\EOF
  1359. #define C_ALLOCA 1
  1360. EOF
  1361.  
  1362.  
  1363. /bin/echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&4
  1364. if eval "test \"`echo '${'ac_cv_os_cray'+set}'`\" = set"; then
  1365.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1366. else
  1367.   cat > conftest.$ac_ext <<EOF
  1368. #line 1369 "configure"
  1369. #include "confdefs.h"
  1370. #if defined(CRAY) && ! defined(CRAY2)
  1371. webecray
  1372. #else
  1373. wenotbecray
  1374. #endif
  1375.  
  1376. EOF
  1377. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1378.   egrep "webecray" >/dev/null 2>&1; then
  1379.   rm -rf conftest*
  1380.   ac_cv_os_cray=yes
  1381. else
  1382.   rm -rf conftest*
  1383.   ac_cv_os_cray=no
  1384. fi
  1385. rm -f conftest*
  1386.  
  1387. fi
  1388. /bin/echo "$ac_t""$ac_cv_os_cray" 1>&4
  1389. if test $ac_cv_os_cray = yes; then
  1390. /bin/echo $ac_n "checking for _getb67""... $ac_c" 1>&4
  1391. if eval "test \"`echo '${'ac_cv_func__getb67'+set}'`\" = set"; then
  1392.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1393. else
  1394.   cat > conftest.$ac_ext <<EOF
  1395. #line 1396 "configure"
  1396. #include "confdefs.h"
  1397. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1398. /* Override any gcc2 internal prototype to avoid an error.  */
  1399. char _getb67(); 
  1400.  
  1401. int main() { return 0; }
  1402. int t() {
  1403.  
  1404. /* The GNU C library defines this for functions which it implements
  1405.     to always fail with ENOSYS.  Some functions are actually named
  1406.     something starting with __ and the normal name is an alias.  */
  1407. #if defined (__stub__getb67) || defined (__stub____getb67)
  1408. choke me
  1409. #else
  1410. _getb67();
  1411. #endif
  1412.  
  1413. ; return 0; }
  1414. EOF
  1415. if eval $ac_link; then
  1416.   rm -rf conftest*
  1417.   eval "ac_cv_func__getb67=yes"
  1418. else
  1419.   rm -rf conftest*
  1420.   eval "ac_cv_func__getb67=no"
  1421. fi
  1422. rm -f conftest*
  1423.  
  1424. fi
  1425. if eval "test \"`echo '$ac_cv_func_'_getb67`\" = yes"; then
  1426.   /bin/echo "$ac_t""yes" 1>&4
  1427.   cat >> confdefs.h <<\EOF
  1428. #define CRAY_STACKSEG_END _getb67
  1429. EOF
  1430.  
  1431. else
  1432.   /bin/echo "$ac_t""no" 1>&4
  1433. /bin/echo $ac_n "checking for GETB67""... $ac_c" 1>&4
  1434. if eval "test \"`echo '${'ac_cv_func_GETB67'+set}'`\" = set"; then
  1435.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1436. else
  1437.   cat > conftest.$ac_ext <<EOF
  1438. #line 1439 "configure"
  1439. #include "confdefs.h"
  1440. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1441. /* Override any gcc2 internal prototype to avoid an error.  */
  1442. char GETB67(); 
  1443.  
  1444. int main() { return 0; }
  1445. int t() {
  1446.  
  1447. /* The GNU C library defines this for functions which it implements
  1448.     to always fail with ENOSYS.  Some functions are actually named
  1449.     something starting with __ and the normal name is an alias.  */
  1450. #if defined (__stub_GETB67) || defined (__stub___GETB67)
  1451. choke me
  1452. #else
  1453. GETB67();
  1454. #endif
  1455.  
  1456. ; return 0; }
  1457. EOF
  1458. if eval $ac_link; then
  1459.   rm -rf conftest*
  1460.   eval "ac_cv_func_GETB67=yes"
  1461. else
  1462.   rm -rf conftest*
  1463.   eval "ac_cv_func_GETB67=no"
  1464. fi
  1465. rm -f conftest*
  1466.  
  1467. fi
  1468. if eval "test \"`echo '$ac_cv_func_'GETB67`\" = yes"; then
  1469.   /bin/echo "$ac_t""yes" 1>&4
  1470.   cat >> confdefs.h <<\EOF
  1471. #define CRAY_STACKSEG_END GETB67
  1472. EOF
  1473.  
  1474. else
  1475.   /bin/echo "$ac_t""no" 1>&4
  1476. /bin/echo $ac_n "checking for getb67""... $ac_c" 1>&4
  1477. if eval "test \"`echo '${'ac_cv_func_getb67'+set}'`\" = set"; then
  1478.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1479. else
  1480.   cat > conftest.$ac_ext <<EOF
  1481. #line 1482 "configure"
  1482. #include "confdefs.h"
  1483. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1484. /* Override any gcc2 internal prototype to avoid an error.  */
  1485. char getb67(); 
  1486.  
  1487. int main() { return 0; }
  1488. int t() {
  1489.  
  1490. /* The GNU C library defines this for functions which it implements
  1491.     to always fail with ENOSYS.  Some functions are actually named
  1492.     something starting with __ and the normal name is an alias.  */
  1493. #if defined (__stub_getb67) || defined (__stub___getb67)
  1494. choke me
  1495. #else
  1496. getb67();
  1497. #endif
  1498.  
  1499. ; return 0; }
  1500. EOF
  1501. if eval $ac_link; then
  1502.   rm -rf conftest*
  1503.   eval "ac_cv_func_getb67=yes"
  1504. else
  1505.   rm -rf conftest*
  1506.   eval "ac_cv_func_getb67=no"
  1507. fi
  1508. rm -f conftest*
  1509.  
  1510. fi
  1511. if eval "test \"`echo '$ac_cv_func_'getb67`\" = yes"; then
  1512.   /bin/echo "$ac_t""yes" 1>&4
  1513.   cat >> confdefs.h <<\EOF
  1514. #define CRAY_STACKSEG_END getb67
  1515. EOF
  1516.  
  1517. else
  1518.   /bin/echo "$ac_t""no" 1>&4
  1519. fi
  1520.  
  1521. fi
  1522.  
  1523. fi
  1524.  
  1525. fi
  1526.  
  1527. /bin/echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&4
  1528. if eval "test \"`echo '${'ac_cv_c_stack_direction'+set}'`\" = set"; then
  1529.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1530. else
  1531.   if test "$cross_compiling" = yes; then
  1532.   ac_cv_c_stack_direction=0
  1533. else
  1534. cat > conftest.$ac_ext <<EOF
  1535. #line 1536 "configure"
  1536. #include "confdefs.h"
  1537. find_stack_direction ()
  1538. {
  1539.   static char *addr = 0;
  1540.   auto char dummy;
  1541.   if (addr == 0)
  1542.     {
  1543.       addr = &dummy;
  1544.       return find_stack_direction ();
  1545.     }
  1546.   else
  1547.     return (&dummy > addr) ? 1 : -1;
  1548. }
  1549. main ()
  1550. {
  1551.   exit (find_stack_direction() < 0);
  1552. }
  1553. EOF
  1554. eval $ac_link
  1555. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1556.   ac_cv_c_stack_direction=1
  1557. else
  1558.   ac_cv_c_stack_direction=-1
  1559. fi
  1560. fi
  1561. rm -fr conftest*
  1562. fi
  1563. /bin/echo "$ac_t""$ac_cv_c_stack_direction" 1>&4
  1564. cat >> confdefs.h <<EOF
  1565. #define STACK_DIRECTION $ac_cv_c_stack_direction
  1566. EOF
  1567.  
  1568. fi
  1569.  
  1570. /bin/echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&4
  1571. if eval "test \"`echo '${'ac_cv_func_closedir_void'+set}'`\" = set"; then
  1572.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1573. else
  1574.   if test "$cross_compiling" = yes; then
  1575.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1576. else
  1577. cat > conftest.$ac_ext <<EOF
  1578. #line 1579 "configure"
  1579. #include "confdefs.h"
  1580. #include <sys/types.h>
  1581. #include <$ac_header_dirent>
  1582. int closedir(); main() { exit(closedir(opendir(".")) != 0); }
  1583. EOF
  1584. eval $ac_link
  1585. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1586.   ac_cv_func_closedir_void=no
  1587. else
  1588.   ac_cv_func_closedir_void=yes
  1589. fi
  1590. fi
  1591. rm -fr conftest*
  1592. fi
  1593. /bin/echo "$ac_t""$ac_cv_func_closedir_void" 1>&4
  1594. if test $ac_cv_func_closedir_void = yes; then
  1595.   cat >> confdefs.h <<\EOF
  1596. #define CLOSEDIR_VOID 1
  1597. EOF
  1598.  
  1599. fi
  1600.  
  1601. ac_safe=`/bin/echo "vfork.h" | tr './\055' '___'`
  1602. /bin/echo $ac_n "checking for vfork.h""... $ac_c" 1>&4
  1603. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1604.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1605. else
  1606.   cat > conftest.$ac_ext <<EOF
  1607. #line 1608 "configure"
  1608. #include "confdefs.h"
  1609. #include <vfork.h>
  1610. EOF
  1611. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1612. ac_err=`grep -v '^ *+' conftest.out`
  1613. if test -z "$ac_err"; then
  1614.   rm -rf conftest*
  1615.   eval "ac_cv_header_$ac_safe=yes"
  1616. else
  1617.   /bin/echo "$ac_err" >&5
  1618.   rm -rf conftest*
  1619.   eval "ac_cv_header_$ac_safe=no"
  1620. fi
  1621. rm -f conftest*
  1622. fi
  1623. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1624.   /bin/echo "$ac_t""yes" 1>&4
  1625.   cat >> confdefs.h <<\EOF
  1626. #define HAVE_VFORK_H 1
  1627. EOF
  1628.  
  1629. else
  1630.   /bin/echo "$ac_t""no" 1>&4
  1631. fi
  1632.  
  1633. /bin/echo $ac_n "checking for working vfork""... $ac_c" 1>&4
  1634. if eval "test \"`echo '${'ac_cv_func_vfork'+set}'`\" = set"; then
  1635.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1636. else
  1637.   
  1638. if test "$cross_compiling" = yes; then
  1639.   ac_cv_func_vfork=no
  1640. else
  1641. cat > conftest.$ac_ext <<EOF
  1642. #line 1643 "configure"
  1643. #include "confdefs.h"
  1644. /* Thanks to Paul Eggert for this test.  */
  1645. #include <stdio.h>
  1646. #include <sys/types.h>
  1647. #include <sys/stat.h>
  1648. #include <signal.h>
  1649. #ifdef HAVE_UNISTD_H
  1650. #include <unistd.h>
  1651. #endif
  1652. #ifdef HAVE_VFORK_H
  1653. #include <vfork.h>
  1654. #endif
  1655. /* On sparc systems, changes by the child to local and incoming
  1656.    argument registers are propagated back to the parent.
  1657.    The compiler is told about this with #include <vfork.h>,
  1658.    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
  1659.    Test for this by using a static variable whose address
  1660.    is put into a register that is clobbered by the vfork.  */
  1661. static
  1662. #ifdef __cplusplus
  1663. sparc_address_test (int arg)
  1664. #else
  1665. sparc_address_test (arg) int arg;
  1666. #endif
  1667. {
  1668.   static pid_t child;
  1669.   if (!child) {
  1670.     child = vfork ();
  1671.     if (child < 0)
  1672.       perror ("vfork");
  1673.     if (!child) {
  1674.       arg = getpid();
  1675.       write(-1, "", 0);
  1676.       _exit (arg);
  1677.     }
  1678.   }
  1679. }
  1680. static int signalled;
  1681. static RETSIGTYPE catch (s) int s; { signalled = 1; }
  1682. main() {
  1683.   pid_t parent = getpid ();
  1684.   pid_t child;
  1685.  
  1686.   sparc_address_test ();
  1687.  
  1688. #ifdef __amigados__
  1689.   /* Force this test to succeed for AmigaDOS, which has a fairly good
  1690.      vfork() emulation, but doesn't support fork() at all.  -fnf */
  1691.   exit (0);
  1692. #endif
  1693.   signal (SIGINT, catch);
  1694.  
  1695.   child = vfork ();
  1696.  
  1697.   if (child == 0) {
  1698.     /* Here is another test for sparc vfork register problems.
  1699.        This test uses lots of local variables, at least
  1700.        as many local variables as main has allocated so far
  1701.        including compiler temporaries.  4 locals are enough for
  1702.        gcc 1.40.3 on a sparc, but we use 8 to be safe.
  1703.        A buggy compiler should reuse the register of parent
  1704.        for one of the local variables, since it will think that
  1705.        parent can't possibly be used any more in this routine.
  1706.        Assigning to the local variable will thus munge parent
  1707.        in the parent process.  */
  1708.     pid_t
  1709.       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
  1710.       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
  1711.     /* Convince the compiler that p..p7 are live; otherwise, it might
  1712.        use the same hardware register for all 8 local variables.  */
  1713.     if (p != p1 || p != p2 || p != p3 || p != p4
  1714.     || p != p5 || p != p6 || p != p7)
  1715.       _exit(1);
  1716.  
  1717.     /* On some systems (e.g. SunOS 5.2), if the parent is catching
  1718.        a signal, the child ignores the signal before execing,
  1719.        and the parent later receives that signal, the parent dumps core.
  1720.        Test for this by ignoring SIGINT in the child.  */
  1721.     signal (SIGINT, SIG_IGN);
  1722.  
  1723.     /* On some systems (e.g. IRIX 3.3),
  1724.        vfork doesn't separate parent from child file descriptors.
  1725.        If the child closes a descriptor before it execs or exits,
  1726.        this munges the parent's descriptor as well.
  1727.        Test for this by closing stdout in the child.  */
  1728.     _exit(close(fileno(stdout)) != 0);
  1729.   } else {
  1730.     int status;
  1731.     struct stat st;
  1732.  
  1733.     while (wait(&status) != child)
  1734.       ;
  1735.     exit(
  1736.      /* Was there some problem with vforking?  */
  1737.      child < 0
  1738.  
  1739.      /* Did the child fail?  (This shouldn't happen.)  */
  1740.      || status
  1741.  
  1742.      /* Did the vfork/compiler bug occur?  */
  1743.      || parent != getpid()
  1744.  
  1745.      /* Did the signal handling bug occur?  */
  1746.      || kill(parent, SIGINT) != 0
  1747.      || signalled != 1
  1748.  
  1749.      /* Did the file descriptor bug occur?  */
  1750.      || fstat(fileno(stdout), &st) != 0
  1751.      );
  1752.   }
  1753. }
  1754. EOF
  1755. eval $ac_link
  1756. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1757.   ac_cv_func_vfork=yes
  1758. else
  1759.   ac_cv_func_vfork=no
  1760. fi
  1761. fi
  1762. rm -fr conftest*
  1763. fi
  1764. /bin/echo "$ac_t""$ac_cv_func_vfork" 1>&4
  1765. if test $ac_cv_func_vfork = no; then
  1766.   cat >> confdefs.h <<\EOF
  1767. #define vfork fork
  1768. EOF
  1769.  
  1770. fi
  1771.  
  1772. /bin/echo $ac_n "checking for vprintf""... $ac_c" 1>&4
  1773. if eval "test \"`echo '${'ac_cv_func_vprintf'+set}'`\" = set"; then
  1774.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1775. else
  1776.   cat > conftest.$ac_ext <<EOF
  1777. #line 1778 "configure"
  1778. #include "confdefs.h"
  1779. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1780. /* Override any gcc2 internal prototype to avoid an error.  */
  1781. char vprintf(); 
  1782.  
  1783. int main() { return 0; }
  1784. int t() {
  1785.  
  1786. /* The GNU C library defines this for functions which it implements
  1787.     to always fail with ENOSYS.  Some functions are actually named
  1788.     something starting with __ and the normal name is an alias.  */
  1789. #if defined (__stub_vprintf) || defined (__stub___vprintf)
  1790. choke me
  1791. #else
  1792. vprintf();
  1793. #endif
  1794.  
  1795. ; return 0; }
  1796. EOF
  1797. if eval $ac_link; then
  1798.   rm -rf conftest*
  1799.   eval "ac_cv_func_vprintf=yes"
  1800. else
  1801.   rm -rf conftest*
  1802.   eval "ac_cv_func_vprintf=no"
  1803. fi
  1804. rm -f conftest*
  1805.  
  1806. fi
  1807. if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
  1808.   /bin/echo "$ac_t""yes" 1>&4
  1809.   cat >> confdefs.h <<\EOF
  1810. #define HAVE_VPRINTF 1
  1811. EOF
  1812.  
  1813. else
  1814.   /bin/echo "$ac_t""no" 1>&4
  1815. fi
  1816.  
  1817. if test "$ac_cv_func_vprintf" != yes; then
  1818. /bin/echo $ac_n "checking for _doprnt""... $ac_c" 1>&4
  1819. if eval "test \"`echo '${'ac_cv_func__doprnt'+set}'`\" = set"; then
  1820.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1821. else
  1822.   cat > conftest.$ac_ext <<EOF
  1823. #line 1824 "configure"
  1824. #include "confdefs.h"
  1825. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1826. /* Override any gcc2 internal prototype to avoid an error.  */
  1827. char _doprnt(); 
  1828.  
  1829. int main() { return 0; }
  1830. int t() {
  1831.  
  1832. /* The GNU C library defines this for functions which it implements
  1833.     to always fail with ENOSYS.  Some functions are actually named
  1834.     something starting with __ and the normal name is an alias.  */
  1835. #if defined (__stub__doprnt) || defined (__stub____doprnt)
  1836. choke me
  1837. #else
  1838. _doprnt();
  1839. #endif
  1840.  
  1841. ; return 0; }
  1842. EOF
  1843. if eval $ac_link; then
  1844.   rm -rf conftest*
  1845.   eval "ac_cv_func__doprnt=yes"
  1846. else
  1847.   rm -rf conftest*
  1848.   eval "ac_cv_func__doprnt=no"
  1849. fi
  1850. rm -f conftest*
  1851.  
  1852. fi
  1853. if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
  1854.   /bin/echo "$ac_t""yes" 1>&4
  1855.   cat >> confdefs.h <<\EOF
  1856. #define HAVE_DOPRNT 1
  1857. EOF
  1858.  
  1859. else
  1860.   /bin/echo "$ac_t""no" 1>&4
  1861. fi
  1862.  
  1863. fi
  1864.  
  1865. /bin/echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&4
  1866. if eval "test \"`echo '${'ac_cv_struct_st_blksize'+set}'`\" = set"; then
  1867.   /bin/echo $ac_n "(cached) $ac_c" 1>&4
  1868. else
  1869.   cat > conftest.$ac_ext <<EOF
  1870. #line 1871 "configure"
  1871. #include "confdefs.h"
  1872. #include <sys/types.h>
  1873. #include <sys/stat.h>
  1874. int main() { return 0; }
  1875. int t() {
  1876. struct stat s; s.st_blksize;
  1877. ; return 0; }
  1878. EOF
  1879. if eval $ac_compile; then
  1880.   rm -rf conftest*
  1881.   ac_cv_struct_st_blksize=yes
  1882. else
  1883.   rm -rf conftest*
  1884.   ac_cv_struct_st_blksize=no
  1885. fi
  1886. rm -f conftest*
  1887.  
  1888. fi
  1889. /bin/echo "$ac_t""$ac_cv_struct_st_blksize" 1>&4
  1890. if test $ac_cv_struct_st_blksize = yes; then
  1891.   cat >> confdefs.h <<\EOF
  1892. #define HAVE_ST_BLKSIZE 1
  1893. EOF
  1894.  
  1895. fi
  1896.  
  1897. trap '' 1 2 15
  1898. if test -w $cache_file; then
  1899. echo "updating cache $cache_file"
  1900. cat > $cache_file <<\EOF
  1901. # This file is a shell script that caches the results of configure
  1902. # tests run on this system so they can be shared between configure
  1903. # scripts and configure runs.  It is not useful on other systems.
  1904. # If it contains results you don't want to keep, you may remove or edit it.
  1905. #
  1906. # By default, configure uses ./config.cache as the cache file,
  1907. # creating it if it does not exist already.  You can give configure
  1908. # the --cache-file=FILE option to use a different cache file; that is
  1909. # what configure does when it calls configure scripts in
  1910. # subdirectories, so they share the cache.
  1911. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  1912. # config.status only pays attention to the cache file if you give it the
  1913. # --recheck option to rerun configure.
  1914. #
  1915. EOF
  1916. # Ultrix sh set writes to stderr and can't be redirected directly.
  1917. (set) 2>&1 |
  1918.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \
  1919.   >> $cache_file
  1920. else
  1921. echo "not updating unwritable cache $cache_file"
  1922. fi
  1923.  
  1924. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  1925.  
  1926. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  1927. # Let make expand exec_prefix.
  1928. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1929.  
  1930. # Any assignment to VPATH causes Sun make to only execute
  1931. # the first set of double-colon rules, so remove it if not needed.
  1932. # If there is a colon in the path, we need to keep it.
  1933. if test "x$srcdir" = x.; then
  1934.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1935. fi
  1936.  
  1937. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1938.  
  1939. DEFS=-DHAVE_CONFIG_H
  1940.  
  1941. # Without the "./", some shells look in PATH for config.status.
  1942. : ${CONFIG_STATUS=./config.status}
  1943.  
  1944. echo creating $CONFIG_STATUS
  1945. # Some systems, like AmigaDOS, won't allow you to remove a script that is
  1946. # being executed, so just move it out of the way instead.
  1947. if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi
  1948. cat > $CONFIG_STATUS <<EOF
  1949. #!/bin/sh
  1950. # Generated automatically by configure.
  1951. # Run this file to recreate the current configuration.
  1952. # This directory was configured as follows,
  1953. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1954. #
  1955. # $0 $ac_configure_args
  1956. #
  1957. # Compiler output produced by configure, useful for debugging
  1958. # configure, is in ./config.log if it exists.
  1959.  
  1960. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1961. for ac_option
  1962. do
  1963.   case "\$ac_option" in
  1964.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1965.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  1966.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  1967.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1968.     /bin/echo "$CONFIG_STATUS generated by autoconf version 2.1"
  1969.     exit 0 ;;
  1970.   -help | --help | --hel | --he | --h)
  1971.     echo "\$ac_cs_usage"; exit 0 ;;
  1972.   *) echo "\$ac_cs_usage"; exit 1 ;;
  1973.   esac
  1974. done
  1975.  
  1976. ac_given_srcdir=$srcdir
  1977. ac_given_INSTALL="$INSTALL"
  1978.  
  1979. trap 'rm -fr Makefile config.h:config.hin conftest*; exit 1' 1 2 15
  1980.  
  1981. # Protect against being on the right side of a sed subst in config.status. 
  1982. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  1983.  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  1984. $ac_vpsub
  1985. $extrasub
  1986. s%@CFLAGS@%$CFLAGS%g
  1987. s%@CPPFLAGS@%$CPPFLAGS%g
  1988. s%@CXXFLAGS@%$CXXFLAGS%g
  1989. s%@DEFS@%$DEFS%g
  1990. s%@LDFLAGS@%$LDFLAGS%g
  1991. s%@LIBS@%$LIBS%g
  1992. s%@exec_prefix@%$exec_prefix%g
  1993. s%@prefix@%$prefix%g
  1994. s%@program_transform_name@%$program_transform_name%g
  1995. s%@CC@%$CC%g
  1996. s%@CPP@%$CPP%g
  1997. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1998. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1999. s%@LIBOBJS@%$LIBOBJS%g
  2000. s%@ALLOCA@%$ALLOCA%g
  2001.  
  2002. CEOF
  2003. EOF
  2004. cat >> $CONFIG_STATUS <<EOF
  2005.  
  2006. CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  2007. EOF
  2008. cat >> $CONFIG_STATUS <<\EOF
  2009. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2010.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  2011.   case "$ac_file" in
  2012.   *:*) ac_file_in=`/bin/echo "$ac_file"|sed 's%.*:%%'`
  2013.        ac_file=`/bin/echo "$ac_file"|sed 's%:.*%%'` ;;
  2014.   *) ac_file_in="${ac_file}.in" ;;
  2015.   esac
  2016.  
  2017.   # Adjust relative srcdir, etc. for subdirectories.
  2018.  
  2019.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2020.   ac_dir=`/bin/echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2021.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2022.     # The file is in a subdirectory.
  2023.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2024.     ac_dir_suffix="/$ac_dir"
  2025.     # A "../" for each directory in $ac_dir_suffix.
  2026.     ac_dots=`/bin/echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2027.   else
  2028.     ac_dir_suffix= ac_dots=
  2029.   fi
  2030.  
  2031.   case "$ac_given_srcdir" in
  2032.   .)  srcdir=.
  2033.       if test -z "$ac_dots"; then top_srcdir=.
  2034.       else top_srcdir=`/bin/echo $ac_dots|sed 's%/$%%'`; fi ;;
  2035.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2036.   *) # Relative path.
  2037.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2038.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2039.   esac
  2040.  
  2041.   case "$ac_given_INSTALL" in
  2042.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  2043.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  2044.   esac
  2045.   echo creating "$ac_file"
  2046.   rm -f "$ac_file"
  2047.   configure_input="Generated automatically from `/bin/echo $ac_file_in|sed 's%.*/%%'` by configure."
  2048.   case "$ac_file" in
  2049.   *Makefile*) ac_comsub="1i\\
  2050. # $configure_input" ;;
  2051.   *) ac_comsub= ;;
  2052.   esac
  2053.   sed -e "$ac_comsub
  2054. s%@configure_input@%$configure_input%g
  2055. s%@srcdir@%$srcdir%g
  2056. s%@top_srcdir@%$top_srcdir%g
  2057. s%@INSTALL@%$INSTALL%g
  2058. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  2059. fi; done
  2060. rm -f conftest.subs
  2061.  
  2062. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  2063. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  2064. #
  2065. # ac_d sets the value in "#define NAME VALUE" lines.
  2066. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  2067. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  2068. ac_dC='\3'
  2069. ac_dD='%g'
  2070. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2071. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2072. ac_uB='\([     ]\)%\1#\2define\3'
  2073. ac_uC=' '
  2074. ac_uD='\4%g'
  2075. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2076. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2077. ac_eB='$%\1#\2define\3'
  2078. ac_eC=' '
  2079. ac_eD='%g'
  2080.  
  2081. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.hin"}
  2082. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  2083.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  2084.   case "$ac_file" in
  2085.   *:*) ac_file_in=`/bin/echo "$ac_file"|sed 's%.*:%%'`
  2086.        ac_file=`/bin/echo "$ac_file"|sed 's%:.*%%'` ;;
  2087.   *) ac_file_in="${ac_file}.in" ;;
  2088.   esac
  2089.  
  2090.   echo creating $ac_file
  2091.  
  2092.   rm -f conftest.frag conftest.in conftest.out
  2093.   cp $ac_given_srcdir/$ac_file_in conftest.in
  2094.  
  2095. EOF
  2096.  
  2097. # Transform confdefs.h into a sed script conftest.vals that substitutes
  2098. # the proper values into config.h.in to produce config.h.  And first:
  2099. # Protect against being on the right side of a sed subst in config.status. 
  2100. # Protect against being in an unquoted here document in config.status.
  2101. rm -f conftest.vals
  2102. cat > conftest.hdr <<\EOF
  2103. s/[\\&%]/\\&/g
  2104. s%[\\$`]%\\&%g
  2105. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  2106. s%ac_d%ac_u%gp
  2107. s%ac_u%ac_e%gp
  2108. EOF
  2109. sed -n -f conftest.hdr confdefs.h > conftest.vals
  2110. rm -f conftest.hdr
  2111.  
  2112. # This sed command replaces #undef with comments.  This is necessary, for
  2113. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2114. # on some systems where configure will not decide to define it.
  2115. cat >> conftest.vals <<\EOF
  2116. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  2117. EOF
  2118.  
  2119. # Break up conftest.vals because some shells have a limit on
  2120. # the size of here documents, and old seds have small limits too.
  2121. # Maximum number of lines to put in a single here document.
  2122. ac_max_here_lines=12
  2123.  
  2124. rm -f conftest.tail
  2125. while :
  2126. do
  2127.   ac_lines=`grep -c . conftest.vals`
  2128.   # grep -c gives empty output for an empty file on some AIX systems.
  2129.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2130.   # Write a limited-size here document to conftest.frag.
  2131.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  2132.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  2133.   echo 'CEOF
  2134.   sed -f conftest.frag conftest.in > conftest.out
  2135.   rm -f conftest.in
  2136.   mv conftest.out conftest.in
  2137. ' >> $CONFIG_STATUS
  2138.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  2139.   rm -f conftest.vals
  2140.   mv conftest.tail conftest.vals
  2141. done
  2142. rm -f conftest.vals
  2143.  
  2144. cat >> $CONFIG_STATUS <<\EOF
  2145.   rm -f conftest.frag conftest.h
  2146.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  2147.   cat conftest.in >> conftest.h
  2148.   rm -f conftest.in
  2149.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  2150.     /bin/echo "$ac_file is unchanged"
  2151.     rm -f conftest.h
  2152.   else
  2153.     rm -f $ac_file
  2154.     mv conftest.h $ac_file
  2155.   fi
  2156. fi; done
  2157.  
  2158.  
  2159. date > stamp-h
  2160. exit 0
  2161. EOF
  2162. chmod +x $CONFIG_STATUS
  2163. rm -fr confdefs* $ac_clean_files
  2164. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS
  2165.  
  2166.