home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / fweb153.zip / fweb-1.53 / web / configure < prev    next >
Text File  |  1995-09-23  |  44KB  |  1,581 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.4 
  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.4"
  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 core.* *.core $ac_clean_files; exit 1' 1 2 15
  283.  
  284. # File descriptor usage:
  285. # 0 standard input
  286. # 1 file creation
  287. # 2 errors and warnings
  288. # 3 some systems may open it to /dev/tty
  289. # 4 used on the Kubota Titan
  290. # 6 checking for... messages and results
  291. # 5 compiler messages saved in config.log
  292. if test "$silent" = yes; then
  293.   exec 6>/dev/null
  294. else
  295.   exec 6>&1
  296. fi
  297. exec 5>./config.log
  298.  
  299. echo "\
  300. This file contains any messages produced by compilers while
  301. running configure, to aid debugging if configure makes a mistake.
  302. " 1>&5
  303.  
  304. # Strip out --no-create and --no-recursion so they do not pile up.
  305. # Also quote any args containing shell metacharacters.
  306. ac_configure_args=
  307. for ac_arg
  308. do
  309.   case "$ac_arg" in
  310.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  311.   | --no-cr | --no-c) ;;
  312.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  313.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  314.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  315.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  316.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  317.   esac
  318. done
  319.  
  320. # NLS nuisances.
  321. # Only set LANG and LC_ALL to C if already set.
  322. # These must not be set unconditionally because not all systems understand
  323. # e.g. LANG=C (notably SCO).
  324. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  325. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  326.  
  327. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  328. rm -rf conftest* confdefs.h
  329. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  330. echo > confdefs.h
  331.  
  332. # A filename unique to this package, relative to the directory that
  333. # configure is in, which we can look for to find out if srcdir is correct.
  334. ac_unique_file=READ_ME.WEB
  335.  
  336. # Set various FWEB environment variables.
  337. if test -z "$CONFIGURE_INI"; then
  338.   CONFIGURE_INI=./configure.ini
  339. fi
  340. . $CONFIGURE_INI
  341.  
  342. # Find the source files, if location was not specified.
  343. if test -z "$srcdir"; then
  344.   ac_srcdir_defaulted=yes
  345.   # Try the directory containing this script, then its parent.
  346.   ac_prog=$0
  347.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  348.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  349.   srcdir=$ac_confdir
  350.   if test ! -r $srcdir/$ac_unique_file; then
  351.     srcdir=..
  352.   fi
  353. else
  354.   ac_srcdir_defaulted=no
  355. fi
  356. if test ! -r $srcdir/$ac_unique_file; then
  357.   if test "$ac_srcdir_defaulted" = yes; then
  358.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  359.   else
  360.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  361.   fi
  362. fi
  363. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  364.  
  365. # Prefer explicitly selected file to automatically selected ones.
  366. if test -z "$CONFIG_SITE"; then
  367.   if test "x$prefix" != xNONE; then
  368.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  369.   else
  370.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  371.   fi
  372. fi
  373. for ac_site_file in $CONFIG_SITE; do
  374.   if test -r "$ac_site_file"; then
  375.     echo "loading site script $ac_site_file"
  376.     . "$ac_site_file"
  377.   fi
  378. done
  379.  
  380. if test -r "$cache_file"; then
  381.   echo "loading cache $cache_file"
  382.   . $cache_file
  383. else
  384.   echo "creating cache $cache_file"
  385.   > $cache_file
  386. fi
  387.  
  388. ac_ext=c
  389. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  390. ac_cpp='$CPP $CPPFLAGS'
  391. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
  392. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
  393.  
  394. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  395.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  396.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  397.     ac_n= ac_c='
  398. ' ac_t='    '
  399.   else
  400.     ac_n=-n ac_c= ac_t=
  401.   fi
  402. else
  403.   ac_n= ac_c='\c' ac_t=
  404. fi
  405.  
  406.  
  407.  
  408. # Extract the first word of "gcc", so it can be a program name with args.
  409. set dummy gcc; ac_word=$2
  410. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  411. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  412.   echo $ac_n "(cached) $ac_c" 1>&6
  413. else
  414.   if test -n "$CC"; then
  415.   ac_cv_prog_CC="$CC" # Let the user override the test.
  416. else
  417.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  418.   for ac_dir in $PATH; do
  419.     test -z "$ac_dir" && ac_dir=.
  420.     if test -f $ac_dir/$ac_word; then
  421.       ac_cv_prog_CC="gcc"
  422.       break
  423.     fi
  424.   done
  425.   IFS="$ac_save_ifs"
  426.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  427. fi
  428. fi
  429. CC="$ac_cv_prog_CC"
  430. if test -n "$CC"; then
  431.   echo "$ac_t""$CC" 1>&6
  432. else
  433.   echo "$ac_t""no" 1>&6
  434. fi
  435.  
  436.  
  437. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  438. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  439.   echo $ac_n "(cached) $ac_c" 1>&6
  440. else
  441.   cat > conftest.c <<EOF
  442. #ifdef __GNUC__
  443.   yes;
  444. #endif
  445. EOF
  446. if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  447.   ac_cv_prog_gcc=yes
  448. else
  449.   ac_cv_prog_gcc=no
  450. fi
  451. fi
  452. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  453. if test $ac_cv_prog_gcc = yes; then
  454.   GCC=yes
  455.   if test "${CFLAGS+set}" != set; then
  456.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  457. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  458.   echo $ac_n "(cached) $ac_c" 1>&6
  459. else
  460.   echo 'void f(){}' > conftest.c
  461. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  462.   ac_cv_prog_gcc_g=yes
  463. else
  464.   ac_cv_prog_gcc_g=no
  465. fi
  466. rm -f conftest*
  467.  
  468. fi
  469.     echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  470.     if test $ac_cv_prog_gcc_g = yes; then
  471.       CFLAGS="-g -O"
  472.     else
  473.       CFLAGS="-O"
  474.     fi
  475.   fi
  476. else
  477.   GCC=
  478.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  479. fi
  480.  
  481. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  482. # On Suns, sometimes $CPP names a directory.
  483. if test -n "$CPP" && test -d "$CPP"; then
  484.   CPP=
  485. fi
  486. if test -z "$CPP"; then
  487. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  488.   echo $ac_n "(cached) $ac_c" 1>&6
  489. else
  490.     # This must be in double quotes, not single quotes, because CPP may get
  491.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  492.   CPP="${CC-cc} -E"
  493.   # On the NeXT, cc -E runs the code through the compiler's parser,
  494.   # not just through cpp.
  495.   cat > conftest.$ac_ext <<EOF
  496. #line 497 "configure"
  497. #include "confdefs.h"
  498. #include <assert.h>
  499. Syntax Error
  500. EOF
  501. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  502. ac_err=`grep -v '^ *+' conftest.out`
  503. if test -z "$ac_err"; then
  504.   :
  505. else
  506.   echo "$ac_err" >&5
  507.   rm -rf conftest*
  508.   CPP="${CC-cc} -E -traditional-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=/lib/cpp
  523. fi
  524. rm -f conftest*
  525. fi
  526. rm -f conftest*
  527.   ac_cv_prog_CPP="$CPP"
  528. fi
  529.   CPP="$ac_cv_prog_CPP"
  530. else
  531.   ac_cv_prog_CPP="$CPP"
  532. fi
  533. echo "$ac_t""$CPP" 1>&6
  534.  
  535. ac_aux_dir=
  536. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  537.   if test -f $ac_dir/install-sh; then
  538.     ac_aux_dir=$ac_dir
  539.     ac_install_sh="$ac_aux_dir/install-sh -c"
  540.     break
  541.   elif test -f $ac_dir/install.sh; then
  542.     ac_aux_dir=$ac_dir
  543.     ac_install_sh="$ac_aux_dir/install.sh -c"
  544.     break
  545.   fi
  546. done
  547. if test -z "$ac_aux_dir"; then
  548.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  549. fi
  550. ac_config_guess=$ac_aux_dir/config.guess
  551. ac_config_sub=$ac_aux_dir/config.sub
  552. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  553.  
  554. # Find a good install program.  We prefer a C program (faster),
  555. # so one script is as good as another.  But avoid the broken or
  556. # incompatible versions:
  557. # SysV /etc/install, /usr/sbin/install
  558. # SunOS /usr/etc/install
  559. # IRIX /sbin/install
  560. # AIX /bin/install
  561. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  562. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  563. # ./install, which can be erroneously created by make from ./install.sh.
  564. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  565. if test -z "$INSTALL"; then
  566. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  567.   echo $ac_n "(cached) $ac_c" 1>&6
  568. else
  569.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  570.   for ac_dir in $PATH; do
  571.     # Account for people who put trailing slashes in PATH elements.
  572.     case "$ac_dir/" in
  573.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  574.     *)
  575.       # OSF1 and SCO ODT 3.0 have their own names for install.
  576.       for ac_prog in ginstall installbsd scoinst install; do
  577.         if test -f $ac_dir/$ac_prog; then
  578.       if test $ac_prog = install &&
  579.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  580.         # AIX install.  It has an incompatible calling convention.
  581.         # OSF/1 installbsd also uses dspmsg, but is usable.
  582.         :
  583.       else
  584.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  585.         break 2
  586.       fi
  587.     fi
  588.       done
  589.       ;;
  590.     esac
  591.   done
  592.   IFS="$ac_save_ifs"
  593.   # As a last resort, use the slow shell script.
  594.   test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
  595. fi
  596.   INSTALL="$ac_cv_path_install"
  597. fi
  598. echo "$ac_t""$INSTALL" 1>&6
  599.  
  600. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  601. # It thinks the first close brace ends the variable substitution.
  602. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  603.  
  604. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  605.  
  606. # If we cannot run a trivial program, we must be cross compiling.
  607. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  608. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  609.   echo $ac_n "(cached) $ac_c" 1>&6
  610. else
  611.   if test "$cross_compiling" = yes; then
  612.   ac_cv_c_cross=yes
  613. else
  614. cat > conftest.$ac_ext <<EOF
  615. #line 616 "configure"
  616. #include "confdefs.h"
  617. main(){return(0);}
  618. EOF
  619. eval $ac_link
  620. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  621.   ac_cv_c_cross=no
  622. else
  623.   ac_cv_c_cross=yes
  624. fi
  625. fi
  626. rm -fr conftest*
  627. fi
  628. cross_compiling=$ac_cv_c_cross
  629. echo "$ac_t""$ac_cv_c_cross" 1>&6
  630.  
  631. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  632. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  633.   echo $ac_n "(cached) $ac_c" 1>&6
  634. else
  635.   cat > conftest.$ac_ext <<EOF
  636. #line 637 "configure"
  637. #include "confdefs.h"
  638. #include <stdlib.h>
  639. #include <stdarg.h>
  640. #include <string.h>
  641. #include <float.h>
  642. EOF
  643. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  644. ac_err=`grep -v '^ *+' conftest.out`
  645. if test -z "$ac_err"; then
  646.   rm -rf conftest*
  647.   ac_cv_header_stdc=yes
  648. else
  649.   echo "$ac_err" >&5
  650.   rm -rf conftest*
  651.   ac_cv_header_stdc=no
  652. fi
  653. rm -f conftest*
  654.  
  655. if test $ac_cv_header_stdc = yes; then
  656.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  657. cat > conftest.$ac_ext <<EOF
  658. #line 659 "configure"
  659. #include "confdefs.h"
  660. #include <string.h>
  661. EOF
  662. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  663.   egrep "memchr" >/dev/null 2>&1; then
  664.   :
  665. else
  666.   rm -rf conftest*
  667.   ac_cv_header_stdc=no
  668. fi
  669. rm -f conftest*
  670.  
  671. fi
  672.  
  673. if test $ac_cv_header_stdc = yes; then
  674.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  675. cat > conftest.$ac_ext <<EOF
  676. #line 677 "configure"
  677. #include "confdefs.h"
  678. #include <stdlib.h>
  679. EOF
  680. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  681.   egrep "free" >/dev/null 2>&1; then
  682.   :
  683. else
  684.   rm -rf conftest*
  685.   ac_cv_header_stdc=no
  686. fi
  687. rm -f conftest*
  688.  
  689. fi
  690.  
  691. if test $ac_cv_header_stdc = yes; then
  692.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  693. if test "$cross_compiling" = yes; then
  694.   ac_cv_header_stdc=no
  695. else
  696. cat > conftest.$ac_ext <<EOF
  697. #line 698 "configure"
  698. #include "confdefs.h"
  699. #include <ctype.h>
  700. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  701. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  702. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  703. int main () { int i; for (i = 0; i < 256; i++)
  704. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  705. exit (0); }
  706.  
  707. EOF
  708. eval $ac_link
  709. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  710.   :
  711. else
  712.   ac_cv_header_stdc=no
  713. fi
  714. fi
  715. rm -fr conftest*
  716. fi
  717. fi
  718. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  719. if test $ac_cv_header_stdc = yes; then
  720.   cat >> confdefs.h <<\EOF
  721. #define STDC_HEADERS 1
  722. EOF
  723.  
  724. fi
  725.  
  726. echo $ac_n "checking for common stdio.h prototypes""... $ac_c" 1>&6
  727. cat > conftest.$ac_ext <<EOF
  728. #line 729 "configure"
  729. #include "confdefs.h"
  730. #include <stdio.h>
  731. EOF
  732. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  733.   egrep "fputc" >/dev/null 2>&1; then
  734.   rm -rf conftest*
  735.   echo "$ac_t""YES" 1>&6
  736. cat >> confdefs.h <<\EOF
  737. #define HAVE_STD_PROTOTYPES 1
  738. EOF
  739.  
  740. else
  741.   rm -rf conftest*
  742.   echo "$ac_t""NO---fputc not prototyped; assuming others such as printf aren't as well" 1>&6
  743. fi
  744. rm -f conftest*
  745.  
  746. for ac_hdr in stdlib.h stdarg.h stddef.h string.h memory.h limits.h values.h
  747. do
  748. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  749. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  750. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  751.   echo $ac_n "(cached) $ac_c" 1>&6
  752. else
  753.   cat > conftest.$ac_ext <<EOF
  754. #line 755 "configure"
  755. #include "confdefs.h"
  756. #include <$ac_hdr>
  757. EOF
  758. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  759. ac_err=`grep -v '^ *+' conftest.out`
  760. if test -z "$ac_err"; then
  761.   rm -rf conftest*
  762.   eval "ac_cv_header_$ac_safe=yes"
  763. else
  764.   echo "$ac_err" >&5
  765.   rm -rf conftest*
  766.   eval "ac_cv_header_$ac_safe=no"
  767. fi
  768. rm -f conftest*
  769. fi
  770. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  771.   echo "$ac_t""yes" 1>&6
  772.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  773.   cat >> confdefs.h <<EOF
  774. #define $ac_tr_hdr 1
  775. EOF
  776.  
  777. else
  778.   echo "$ac_t""no" 1>&6
  779. fi
  780. done
  781.  
  782. for ac_hdr in float.h
  783. do
  784. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  785. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  786. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  787.   echo $ac_n "(cached) $ac_c" 1>&6
  788. else
  789.   cat > conftest.$ac_ext <<EOF
  790. #line 791 "configure"
  791. #include "confdefs.h"
  792. #include <$ac_hdr>
  793. EOF
  794. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  795. ac_err=`grep -v '^ *+' conftest.out`
  796. if test -z "$ac_err"; then
  797.   rm -rf conftest*
  798.   eval "ac_cv_header_$ac_safe=yes"
  799. else
  800.   echo "$ac_err" >&5
  801.   rm -rf conftest*
  802.   eval "ac_cv_header_$ac_safe=no"
  803. fi
  804. rm -f conftest*
  805. fi
  806. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  807.   echo "$ac_t""yes" 1>&6
  808.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  809.   cat >> confdefs.h <<EOF
  810. #define $ac_tr_hdr 1
  811. EOF
  812.  
  813. else
  814.   echo "$ac_t""no" 1>&6
  815. fi
  816. done
  817.  
  818. # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  819. echo $ac_n "checking for ANSI ctype.h""... $ac_c" 1>&6
  820. if test "$cross_compiling" = yes; then
  821.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  822. else
  823. cat > conftest.$ac_ext <<EOF
  824. #line 825 "configure"
  825. #include "confdefs.h"
  826. #include <ctype.h>
  827. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  828. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  829. #define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
  830. int main () { int i; for (i = 0; i < 256; i++)
  831. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  832. exit (0); }
  833.  
  834. EOF
  835. eval $ac_link
  836. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  837.   echo "$ac_t""YES" 1>&6
  838. cat >> confdefs.h <<\EOF
  839. #define ANSI_CTYPE_H 1
  840. EOF
  841.  
  842. else
  843.   echo "$ac_t""NO" 1>&6
  844. fi
  845. fi
  846. rm -fr conftest*
  847. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  848. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  849.   echo $ac_n "(cached) $ac_c" 1>&6
  850. else
  851.   cat > conftest.$ac_ext <<EOF
  852. #line 853 "configure"
  853. #include "confdefs.h"
  854. #include <sys/types.h>
  855. #if STDC_HEADERS
  856. #include <stdlib.h>
  857. #endif
  858. EOF
  859. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  860.   egrep "size_t" >/dev/null 2>&1; then
  861.   rm -rf conftest*
  862.   ac_cv_type_size_t=yes
  863. else
  864.   rm -rf conftest*
  865.   ac_cv_type_size_t=no
  866. fi
  867. rm -f conftest*
  868.  
  869. fi
  870. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  871. if test $ac_cv_type_size_t = no; then
  872.   cat >> confdefs.h <<\EOF
  873. #define size_t unsigned
  874. EOF
  875.  
  876. fi
  877.  
  878. echo $ac_n "checking for clock_t""... $ac_c" 1>&6
  879. if eval "test \"`echo '$''{'ac_cv_type_clock_t'+set}'`\" = set"; then
  880.   echo $ac_n "(cached) $ac_c" 1>&6
  881. else
  882.   cat > conftest.$ac_ext <<EOF
  883. #line 884 "configure"
  884. #include "confdefs.h"
  885. #include <sys/types.h>
  886. #if STDC_HEADERS
  887. #include <stdlib.h>
  888. #endif
  889. EOF
  890. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  891.   egrep "clock_t" >/dev/null 2>&1; then
  892.   rm -rf conftest*
  893.   ac_cv_type_clock_t=yes
  894. else
  895.   rm -rf conftest*
  896.   ac_cv_type_clock_t=no
  897. fi
  898. rm -f conftest*
  899.  
  900. fi
  901. echo "$ac_t""$ac_cv_type_clock_t" 1>&6
  902. if test $ac_cv_type_clock_t = no; then
  903.   cat >> confdefs.h <<\EOF
  904. #define clock_t long
  905. EOF
  906.  
  907. fi
  908.  
  909. for ac_func in getenv tempnam tmpnam strerror
  910. do
  911. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  912. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  913.   echo $ac_n "(cached) $ac_c" 1>&6
  914. else
  915.   cat > conftest.$ac_ext <<EOF
  916. #line 917 "configure"
  917. #include "confdefs.h"
  918. /* System header to define __stub macros and hopefully few prototypes,
  919.     which can conflict with char $ac_func(); below.  */
  920. #include <assert.h>
  921. /* Override any gcc2 internal prototype to avoid an error.  */
  922. char $ac_func(); 
  923.  
  924. int main() { return 0; }
  925. int t() {
  926.  
  927. /* The GNU C library defines this for functions which it implements
  928.     to always fail with ENOSYS.  Some functions are actually named
  929.     something starting with __ and the normal name is an alias.  */
  930. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  931. choke me
  932. #else
  933. $ac_func();
  934. #endif
  935.  
  936. ; return 0; }
  937. EOF
  938. if eval $ac_link; then
  939.   rm -rf conftest*
  940.   eval "ac_cv_func_$ac_func=yes"
  941. else
  942.   rm -rf conftest*
  943.   eval "ac_cv_func_$ac_func=no"
  944. fi
  945. rm -f conftest*
  946.  
  947. fi
  948. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  949.   echo "$ac_t""yes" 1>&6
  950.     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  951.   cat >> confdefs.h <<EOF
  952. #define $ac_tr_func 1
  953. EOF
  954.  
  955. else
  956.   echo "$ac_t""no" 1>&6
  957. fi
  958. done
  959.  
  960. HAVE_GETTIME=""
  961. echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
  962. if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
  963.   echo $ac_n "(cached) $ac_c" 1>&6
  964. else
  965.   cat > conftest.$ac_ext <<EOF
  966. #line 967 "configure"
  967. #include "confdefs.h"
  968. /* System header to define __stub macros and hopefully few prototypes,
  969.     which can conflict with char gettimeofday(); below.  */
  970. #include <assert.h>
  971. /* Override any gcc2 internal prototype to avoid an error.  */
  972. char gettimeofday(); 
  973.  
  974. int main() { return 0; }
  975. int t() {
  976.  
  977. /* The GNU C library defines this for functions which it implements
  978.     to always fail with ENOSYS.  Some functions are actually named
  979.     something starting with __ and the normal name is an alias.  */
  980. #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
  981. choke me
  982. #else
  983. gettimeofday();
  984. #endif
  985.  
  986. ; return 0; }
  987. EOF
  988. if eval $ac_link; then
  989.   rm -rf conftest*
  990.   eval "ac_cv_func_gettimeofday=yes"
  991. else
  992.   rm -rf conftest*
  993.   eval "ac_cv_func_gettimeofday=no"
  994. fi
  995. rm -f conftest*
  996.  
  997. fi
  998. if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
  999.   echo "$ac_t""yes" 1>&6
  1000.   cat >> confdefs.h <<\EOF
  1001. #define HAVE_GETTIMEOFDAY 1
  1002. EOF
  1003.  
  1004. HAVE_GETTIME=y
  1005. else
  1006.   echo "$ac_t""no" 1>&6
  1007. fi
  1008.  
  1009. if [ ! "$HAVE_GETTIME" ] 
  1010. then
  1011. for ac_hdr in sys/timeb.h
  1012. do
  1013. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1014. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1015. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1016.   echo $ac_n "(cached) $ac_c" 1>&6
  1017. else
  1018.   cat > conftest.$ac_ext <<EOF
  1019. #line 1020 "configure"
  1020. #include "confdefs.h"
  1021. #include <$ac_hdr>
  1022. EOF
  1023. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1024. ac_err=`grep -v '^ *+' conftest.out`
  1025. if test -z "$ac_err"; then
  1026.   rm -rf conftest*
  1027.   eval "ac_cv_header_$ac_safe=yes"
  1028. else
  1029.   echo "$ac_err" >&5
  1030.   rm -rf conftest*
  1031.   eval "ac_cv_header_$ac_safe=no"
  1032. fi
  1033. rm -f conftest*
  1034. fi
  1035. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1036.   echo "$ac_t""yes" 1>&6
  1037.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  1038.   cat >> confdefs.h <<EOF
  1039. #define $ac_tr_hdr 1
  1040. EOF
  1041.  
  1042. else
  1043.   echo "$ac_t""no" 1>&6
  1044. fi
  1045. done
  1046.  
  1047. fi
  1048. echo $ac_n "checking for working const""... $ac_c" 1>&6
  1049. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  1050.   echo $ac_n "(cached) $ac_c" 1>&6
  1051. else
  1052.   cat > conftest.$ac_ext <<EOF
  1053. #line 1054 "configure"
  1054. #include "confdefs.h"
  1055.  
  1056. int main() { return 0; }
  1057. int t() {
  1058.  
  1059. /* Ultrix mips cc rejects this.  */
  1060. typedef int charset[2]; const charset x;
  1061. /* SunOS 4.1.1 cc rejects this.  */
  1062. char const *const *ccp;
  1063. char **p;
  1064. /* NEC SVR4.0.2 mips cc rejects this.  */
  1065. struct point {int x, y;};
  1066. static struct point const zero;
  1067. /* AIX XL C 1.02.0.0 rejects this.
  1068.    It does not let you subtract one const X* pointer from another in an arm
  1069.    of an if-expression whose if-part is not a constant expression */
  1070. const char *g = "string";
  1071. ccp = &g + (g ? g-g : 0);
  1072. /* HPUX 7.0 cc rejects these. */
  1073. ++ccp;
  1074. p = (char**) ccp;
  1075. ccp = (char const *const *) p;
  1076. { /* SCO 3.2v4 cc rejects this.  */
  1077.   char *t;
  1078.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  1079.  
  1080.   *t++ = 0;
  1081. }
  1082. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  1083.   int x[] = {25, 17};
  1084.   const int *foo = &x[0];
  1085.   ++foo;
  1086. }
  1087. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1088.   typedef const int *iptr;
  1089.   iptr p = 0;
  1090.   ++p;
  1091. }
  1092. { /* AIX XL C 1.02.0.0 rejects this saying
  1093.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1094.   struct s { int j; const int *ap[3]; };
  1095.   struct s *b; b->j = 5;
  1096. }
  1097. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1098.   const int foo = 10;
  1099. }
  1100.  
  1101. ; return 0; }
  1102. EOF
  1103. if eval $ac_compile; then
  1104.   rm -rf conftest*
  1105.   ac_cv_c_const=yes
  1106. else
  1107.   rm -rf conftest*
  1108.   ac_cv_c_const=no
  1109. fi
  1110. rm -f conftest*
  1111.  
  1112. fi
  1113. echo "$ac_t""$ac_cv_c_const" 1>&6
  1114. if test $ac_cv_c_const = no; then
  1115.   cat >> confdefs.h <<\EOF
  1116. #define const 
  1117. EOF
  1118.  
  1119. fi
  1120.  
  1121. echo $ac_n "checking for working void""... $ac_c" 1>&6
  1122. if test "$cross_compiling" = yes; then
  1123.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1124. else
  1125. cat > conftest.$ac_ext <<EOF
  1126. #line 1127 "configure"
  1127. #include "confdefs.h"
  1128. main()
  1129. {
  1130. void *p;
  1131. void f(void);
  1132.  
  1133. exit(0);
  1134. }
  1135. void f(void)
  1136. {}
  1137.  
  1138. EOF
  1139. eval $ac_link
  1140. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1141.   echo "$ac_t""YES" 1>&6
  1142. else
  1143.   echo "$ac_t""NO" 1>&6
  1144. cat >> confdefs.h <<\EOF
  1145. #define NO_VOID 1
  1146. EOF
  1147.  
  1148. fi
  1149. fi
  1150. rm -fr conftest*
  1151. echo $ac_n "checking for working backslash continuations""... $ac_c" 1>&6
  1152. cat > conftest.$ac_ext <<EOF
  1153. #line 1154 "configure"
  1154. #include "confdefs.h"
  1155.  
  1156. int main() { return 0; }
  1157. int t() {
  1158.  
  1159. int i\\
  1160. = 0;
  1161.  
  1162. ; return 0; }
  1163. EOF
  1164. if eval $ac_compile; then
  1165.   rm -rf conftest*
  1166.   echo "$ac_t""YES" 1>&6
  1167. else
  1168.   rm -rf conftest*
  1169.   echo "$ac_t""NO" 1>&6
  1170. cat >> confdefs.h <<\EOF
  1171. #define FANCY_SPLIT 1
  1172. EOF
  1173.  
  1174. fi
  1175. rm -f conftest*
  1176.  
  1177. echo $ac_n "checking for new-style prototypes""... $ac_c" 1>&6
  1178. if test "$cross_compiling" = yes; then
  1179.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1180. else
  1181. cat > conftest.$ac_ext <<EOF
  1182. #line 1183 "configure"
  1183. #include "confdefs.h"
  1184. main(int argc,char *argv[])
  1185. {
  1186. exit(0);
  1187. }
  1188.  
  1189. EOF
  1190. eval $ac_link
  1191. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1192.   echo "$ac_t""YES" 1>&6
  1193. else
  1194.   echo "$ac_t""NO" 1>&6
  1195. cat >> confdefs.h <<\EOF
  1196. #define OLD_PROTOTYPES 1
  1197. EOF
  1198.  
  1199. fi
  1200. fi
  1201. rm -fr conftest*
  1202. echo $ac_n "checking for ANSI sprintf""... $ac_c" 1>&6
  1203. if test "$cross_compiling" = yes; then
  1204.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1205. else
  1206. cat > conftest.$ac_ext <<EOF
  1207. #line 1208 "configure"
  1208. #include "confdefs.h"
  1209. #include <stdio.h>
  1210. #define TEST "abc"
  1211. main()
  1212. {
  1213. char temp[4];
  1214. int n;
  1215.  
  1216. n = sprintf(temp,TEST);
  1217. if(n == strlen(TEST))
  1218.   exit(0);
  1219. else
  1220.   exit(1);
  1221. }
  1222.  
  1223. EOF
  1224. eval $ac_link
  1225. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1226.   echo "$ac_t""YES" 1>&6
  1227. cat >> confdefs.h <<\EOF
  1228. #define ANSI_SPRINTF 1
  1229. EOF
  1230.  
  1231. else
  1232.   echo "$ac_t""NO---doesn't return number of characters written" 1>&6
  1233. fi
  1234. fi
  1235. rm -fr conftest*
  1236. echo $ac_n "checking for ANSI sscanf""... $ac_c" 1>&6
  1237. if test "$cross_compiling" = yes; then
  1238.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1239. else
  1240. cat > conftest.$ac_ext <<EOF
  1241. #line 1242 "configure"
  1242. #include "confdefs.h"
  1243. #include <stdio.h>
  1244. main()
  1245. {
  1246. char temp[] = "{12}{{1.11}{5}}{10}";
  1247. int n;
  1248. char smodno[10], smodno0[10], spageno[10], ssecno[10];
  1249. n = sscanf(temp,"%*c%[^}]%*3c%[^}]%*2c%[^}]%*3c%[^}]",
  1250.        smodno, ssecno, spageno, smodno0);
  1251. if(n != 4) exit(1);
  1252. if(strcmp(smodno,"12") || strcmp(ssecno,"1.11") || strcmp(spageno,"5")
  1253.         || strcmp(smodno0,"10")) 
  1254.     exit(2);
  1255. exit(0);
  1256. }
  1257.  
  1258. EOF
  1259. eval $ac_link
  1260. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1261.   echo "$ac_t""YES" 1>&6
  1262. cat >> confdefs.h <<\EOF
  1263. #define ANSI_SSCANF 1
  1264. EOF
  1265.  
  1266. else
  1267.   echo "$ac_t""NO---doesn't handle scansets correctly" 1>&6
  1268. fi
  1269. fi
  1270. rm -fr conftest*
  1271. if test -d "/usr/local/lib/texmf/tex"; then
  1272.     _TEXSUBDIR_=lib/texmf/tex/fweb
  1273. else
  1274.     _TEXSUBDIR_=lib/tex/inputs
  1275. fi
  1276. trap '' 1 2 15
  1277. cat > confcache <<\EOF
  1278. # This file is a shell script that caches the results of configure
  1279. # tests run on this system so they can be shared between configure
  1280. # scripts and configure runs.  It is not useful on other systems.
  1281. # If it contains results you don't want to keep, you may remove or edit it.
  1282. #
  1283. # By default, configure uses ./config.cache as the cache file,
  1284. # creating it if it does not exist already.  You can give configure
  1285. # the --cache-file=FILE option to use a different cache file; that is
  1286. # what configure does when it calls configure scripts in
  1287. # subdirectories, so they share the cache.
  1288. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  1289. # config.status only pays attention to the cache file if you give it the
  1290. # --recheck option to rerun configure.
  1291. #
  1292. EOF
  1293. # Ultrix sh set writes to stderr and can't be redirected directly,
  1294. # and sets the high bit in the cache file unless we assign to the vars.
  1295. (set) 2>&1 |
  1296.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  1297.   >> confcache
  1298. if cmp -s $cache_file confcache; then
  1299.   :
  1300. else
  1301.   if test -w $cache_file; then
  1302.     echo "updating cache $cache_file"
  1303.     cat confcache > $cache_file
  1304.   else
  1305.     echo "not updating unwritable cache $cache_file"
  1306.   fi
  1307. fi
  1308. rm -f confcache
  1309.  
  1310. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  1311.  
  1312. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  1313. # Let make expand exec_prefix.
  1314. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1315.  
  1316. # Any assignment to VPATH causes Sun make to only execute
  1317. # the first set of double-colon rules, so remove it if not needed.
  1318. # If there is a colon in the path, we need to keep it.
  1319. if test "x$srcdir" = x.; then
  1320.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1321. fi
  1322.  
  1323. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1324.  
  1325. DEFS=-DHAVE_CONFIG_H
  1326.  
  1327. # Without the "./", some shells look in PATH for config.status.
  1328. : ${CONFIG_STATUS=./config.status}
  1329.  
  1330. echo creating $CONFIG_STATUS
  1331. rm -f $CONFIG_STATUS
  1332. cat > $CONFIG_STATUS <<EOF
  1333. #! /bin/sh
  1334. # Generated automatically by configure.
  1335. # Run this file to recreate the current configuration.
  1336. # This directory was configured as follows,
  1337. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1338. #
  1339. # $0 $ac_configure_args
  1340. #
  1341. # Compiler output produced by configure, useful for debugging
  1342. # configure, is in ./config.log if it exists.
  1343.  
  1344. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1345. for ac_option
  1346. do
  1347.   case "\$ac_option" in
  1348.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1349.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  1350.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  1351.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1352.     echo "$CONFIG_STATUS generated by autoconf version 2.4"
  1353.     exit 0 ;;
  1354.   -help | --help | --hel | --he | --h)
  1355.     echo "\$ac_cs_usage"; exit 0 ;;
  1356.   *) echo "\$ac_cs_usage"; exit 1 ;;
  1357.   esac
  1358. done
  1359.  
  1360. ac_given_srcdir=$srcdir
  1361. ac_given_INSTALL="$INSTALL"
  1362.  
  1363. trap 'rm -fr `echo "defaults.mk custom.h config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  1364.  
  1365. # Protect against being on the right side of a sed subst in config.status. 
  1366. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  1367.  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  1368. $ac_vpsub
  1369. $extrasub
  1370. s%@CFLAGS@%$CFLAGS%g
  1371. s%@CPPFLAGS@%$CPPFLAGS%g
  1372. s%@CXXFLAGS@%$CXXFLAGS%g
  1373. s%@DEFS@%$DEFS%g
  1374. s%@LDFLAGS@%$LDFLAGS%g
  1375. s%@LIBS@%$LIBS%g
  1376. s%@exec_prefix@%$exec_prefix%g
  1377. s%@prefix@%$prefix%g
  1378. s%@program_transform_name@%$program_transform_name%g
  1379. s%@CC@%$CC%g
  1380. s%@CPP@%$CPP%g
  1381. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1382. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1383. s%@_CFLAGS_@%$_CFLAGS_%g
  1384. s%@_COMMON2_@%$_COMMON2_%g
  1385. s%@_COMPILE_@%$_COMPILE_%g
  1386. s%@_COMPILER_@%$_COMPILER_%g
  1387. s%@_CPPFLAGS_@%$_CPPFLAGS_%g
  1388. s%@_FTANGLE2_@%$_FTANGLE2_%g
  1389. s%@_FTANGLE3_@%$_FTANGLE3_%g
  1390. s%@_FWEAVE2_@%$_FWEAVE2_%g
  1391. s%@_FWEAVE3_@%$_FWEAVE3_%g
  1392. s%@_HOME_MACHINE_@%$_HOME_MACHINE_%g
  1393. s%@_HWEB_@%$_HWEB_%g
  1394. s%@_LDFLAGS_@%$_LDFLAGS_%g
  1395. s%@_LINK_@%$_LINK_%g
  1396. s%@_LIBS_@%$_LIBS_%g
  1397. s%@_LOCAL_DEFS_@%$_LOCAL_DEFS_%g
  1398. s%@_MACHINE_@%$_MACHINE_%g
  1399. s%@_MAKE_@%$_MAKE_%g
  1400. s%@_MV_@%$_MV_%g
  1401. s%@_O_@%$_O_%g
  1402. s%@_OBJ_@%$_OBJ_%g
  1403. s%@_OPTIMIZE_@%$_OPTIMIZE_%g
  1404. s%@_PART1_@%$_PART1_%g
  1405. s%@_PART2_@%$_PART2_%g
  1406. s%@_PART3_@%$_PART3_%g
  1407. s%@_PRINT_DVI_@%$_PRINT_DVI_%g
  1408. s%@_PROD2_@%$_PROD2_%g
  1409. s%@_RATFOR2_@%$_RATFOR2_%g
  1410. s%@_RESERVED2_@%$_RESERVED2_%g
  1411. s%@_RM_@%$_RM_%g
  1412. s%@_TERMCAP0_@%$_TERMCAP0_%g
  1413. s%@_TEXSUBDIR_@%$_TEXSUBDIR_%g
  1414. s%@_TOUCH_@%$_TOUCH_%g
  1415. s%@_UNSIGNED_CHAR_@%$_UNSIGNED_CHAR_%g
  1416.  
  1417. CEOF
  1418. EOF
  1419. cat >> $CONFIG_STATUS <<EOF
  1420.  
  1421. CONFIG_FILES=\${CONFIG_FILES-"defaults.mk custom.h"}
  1422. EOF
  1423. cat >> $CONFIG_STATUS <<\EOF
  1424. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  1425.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1426.   case "$ac_file" in
  1427.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1428.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1429.   *) ac_file_in="${ac_file}.in" ;;
  1430.   esac
  1431.  
  1432.   # Adjust relative srcdir, etc. for subdirectories.
  1433.  
  1434.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1435.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1436.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1437.     # The file is in a subdirectory.
  1438.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1439.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  1440.     # A "../" for each directory in $ac_dir_suffix.
  1441.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1442.   else
  1443.     ac_dir_suffix= ac_dots=
  1444.   fi
  1445.  
  1446.   case "$ac_given_srcdir" in
  1447.   .)  srcdir=.
  1448.       if test -z "$ac_dots"; then top_srcdir=.
  1449.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  1450.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1451.   *) # Relative path.
  1452.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1453.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1454.   esac
  1455.  
  1456.   case "$ac_given_INSTALL" in
  1457.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  1458.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  1459.   esac
  1460.   echo creating "$ac_file"
  1461.   rm -f "$ac_file"
  1462.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  1463.   case "$ac_file" in
  1464.   *Makefile*) ac_comsub="1i\\
  1465. # $configure_input" ;;
  1466.   *) ac_comsub= ;;
  1467.   esac
  1468.   sed -e "$ac_comsub
  1469. s%@configure_input@%$configure_input%g
  1470. s%@srcdir@%$srcdir%g
  1471. s%@top_srcdir@%$top_srcdir%g
  1472. s%@INSTALL@%$INSTALL%g
  1473. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  1474. fi; done
  1475. rm -f conftest.subs
  1476.  
  1477. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  1478. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  1479. #
  1480. # ac_d sets the value in "#define NAME VALUE" lines.
  1481. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  1482. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  1483. ac_dC='\3'
  1484. ac_dD='%g'
  1485. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  1486. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1487. ac_uB='\([     ]\)%\1#\2define\3'
  1488. ac_uC=' '
  1489. ac_uD='\4%g'
  1490. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  1491. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1492. ac_eB='$%\1#\2define\3'
  1493. ac_eC=' '
  1494. ac_eD='%g'
  1495.  
  1496. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  1497. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  1498.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1499.   case "$ac_file" in
  1500.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1501.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1502.   *) ac_file_in="${ac_file}.in" ;;
  1503.   esac
  1504.  
  1505.   echo creating $ac_file
  1506.  
  1507.   rm -f conftest.frag conftest.in conftest.out
  1508.   cp $ac_given_srcdir/$ac_file_in conftest.in
  1509.  
  1510. EOF
  1511.  
  1512. # Transform confdefs.h into a sed script conftest.vals that substitutes
  1513. # the proper values into config.h.in to produce config.h.  And first:
  1514. # Protect against being on the right side of a sed subst in config.status. 
  1515. # Protect against being in an unquoted here document in config.status.
  1516. rm -f conftest.vals
  1517. cat > conftest.hdr <<\EOF
  1518. s/[\\&%]/\\&/g
  1519. s%[\\$`]%\\&%g
  1520. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  1521. s%ac_d%ac_u%gp
  1522. s%ac_u%ac_e%gp
  1523. EOF
  1524. sed -n -f conftest.hdr confdefs.h > conftest.vals
  1525. rm -f conftest.hdr
  1526.  
  1527. # This sed command replaces #undef with comments.  This is necessary, for
  1528. # example, in the case of _POSIX_SOURCE, which is predefined and required
  1529. # on some systems where configure will not decide to define it.
  1530. cat >> conftest.vals <<\EOF
  1531. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  1532. EOF
  1533.  
  1534. # Break up conftest.vals because some shells have a limit on
  1535. # the size of here documents, and old seds have small limits too.
  1536. # Maximum number of lines to put in a single here document.
  1537. ac_max_here_lines=12
  1538.  
  1539. rm -f conftest.tail
  1540. while :
  1541. do
  1542.   ac_lines=`grep -c . conftest.vals`
  1543.   # grep -c gives empty output for an empty file on some AIX systems.
  1544.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1545.   # Write a limited-size here document to conftest.frag.
  1546.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  1547.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  1548.   echo 'CEOF
  1549.   sed -f conftest.frag conftest.in > conftest.out
  1550.   rm -f conftest.in
  1551.   mv conftest.out conftest.in
  1552. ' >> $CONFIG_STATUS
  1553.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  1554.   rm -f conftest.vals
  1555.   mv conftest.tail conftest.vals
  1556. done
  1557. rm -f conftest.vals
  1558.  
  1559. cat >> $CONFIG_STATUS <<\EOF
  1560.   rm -f conftest.frag conftest.h
  1561.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  1562.   cat conftest.in >> conftest.h
  1563.   rm -f conftest.in
  1564.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  1565.     echo "$ac_file is unchanged"
  1566.     rm -f conftest.h
  1567.   else
  1568.     rm -f $ac_file
  1569.     mv conftest.h $ac_file
  1570.   fi
  1571. fi; done
  1572.  
  1573.  
  1574.  
  1575. exit 0
  1576. EOF
  1577. chmod +x $CONFIG_STATUS
  1578. rm -fr confdefs* $ac_clean_files
  1579. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  1580.  
  1581.