home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / utilities / text / less-278.lha / less-278 / src.lha / source / configure < prev    next >
Encoding:
Text File  |  1995-02-15  |  48.2 KB  |  1,896 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.  
  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=`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=`echo $ac_option|sed -e 's/-*disable-//'`
  74.     # Reject names that are not valid shell variable names.
  75.     if test -n "`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=`echo $ac_feature| sed 's/-/_/g'`
  79.     eval "enable_${ac_feature}=no" ;;
  80.  
  81.   -enable-* | --enable-*)
  82.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  83.     # Reject names that are not valid shell variable names.
  84.     if test -n "`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=`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=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  224.     # Reject names that are not valid shell variable names.
  225.     if test -n "`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=`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=`echo $ac_option|sed -e 's/-*without-//'`
  237.     # Reject names that are not valid shell variable names.
  238.     if test -n "`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=`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 "`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 --`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. 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=forwback.c
  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=`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=`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.  
  402. # Extract the first word of "gcc", so it can be a program name with args.
  403. set dummy gcc; ac_word=$2
  404. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  405. if eval "test \"`echo '${'ac_cv_prog_CC'+set}'`\" = set"; then
  406.   echo $ac_n "(cached) $ac_c" 1>&4
  407. else
  408.   if test -n "$CC"; then
  409.   ac_cv_prog_CC="$CC" # Let the user override the test.
  410. else
  411.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  412.   for ac_dir in $PATH; do
  413.     test -z "$ac_dir" && ac_dir=.
  414.     if test -f $ac_dir/$ac_word; then
  415.       ac_cv_prog_CC="gcc"
  416.       break
  417.     fi
  418.   done
  419.   IFS="$ac_save_ifs"
  420.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  421. fi
  422. fi
  423. CC="$ac_cv_prog_CC"
  424. if test -n "$CC"; then
  425.   echo "$ac_t""$CC" 1>&4
  426. else
  427.   echo "$ac_t""no" 1>&4
  428. fi
  429.  
  430.  
  431. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&4
  432. if eval "test \"`echo '${'ac_cv_prog_gcc'+set}'`\" = set"; then
  433.   echo $ac_n "(cached) $ac_c" 1>&4
  434. else
  435.   cat > conftest.c <<EOF
  436. #ifdef __GNUC__
  437.   yes;
  438. #endif
  439. EOF
  440. if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  441.   ac_cv_prog_gcc=yes
  442. else
  443.   ac_cv_prog_gcc=no
  444. fi
  445. fi
  446. echo "$ac_t""$ac_cv_prog_gcc" 1>&4
  447. if test $ac_cv_prog_gcc = yes; then
  448.   GCC=yes
  449.   if test "${CFLAGS+set}" != set; then
  450.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&4
  451. if eval "test \"`echo '${'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  452.   echo $ac_n "(cached) $ac_c" 1>&4
  453. else
  454.   echo 'void f(){}' > conftest.c
  455. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  456.   ac_cv_prog_gcc_g=yes
  457. else
  458.   ac_cv_prog_gcc_g=no
  459. fi
  460. rm -f conftest*
  461.  
  462. fi
  463.     echo "$ac_t""$ac_cv_prog_gcc_g" 1>&4
  464.     if test $ac_cv_prog_gcc_g = yes; then
  465.       CFLAGS="-g -O"
  466.     else
  467.       CFLAGS="-O"
  468.     fi
  469.   fi
  470. else
  471.   GCC=
  472.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  473. fi
  474.  
  475. echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&4
  476. if test -d /etc/conf/kconfig.d &&
  477.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  478. then
  479.   echo "$ac_t""yes" 1>&4
  480.   ISC=yes # If later tests want to check for ISC.
  481.   cat >> confdefs.h <<\EOF
  482. #define _POSIX_SOURCE 1
  483. EOF
  484.  
  485.   if test "$GCC" = yes; then
  486.     CC="$CC -posix"
  487.   else
  488.     CC="$CC -Xp"
  489.   fi
  490. else
  491.   echo "$ac_t""no" 1>&4
  492.   ISC=
  493. fi
  494.  
  495. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&4
  496. # On Suns, sometimes $CPP names a directory.
  497. if test -n "$CPP" && test -d "$CPP"; then
  498.   CPP=
  499. fi
  500. if test -z "$CPP"; then
  501. if eval "test \"`echo '${'ac_cv_prog_CPP'+set}'`\" = set"; then
  502.   echo $ac_n "(cached) $ac_c" 1>&4
  503. else
  504.     # This must be in double quotes, not single quotes, because CPP may get
  505.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  506.   CPP="${CC-cc} -E"
  507.   # On the NeXT, cc -E runs the code through the compiler's parser,
  508.   # not just through cpp.
  509.   cat > conftest.$ac_ext <<EOF
  510. #line 511 "configure"
  511. #include "confdefs.h"
  512. #include <assert.h>
  513. Syntax Error
  514. EOF
  515. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  516. ac_err=`grep -v '^ *+' conftest.out`
  517. if test -z "$ac_err"; then
  518.   :
  519. else
  520.   echo "$ac_err" >&5
  521.   rm -rf conftest*
  522.   CPP="${CC-cc} -E -traditional-cpp"
  523.   cat > conftest.$ac_ext <<EOF
  524. #line 525 "configure"
  525. #include "confdefs.h"
  526. #include <assert.h>
  527. Syntax Error
  528. EOF
  529. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  530. ac_err=`grep -v '^ *+' conftest.out`
  531. if test -z "$ac_err"; then
  532.   :
  533. else
  534.   echo "$ac_err" >&5
  535.   rm -rf conftest*
  536.   CPP=/lib/cpp
  537. fi
  538. rm -f conftest*
  539. fi
  540. rm -f conftest*
  541.   ac_cv_prog_CPP="$CPP"
  542. fi
  543. fi
  544. CPP="$ac_cv_prog_CPP"
  545. echo "$ac_t""$CPP" 1>&4
  546.  
  547. if test $ac_cv_prog_gcc = yes; then
  548.   echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&4
  549. if eval "test \"`echo '${'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  550.   echo $ac_n "(cached) $ac_c" 1>&4
  551. else
  552.     ac_pattern="Autoconf.*'x'"
  553.   cat > conftest.$ac_ext <<EOF
  554. #line 555 "configure"
  555. #include "confdefs.h"
  556. #include <sgtty.h>
  557. Autoconf TIOCGETP
  558. EOF
  559. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  560.   egrep "$ac_pattern" >/dev/null 2>&1; then
  561.   rm -rf conftest*
  562.   ac_cv_prog_gcc_traditional=yes
  563. else
  564.   rm -rf conftest*
  565.   ac_cv_prog_gcc_traditional=no
  566. fi
  567. rm -f conftest*
  568.  
  569.  
  570.   if test $ac_cv_prog_gcc_traditional = no; then
  571.     cat > conftest.$ac_ext <<EOF
  572. #line 573 "configure"
  573. #include "confdefs.h"
  574. #include <termio.h>
  575. Autoconf TCGETA
  576. EOF
  577. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  578.   egrep "$ac_pattern" >/dev/null 2>&1; then
  579.   rm -rf conftest*
  580.   ac_cv_prog_gcc_traditional=yes
  581. fi
  582. rm -f conftest*
  583.  
  584.   fi
  585. fi
  586.   echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&4
  587.   if test $ac_cv_prog_gcc_traditional = yes; then
  588.     CC="$CC -traditional"
  589.   fi
  590. fi
  591.  
  592. ac_aux_dir=
  593. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  594.   if test -f $ac_dir/install-sh; then
  595.     ac_aux_dir=$ac_dir
  596.     ac_install_sh="$ac_aux_dir/install-sh -c"
  597.     break
  598.   elif test -f $ac_dir/install.sh; then
  599.     ac_aux_dir=$ac_dir
  600.     ac_install_sh="$ac_aux_dir/install.sh -c"
  601.     break
  602.   fi
  603. done
  604. if test -z "$ac_aux_dir"; then
  605.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  606. fi
  607. ac_config_guess=$ac_aux_dir/config.guess
  608. ac_config_sub=$ac_aux_dir/config.sub
  609. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  610.  
  611. # Find a good install program.  We prefer a C program (faster),
  612. # so one script is as good as another.  But avoid the broken or
  613. # incompatible versions:
  614. # SysV /etc/install, /usr/sbin/install
  615. # SunOS /usr/etc/install
  616. # IRIX /sbin/install
  617. # AIX /bin/install
  618. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  619. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  620. # ./install, which can be erroneously created by make from ./install.sh.
  621. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&4
  622. if test -z "$INSTALL"; then
  623. if eval "test \"`echo '${'ac_cv_path_install'+set}'`\" = set"; then
  624.   echo $ac_n "(cached) $ac_c" 1>&4
  625. else
  626.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  627.   for ac_dir in $PATH; do
  628.     case "$ac_dir" in
  629.     ''|.|/etc|/usr/sbin|/usr/etc|/sbin|/usr/afsws/bin|/usr/ucb) ;;
  630.     *)
  631.       # OSF1 and SCO ODT 3.0 have their own names for install.
  632.       for ac_prog in ginstall installbsd scoinst install; do
  633.         if test -f $ac_dir/$ac_prog; then
  634.       if test $ac_prog = install &&
  635.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  636.         # AIX install.  It has an incompatible calling convention.
  637.         # OSF/1 installbsd also uses dspmsg, but is usable.
  638.         :
  639.       else
  640.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  641.         break 2
  642.       fi
  643.     fi
  644.       done
  645.       ;;
  646.     esac
  647.   done
  648.   IFS="$ac_save_ifs"
  649.   # As a last resort, use the slow shell script.
  650.   test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
  651. fi
  652.   INSTALL="$ac_cv_path_install"
  653. fi
  654. echo "$ac_t""$INSTALL" 1>&4
  655.  
  656. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  657. # It thinks the first close brace ends the variable substitution.
  658. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  659.  
  660. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  661.  
  662.  
  663. TERMLIBS=
  664. echo $ac_n "checking for -lcurses""... $ac_c" 1>&4
  665. if eval "test \"`echo '${'ac_cv_lib_curses'+set}'`\" = set"; then
  666.   echo $ac_n "(cached) $ac_c" 1>&4
  667. else
  668.   ac_save_LIBS="$LIBS"
  669. LIBS="$LIBS -lcurses "
  670. cat > conftest.$ac_ext <<EOF
  671. #line 672 "configure"
  672. #include "confdefs.h"
  673.  
  674. int main() { return 0; }
  675. int t() {
  676. initscr()
  677. ; return 0; }
  678. EOF
  679. if eval $ac_link; then
  680.   rm -rf conftest*
  681.   eval "ac_cv_lib_curses=yes"
  682. else
  683.   rm -rf conftest*
  684.   eval "ac_cv_lib_curses=no"
  685. fi
  686. rm -f conftest*
  687. LIBS="$ac_save_LIBS"
  688.  
  689. fi
  690. if eval "test \"`echo '$ac_cv_lib_'curses`\" = yes"; then
  691.   echo "$ac_t""yes" 1>&4
  692.   TERMLIBS="$TERMLIBS -lcurses"
  693. else
  694.   echo "$ac_t""no" 1>&4
  695. fi
  696.  
  697. echo $ac_n "checking for -ltermcap""... $ac_c" 1>&4
  698. if eval "test \"`echo '${'ac_cv_lib_termcap'+set}'`\" = set"; then
  699.   echo $ac_n "(cached) $ac_c" 1>&4
  700. else
  701.   ac_save_LIBS="$LIBS"
  702. LIBS="$LIBS -ltermcap "
  703. cat > conftest.$ac_ext <<EOF
  704. #line 705 "configure"
  705. #include "confdefs.h"
  706.  
  707. int main() { return 0; }
  708. int t() {
  709. tgetent()
  710. ; return 0; }
  711. EOF
  712. if eval $ac_link; then
  713.   rm -rf conftest*
  714.   eval "ac_cv_lib_termcap=yes"
  715. else
  716.   rm -rf conftest*
  717.   eval "ac_cv_lib_termcap=no"
  718. fi
  719. rm -f conftest*
  720. LIBS="$ac_save_LIBS"
  721.  
  722. fi
  723. if eval "test \"`echo '$ac_cv_lib_'termcap`\" = yes"; then
  724.   echo "$ac_t""yes" 1>&4
  725.   TERMLIBS="$TERMLIBS -ltermcap"
  726. else
  727.   echo "$ac_t""no" 1>&4
  728. fi
  729.  
  730. echo $ac_n "checking for -ltermlib""... $ac_c" 1>&4
  731. if eval "test \"`echo '${'ac_cv_lib_termlib'+set}'`\" = set"; then
  732.   echo $ac_n "(cached) $ac_c" 1>&4
  733. else
  734.   ac_save_LIBS="$LIBS"
  735. LIBS="$LIBS -ltermlib "
  736. cat > conftest.$ac_ext <<EOF
  737. #line 738 "configure"
  738. #include "confdefs.h"
  739.  
  740. int main() { return 0; }
  741. int t() {
  742. tgetent()
  743. ; return 0; }
  744. EOF
  745. if eval $ac_link; then
  746.   rm -rf conftest*
  747.   eval "ac_cv_lib_termlib=yes"
  748. else
  749.   rm -rf conftest*
  750.   eval "ac_cv_lib_termlib=no"
  751. fi
  752. rm -f conftest*
  753. LIBS="$ac_save_LIBS"
  754.  
  755. fi
  756. if eval "test \"`echo '$ac_cv_lib_'termlib`\" = yes"; then
  757.   echo "$ac_t""yes" 1>&4
  758.   have_termlib=yes
  759. else
  760.   echo "$ac_t""no" 1>&4
  761. have_termlib=no
  762. fi
  763.  
  764. echo $ac_n "checking for -lgen""... $ac_c" 1>&4
  765. if eval "test \"`echo '${'ac_cv_lib_gen'+set}'`\" = set"; then
  766.   echo $ac_n "(cached) $ac_c" 1>&4
  767. else
  768.   ac_save_LIBS="$LIBS"
  769. LIBS="$LIBS -lgen "
  770. cat > conftest.$ac_ext <<EOF
  771. #line 772 "configure"
  772. #include "confdefs.h"
  773.  
  774. int main() { return 0; }
  775. int t() {
  776. regcmp()
  777. ; return 0; }
  778. EOF
  779. if eval $ac_link; then
  780.   rm -rf conftest*
  781.   eval "ac_cv_lib_gen=yes"
  782. else
  783.   rm -rf conftest*
  784.   eval "ac_cv_lib_gen=no"
  785. fi
  786. rm -f conftest*
  787. LIBS="$ac_save_LIBS"
  788.  
  789. fi
  790. if eval "test \"`echo '$ac_cv_lib_'gen`\" = yes"; then
  791.   echo "$ac_t""yes" 1>&4
  792.     ac_tr_lib=HAVE_LIB`echo gen | tr '[a-z]' '[A-Z]'`
  793.   cat >> confdefs.h <<EOF
  794. #define $ac_tr_lib 1
  795. EOF
  796.  
  797.   LIBS="$LIBS -lgen"
  798.  
  799. else
  800.   echo "$ac_t""no" 1>&4
  801. fi
  802.  
  803. echo $ac_n "checking for -lintl""... $ac_c" 1>&4
  804. if eval "test \"`echo '${'ac_cv_lib_intl'+set}'`\" = set"; then
  805.   echo $ac_n "(cached) $ac_c" 1>&4
  806. else
  807.   ac_save_LIBS="$LIBS"
  808. LIBS="$LIBS -lintl "
  809. cat > conftest.$ac_ext <<EOF
  810. #line 811 "configure"
  811. #include "confdefs.h"
  812.  
  813. int main() { return 0; }
  814. int t() {
  815. regcmp()
  816. ; return 0; }
  817. EOF
  818. if eval $ac_link; then
  819.   rm -rf conftest*
  820.   eval "ac_cv_lib_intl=yes"
  821. else
  822.   rm -rf conftest*
  823.   eval "ac_cv_lib_intl=no"
  824. fi
  825. rm -f conftest*
  826. LIBS="$ac_save_LIBS"
  827.  
  828. fi
  829. if eval "test \"`echo '$ac_cv_lib_'intl`\" = yes"; then
  830.   echo "$ac_t""yes" 1>&4
  831.     ac_tr_lib=HAVE_LIB`echo intl | tr '[a-z]' '[A-Z]'`
  832.   cat >> confdefs.h <<EOF
  833. #define $ac_tr_lib 1
  834. EOF
  835.  
  836.   LIBS="$LIBS -lintl"
  837.  
  838. else
  839.   echo "$ac_t""no" 1>&4
  840. fi
  841.  
  842.  
  843. echo $ac_n "checking for working terminal libraries""... $ac_c" 1>&4
  844. SAVE_LIBS=$LIBS
  845. LIBS="$LIBS $TERMLIBS"
  846. cat > conftest.$ac_ext <<EOF
  847. #line 848 "configure"
  848. #include "confdefs.h"
  849.  
  850. int main() { return 0; }
  851. int t() {
  852. tgetent(0); tgetflag(0); tgetnum(0); tgetstr(0);
  853. ; return 0; }
  854. EOF
  855. if eval $ac_link; then
  856.   rm -rf conftest*
  857.   termok=yes
  858. else
  859.   rm -rf conftest*
  860.   termok=no
  861. fi
  862. rm -f conftest*
  863.  
  864. if test $termok = yes; then
  865.   echo "$ac_t""using $TERMLIBS" 1>&4
  866. else
  867.   LIBS="$SAVE_LIBS"
  868.   if test $have_termlib = yes; then
  869.     LIBS="$LIBS -ltermlib"
  870.     echo "$ac_t""using -ltermlib" 1>&4
  871.   else
  872.     echo "$ac_t""TERMINAL LIBRARY BROKEN - configure failed" 1>&4
  873.     exit 1
  874.   fi
  875. fi
  876.  
  877. # If we cannot run a trivial program, we must be cross compiling.
  878. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&4
  879. if eval "test \"`echo '${'ac_cv_c_cross'+set}'`\" = set"; then
  880.   echo $ac_n "(cached) $ac_c" 1>&4
  881. else
  882.   if test "$cross_compiling" = yes; then
  883.   ac_cv_cross=yes
  884. else
  885. cat > conftest.$ac_ext <<EOF
  886. #line 887 "configure"
  887. #include "confdefs.h"
  888. main(){return(0);}
  889. EOF
  890. eval $ac_link
  891. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  892.   ac_cv_c_cross=no
  893. else
  894.   ac_cv_c_cross=yes
  895. fi
  896. fi
  897. rm -fr conftest*
  898. fi
  899. cross_compiling=$ac_cv_c_cross
  900. echo "$ac_t""$ac_cv_c_cross" 1>&4
  901.  
  902. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&4
  903. if eval "test \"`echo '${'ac_cv_header_stdc'+set}'`\" = set"; then
  904.   echo $ac_n "(cached) $ac_c" 1>&4
  905. else
  906.   cat > conftest.$ac_ext <<EOF
  907. #line 908 "configure"
  908. #include "confdefs.h"
  909. #include <stdlib.h>
  910. #include <stdarg.h>
  911. #include <string.h>
  912. #include <float.h>
  913. EOF
  914. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  915. ac_err=`grep -v '^ *+' conftest.out`
  916. if test -z "$ac_err"; then
  917.   rm -rf conftest*
  918.   ac_cv_header_stdc=yes
  919. else
  920.   echo "$ac_err" >&5
  921.   rm -rf conftest*
  922.   ac_cv_header_stdc=no
  923. fi
  924. rm -f conftest*
  925.  
  926. if test $ac_cv_header_stdc = yes; then
  927.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  928. cat > conftest.$ac_ext <<EOF
  929. #line 930 "configure"
  930. #include "confdefs.h"
  931. #include <string.h>
  932. EOF
  933. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  934.   egrep "memchr" >/dev/null 2>&1; then
  935.   :
  936. else
  937.   rm -rf conftest*
  938.   ac_cv_header_stdc=no
  939. fi
  940. rm -f conftest*
  941.  
  942. fi
  943.  
  944. if test $ac_cv_header_stdc = yes; then
  945.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  946. cat > conftest.$ac_ext <<EOF
  947. #line 948 "configure"
  948. #include "confdefs.h"
  949. #include <stdlib.h>
  950. EOF
  951. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  952.   egrep "free" >/dev/null 2>&1; then
  953.   :
  954. else
  955.   rm -rf conftest*
  956.   ac_cv_header_stdc=no
  957. fi
  958. rm -f conftest*
  959.  
  960. fi
  961.  
  962. if test $ac_cv_header_stdc = yes; then
  963.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  964. if test "$cross_compiling" = yes; then
  965.   ac_cv_header_stdc=no
  966. else
  967. cat > conftest.$ac_ext <<EOF
  968. #line 969 "configure"
  969. #include "confdefs.h"
  970. #include <ctype.h>
  971. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  972. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  973. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  974. int main () { int i; for (i = 0; i < 256; i++)
  975. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  976. exit (0); }
  977.  
  978. EOF
  979. eval $ac_link
  980. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  981.   :
  982. else
  983.   ac_cv_header_stdc=no
  984. fi
  985. fi
  986. rm -fr conftest*
  987. fi
  988. fi
  989. echo "$ac_t""$ac_cv_header_stdc" 1>&4
  990. if test $ac_cv_header_stdc = yes; then
  991.   cat >> confdefs.h <<\EOF
  992. #define STDC_HEADERS 1
  993. EOF
  994.  
  995. fi
  996.  
  997. for ac_hdr in ctype.h errno.h fcntl.h stdio.h termcap.h termio.h termios.h time.h unistd.h values.h sys/ioctl.h sys/stream.h sys/ptem.h
  998. do
  999. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1000. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
  1001. if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1002.   echo $ac_n "(cached) $ac_c" 1>&4
  1003. else
  1004.   cat > conftest.$ac_ext <<EOF
  1005. #line 1006 "configure"
  1006. #include "confdefs.h"
  1007. #include <$ac_hdr>
  1008. EOF
  1009. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1010. ac_err=`grep -v '^ *+' conftest.out`
  1011. if test -z "$ac_err"; then
  1012.   rm -rf conftest*
  1013.   eval "ac_cv_header_$ac_safe=yes"
  1014. else
  1015.   echo "$ac_err" >&5
  1016.   rm -rf conftest*
  1017.   eval "ac_cv_header_$ac_safe=no"
  1018. fi
  1019. rm -f conftest*
  1020. fi
  1021. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1022.   echo "$ac_t""yes" 1>&4
  1023.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  1024.   cat >> confdefs.h <<EOF
  1025. #define $ac_tr_hdr 1
  1026. EOF
  1027.  
  1028. else
  1029.   echo "$ac_t""no" 1>&4
  1030. fi
  1031. done
  1032.  
  1033.  
  1034. echo $ac_n "checking for off_t""... $ac_c" 1>&4
  1035. if eval "test \"`echo '${'ac_cv_type_off_t'+set}'`\" = set"; then
  1036.   echo $ac_n "(cached) $ac_c" 1>&4
  1037. else
  1038.   cat > conftest.$ac_ext <<EOF
  1039. #line 1040 "configure"
  1040. #include "confdefs.h"
  1041. #include <sys/types.h>
  1042. #if STDC_HEADERS
  1043. #include <stdlib.h>
  1044. #endif
  1045. EOF
  1046. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1047.   egrep "off_t" >/dev/null 2>&1; then
  1048.   rm -rf conftest*
  1049.   ac_cv_type_off_t=yes
  1050. else
  1051.   rm -rf conftest*
  1052.   ac_cv_type_off_t=no
  1053. fi
  1054. rm -f conftest*
  1055.  
  1056. fi
  1057. echo "$ac_t""$ac_cv_type_off_t" 1>&4
  1058. if test $ac_cv_type_off_t = no; then
  1059.   cat >> confdefs.h <<\EOF
  1060. #define off_t long
  1061. EOF
  1062.  
  1063. fi
  1064.  
  1065. echo $ac_n "checking for void""... $ac_c" 1>&4
  1066. cat > conftest.$ac_ext <<EOF
  1067. #line 1068 "configure"
  1068. #include "confdefs.h"
  1069.  
  1070. int main() { return 0; }
  1071. int t() {
  1072. void *foo = 0;
  1073. ; return 0; }
  1074. EOF
  1075. if eval $ac_compile; then
  1076.   rm -rf conftest*
  1077.   echo "$ac_t""yes" 1>&4; cat >> confdefs.h <<\EOF
  1078. #define HAVE_VOID 1
  1079. EOF
  1080.  
  1081. else
  1082.   rm -rf conftest*
  1083.   echo "$ac_t""no" 1>&4
  1084. fi
  1085. rm -f conftest*
  1086.  
  1087. echo $ac_n "checking for time_t""... $ac_c" 1>&4
  1088. cat > conftest.$ac_ext <<EOF
  1089. #line 1090 "configure"
  1090. #include "confdefs.h"
  1091. #include <time.h>
  1092. int main() { return 0; }
  1093. int t() {
  1094. time_t t = 0;
  1095. ; return 0; }
  1096. EOF
  1097. if eval $ac_compile; then
  1098.   rm -rf conftest*
  1099.   echo "$ac_t""yes" 1>&4; cat >> confdefs.h <<\EOF
  1100. #define HAVE_TIME_T 1
  1101. EOF
  1102.  
  1103. else
  1104.   rm -rf conftest*
  1105.   echo "$ac_t""no" 1>&4
  1106. fi
  1107. rm -f conftest*
  1108.  
  1109.  
  1110. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&4
  1111. if eval "test \"`echo '${'ac_cv_type_signal'+set}'`\" = set"; then
  1112.   echo $ac_n "(cached) $ac_c" 1>&4
  1113. else
  1114.   cat > conftest.$ac_ext <<EOF
  1115. #line 1116 "configure"
  1116. #include "confdefs.h"
  1117. #include <sys/types.h>
  1118. #include <signal.h>
  1119. #ifdef signal
  1120. #undef signal
  1121. #endif
  1122. extern void (*signal ()) ();
  1123. int main() { return 0; }
  1124. int t() {
  1125. int i;
  1126. ; return 0; }
  1127. EOF
  1128. if eval $ac_compile; then
  1129.   rm -rf conftest*
  1130.   ac_cv_type_signal=void
  1131. else
  1132.   rm -rf conftest*
  1133.   ac_cv_type_signal=int
  1134. fi
  1135. rm -f conftest*
  1136.  
  1137. fi
  1138. echo "$ac_t""$ac_cv_type_signal" 1>&4
  1139. cat >> confdefs.h <<EOF
  1140. #define RETSIGTYPE $ac_cv_type_signal
  1141. EOF
  1142.  
  1143.  
  1144. for ac_func in _setjmp system sigsetmask memcpy strchr
  1145. do
  1146. echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
  1147. if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1148.   echo $ac_n "(cached) $ac_c" 1>&4
  1149. else
  1150.   cat > conftest.$ac_ext <<EOF
  1151. #line 1152 "configure"
  1152. #include "confdefs.h"
  1153. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1154. /* Override any gcc2 internal prototype to avoid an error.  */
  1155. char $ac_func(); 
  1156.  
  1157. int main() { return 0; }
  1158. int t() {
  1159.  
  1160. /* The GNU C library defines this for functions which it implements
  1161.     to always fail with ENOSYS.  Some functions are actually named
  1162.     something starting with __ and the normal name is an alias.  */
  1163. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1164. choke me
  1165. #else
  1166. $ac_func();
  1167. #endif
  1168.  
  1169. ; return 0; }
  1170. EOF
  1171. if eval $ac_link; then
  1172.   rm -rf conftest*
  1173.   eval "ac_cv_func_$ac_func=yes"
  1174. else
  1175.   rm -rf conftest*
  1176.   eval "ac_cv_func_$ac_func=no"
  1177. fi
  1178. rm -f conftest*
  1179.  
  1180. fi
  1181. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1182.   echo "$ac_t""yes" 1>&4
  1183.     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  1184.   cat >> confdefs.h <<EOF
  1185. #define $ac_tr_func 1
  1186. EOF
  1187.  
  1188. else
  1189.   echo "$ac_t""no" 1>&4
  1190. fi
  1191. done
  1192.  
  1193. echo $ac_n "checking for tcgetattr""... $ac_c" 1>&4
  1194. if eval "test \"`echo '${'ac_cv_func_tcgetattr'+set}'`\" = set"; then
  1195.   echo $ac_n "(cached) $ac_c" 1>&4
  1196. else
  1197.   cat > conftest.$ac_ext <<EOF
  1198. #line 1199 "configure"
  1199. #include "confdefs.h"
  1200. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1201. /* Override any gcc2 internal prototype to avoid an error.  */
  1202. char tcgetattr(); 
  1203.  
  1204. int main() { return 0; }
  1205. int t() {
  1206.  
  1207. /* The GNU C library defines this for functions which it implements
  1208.     to always fail with ENOSYS.  Some functions are actually named
  1209.     something starting with __ and the normal name is an alias.  */
  1210. #if defined (__stub_tcgetattr) || defined (__stub___tcgetattr)
  1211. choke me
  1212. #else
  1213. tcgetattr();
  1214. #endif
  1215.  
  1216. ; return 0; }
  1217. EOF
  1218. if eval $ac_link; then
  1219.   rm -rf conftest*
  1220.   eval "ac_cv_func_tcgetattr=yes"
  1221. else
  1222.   rm -rf conftest*
  1223.   eval "ac_cv_func_tcgetattr=no"
  1224. fi
  1225. rm -f conftest*
  1226.  
  1227. fi
  1228. if eval "test \"`echo '$ac_cv_func_'tcgetattr`\" = yes"; then
  1229.   echo "$ac_t""yes" 1>&4
  1230.   cat >> confdefs.h <<\EOF
  1231. #define HAVE_TERMIOS_FUNCS 1
  1232. EOF
  1233.  
  1234. else
  1235.   echo "$ac_t""no" 1>&4
  1236. fi
  1237.  
  1238. echo $ac_n "checking for fileno""... $ac_c" 1>&4
  1239. cat > conftest.$ac_ext <<EOF
  1240. #line 1241 "configure"
  1241. #include "confdefs.h"
  1242.  
  1243. #if HAVE_STDIO_H
  1244. #include <stdio.h>
  1245. #endif
  1246. int main() { return 0; }
  1247. int t() {
  1248. static int x; x = fileno(stdin);
  1249. ; return 0; }
  1250. EOF
  1251. if eval $ac_link; then
  1252.   rm -rf conftest*
  1253.   echo "$ac_t""yes" 1>&4; cat >> confdefs.h <<\EOF
  1254. #define HAVE_FILENO 1
  1255. EOF
  1256.  
  1257. else
  1258.   rm -rf conftest*
  1259.   echo "$ac_t""no" 1>&4
  1260. fi
  1261. rm -f conftest*
  1262.  
  1263. echo $ac_n "checking for strerror""... $ac_c" 1>&4
  1264. cat > conftest.$ac_ext <<EOF
  1265. #line 1266 "configure"
  1266. #include "confdefs.h"
  1267.  
  1268. #if HAVE_STDIO_H
  1269. #include <stdio.h>
  1270. #endif
  1271. #if HAVE_STRING_H
  1272. #include <string.h>
  1273. #endif
  1274. #if HAVE_ERRNO_H
  1275. #include <errno.h>
  1276. #endif
  1277. int main() { return 0; }
  1278. int t() {
  1279. static char *x; x = strerror(0);
  1280. ; return 0; }
  1281. EOF
  1282. if eval $ac_link; then
  1283.   rm -rf conftest*
  1284.   echo "$ac_t""yes" 1>&4; cat >> confdefs.h <<\EOF
  1285. #define HAVE_STRERROR 1
  1286. EOF
  1287.  
  1288. else
  1289.   rm -rf conftest*
  1290.   echo "$ac_t""no" 1>&4
  1291. fi
  1292. rm -f conftest*
  1293.  
  1294. echo $ac_n "checking for sys_errlist""... $ac_c" 1>&4
  1295. cat > conftest.$ac_ext <<EOF
  1296. #line 1297 "configure"
  1297. #include "confdefs.h"
  1298.  
  1299. int main() { return 0; }
  1300. int t() {
  1301. extern char *sys_errlist[]; static char **x; x = sys_errlist;
  1302. ; return 0; }
  1303. EOF
  1304. if eval $ac_link; then
  1305.   rm -rf conftest*
  1306.   echo "$ac_t""yes" 1>&4; cat >> confdefs.h <<\EOF
  1307. #define HAVE_SYS_ERRLIST 1
  1308. EOF
  1309.  
  1310. else
  1311.   rm -rf conftest*
  1312.   echo "$ac_t""no" 1>&4
  1313. fi
  1314. rm -f conftest*
  1315.  
  1316. echo $ac_n "checking for errno""... $ac_c" 1>&4
  1317. cat > conftest.$ac_ext <<EOF
  1318. #line 1319 "configure"
  1319. #include "confdefs.h"
  1320.  
  1321. int main() { return 0; }
  1322. int t() {
  1323. extern int errno; static int x; x = errno;
  1324. ; return 0; }
  1325. EOF
  1326. if eval $ac_link; then
  1327.   rm -rf conftest*
  1328.   echo "$ac_t""yes" 1>&4; cat >> confdefs.h <<\EOF
  1329. #define HAVE_ERRNO 1
  1330. EOF
  1331.  
  1332. else
  1333.   rm -rf conftest*
  1334.   echo "$ac_t""no" 1>&4
  1335. fi
  1336. rm -f conftest*
  1337.  
  1338. echo $ac_n "checking for locale""... $ac_c" 1>&4
  1339. cat > conftest.$ac_ext <<EOF
  1340. #line 1341 "configure"
  1341. #include "confdefs.h"
  1342. #include <locale.h>
  1343. #include <ctype.h>
  1344. int main() { return 0; }
  1345. int t() {
  1346. setlocale(LC_CTYPE,""); isprint(0); iscntrl(0);
  1347. ; return 0; }
  1348. EOF
  1349. if eval $ac_link; then
  1350.   rm -rf conftest*
  1351.   echo "$ac_t""yes" 1>&4; cat >> confdefs.h <<\EOF
  1352. #define HAVE_LOCALE 1
  1353. EOF
  1354.  
  1355. else
  1356.   rm -rf conftest*
  1357.   echo "$ac_t""no" 1>&4
  1358. fi
  1359. rm -f conftest*
  1360.  
  1361. echo $ac_n "checking for ctype functions""... $ac_c" 1>&4
  1362. cat > conftest.$ac_ext <<EOF
  1363. #line 1364 "configure"
  1364. #include "confdefs.h"
  1365.  
  1366. #if HAVE_CTYPE_H
  1367. #include <ctype.h>
  1368. #endif
  1369. int main() { return 0; }
  1370. int t() {
  1371. static int x; x = isupper(x); x = tolower(x); x = toupper(x);
  1372. ; return 0; }
  1373. EOF
  1374. if eval $ac_link; then
  1375.   rm -rf conftest*
  1376.   echo "$ac_t""yes" 1>&4; cat >> confdefs.h <<\EOF
  1377. #define HAVE_UPPER_LOWER 1
  1378. EOF
  1379.  
  1380. else
  1381.   rm -rf conftest*
  1382.   echo "$ac_t""no" 1>&4
  1383. fi
  1384. rm -f conftest*
  1385.  
  1386.  
  1387. have_ospeed=no
  1388. echo $ac_n "checking termcap for ospeed""... $ac_c" 1>&4
  1389. cat > conftest.$ac_ext <<EOF
  1390. #line 1391 "configure"
  1391. #include "confdefs.h"
  1392.  
  1393. #include <sys/types.h>
  1394. #if HAVE_TERMIOS_H
  1395. #include <termios.h>
  1396. #endif
  1397. #if HAVE_TERMCAP_H
  1398. #include <termcap.h>
  1399. #endif
  1400. int main() { return 0; }
  1401. int t() {
  1402. ospeed = 0;
  1403. ; return 0; }
  1404. EOF
  1405. if eval $ac_link; then
  1406.   rm -rf conftest*
  1407.   echo "$ac_t""yes" 1>&4; cat >> confdefs.h <<\EOF
  1408. #define HAVE_OSPEED 1
  1409. EOF
  1410.  have_ospeed=yes
  1411. fi
  1412. rm -f conftest*
  1413.  
  1414. if test $have_ospeed = no; then
  1415. cat > conftest.$ac_ext <<EOF
  1416. #line 1417 "configure"
  1417. #include "confdefs.h"
  1418.  
  1419. int main() { return 0; }
  1420. int t() {
  1421. extern short ospeed; ospeed = 0;
  1422. ; return 0; }
  1423. EOF
  1424. if eval $ac_link; then
  1425.   rm -rf conftest*
  1426.   echo "$ac_t""yes" 1>&4; cat >> confdefs.h <<\EOF
  1427. #define HAVE_OSPEED 1
  1428. EOF
  1429.  cat >> confdefs.h <<\EOF
  1430. #define MUST_DEFINE_OSPEED 1
  1431. EOF
  1432.  
  1433. else
  1434.   rm -rf conftest*
  1435.   echo "$ac_t""no" 1>&4
  1436. fi
  1437. rm -f conftest*
  1438.  
  1439. fi
  1440.  
  1441. have_regex=no
  1442. have_posix_regex=unknown
  1443. echo "checking for regular expression library" 1>&4
  1444. if test "$cross_compiling" = yes; then
  1445.   have_posix_regex=unknown
  1446. else
  1447. cat > conftest.$ac_ext <<EOF
  1448. #line 1449 "configure"
  1449. #include "confdefs.h"
  1450.  
  1451. #include <sys/types.h>
  1452. #include <regex.h>
  1453. main() { regex_t r; regmatch_t rm;
  1454. if (regcomp(&r, "abc", 0)) exit(1);
  1455. if (regexec(&r, "xabcy", 1, &rm, 0)) exit(1);
  1456. exit(0); }
  1457. EOF
  1458. eval $ac_link
  1459. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1460.   have_posix_regex=yes
  1461. else
  1462.   have_posix_regex=no
  1463. fi
  1464. fi
  1465. rm -fr conftest*
  1466. if test $have_posix_regex = yes; then
  1467.   echo "$ac_t""using POSIX regcomp" 1>&4
  1468.   cat >> confdefs.h <<\EOF
  1469. #define HAVE_POSIX_REGCOMP 1
  1470. EOF
  1471.  
  1472.   have_regex=yes
  1473. elif test $have_posix_regex = unknown; then
  1474.   cat > conftest.$ac_ext <<EOF
  1475. #line 1476 "configure"
  1476. #include "confdefs.h"
  1477.  
  1478. #include <sys/types.h>
  1479. #include <regex.h>
  1480. int main() { return 0; }
  1481. int t() {
  1482. regex_t *r; regfree(r);
  1483. ; return 0; }
  1484. EOF
  1485. if eval $ac_link; then
  1486.   rm -rf conftest*
  1487.   echo "$ac_t""using POSIX regcomp" 1>&4
  1488.   cat >> confdefs.h <<\EOF
  1489. #define HAVE_POSIX_REGCOMP 1
  1490. EOF
  1491.  have_regex=yes
  1492. fi
  1493. rm -f conftest*
  1494.  
  1495. fi
  1496. if test $have_regex = no; then
  1497. echo $ac_n "checking for regcmp""... $ac_c" 1>&4
  1498. if eval "test \"`echo '${'ac_cv_func_regcmp'+set}'`\" = set"; then
  1499.   echo $ac_n "(cached) $ac_c" 1>&4
  1500. else
  1501.   cat > conftest.$ac_ext <<EOF
  1502. #line 1503 "configure"
  1503. #include "confdefs.h"
  1504. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1505. /* Override any gcc2 internal prototype to avoid an error.  */
  1506. char regcmp(); 
  1507.  
  1508. int main() { return 0; }
  1509. int t() {
  1510.  
  1511. /* The GNU C library defines this for functions which it implements
  1512.     to always fail with ENOSYS.  Some functions are actually named
  1513.     something starting with __ and the normal name is an alias.  */
  1514. #if defined (__stub_regcmp) || defined (__stub___regcmp)
  1515. choke me
  1516. #else
  1517. regcmp();
  1518. #endif
  1519.  
  1520. ; return 0; }
  1521. EOF
  1522. if eval $ac_link; then
  1523.   rm -rf conftest*
  1524.   eval "ac_cv_func_regcmp=yes"
  1525. else
  1526.   rm -rf conftest*
  1527.   eval "ac_cv_func_regcmp=no"
  1528. fi
  1529. rm -f conftest*
  1530.  
  1531. fi
  1532. if eval "test \"`echo '$ac_cv_func_'regcmp`\" = yes"; then
  1533.   echo "$ac_t""yes" 1>&4
  1534.   echo "$ac_t""using regcmp" 1>&4; cat >> confdefs.h <<\EOF
  1535. #define HAVE_REGCMP 1
  1536. EOF
  1537.  have_regex=yes
  1538. else
  1539.   echo "$ac_t""no" 1>&4
  1540. fi
  1541.  
  1542. fi
  1543. if test $have_regex = no; then
  1544. cat > conftest.$ac_ext <<EOF
  1545. #line 1546 "configure"
  1546. #include "confdefs.h"
  1547.  
  1548. #include "regexp.h"
  1549. int main() { return 0; }
  1550. int t() {
  1551. regcomp("");
  1552. ; return 0; }
  1553. EOF
  1554. if eval $ac_link; then
  1555.   rm -rf conftest*
  1556.   echo "$ac_t""using V8 regcomp" 1>&4; cat >> confdefs.h <<\EOF
  1557. #define HAVE_V8_REGCOMP 1
  1558. EOF
  1559.  have_regex=yes
  1560. fi
  1561. rm -f conftest*
  1562.  
  1563. fi
  1564. if test $have_regex = no && test -f ${srcdir}/regex.c; then
  1565. echo "$ac_t""using POSIX regcomp -- local source" 1>&4; cat >> confdefs.h <<\EOF
  1566. #define HAVE_POSIX_REGCOMP 1
  1567. EOF
  1568.  REGEX_O='regex.$(O)'  have_regex=yes
  1569. fi
  1570. if test $have_regex = no && test -f ${srcdir}/regexp.c; then
  1571. echo "$ac_t""using V8 regcomp -- local source" 1>&4; cat >> confdefs.h <<\EOF
  1572. #define HAVE_V8_REGCOMP 1
  1573. EOF
  1574.  REGEX_O='regexp.$(O)'  have_regex=yes
  1575. fi
  1576. if test $have_regex = no; then
  1577. echo "$ac_t""using re_comp" 1>&4; echo $ac_n "checking for re_comp""... $ac_c" 1>&4
  1578. if eval "test \"`echo '${'ac_cv_func_re_comp'+set}'`\" = set"; then
  1579.   echo $ac_n "(cached) $ac_c" 1>&4
  1580. else
  1581.   cat > conftest.$ac_ext <<EOF
  1582. #line 1583 "configure"
  1583. #include "confdefs.h"
  1584. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1585. /* Override any gcc2 internal prototype to avoid an error.  */
  1586. char re_comp(); 
  1587.  
  1588. int main() { return 0; }
  1589. int t() {
  1590.  
  1591. /* The GNU C library defines this for functions which it implements
  1592.     to always fail with ENOSYS.  Some functions are actually named
  1593.     something starting with __ and the normal name is an alias.  */
  1594. #if defined (__stub_re_comp) || defined (__stub___re_comp)
  1595. choke me
  1596. #else
  1597. re_comp();
  1598. #endif
  1599.  
  1600. ; return 0; }
  1601. EOF
  1602. if eval $ac_link; then
  1603.   rm -rf conftest*
  1604.   eval "ac_cv_func_re_comp=yes"
  1605. else
  1606.   rm -rf conftest*
  1607.   eval "ac_cv_func_re_comp=no"
  1608. fi
  1609. rm -f conftest*
  1610.  
  1611. fi
  1612. if eval "test \"`echo '$ac_cv_func_'re_comp`\" = yes"; then
  1613.   echo "$ac_t""yes" 1>&4
  1614.   cat >> confdefs.h <<\EOF
  1615. #define HAVE_RE_COMP 1
  1616. EOF
  1617.  have_regex=yes
  1618. else
  1619.   echo "$ac_t""no" 1>&4
  1620. fi
  1621.  
  1622. fi
  1623. if test $have_regex = no; then
  1624. echo "$ac_t""cannot find regular expression library" 1>&4; cat >> confdefs.h <<\EOF
  1625. #define NO_REGEX 1
  1626. EOF
  1627.  
  1628. fi
  1629.  
  1630. trap '' 1 2 15
  1631. if test -w $cache_file; then
  1632. echo "updating cache $cache_file"
  1633. cat > $cache_file <<\EOF
  1634. # This file is a shell script that caches the results of configure
  1635. # tests run on this system so they can be shared between configure
  1636. # scripts and configure runs.  It is not useful on other systems.
  1637. # If it contains results you don't want to keep, you may remove or edit it.
  1638. #
  1639. # By default, configure uses ./config.cache as the cache file,
  1640. # creating it if it does not exist already.  You can give configure
  1641. # the --cache-file=FILE option to use a different cache file; that is
  1642. # what configure does when it calls configure scripts in
  1643. # subdirectories, so they share the cache.
  1644. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  1645. # config.status only pays attention to the cache file if you give it the
  1646. # --recheck option to rerun configure.
  1647. #
  1648. EOF
  1649. # Ultrix sh set writes to stderr and can't be redirected directly.
  1650. (set) 2>&1 |
  1651.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \
  1652.   >> $cache_file
  1653. else
  1654. echo "not updating unwritable cache $cache_file"
  1655. fi
  1656.  
  1657. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  1658.  
  1659. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  1660. # Let make expand exec_prefix.
  1661. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1662.  
  1663. # Any assignment to VPATH causes Sun make to only execute
  1664. # the first set of double-colon rules, so remove it if not needed.
  1665. # If there is a colon in the path, we need to keep it.
  1666. if test "x$srcdir" = x.; then
  1667.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1668. fi
  1669.  
  1670. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1671.  
  1672. DEFS=-DHAVE_CONFIG_H
  1673.  
  1674. # Without the "./", some shells look in PATH for config.status.
  1675. : ${CONFIG_STATUS=./config.status}
  1676.  
  1677. echo creating $CONFIG_STATUS
  1678. rm -f $CONFIG_STATUS
  1679. cat > $CONFIG_STATUS <<EOF
  1680. #!/bin/sh
  1681. # Generated automatically by configure.
  1682. # Run this file to recreate the current configuration.
  1683. # This directory was configured as follows,
  1684. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1685. #
  1686. # $0 $ac_configure_args
  1687. #
  1688. # Compiler output produced by configure, useful for debugging
  1689. # configure, is in ./config.log if it exists.
  1690.  
  1691. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1692. for ac_option
  1693. do
  1694.   case "\$ac_option" in
  1695.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1696.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  1697.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  1698.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1699.     echo "$CONFIG_STATUS generated by autoconf version 2.1"
  1700.     exit 0 ;;
  1701.   -help | --help | --hel | --he | --h)
  1702.     echo "\$ac_cs_usage"; exit 0 ;;
  1703.   *) echo "\$ac_cs_usage"; exit 1 ;;
  1704.   esac
  1705. done
  1706.  
  1707. ac_given_srcdir=$srcdir
  1708. ac_given_INSTALL="$INSTALL"
  1709.  
  1710. trap 'rm -fr Makefile defines.h conftest*; exit 1' 1 2 15
  1711.  
  1712. # Protect against being on the right side of a sed subst in config.status. 
  1713. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  1714.  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  1715. $ac_vpsub
  1716. $extrasub
  1717. s%@CFLAGS@%$CFLAGS%g
  1718. s%@CPPFLAGS@%$CPPFLAGS%g
  1719. s%@CXXFLAGS@%$CXXFLAGS%g
  1720. s%@DEFS@%$DEFS%g
  1721. s%@LDFLAGS@%$LDFLAGS%g
  1722. s%@LIBS@%$LIBS%g
  1723. s%@exec_prefix@%$exec_prefix%g
  1724. s%@prefix@%$prefix%g
  1725. s%@program_transform_name@%$program_transform_name%g
  1726. s%@CC@%$CC%g
  1727. s%@CPP@%$CPP%g
  1728. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1729. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1730. s%@REGEX_O@%$REGEX_O%g
  1731.  
  1732. CEOF
  1733. EOF
  1734. cat >> $CONFIG_STATUS <<EOF
  1735.  
  1736. CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  1737. EOF
  1738. cat >> $CONFIG_STATUS <<\EOF
  1739. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  1740.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1741.   case "$ac_file" in
  1742.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1743.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1744.   *) ac_file_in="${ac_file}.in" ;;
  1745.   esac
  1746.  
  1747.   # Adjust relative srcdir, etc. for subdirectories.
  1748.  
  1749.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1750.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1751.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1752.     # The file is in a subdirectory.
  1753.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1754.     ac_dir_suffix="/$ac_dir"
  1755.     # A "../" for each directory in $ac_dir_suffix.
  1756.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1757.   else
  1758.     ac_dir_suffix= ac_dots=
  1759.   fi
  1760.  
  1761.   case "$ac_given_srcdir" in
  1762.   .)  srcdir=.
  1763.       if test -z "$ac_dots"; then top_srcdir=.
  1764.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  1765.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1766.   *) # Relative path.
  1767.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1768.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1769.   esac
  1770.  
  1771.   case "$ac_given_INSTALL" in
  1772.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  1773.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  1774.   esac
  1775.   echo creating "$ac_file"
  1776.   rm -f "$ac_file"
  1777.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  1778.   case "$ac_file" in
  1779.   *Makefile*) ac_comsub="1i\\
  1780. # $configure_input" ;;
  1781.   *) ac_comsub= ;;
  1782.   esac
  1783.   sed -e "$ac_comsub
  1784. s%@configure_input@%$configure_input%g
  1785. s%@srcdir@%$srcdir%g
  1786. s%@top_srcdir@%$top_srcdir%g
  1787. s%@INSTALL@%$INSTALL%g
  1788. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  1789. fi; done
  1790. rm -f conftest.subs
  1791.  
  1792. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  1793. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  1794. #
  1795. # ac_d sets the value in "#define NAME VALUE" lines.
  1796. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  1797. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  1798. ac_dC='\3'
  1799. ac_dD='%g'
  1800. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  1801. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1802. ac_uB='\([     ]\)%\1#\2define\3'
  1803. ac_uC=' '
  1804. ac_uD='\4%g'
  1805. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  1806. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1807. ac_eB='$%\1#\2define\3'
  1808. ac_eC=' '
  1809. ac_eD='%g'
  1810.  
  1811. CONFIG_HEADERS=${CONFIG_HEADERS-"defines.h"}
  1812. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  1813.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1814.   case "$ac_file" in
  1815.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1816.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1817.   *) ac_file_in="${ac_file}.in" ;;
  1818.   esac
  1819.  
  1820.   echo creating $ac_file
  1821.  
  1822.   rm -f conftest.frag conftest.in conftest.out
  1823.   cp $ac_given_srcdir/$ac_file_in conftest.in
  1824.  
  1825. EOF
  1826.  
  1827. # Transform confdefs.h into a sed script conftest.vals that substitutes
  1828. # the proper values into config.h.in to produce config.h.  And first:
  1829. # Protect against being on the right side of a sed subst in config.status. 
  1830. # Protect against being in an unquoted here document in config.status.
  1831. rm -f conftest.vals
  1832. cat > conftest.hdr <<\EOF
  1833. s/[\\&%]/\\&/g
  1834. s%[\\$`]%\\&%g
  1835. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  1836. s%ac_d%ac_u%gp
  1837. s%ac_u%ac_e%gp
  1838. EOF
  1839. sed -n -f conftest.hdr confdefs.h > conftest.vals
  1840. rm -f conftest.hdr
  1841.  
  1842. # This sed command replaces #undef with comments.  This is necessary, for
  1843. # example, in the case of _POSIX_SOURCE, which is predefined and required
  1844. # on some systems where configure will not decide to define it.
  1845. cat >> conftest.vals <<\EOF
  1846. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  1847. EOF
  1848.  
  1849. # Break up conftest.vals because some shells have a limit on
  1850. # the size of here documents, and old seds have small limits too.
  1851. # Maximum number of lines to put in a single here document.
  1852. ac_max_here_lines=12
  1853.  
  1854. rm -f conftest.tail
  1855. while :
  1856. do
  1857.   ac_lines=`grep -c . conftest.vals`
  1858.   # grep -c gives empty output for an empty file on some AIX systems.
  1859.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1860.   # Write a limited-size here document to conftest.frag.
  1861.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  1862.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  1863.   echo 'CEOF
  1864.   sed -f conftest.frag conftest.in > conftest.out
  1865.   rm -f conftest.in
  1866.   mv conftest.out conftest.in
  1867. ' >> $CONFIG_STATUS
  1868.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  1869.   rm -f conftest.vals
  1870.   mv conftest.tail conftest.vals
  1871. done
  1872. rm -f conftest.vals
  1873.  
  1874. cat >> $CONFIG_STATUS <<\EOF
  1875.   rm -f conftest.frag conftest.h
  1876.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  1877.   cat conftest.in >> conftest.h
  1878.   rm -f conftest.in
  1879.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  1880.     echo "$ac_file is unchanged"
  1881.     rm -f conftest.h
  1882.   else
  1883.     rm -f $ac_file
  1884.     mv conftest.h $ac_file
  1885.   fi
  1886. fi; done
  1887.  
  1888.  
  1889.  
  1890. exit 0
  1891. EOF
  1892. chmod +x $CONFIG_STATUS
  1893. rm -fr confdefs* $ac_clean_files
  1894. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS
  1895.  
  1896.