home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 9 / FreshFishVol9-CD2.bin / bbs / gnu / unixtex-6.1b-src.lha / unixtex-6.1b / xdvik / configure < prev    next >
Encoding:
Text File  |  1995-04-04  |  61.2 KB  |  2,201 lines

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