home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / szachy / gnu / amyboard-3.2.pl2 / configure < prev    next >
Text File  |  1995-03-08  |  67KB  |  2,594 lines

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