home *** CD-ROM | disk | FTP | other *** search
/ Ultra Pack / UltraComputing Partner Applications.iso / SunLabs / tclTK / src / tcl7.4 / configure < prev    next >
Encoding:
Text File  |  1995-06-30  |  64.5 KB  |  2,523 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.2 
  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.2"
  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=tcl.h
  335.  
  336. # Find the source files, if location was not specified.
  337. if test -z "$srcdir"; then
  338.   ac_srcdir_defaulted=yes
  339.   # Try the directory containing this script, then its parent.
  340.   ac_prog=$0
  341.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  342.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  343.   srcdir=$ac_confdir
  344.   if test ! -r $srcdir/$ac_unique_file; then
  345.     srcdir=..
  346.   fi
  347. else
  348.   ac_srcdir_defaulted=no
  349. fi
  350. if test ! -r $srcdir/$ac_unique_file; then
  351.   if test "$ac_srcdir_defaulted" = yes; then
  352.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  353.   else
  354.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  355.   fi
  356. fi
  357. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  358.  
  359. # Prefer explicitly selected file to automatically selected ones.
  360. if test -z "$CONFIG_SITE"; then
  361.   if test "x$prefix" != xNONE; then
  362.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  363.   else
  364.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  365.   fi
  366. fi
  367. for ac_site_file in $CONFIG_SITE; do
  368.   if test -r "$ac_site_file"; then
  369.     echo "loading site script $ac_site_file"
  370.     . "$ac_site_file"
  371.   fi
  372. done
  373.  
  374. if test -r "$cache_file"; then
  375.   echo "loading cache $cache_file"
  376.   . $cache_file
  377. else
  378.   echo "creating cache $cache_file"
  379.   > $cache_file
  380. fi
  381.  
  382. ac_ext=c
  383. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  384. ac_cpp='$CPP $CPPFLAGS'
  385. ac_compile='${CC-cc} conftest.$ac_ext $CFLAGS $CPPFLAGS -c 1>&5 2>&5'
  386. ac_link='${CC-cc} conftest.$ac_ext $CFLAGS $CPPFLAGS $LDFLAGS -o conftest $LIBS 1>&5 2>&5'
  387.  
  388. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  389.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  390.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  391.     ac_n= ac_c='
  392. ' ac_t='    '
  393.   else
  394.     ac_n=-n ac_c= ac_t=
  395.   fi
  396. else
  397.   ac_n= ac_c='\c' ac_t=
  398. fi
  399.  
  400.  
  401. # @(#) configure.in 1.15 95/06/27 21:53:14
  402.  
  403. ac_aux_dir=
  404. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  405.   if test -f $ac_dir/install-sh; then
  406.     ac_aux_dir=$ac_dir
  407.     ac_install_sh="$ac_aux_dir/install-sh -c"
  408.     break
  409.   elif test -f $ac_dir/install.sh; then
  410.     ac_aux_dir=$ac_dir
  411.     ac_install_sh="$ac_aux_dir/install.sh -c"
  412.     break
  413.   fi
  414. done
  415. if test -z "$ac_aux_dir"; then
  416.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  417. fi
  418. ac_config_guess=$ac_aux_dir/config.guess
  419. ac_config_sub=$ac_aux_dir/config.sub
  420. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  421.  
  422. # Find a good install program.  We prefer a C program (faster),
  423. # so one script is as good as another.  But avoid the broken or
  424. # incompatible versions:
  425. # SysV /etc/install, /usr/sbin/install
  426. # SunOS /usr/etc/install
  427. # IRIX /sbin/install
  428. # AIX /bin/install
  429. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  430. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  431. # ./install, which can be erroneously created by make from ./install.sh.
  432. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  433. if test -z "$INSTALL"; then
  434. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  435.   echo $ac_n "(cached) $ac_c" 1>&6
  436. else
  437.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  438.   for ac_dir in $PATH; do
  439.     # Account for people who put trailing slashes in PATH elements.
  440.     case "$ac_dir/" in
  441.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  442.     *)
  443.       # OSF1 and SCO ODT 3.0 have their own names for install.
  444.       for ac_prog in ginstall installbsd scoinst install; do
  445.         if test -f $ac_dir/$ac_prog; then
  446.       if test $ac_prog = install &&
  447.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  448.         # AIX install.  It has an incompatible calling convention.
  449.         # OSF/1 installbsd also uses dspmsg, but is usable.
  450.         :
  451.       else
  452.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  453.         break 2
  454.       fi
  455.     fi
  456.       done
  457.       ;;
  458.     esac
  459.   done
  460.   IFS="$ac_save_ifs"
  461.   # As a last resort, use the slow shell script.
  462.   test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
  463. fi
  464.   INSTALL="$ac_cv_path_install"
  465. fi
  466. echo "$ac_t""$INSTALL" 1>&6
  467.  
  468. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  469. # It thinks the first close brace ends the variable substitution.
  470. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  471.  
  472. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  473.  
  474. # Extract the first word of "ranlib", so it can be a program name with args.
  475. set dummy ranlib; ac_word=$2
  476. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  477. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  478.   echo $ac_n "(cached) $ac_c" 1>&6
  479. else
  480.   if test -n "$RANLIB"; then
  481.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  482. else
  483.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  484.   for ac_dir in $PATH; do
  485.     test -z "$ac_dir" && ac_dir=.
  486.     if test -f $ac_dir/$ac_word; then
  487.       ac_cv_prog_RANLIB="ranlib"
  488.       break
  489.     fi
  490.   done
  491.   IFS="$ac_save_ifs"
  492.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  493. fi
  494. fi
  495. RANLIB="$ac_cv_prog_RANLIB"
  496. if test -n "$RANLIB"; then
  497.   echo "$ac_t""$RANLIB" 1>&6
  498. else
  499.   echo "$ac_t""no" 1>&6
  500. fi
  501.  
  502. if test "x$prefix" = xNONE; then
  503. echo $ac_n "checking for prefix by ""... $ac_c" 1>&6
  504. # Extract the first word of "tclsh", so it can be a program name with args.
  505. set dummy tclsh; ac_word=$2
  506. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  507. if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then
  508.   echo $ac_n "(cached) $ac_c" 1>&6
  509. else
  510.   case "$TCLSH" in
  511.   /*)
  512.   ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
  513.   ;;
  514.   *)
  515.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  516.   for ac_dir in $PATH; do
  517.     test -z "$ac_dir" && ac_dir=.
  518.     if test -f $ac_dir/$ac_word; then
  519.       ac_cv_path_TCLSH="$ac_dir/$ac_word"
  520.       break
  521.     fi
  522.   done
  523.   IFS="$ac_save_ifs"
  524.   ;;
  525. esac
  526. fi
  527. TCLSH="$ac_cv_path_TCLSH"
  528. if test -n "$TCLSH"; then
  529.   echo "$ac_t""$TCLSH" 1>&6
  530. else
  531.   echo "$ac_t""no" 1>&6
  532. fi
  533.  
  534.   if test -n "$ac_cv_path_TCLSH"; then
  535.     prefix=`echo $ac_cv_path_TCLSH|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
  536.   fi
  537. fi
  538.  
  539. # If we cannot run a trivial program, we must be cross compiling.
  540. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  541. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  542.   echo $ac_n "(cached) $ac_c" 1>&6
  543. else
  544.   if test "$cross_compiling" = yes; then
  545.   ac_cv_c_cross=yes
  546. else
  547. cat > conftest.$ac_ext <<EOF
  548. #line 549 "configure"
  549. #include "confdefs.h"
  550. main(){return(0);}
  551. EOF
  552. eval $ac_link
  553. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  554.   ac_cv_c_cross=no
  555. else
  556.   ac_cv_c_cross=yes
  557. fi
  558. fi
  559. rm -fr conftest*
  560. fi
  561. cross_compiling=$ac_cv_c_cross
  562. echo "$ac_t""$ac_cv_c_cross" 1>&6
  563.  
  564. CC=${CC-cc}
  565.  
  566.  
  567. #--------------------------------------------------------------------
  568. #    Supply substitutes for missing POSIX library procedures, or
  569. #    set flags so Tcl uses alternate procedures.
  570. #--------------------------------------------------------------------
  571.  
  572. for ac_func in getcwd opendir strerror strstr
  573. do
  574. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  575. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  576.   echo $ac_n "(cached) $ac_c" 1>&6
  577. else
  578.   cat > conftest.$ac_ext <<EOF
  579. #line 580 "configure"
  580. #include "confdefs.h"
  581. /* System header to define __stub macros and hopefully few prototypes,
  582.     which can conflict with char $ac_func(); below.  */
  583. #include <assert.h>
  584. /* Override any gcc2 internal prototype to avoid an error.  */
  585. char $ac_func(); 
  586.  
  587. int main() { return 0; }
  588. int t() {
  589.  
  590. /* The GNU C library defines this for functions which it implements
  591.     to always fail with ENOSYS.  Some functions are actually named
  592.     something starting with __ and the normal name is an alias.  */
  593. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  594. choke me
  595. #else
  596. $ac_func();
  597. #endif
  598.  
  599. ; return 0; }
  600. EOF
  601. if eval $ac_link; then
  602.   rm -rf conftest*
  603.   eval "ac_cv_func_$ac_func=yes"
  604. else
  605.   rm -rf conftest*
  606.   eval "ac_cv_func_$ac_func=no"
  607. fi
  608. rm -f conftest*
  609.  
  610. fi
  611. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  612.   echo "$ac_t""yes" 1>&6
  613.   :
  614. else
  615.   echo "$ac_t""no" 1>&6
  616. LIBOBJS="$LIBOBJS ${ac_func}.o"
  617. fi
  618.  
  619. done
  620.  
  621. for ac_func in strtol tmpnam waitpid
  622. do
  623. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  624. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  625.   echo $ac_n "(cached) $ac_c" 1>&6
  626. else
  627.   cat > conftest.$ac_ext <<EOF
  628. #line 629 "configure"
  629. #include "confdefs.h"
  630. /* System header to define __stub macros and hopefully few prototypes,
  631.     which can conflict with char $ac_func(); below.  */
  632. #include <assert.h>
  633. /* Override any gcc2 internal prototype to avoid an error.  */
  634. char $ac_func(); 
  635.  
  636. int main() { return 0; }
  637. int t() {
  638.  
  639. /* The GNU C library defines this for functions which it implements
  640.     to always fail with ENOSYS.  Some functions are actually named
  641.     something starting with __ and the normal name is an alias.  */
  642. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  643. choke me
  644. #else
  645. $ac_func();
  646. #endif
  647.  
  648. ; return 0; }
  649. EOF
  650. if eval $ac_link; then
  651.   rm -rf conftest*
  652.   eval "ac_cv_func_$ac_func=yes"
  653. else
  654.   rm -rf conftest*
  655.   eval "ac_cv_func_$ac_func=no"
  656. fi
  657. rm -f conftest*
  658.  
  659. fi
  660. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  661.   echo "$ac_t""yes" 1>&6
  662.   :
  663. else
  664.   echo "$ac_t""no" 1>&6
  665. LIBOBJS="$LIBOBJS ${ac_func}.o"
  666. fi
  667.  
  668. done
  669.  
  670. echo $ac_n "checking for getwd""... $ac_c" 1>&6
  671. if eval "test \"`echo '$''{'ac_cv_func_getwd'+set}'`\" = set"; then
  672.   echo $ac_n "(cached) $ac_c" 1>&6
  673. else
  674.   cat > conftest.$ac_ext <<EOF
  675. #line 676 "configure"
  676. #include "confdefs.h"
  677. /* System header to define __stub macros and hopefully few prototypes,
  678.     which can conflict with char getwd(); below.  */
  679. #include <assert.h>
  680. /* Override any gcc2 internal prototype to avoid an error.  */
  681. char getwd(); 
  682.  
  683. int main() { return 0; }
  684. int t() {
  685.  
  686. /* The GNU C library defines this for functions which it implements
  687.     to always fail with ENOSYS.  Some functions are actually named
  688.     something starting with __ and the normal name is an alias.  */
  689. #if defined (__stub_getwd) || defined (__stub___getwd)
  690. choke me
  691. #else
  692. getwd();
  693. #endif
  694.  
  695. ; return 0; }
  696. EOF
  697. if eval $ac_link; then
  698.   rm -rf conftest*
  699.   eval "ac_cv_func_getwd=yes"
  700. else
  701.   rm -rf conftest*
  702.   eval "ac_cv_func_getwd=no"
  703. fi
  704. rm -f conftest*
  705.  
  706. fi
  707. if eval "test \"`echo '$ac_cv_func_'getwd`\" = yes"; then
  708.   echo "$ac_t""yes" 1>&6
  709.   :
  710. else
  711.   echo "$ac_t""no" 1>&6
  712. cat >> confdefs.h <<\EOF
  713. #define NO_GETWD 1
  714. EOF
  715.  
  716. fi
  717.  
  718. echo $ac_n "checking for wait3""... $ac_c" 1>&6
  719. if eval "test \"`echo '$''{'ac_cv_func_wait3'+set}'`\" = set"; then
  720.   echo $ac_n "(cached) $ac_c" 1>&6
  721. else
  722.   cat > conftest.$ac_ext <<EOF
  723. #line 724 "configure"
  724. #include "confdefs.h"
  725. /* System header to define __stub macros and hopefully few prototypes,
  726.     which can conflict with char wait3(); below.  */
  727. #include <assert.h>
  728. /* Override any gcc2 internal prototype to avoid an error.  */
  729. char wait3(); 
  730.  
  731. int main() { return 0; }
  732. int t() {
  733.  
  734. /* The GNU C library defines this for functions which it implements
  735.     to always fail with ENOSYS.  Some functions are actually named
  736.     something starting with __ and the normal name is an alias.  */
  737. #if defined (__stub_wait3) || defined (__stub___wait3)
  738. choke me
  739. #else
  740. wait3();
  741. #endif
  742.  
  743. ; return 0; }
  744. EOF
  745. if eval $ac_link; then
  746.   rm -rf conftest*
  747.   eval "ac_cv_func_wait3=yes"
  748. else
  749.   rm -rf conftest*
  750.   eval "ac_cv_func_wait3=no"
  751. fi
  752. rm -f conftest*
  753.  
  754. fi
  755. if eval "test \"`echo '$ac_cv_func_'wait3`\" = yes"; then
  756.   echo "$ac_t""yes" 1>&6
  757.   :
  758. else
  759.   echo "$ac_t""no" 1>&6
  760. cat >> confdefs.h <<\EOF
  761. #define NO_WAIT3 1
  762. EOF
  763.  
  764. fi
  765.  
  766.  
  767. #--------------------------------------------------------------------
  768. #    On a few very rare systems, all of the libm.a stuff is
  769. #    already in libc.a.  Set compiler flags accordingly.
  770. #    Also, Linux requires the "ieee" library for math to work
  771. #    right (and it must appear before "-lm").
  772. #--------------------------------------------------------------------
  773.  
  774. echo $ac_n "checking for sin""... $ac_c" 1>&6
  775. if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
  776.   echo $ac_n "(cached) $ac_c" 1>&6
  777. else
  778.   cat > conftest.$ac_ext <<EOF
  779. #line 780 "configure"
  780. #include "confdefs.h"
  781. /* System header to define __stub macros and hopefully few prototypes,
  782.     which can conflict with char sin(); below.  */
  783. #include <assert.h>
  784. /* Override any gcc2 internal prototype to avoid an error.  */
  785. char sin(); 
  786.  
  787. int main() { return 0; }
  788. int t() {
  789.  
  790. /* The GNU C library defines this for functions which it implements
  791.     to always fail with ENOSYS.  Some functions are actually named
  792.     something starting with __ and the normal name is an alias.  */
  793. #if defined (__stub_sin) || defined (__stub___sin)
  794. choke me
  795. #else
  796. sin();
  797. #endif
  798.  
  799. ; return 0; }
  800. EOF
  801. if eval $ac_link; then
  802.   rm -rf conftest*
  803.   eval "ac_cv_func_sin=yes"
  804. else
  805.   rm -rf conftest*
  806.   eval "ac_cv_func_sin=no"
  807. fi
  808. rm -f conftest*
  809.  
  810. fi
  811. if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
  812.   echo "$ac_t""yes" 1>&6
  813.   MATH_LIBS=""
  814. else
  815.   echo "$ac_t""no" 1>&6
  816. MATH_LIBS="-lm"
  817. fi
  818.  
  819.  
  820. echo $ac_n "checking for -lieee""... $ac_c" 1>&6
  821. if eval "test \"`echo '$''{'ac_cv_lib_ieee'+set}'`\" = set"; then
  822.   echo $ac_n "(cached) $ac_c" 1>&6
  823. else
  824.   ac_save_LIBS="$LIBS"
  825. LIBS="-lieee  $LIBS"
  826. cat > conftest.$ac_ext <<EOF
  827. #line 828 "configure"
  828. #include "confdefs.h"
  829.  
  830. int main() { return 0; }
  831. int t() {
  832. main()
  833. ; return 0; }
  834. EOF
  835. if eval $ac_link; then
  836.   rm -rf conftest*
  837.   eval "ac_cv_lib_ieee=yes"
  838. else
  839.   rm -rf conftest*
  840.   eval "ac_cv_lib_ieee=no"
  841. fi
  842. rm -f conftest*
  843. LIBS="$ac_save_LIBS"
  844.  
  845. fi
  846. if eval "test \"`echo '$ac_cv_lib_'ieee`\" = yes"; then
  847.   echo "$ac_t""yes" 1>&6
  848.   MATH_LIBS="-lieee $MATH_LIBS"
  849. else
  850.   echo "$ac_t""no" 1>&6
  851. fi
  852.  
  853.  
  854. #--------------------------------------------------------------------
  855. #    Supply substitutes for missing POSIX header files.  Special
  856. #    notes:
  857. #        - Sprite's dirent.h exists but is bogus.
  858. #        - stdlib.h doesn't define strtol, strtoul, or
  859. #          strtod insome versions of SunOS
  860. #        - some versions of string.h don't declare procedures such
  861. #          as strstr
  862. #--------------------------------------------------------------------
  863.  
  864. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  865. # On Suns, sometimes $CPP names a directory.
  866. if test -n "$CPP" && test -d "$CPP"; then
  867.   CPP=
  868. fi
  869. if test -z "$CPP"; then
  870. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  871.   echo $ac_n "(cached) $ac_c" 1>&6
  872. else
  873.     # This must be in double quotes, not single quotes, because CPP may get
  874.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  875.   CPP="${CC-cc} -E"
  876.   # On the NeXT, cc -E runs the code through the compiler's parser,
  877.   # not just through cpp.
  878.   cat > conftest.$ac_ext <<EOF
  879. #line 880 "configure"
  880. #include "confdefs.h"
  881. #include <assert.h>
  882. Syntax Error
  883. EOF
  884. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  885. ac_err=`grep -v '^ *+' conftest.out`
  886. if test -z "$ac_err"; then
  887.   :
  888. else
  889.   echo "$ac_err" >&5
  890.   rm -rf conftest*
  891.   CPP="${CC-cc} -E -traditional-cpp"
  892.   cat > conftest.$ac_ext <<EOF
  893. #line 894 "configure"
  894. #include "confdefs.h"
  895. #include <assert.h>
  896. Syntax Error
  897. EOF
  898. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  899. ac_err=`grep -v '^ *+' conftest.out`
  900. if test -z "$ac_err"; then
  901.   :
  902. else
  903.   echo "$ac_err" >&5
  904.   rm -rf conftest*
  905.   CPP=/lib/cpp
  906. fi
  907. rm -f conftest*
  908. fi
  909. rm -f conftest*
  910.   ac_cv_prog_CPP="$CPP"
  911. fi
  912. fi
  913. CPP="$ac_cv_prog_CPP"
  914. echo "$ac_t""$CPP" 1>&6
  915.  
  916. for ac_hdr in unistd.h
  917. do
  918. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  919. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  920. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  921.   echo $ac_n "(cached) $ac_c" 1>&6
  922. else
  923.   cat > conftest.$ac_ext <<EOF
  924. #line 925 "configure"
  925. #include "confdefs.h"
  926. #include <$ac_hdr>
  927. EOF
  928. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  929. ac_err=`grep -v '^ *+' conftest.out`
  930. if test -z "$ac_err"; then
  931.   rm -rf conftest*
  932.   eval "ac_cv_header_$ac_safe=yes"
  933. else
  934.   echo "$ac_err" >&5
  935.   rm -rf conftest*
  936.   eval "ac_cv_header_$ac_safe=no"
  937. fi
  938. rm -f conftest*
  939. fi
  940. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  941.   echo "$ac_t""yes" 1>&6
  942.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  943.   cat >> confdefs.h <<EOF
  944. #define $ac_tr_hdr 1
  945. EOF
  946.  
  947. else
  948.   echo "$ac_t""no" 1>&6
  949. fi
  950. done
  951.  
  952. echo $ac_n "checking dirent.h""... $ac_c" 1>&6
  953. cat > conftest.$ac_ext <<EOF
  954. #line 955 "configure"
  955. #include "confdefs.h"
  956. #include <sys/types.h>
  957. #include <dirent.h>
  958. int main() { return 0; }
  959. int t() {
  960.  
  961. #ifndef _POSIX_SOURCE
  962. #   ifdef __Lynx__
  963.     /*
  964.      * Generate compilation error to make the test fail:  Lynx headers
  965.      * are only valid if really in the POSIX environment.
  966.      */
  967.  
  968.     missing_procedure();
  969. #   endif
  970. #endif
  971. DIR *d;
  972. struct dirent *entryPtr;
  973. char *p;
  974. d = opendir("foobar");
  975. entryPtr = readdir(d);
  976. p = entryPtr->d_name;
  977. closedir(d);
  978.  
  979. ; return 0; }
  980. EOF
  981. if eval $ac_link; then
  982.   rm -rf conftest*
  983.   tcl_ok=yes
  984. else
  985.   rm -rf conftest*
  986.   tcl_ok=no
  987. fi
  988. rm -f conftest*
  989.  
  990. cat > conftest.$ac_ext <<EOF
  991. #line 992 "configure"
  992. #include "confdefs.h"
  993. #include <dirent.h>
  994. EOF
  995. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  996.   egrep "Sprite version.* NOT POSIX" >/dev/null 2>&1; then
  997.   rm -rf conftest*
  998.   tcl_ok=no
  999. fi
  1000. rm -f conftest*
  1001.  
  1002. if test $tcl_ok = no; then
  1003.     cat >> confdefs.h <<\EOF
  1004. #define NO_DIRENT_H 1
  1005. EOF
  1006.  
  1007. fi
  1008. echo "$ac_t""$tcl_ok" 1>&6
  1009. ac_safe=`echo "errno.h" | tr './\055' '___'`
  1010. echo $ac_n "checking for errno.h""... $ac_c" 1>&6
  1011. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1012.   echo $ac_n "(cached) $ac_c" 1>&6
  1013. else
  1014.   cat > conftest.$ac_ext <<EOF
  1015. #line 1016 "configure"
  1016. #include "confdefs.h"
  1017. #include <errno.h>
  1018. EOF
  1019. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1020. ac_err=`grep -v '^ *+' conftest.out`
  1021. if test -z "$ac_err"; then
  1022.   rm -rf conftest*
  1023.   eval "ac_cv_header_$ac_safe=yes"
  1024. else
  1025.   echo "$ac_err" >&5
  1026.   rm -rf conftest*
  1027.   eval "ac_cv_header_$ac_safe=no"
  1028. fi
  1029. rm -f conftest*
  1030. fi
  1031. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1032.   echo "$ac_t""yes" 1>&6
  1033.   :
  1034. else
  1035.   echo "$ac_t""no" 1>&6
  1036. cat >> confdefs.h <<\EOF
  1037. #define NO_ERRNO_H 1
  1038. EOF
  1039.  
  1040. fi
  1041.  
  1042. ac_safe=`echo "float.h" | tr './\055' '___'`
  1043. echo $ac_n "checking for float.h""... $ac_c" 1>&6
  1044. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1045.   echo $ac_n "(cached) $ac_c" 1>&6
  1046. else
  1047.   cat > conftest.$ac_ext <<EOF
  1048. #line 1049 "configure"
  1049. #include "confdefs.h"
  1050. #include <float.h>
  1051. EOF
  1052. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1053. ac_err=`grep -v '^ *+' conftest.out`
  1054. if test -z "$ac_err"; then
  1055.   rm -rf conftest*
  1056.   eval "ac_cv_header_$ac_safe=yes"
  1057. else
  1058.   echo "$ac_err" >&5
  1059.   rm -rf conftest*
  1060.   eval "ac_cv_header_$ac_safe=no"
  1061. fi
  1062. rm -f conftest*
  1063. fi
  1064. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1065.   echo "$ac_t""yes" 1>&6
  1066.   :
  1067. else
  1068.   echo "$ac_t""no" 1>&6
  1069. cat >> confdefs.h <<\EOF
  1070. #define NO_FLOAT_H 1
  1071. EOF
  1072.  
  1073. fi
  1074.  
  1075. ac_safe=`echo "limits.h" | tr './\055' '___'`
  1076. echo $ac_n "checking for limits.h""... $ac_c" 1>&6
  1077. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1078.   echo $ac_n "(cached) $ac_c" 1>&6
  1079. else
  1080.   cat > conftest.$ac_ext <<EOF
  1081. #line 1082 "configure"
  1082. #include "confdefs.h"
  1083. #include <limits.h>
  1084. EOF
  1085. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1086. ac_err=`grep -v '^ *+' conftest.out`
  1087. if test -z "$ac_err"; then
  1088.   rm -rf conftest*
  1089.   eval "ac_cv_header_$ac_safe=yes"
  1090. else
  1091.   echo "$ac_err" >&5
  1092.   rm -rf conftest*
  1093.   eval "ac_cv_header_$ac_safe=no"
  1094. fi
  1095. rm -f conftest*
  1096. fi
  1097. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1098.   echo "$ac_t""yes" 1>&6
  1099.   :
  1100. else
  1101.   echo "$ac_t""no" 1>&6
  1102. cat >> confdefs.h <<\EOF
  1103. #define NO_LIMITS_H 1
  1104. EOF
  1105.  
  1106. fi
  1107.  
  1108. ac_safe=`echo "stdlib.h" | tr './\055' '___'`
  1109. echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
  1110. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1111.   echo $ac_n "(cached) $ac_c" 1>&6
  1112. else
  1113.   cat > conftest.$ac_ext <<EOF
  1114. #line 1115 "configure"
  1115. #include "confdefs.h"
  1116. #include <stdlib.h>
  1117. EOF
  1118. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1119. ac_err=`grep -v '^ *+' conftest.out`
  1120. if test -z "$ac_err"; then
  1121.   rm -rf conftest*
  1122.   eval "ac_cv_header_$ac_safe=yes"
  1123. else
  1124.   echo "$ac_err" >&5
  1125.   rm -rf conftest*
  1126.   eval "ac_cv_header_$ac_safe=no"
  1127. fi
  1128. rm -f conftest*
  1129. fi
  1130. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1131.   echo "$ac_t""yes" 1>&6
  1132.   tcl_ok=1
  1133. else
  1134.   echo "$ac_t""no" 1>&6
  1135. tcl_ok=0
  1136. fi
  1137.  
  1138. cat > conftest.$ac_ext <<EOF
  1139. #line 1140 "configure"
  1140. #include "confdefs.h"
  1141. #include <stdlib.h>
  1142. EOF
  1143. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1144.   egrep "strtol" >/dev/null 2>&1; then
  1145.   :
  1146. else
  1147.   rm -rf conftest*
  1148.   tcl_ok=0
  1149. fi
  1150. rm -f conftest*
  1151.  
  1152. cat > conftest.$ac_ext <<EOF
  1153. #line 1154 "configure"
  1154. #include "confdefs.h"
  1155. #include <stdlib.h>
  1156. EOF
  1157. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1158.   egrep "strtoul" >/dev/null 2>&1; then
  1159.   :
  1160. else
  1161.   rm -rf conftest*
  1162.   tcl_ok=0
  1163. fi
  1164. rm -f conftest*
  1165.  
  1166. cat > conftest.$ac_ext <<EOF
  1167. #line 1168 "configure"
  1168. #include "confdefs.h"
  1169. #include <stdlib.h>
  1170. EOF
  1171. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1172.   egrep "strtod" >/dev/null 2>&1; then
  1173.   :
  1174. else
  1175.   rm -rf conftest*
  1176.   tcl_ok=0
  1177. fi
  1178. rm -f conftest*
  1179.  
  1180. if test $tcl_ok = 0; then
  1181.     cat >> confdefs.h <<\EOF
  1182. #define NO_STDLIB_H 1
  1183. EOF
  1184.  
  1185. fi
  1186. ac_safe=`echo "string.h" | tr './\055' '___'`
  1187. echo $ac_n "checking for string.h""... $ac_c" 1>&6
  1188. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1189.   echo $ac_n "(cached) $ac_c" 1>&6
  1190. else
  1191.   cat > conftest.$ac_ext <<EOF
  1192. #line 1193 "configure"
  1193. #include "confdefs.h"
  1194. #include <string.h>
  1195. EOF
  1196. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1197. ac_err=`grep -v '^ *+' conftest.out`
  1198. if test -z "$ac_err"; then
  1199.   rm -rf conftest*
  1200.   eval "ac_cv_header_$ac_safe=yes"
  1201. else
  1202.   echo "$ac_err" >&5
  1203.   rm -rf conftest*
  1204.   eval "ac_cv_header_$ac_safe=no"
  1205. fi
  1206. rm -f conftest*
  1207. fi
  1208. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1209.   echo "$ac_t""yes" 1>&6
  1210.   tcl_ok=1
  1211. else
  1212.   echo "$ac_t""no" 1>&6
  1213. tcl_ok=0
  1214. fi
  1215.  
  1216. cat > conftest.$ac_ext <<EOF
  1217. #line 1218 "configure"
  1218. #include "confdefs.h"
  1219. #include <string.h>
  1220. EOF
  1221. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1222.   egrep "strstr" >/dev/null 2>&1; then
  1223.   :
  1224. else
  1225.   rm -rf conftest*
  1226.   tcl_ok=0
  1227. fi
  1228. rm -f conftest*
  1229.  
  1230. cat > conftest.$ac_ext <<EOF
  1231. #line 1232 "configure"
  1232. #include "confdefs.h"
  1233. #include <string.h>
  1234. EOF
  1235. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1236.   egrep "strerror" >/dev/null 2>&1; then
  1237.   :
  1238. else
  1239.   rm -rf conftest*
  1240.   tcl_ok=0
  1241. fi
  1242. rm -f conftest*
  1243.  
  1244. if test $tcl_ok = 0; then
  1245.     cat >> confdefs.h <<\EOF
  1246. #define NO_STRING_H 1
  1247. EOF
  1248.  
  1249. fi
  1250. ac_safe=`echo "sys/time.h" | tr './\055' '___'`
  1251. echo $ac_n "checking for sys/time.h""... $ac_c" 1>&6
  1252. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1253.   echo $ac_n "(cached) $ac_c" 1>&6
  1254. else
  1255.   cat > conftest.$ac_ext <<EOF
  1256. #line 1257 "configure"
  1257. #include "confdefs.h"
  1258. #include <sys/time.h>
  1259. EOF
  1260. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1261. ac_err=`grep -v '^ *+' conftest.out`
  1262. if test -z "$ac_err"; then
  1263.   rm -rf conftest*
  1264.   eval "ac_cv_header_$ac_safe=yes"
  1265. else
  1266.   echo "$ac_err" >&5
  1267.   rm -rf conftest*
  1268.   eval "ac_cv_header_$ac_safe=no"
  1269. fi
  1270. rm -f conftest*
  1271. fi
  1272. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1273.   echo "$ac_t""yes" 1>&6
  1274.   :
  1275. else
  1276.   echo "$ac_t""no" 1>&6
  1277. cat >> confdefs.h <<\EOF
  1278. #define NO_SYS_TIME_H 1
  1279. EOF
  1280.  
  1281. fi
  1282.  
  1283. ac_safe=`echo "sys/wait.h" | tr './\055' '___'`
  1284. echo $ac_n "checking for sys/wait.h""... $ac_c" 1>&6
  1285. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1286.   echo $ac_n "(cached) $ac_c" 1>&6
  1287. else
  1288.   cat > conftest.$ac_ext <<EOF
  1289. #line 1290 "configure"
  1290. #include "confdefs.h"
  1291. #include <sys/wait.h>
  1292. EOF
  1293. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1294. ac_err=`grep -v '^ *+' conftest.out`
  1295. if test -z "$ac_err"; then
  1296.   rm -rf conftest*
  1297.   eval "ac_cv_header_$ac_safe=yes"
  1298. else
  1299.   echo "$ac_err" >&5
  1300.   rm -rf conftest*
  1301.   eval "ac_cv_header_$ac_safe=no"
  1302. fi
  1303. rm -f conftest*
  1304. fi
  1305. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1306.   echo "$ac_t""yes" 1>&6
  1307.   :
  1308. else
  1309.   echo "$ac_t""no" 1>&6
  1310. cat >> confdefs.h <<\EOF
  1311. #define NO_SYS_WAIT_H 1
  1312. EOF
  1313.  
  1314. fi
  1315.  
  1316.  
  1317. #--------------------------------------------------------------------
  1318. #    On some systems strstr is broken: it returns a pointer even
  1319. #    even if the original string is empty.
  1320. #--------------------------------------------------------------------
  1321.  
  1322. echo $ac_n "checking proper strstr implementation""... $ac_c" 1>&6
  1323. if test "$cross_compiling" = yes; then
  1324.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1325. else
  1326. cat > conftest.$ac_ext <<EOF
  1327. #line 1328 "configure"
  1328. #include "confdefs.h"
  1329.  
  1330. extern int strstr();
  1331. int main()
  1332. {
  1333.     exit(strstr("\0test", "test") ? 1 : 0);
  1334. }
  1335.  
  1336. EOF
  1337. eval $ac_link
  1338. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1339.   tcl_ok=yes
  1340. else
  1341.   tcl_ok=no
  1342. fi
  1343. fi
  1344. rm -fr conftest*
  1345. if test $tcl_ok = yes; then
  1346.     echo "$ac_t""yes" 1>&6
  1347. else
  1348.     echo "$ac_t""broken, using substitute" 1>&6
  1349.     LIBOBJS="$LIBOBJS strstr.o"
  1350. fi
  1351.  
  1352. #--------------------------------------------------------------------
  1353. #    Check for strtoul function.  This is tricky because under some
  1354. #    versions of AIX strtoul returns an incorrect terminator
  1355. #    pointer for the string "0".
  1356. #--------------------------------------------------------------------
  1357.  
  1358. echo $ac_n "checking for strtoul""... $ac_c" 1>&6
  1359. if eval "test \"`echo '$''{'ac_cv_func_strtoul'+set}'`\" = set"; then
  1360.   echo $ac_n "(cached) $ac_c" 1>&6
  1361. else
  1362.   cat > conftest.$ac_ext <<EOF
  1363. #line 1364 "configure"
  1364. #include "confdefs.h"
  1365. /* System header to define __stub macros and hopefully few prototypes,
  1366.     which can conflict with char strtoul(); below.  */
  1367. #include <assert.h>
  1368. /* Override any gcc2 internal prototype to avoid an error.  */
  1369. char strtoul(); 
  1370.  
  1371. int main() { return 0; }
  1372. int t() {
  1373.  
  1374. /* The GNU C library defines this for functions which it implements
  1375.     to always fail with ENOSYS.  Some functions are actually named
  1376.     something starting with __ and the normal name is an alias.  */
  1377. #if defined (__stub_strtoul) || defined (__stub___strtoul)
  1378. choke me
  1379. #else
  1380. strtoul();
  1381. #endif
  1382.  
  1383. ; return 0; }
  1384. EOF
  1385. if eval $ac_link; then
  1386.   rm -rf conftest*
  1387.   eval "ac_cv_func_strtoul=yes"
  1388. else
  1389.   rm -rf conftest*
  1390.   eval "ac_cv_func_strtoul=no"
  1391. fi
  1392. rm -f conftest*
  1393.  
  1394. fi
  1395. if eval "test \"`echo '$ac_cv_func_'strtoul`\" = yes"; then
  1396.   echo "$ac_t""yes" 1>&6
  1397.   tcl_ok=1
  1398. else
  1399.   echo "$ac_t""no" 1>&6
  1400. tcl_ok=0
  1401. fi
  1402.  
  1403. if test "$cross_compiling" = yes; then
  1404.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1405. else
  1406. cat > conftest.$ac_ext <<EOF
  1407. #line 1408 "configure"
  1408. #include "confdefs.h"
  1409.  
  1410. extern int strtoul();
  1411. int main()
  1412. {
  1413.     char *string = "0";
  1414.     char *term;
  1415.     int value;
  1416.     value = strtoul(string, &term, 0);
  1417.     if ((value != 0) || (term != (string+1))) {
  1418.         exit(1);
  1419.     }
  1420.     exit(0);
  1421. }
  1422. EOF
  1423. eval $ac_link
  1424. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1425.   :
  1426. else
  1427.   tcl_ok=0
  1428. fi
  1429. fi
  1430. rm -fr conftest*
  1431. if test $tcl_ok = 0; then
  1432.     test -n "$verbose" && echo "    Adding strtoul.o."
  1433.     LIBOBJS="$LIBOBJS strtoul.o"
  1434. fi
  1435.  
  1436. #--------------------------------------------------------------------
  1437. #    Check for the strtod function.  This is tricky because in some
  1438. #    versions of Linux strtod mis-parses strings starting with "+".
  1439. #--------------------------------------------------------------------
  1440.  
  1441. echo $ac_n "checking for strtod""... $ac_c" 1>&6
  1442. if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
  1443.   echo $ac_n "(cached) $ac_c" 1>&6
  1444. else
  1445.   cat > conftest.$ac_ext <<EOF
  1446. #line 1447 "configure"
  1447. #include "confdefs.h"
  1448. /* System header to define __stub macros and hopefully few prototypes,
  1449.     which can conflict with char strtod(); below.  */
  1450. #include <assert.h>
  1451. /* Override any gcc2 internal prototype to avoid an error.  */
  1452. char strtod(); 
  1453.  
  1454. int main() { return 0; }
  1455. int t() {
  1456.  
  1457. /* The GNU C library defines this for functions which it implements
  1458.     to always fail with ENOSYS.  Some functions are actually named
  1459.     something starting with __ and the normal name is an alias.  */
  1460. #if defined (__stub_strtod) || defined (__stub___strtod)
  1461. choke me
  1462. #else
  1463. strtod();
  1464. #endif
  1465.  
  1466. ; return 0; }
  1467. EOF
  1468. if eval $ac_link; then
  1469.   rm -rf conftest*
  1470.   eval "ac_cv_func_strtod=yes"
  1471. else
  1472.   rm -rf conftest*
  1473.   eval "ac_cv_func_strtod=no"
  1474. fi
  1475. rm -f conftest*
  1476.  
  1477. fi
  1478. if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
  1479.   echo "$ac_t""yes" 1>&6
  1480.   tcl_ok=1
  1481. else
  1482.   echo "$ac_t""no" 1>&6
  1483. tcl_ok=0
  1484. fi
  1485.  
  1486. if test "$cross_compiling" = yes; then
  1487.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1488. else
  1489. cat > conftest.$ac_ext <<EOF
  1490. #line 1491 "configure"
  1491. #include "confdefs.h"
  1492.  
  1493. extern double strtod();
  1494. int main()
  1495. {
  1496.     char *string = " +69";
  1497.     char *term;
  1498.     double value;
  1499.     value = strtod(string, &term);
  1500.     if ((value != 69) || (term != (string+4))) {
  1501.     exit(1);
  1502.     }
  1503.     exit(0);
  1504. }
  1505. EOF
  1506. eval $ac_link
  1507. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1508.   :
  1509. else
  1510.   tcl_ok=0
  1511. fi
  1512. fi
  1513. rm -fr conftest*
  1514. if test $tcl_ok = 0; then
  1515.     test -n "$verbose" && echo "    Adding strtod.o."
  1516.     LIBOBJS="$LIBOBJS strtod.o"
  1517. fi
  1518.  
  1519. #--------------------------------------------------------------------
  1520. #    Under Solaris 2.4, strtod returns the wrong value for the
  1521. #    terminating character under some conditions.  Check for this
  1522. #    and if the problem exists use a substitute procedure
  1523. #    "fixstrtod" that corrects the error.
  1524. #--------------------------------------------------------------------
  1525.  
  1526. echo $ac_n "checking for strtod""... $ac_c" 1>&6
  1527. if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
  1528.   echo $ac_n "(cached) $ac_c" 1>&6
  1529. else
  1530.   cat > conftest.$ac_ext <<EOF
  1531. #line 1532 "configure"
  1532. #include "confdefs.h"
  1533. /* System header to define __stub macros and hopefully few prototypes,
  1534.     which can conflict with char strtod(); below.  */
  1535. #include <assert.h>
  1536. /* Override any gcc2 internal prototype to avoid an error.  */
  1537. char strtod(); 
  1538.  
  1539. int main() { return 0; }
  1540. int t() {
  1541.  
  1542. /* The GNU C library defines this for functions which it implements
  1543.     to always fail with ENOSYS.  Some functions are actually named
  1544.     something starting with __ and the normal name is an alias.  */
  1545. #if defined (__stub_strtod) || defined (__stub___strtod)
  1546. choke me
  1547. #else
  1548. strtod();
  1549. #endif
  1550.  
  1551. ; return 0; }
  1552. EOF
  1553. if eval $ac_link; then
  1554.   rm -rf conftest*
  1555.   eval "ac_cv_func_strtod=yes"
  1556. else
  1557.   rm -rf conftest*
  1558.   eval "ac_cv_func_strtod=no"
  1559. fi
  1560. rm -f conftest*
  1561.  
  1562. fi
  1563. if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
  1564.   echo "$ac_t""yes" 1>&6
  1565.   tcl_strtod=1
  1566. else
  1567.   echo "$ac_t""no" 1>&6
  1568. tcl_strtod=0
  1569. fi
  1570.  
  1571. if test "$tcl_strtod" = 1; then
  1572.     echo $ac_n "checking for Solaris strtod bug""... $ac_c" 1>&6
  1573.     if test "$cross_compiling" = yes; then
  1574.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1575. else
  1576. cat > conftest.$ac_ext <<EOF
  1577. #line 1578 "configure"
  1578. #include "confdefs.h"
  1579.  
  1580.     extern double strtod();
  1581.     int main()
  1582.     {
  1583.         char *string = "NaN";
  1584.         char *term;
  1585.         strtod(string, &term);
  1586.         if ((term != string) && (term[-1] == 0)) {
  1587.         exit(1);
  1588.         }
  1589.         exit(0);
  1590.     }
  1591. EOF
  1592. eval $ac_link
  1593. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1594.   echo "$ac_t""ok" 1>&6
  1595. else
  1596.   
  1597.         echo "$ac_t""buggy" 1>&6
  1598.         LIBOBJS="$LIBOBJS fixstrtod.o"
  1599.         cat >> confdefs.h <<\EOF
  1600. #define strtod fixstrtod
  1601. EOF
  1602.  
  1603.     
  1604. fi
  1605. fi
  1606. rm -fr conftest*
  1607. fi
  1608.  
  1609. #--------------------------------------------------------------------
  1610. #    Check for various typedefs and provide substitutes if
  1611. #    they don't exist.
  1612. #--------------------------------------------------------------------
  1613.  
  1614. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1615. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1616.   echo $ac_n "(cached) $ac_c" 1>&6
  1617. else
  1618.   cat > conftest.$ac_ext <<EOF
  1619. #line 1620 "configure"
  1620. #include "confdefs.h"
  1621. #include <stdlib.h>
  1622. #include <stdarg.h>
  1623. #include <string.h>
  1624. #include <float.h>
  1625. EOF
  1626. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1627. ac_err=`grep -v '^ *+' conftest.out`
  1628. if test -z "$ac_err"; then
  1629.   rm -rf conftest*
  1630.   ac_cv_header_stdc=yes
  1631. else
  1632.   echo "$ac_err" >&5
  1633.   rm -rf conftest*
  1634.   ac_cv_header_stdc=no
  1635. fi
  1636. rm -f conftest*
  1637.  
  1638. if test $ac_cv_header_stdc = yes; then
  1639.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1640. cat > conftest.$ac_ext <<EOF
  1641. #line 1642 "configure"
  1642. #include "confdefs.h"
  1643. #include <string.h>
  1644. EOF
  1645. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1646.   egrep "memchr" >/dev/null 2>&1; then
  1647.   :
  1648. else
  1649.   rm -rf conftest*
  1650.   ac_cv_header_stdc=no
  1651. fi
  1652. rm -f conftest*
  1653.  
  1654. fi
  1655.  
  1656. if test $ac_cv_header_stdc = yes; then
  1657.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1658. cat > conftest.$ac_ext <<EOF
  1659. #line 1660 "configure"
  1660. #include "confdefs.h"
  1661. #include <stdlib.h>
  1662. EOF
  1663. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1664.   egrep "free" >/dev/null 2>&1; then
  1665.   :
  1666. else
  1667.   rm -rf conftest*
  1668.   ac_cv_header_stdc=no
  1669. fi
  1670. rm -f conftest*
  1671.  
  1672. fi
  1673.  
  1674. if test $ac_cv_header_stdc = yes; then
  1675.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1676. if test "$cross_compiling" = yes; then
  1677.   ac_cv_header_stdc=no
  1678. else
  1679. cat > conftest.$ac_ext <<EOF
  1680. #line 1681 "configure"
  1681. #include "confdefs.h"
  1682. #include <ctype.h>
  1683. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1684. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1685. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1686. int main () { int i; for (i = 0; i < 256; i++)
  1687. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1688. exit (0); }
  1689.  
  1690. EOF
  1691. eval $ac_link
  1692. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1693.   :
  1694. else
  1695.   ac_cv_header_stdc=no
  1696. fi
  1697. fi
  1698. rm -fr conftest*
  1699. fi
  1700. fi
  1701. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1702. if test $ac_cv_header_stdc = yes; then
  1703.   cat >> confdefs.h <<\EOF
  1704. #define STDC_HEADERS 1
  1705. EOF
  1706.  
  1707. fi
  1708.  
  1709. echo $ac_n "checking for mode_t""... $ac_c" 1>&6
  1710. if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  1711.   echo $ac_n "(cached) $ac_c" 1>&6
  1712. else
  1713.   cat > conftest.$ac_ext <<EOF
  1714. #line 1715 "configure"
  1715. #include "confdefs.h"
  1716. #include <sys/types.h>
  1717. #if STDC_HEADERS
  1718. #include <stdlib.h>
  1719. #endif
  1720. EOF
  1721. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1722.   egrep "mode_t" >/dev/null 2>&1; then
  1723.   rm -rf conftest*
  1724.   ac_cv_type_mode_t=yes
  1725. else
  1726.   rm -rf conftest*
  1727.   ac_cv_type_mode_t=no
  1728. fi
  1729. rm -f conftest*
  1730.  
  1731. fi
  1732. echo "$ac_t""$ac_cv_type_mode_t" 1>&6
  1733. if test $ac_cv_type_mode_t = no; then
  1734.   cat >> confdefs.h <<\EOF
  1735. #define mode_t int
  1736. EOF
  1737.  
  1738. fi
  1739.  
  1740. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  1741. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  1742.   echo $ac_n "(cached) $ac_c" 1>&6
  1743. else
  1744.   cat > conftest.$ac_ext <<EOF
  1745. #line 1746 "configure"
  1746. #include "confdefs.h"
  1747. #include <sys/types.h>
  1748. #if STDC_HEADERS
  1749. #include <stdlib.h>
  1750. #endif
  1751. EOF
  1752. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1753.   egrep "pid_t" >/dev/null 2>&1; then
  1754.   rm -rf conftest*
  1755.   ac_cv_type_pid_t=yes
  1756. else
  1757.   rm -rf conftest*
  1758.   ac_cv_type_pid_t=no
  1759. fi
  1760. rm -f conftest*
  1761.  
  1762. fi
  1763. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  1764. if test $ac_cv_type_pid_t = no; then
  1765.   cat >> confdefs.h <<\EOF
  1766. #define pid_t int
  1767. EOF
  1768.  
  1769. fi
  1770.  
  1771. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  1772. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  1773.   echo $ac_n "(cached) $ac_c" 1>&6
  1774. else
  1775.   cat > conftest.$ac_ext <<EOF
  1776. #line 1777 "configure"
  1777. #include "confdefs.h"
  1778. #include <sys/types.h>
  1779. #if STDC_HEADERS
  1780. #include <stdlib.h>
  1781. #endif
  1782. EOF
  1783. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1784.   egrep "size_t" >/dev/null 2>&1; then
  1785.   rm -rf conftest*
  1786.   ac_cv_type_size_t=yes
  1787. else
  1788.   rm -rf conftest*
  1789.   ac_cv_type_size_t=no
  1790. fi
  1791. rm -f conftest*
  1792.  
  1793. fi
  1794. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  1795. if test $ac_cv_type_size_t = no; then
  1796.   cat >> confdefs.h <<\EOF
  1797. #define size_t unsigned
  1798. EOF
  1799.  
  1800. fi
  1801.  
  1802. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  1803. if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  1804.   echo $ac_n "(cached) $ac_c" 1>&6
  1805. else
  1806.   cat > conftest.$ac_ext <<EOF
  1807. #line 1808 "configure"
  1808. #include "confdefs.h"
  1809. #include <sys/types.h>
  1810. EOF
  1811. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1812.   egrep "uid_t" >/dev/null 2>&1; then
  1813.   rm -rf conftest*
  1814.   ac_cv_type_uid_t=yes
  1815. else
  1816.   rm -rf conftest*
  1817.   ac_cv_type_uid_t=no
  1818. fi
  1819. rm -f conftest*
  1820.  
  1821. fi
  1822. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  1823. if test $ac_cv_type_uid_t = no; then
  1824.   cat >> confdefs.h <<\EOF
  1825. #define uid_t int
  1826. EOF
  1827.  
  1828.   cat >> confdefs.h <<\EOF
  1829. #define gid_t int
  1830. EOF
  1831.  
  1832. fi
  1833.  
  1834.  
  1835. #--------------------------------------------------------------------
  1836. #    If a system doesn't have an opendir function (man, that's old!)
  1837. #    then we have to supply a different version of dirent.h which
  1838. #    is compatible with the substitute version of opendir that's
  1839. #    provided.  This version only works with V7-style directories.
  1840. #--------------------------------------------------------------------
  1841.  
  1842. echo $ac_n "checking for opendir""... $ac_c" 1>&6
  1843. if eval "test \"`echo '$''{'ac_cv_func_opendir'+set}'`\" = set"; then
  1844.   echo $ac_n "(cached) $ac_c" 1>&6
  1845. else
  1846.   cat > conftest.$ac_ext <<EOF
  1847. #line 1848 "configure"
  1848. #include "confdefs.h"
  1849. /* System header to define __stub macros and hopefully few prototypes,
  1850.     which can conflict with char opendir(); below.  */
  1851. #include <assert.h>
  1852. /* Override any gcc2 internal prototype to avoid an error.  */
  1853. char opendir(); 
  1854.  
  1855. int main() { return 0; }
  1856. int t() {
  1857.  
  1858. /* The GNU C library defines this for functions which it implements
  1859.     to always fail with ENOSYS.  Some functions are actually named
  1860.     something starting with __ and the normal name is an alias.  */
  1861. #if defined (__stub_opendir) || defined (__stub___opendir)
  1862. choke me
  1863. #else
  1864. opendir();
  1865. #endif
  1866.  
  1867. ; return 0; }
  1868. EOF
  1869. if eval $ac_link; then
  1870.   rm -rf conftest*
  1871.   eval "ac_cv_func_opendir=yes"
  1872. else
  1873.   rm -rf conftest*
  1874.   eval "ac_cv_func_opendir=no"
  1875. fi
  1876. rm -f conftest*
  1877.  
  1878. fi
  1879. if eval "test \"`echo '$ac_cv_func_'opendir`\" = yes"; then
  1880.   echo "$ac_t""yes" 1>&6
  1881.   :
  1882. else
  1883.   echo "$ac_t""no" 1>&6
  1884. cat >> confdefs.h <<\EOF
  1885. #define USE_DIRENT2_H 1
  1886. EOF
  1887.  
  1888. fi
  1889.  
  1890.  
  1891. #--------------------------------------------------------------------
  1892. #    Check for the existence of sys_errlist (this is only needed if
  1893. #    there's no strerror, but I don't know how to conditionalize the
  1894. #    check).
  1895. #--------------------------------------------------------------------
  1896.  
  1897. echo $ac_n "checking sys_errlist""... $ac_c" 1>&6
  1898. cat > conftest.$ac_ext <<EOF
  1899. #line 1900 "configure"
  1900. #include "confdefs.h"
  1901.  
  1902. int main() { return 0; }
  1903. int t() {
  1904.  
  1905. extern char *sys_errlist[];
  1906. extern int sys_nerr;
  1907. sys_errlist[sys_nerr-1][0] = 0;
  1908.  
  1909. ; return 0; }
  1910. EOF
  1911. if eval $ac_link; then
  1912.   rm -rf conftest*
  1913.   tcl_ok=yes
  1914. else
  1915.   rm -rf conftest*
  1916.   tcl_ok=no
  1917. fi
  1918. rm -f conftest*
  1919.  
  1920. echo "$ac_t""$tcl_ok" 1>&6
  1921. if test $tcl_ok = no; then
  1922.     cat >> confdefs.h <<\EOF
  1923. #define NO_SYS_ERRLIST 1
  1924. EOF
  1925.  
  1926. fi
  1927.  
  1928. #--------------------------------------------------------------------
  1929. #    The check below checks whether <sys/wait.h> defines the type
  1930. #    "union wait" correctly.  It's needed because of weirdness in
  1931. #    HP-UX where "union wait" is defined in both the BSD and SYS-V
  1932. #    environments.  Checking the usability of WIFEXITED seems to do
  1933. #    the trick.
  1934. #--------------------------------------------------------------------
  1935.  
  1936. echo $ac_n "checking union wait""... $ac_c" 1>&6
  1937. cat > conftest.$ac_ext <<EOF
  1938. #line 1939 "configure"
  1939. #include "confdefs.h"
  1940. #include <sys/types.h> 
  1941. #include <sys/wait.h>
  1942. int main() { return 0; }
  1943. int t() {
  1944.  
  1945. union wait x;
  1946. WIFEXITED(x);        /* Generates compiler error if WIFEXITED
  1947.              * uses an int. */
  1948.  
  1949. ; return 0; }
  1950. EOF
  1951. if eval $ac_link; then
  1952.   rm -rf conftest*
  1953.   tcl_ok=yes
  1954. else
  1955.   rm -rf conftest*
  1956.   tcl_ok=no
  1957. fi
  1958. rm -f conftest*
  1959.  
  1960. echo "$ac_t""$tcl_ok" 1>&6
  1961. if test $tcl_ok = no; then
  1962.     cat >> confdefs.h <<\EOF
  1963. #define NO_UNION_WAIT 1
  1964. EOF
  1965.  
  1966. fi
  1967.  
  1968. #--------------------------------------------------------------------
  1969. #    Check to see whether the system supports the matherr function
  1970. #    and its associated type "struct exception".
  1971. #--------------------------------------------------------------------
  1972.  
  1973. echo $ac_n "checking matherr support""... $ac_c" 1>&6
  1974. cat > conftest.$ac_ext <<EOF
  1975. #line 1976 "configure"
  1976. #include "confdefs.h"
  1977. #include <math.h>
  1978. int main() { return 0; }
  1979. int t() {
  1980.  
  1981. struct exception x;
  1982. x.type = DOMAIN;
  1983. x.type = SING;
  1984.  
  1985. ; return 0; }
  1986. EOF
  1987. if eval $ac_compile; then
  1988.   rm -rf conftest*
  1989.   tcl_ok=yes
  1990. else
  1991.   rm -rf conftest*
  1992.   tcl_ok=no
  1993. fi
  1994. rm -f conftest*
  1995.  
  1996. echo "$ac_t""$tcl_ok" 1>&6
  1997. if test $tcl_ok = yes; then
  1998.     cat >> confdefs.h <<\EOF
  1999. #define NEED_MATHERR 1
  2000. EOF
  2001.  
  2002. fi
  2003.  
  2004. #--------------------------------------------------------------------
  2005. #    Check to see whether the system provides a vfork kernel call.
  2006. #    If not, then use fork instead.  Also, check for a problem with
  2007. #    Solaris 2.4 and vforks and signals that can core dumps can occur
  2008. #    if a vforked child resets a signal handler.  If the problem
  2009. #    exists, then use fork instead of vfork.
  2010. #--------------------------------------------------------------------
  2011.  
  2012. echo $ac_n "checking for vfork""... $ac_c" 1>&6
  2013. if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
  2014.   echo $ac_n "(cached) $ac_c" 1>&6
  2015. else
  2016.   cat > conftest.$ac_ext <<EOF
  2017. #line 2018 "configure"
  2018. #include "confdefs.h"
  2019. /* System header to define __stub macros and hopefully few prototypes,
  2020.     which can conflict with char vfork(); below.  */
  2021. #include <assert.h>
  2022. /* Override any gcc2 internal prototype to avoid an error.  */
  2023. char vfork(); 
  2024.  
  2025. int main() { return 0; }
  2026. int t() {
  2027.  
  2028. /* The GNU C library defines this for functions which it implements
  2029.     to always fail with ENOSYS.  Some functions are actually named
  2030.     something starting with __ and the normal name is an alias.  */
  2031. #if defined (__stub_vfork) || defined (__stub___vfork)
  2032. choke me
  2033. #else
  2034. vfork();
  2035. #endif
  2036.  
  2037. ; return 0; }
  2038. EOF
  2039. if eval $ac_link; then
  2040.   rm -rf conftest*
  2041.   eval "ac_cv_func_vfork=yes"
  2042. else
  2043.   rm -rf conftest*
  2044.   eval "ac_cv_func_vfork=no"
  2045. fi
  2046. rm -f conftest*
  2047.  
  2048. fi
  2049. if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
  2050.   echo "$ac_t""yes" 1>&6
  2051.   tcl_ok=1
  2052. else
  2053.   echo "$ac_t""no" 1>&6
  2054. tcl_ok=0
  2055. fi
  2056.  
  2057. if test "$tcl_ok" = 1; then
  2058.     echo $ac_n "checking Solaris 2.4 vfork/signal bug""... $ac_c" 1>&6;
  2059.     if test "$cross_compiling" = yes; then
  2060.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2061. else
  2062. cat > conftest.$ac_ext <<EOF
  2063. #line 2064 "configure"
  2064. #include "confdefs.h"
  2065.  
  2066.     #include <stdio.h>
  2067.     #include <signal.h>
  2068.     #include <sys/wait.h>
  2069.     int gotSignal = 0;
  2070.     sigProc(sig)
  2071.         int sig;
  2072.     {
  2073.         gotSignal = 1;
  2074.     }
  2075.     main()
  2076.     {
  2077.         int pid, sts;
  2078.         (void) signal(SIGCHLD, sigProc);
  2079.         pid = vfork();
  2080.         if (pid <  0) {
  2081.         exit(1);
  2082.         } else if (pid == 0) {
  2083.         (void) signal(SIGCHLD, SIG_DFL);
  2084.         _exit(0);
  2085.         } else {
  2086.         (void) wait(&sts);
  2087.         }
  2088.         exit((gotSignal) ? 0 : 1);
  2089.     }
  2090. EOF
  2091. eval $ac_link
  2092. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2093.   echo "$ac_t""ok" 1>&6
  2094. else
  2095.   
  2096.         echo "$ac_t""buggy" 1>&6
  2097.         tcl_ok=0
  2098.     
  2099. fi
  2100. fi
  2101. rm -fr conftest*
  2102. fi
  2103. rm -f core
  2104. if test "$tcl_ok" = 0; then
  2105.     cat >> confdefs.h <<\EOF
  2106. #define vfork fork
  2107. EOF
  2108.  
  2109. fi
  2110.  
  2111. #--------------------------------------------------------------------
  2112. #    Check whether there is an strncasecmp function on this system.
  2113. #    This is a bit tricky because under SCO it's in the socket
  2114. #    library.
  2115. #--------------------------------------------------------------------
  2116.  
  2117. echo $ac_n "checking for strncasecmp""... $ac_c" 1>&6
  2118. if eval "test \"`echo '$''{'ac_cv_func_strncasecmp'+set}'`\" = set"; then
  2119.   echo $ac_n "(cached) $ac_c" 1>&6
  2120. else
  2121.   cat > conftest.$ac_ext <<EOF
  2122. #line 2123 "configure"
  2123. #include "confdefs.h"
  2124. /* System header to define __stub macros and hopefully few prototypes,
  2125.     which can conflict with char strncasecmp(); below.  */
  2126. #include <assert.h>
  2127. /* Override any gcc2 internal prototype to avoid an error.  */
  2128. char strncasecmp(); 
  2129.  
  2130. int main() { return 0; }
  2131. int t() {
  2132.  
  2133. /* The GNU C library defines this for functions which it implements
  2134.     to always fail with ENOSYS.  Some functions are actually named
  2135.     something starting with __ and the normal name is an alias.  */
  2136. #if defined (__stub_strncasecmp) || defined (__stub___strncasecmp)
  2137. choke me
  2138. #else
  2139. strncasecmp();
  2140. #endif
  2141.  
  2142. ; return 0; }
  2143. EOF
  2144. if eval $ac_link; then
  2145.   rm -rf conftest*
  2146.   eval "ac_cv_func_strncasecmp=yes"
  2147. else
  2148.   rm -rf conftest*
  2149.   eval "ac_cv_func_strncasecmp=no"
  2150. fi
  2151. rm -f conftest*
  2152.  
  2153. fi
  2154. if eval "test \"`echo '$ac_cv_func_'strncasecmp`\" = yes"; then
  2155.   echo "$ac_t""yes" 1>&6
  2156.   :
  2157. else
  2158.   echo "$ac_t""no" 1>&6
  2159. echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
  2160. if eval "test \"`echo '$''{'ac_cv_lib_socket'+set}'`\" = set"; then
  2161.   echo $ac_n "(cached) $ac_c" 1>&6
  2162. else
  2163.   ac_save_LIBS="$LIBS"
  2164. LIBS="-lsocket  $LIBS"
  2165. cat > conftest.$ac_ext <<EOF
  2166. #line 2167 "configure"
  2167. #include "confdefs.h"
  2168.  
  2169. int main() { return 0; }
  2170. int t() {
  2171. strncasecmp()
  2172. ; return 0; }
  2173. EOF
  2174. if eval $ac_link; then
  2175.   rm -rf conftest*
  2176.   eval "ac_cv_lib_socket=yes"
  2177. else
  2178.   rm -rf conftest*
  2179.   eval "ac_cv_lib_socket=no"
  2180. fi
  2181. rm -f conftest*
  2182. LIBS="$ac_save_LIBS"
  2183.  
  2184. fi
  2185. if eval "test \"`echo '$ac_cv_lib_'socket`\" = yes"; then
  2186.   echo "$ac_t""yes" 1>&6
  2187.     ac_tr_lib=HAVE_LIB`echo socket | tr 'a-z' 'A-Z'`
  2188.   cat >> confdefs.h <<EOF
  2189. #define $ac_tr_lib 1
  2190. EOF
  2191.  
  2192.   LIBS="-lsocket $LIBS"
  2193.  
  2194. else
  2195.   echo "$ac_t""no" 1>&6
  2196. LIBOBJS="$LIBOBJS strncasecmp.o"
  2197. fi
  2198.  
  2199. fi
  2200.  
  2201.  
  2202. #--------------------------------------------------------------------
  2203. #    The code below deals with several issues related to gettimeofday:
  2204. #    1. Some systems don't provide a gettimeofday function at all
  2205. #       (set NO_GETTOD if this is the case).
  2206. #    2. SGI systems don't use the BSD form of the gettimeofday function,
  2207. #       but they have a BSDgettimeofday function that can be used instead.
  2208. #    3. See if gettimeofday is declared in the <sys/time.h> header file.
  2209. #       if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can
  2210. #       declare it.
  2211. #--------------------------------------------------------------------
  2212.  
  2213. echo $ac_n "checking for BSDgettimeofday""... $ac_c" 1>&6
  2214. if eval "test \"`echo '$''{'ac_cv_func_BSDgettimeofday'+set}'`\" = set"; then
  2215.   echo $ac_n "(cached) $ac_c" 1>&6
  2216. else
  2217.   cat > conftest.$ac_ext <<EOF
  2218. #line 2219 "configure"
  2219. #include "confdefs.h"
  2220. /* System header to define __stub macros and hopefully few prototypes,
  2221.     which can conflict with char BSDgettimeofday(); below.  */
  2222. #include <assert.h>
  2223. /* Override any gcc2 internal prototype to avoid an error.  */
  2224. char BSDgettimeofday(); 
  2225.  
  2226. int main() { return 0; }
  2227. int t() {
  2228.  
  2229. /* The GNU C library defines this for functions which it implements
  2230.     to always fail with ENOSYS.  Some functions are actually named
  2231.     something starting with __ and the normal name is an alias.  */
  2232. #if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday)
  2233. choke me
  2234. #else
  2235. BSDgettimeofday();
  2236. #endif
  2237.  
  2238. ; return 0; }
  2239. EOF
  2240. if eval $ac_link; then
  2241.   rm -rf conftest*
  2242.   eval "ac_cv_func_BSDgettimeofday=yes"
  2243. else
  2244.   rm -rf conftest*
  2245.   eval "ac_cv_func_BSDgettimeofday=no"
  2246. fi
  2247. rm -f conftest*
  2248.  
  2249. fi
  2250. if eval "test \"`echo '$ac_cv_func_'BSDgettimeofday`\" = yes"; then
  2251.   echo "$ac_t""yes" 1>&6
  2252.   cat >> confdefs.h <<\EOF
  2253. #define HAVE_BSDGETTIMEOFDAY 1
  2254. EOF
  2255.  
  2256. else
  2257.   echo "$ac_t""no" 1>&6
  2258. echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
  2259. if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
  2260.   echo $ac_n "(cached) $ac_c" 1>&6
  2261. else
  2262.   cat > conftest.$ac_ext <<EOF
  2263. #line 2264 "configure"
  2264. #include "confdefs.h"
  2265. /* System header to define __stub macros and hopefully few prototypes,
  2266.     which can conflict with char gettimeofday(); below.  */
  2267. #include <assert.h>
  2268. /* Override any gcc2 internal prototype to avoid an error.  */
  2269. char gettimeofday(); 
  2270.  
  2271. int main() { return 0; }
  2272. int t() {
  2273.  
  2274. /* The GNU C library defines this for functions which it implements
  2275.     to always fail with ENOSYS.  Some functions are actually named
  2276.     something starting with __ and the normal name is an alias.  */
  2277. #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
  2278. choke me
  2279. #else
  2280. gettimeofday();
  2281. #endif
  2282.  
  2283. ; return 0; }
  2284. EOF
  2285. if eval $ac_link; then
  2286.   rm -rf conftest*
  2287.   eval "ac_cv_func_gettimeofday=yes"
  2288. else
  2289.   rm -rf conftest*
  2290.   eval "ac_cv_func_gettimeofday=no"
  2291. fi
  2292. rm -f conftest*
  2293.  
  2294. fi
  2295. if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
  2296.   echo "$ac_t""yes" 1>&6
  2297.   :
  2298. else
  2299.   echo "$ac_t""no" 1>&6
  2300. cat >> confdefs.h <<\EOF
  2301. #define NO_GETTOD 1
  2302. EOF
  2303.  
  2304. fi
  2305.  
  2306. fi
  2307.  
  2308. echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6
  2309. cat > conftest.$ac_ext <<EOF
  2310. #line 2311 "configure"
  2311. #include "confdefs.h"
  2312. #include <sys/time.h>
  2313. EOF
  2314. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2315.   egrep "gettimeofday" >/dev/null 2>&1; then
  2316.   rm -rf conftest*
  2317.   echo "$ac_t""present" 1>&6
  2318. else
  2319.   rm -rf conftest*
  2320.   
  2321.     echo "$ac_t""missing" 1>&6
  2322.     cat >> confdefs.h <<\EOF
  2323. #define GETTOD_NOT_DECLARED 1
  2324. EOF
  2325.  
  2326.  
  2327. fi
  2328. rm -f conftest*
  2329.  
  2330.  
  2331. trap '' 1 2 15
  2332. cat > confcache <<\EOF
  2333. # This file is a shell script that caches the results of configure
  2334. # tests run on this system so they can be shared between configure
  2335. # scripts and configure runs.  It is not useful on other systems.
  2336. # If it contains results you don't want to keep, you may remove or edit it.
  2337. #
  2338. # By default, configure uses ./config.cache as the cache file,
  2339. # creating it if it does not exist already.  You can give configure
  2340. # the --cache-file=FILE option to use a different cache file; that is
  2341. # what configure does when it calls configure scripts in
  2342. # subdirectories, so they share the cache.
  2343. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2344. # config.status only pays attention to the cache file if you give it the
  2345. # --recheck option to rerun configure.
  2346. #
  2347. EOF
  2348. # Ultrix sh set writes to stderr and can't be redirected directly,
  2349. # and sets the high bit in the cache file unless we assign to the vars.
  2350. (set) 2>&1 |
  2351.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  2352.   >> confcache
  2353. if cmp -s $cache_file confcache; then
  2354.   :
  2355. else
  2356.   if test -w $cache_file; then
  2357.     echo "updating cache $cache_file"
  2358.     cat confcache > $cache_file
  2359.   else
  2360.     echo "not updating unwritable cache $cache_file"
  2361.   fi
  2362. fi
  2363. rm -f confcache
  2364.  
  2365. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  2366.  
  2367. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  2368. # Let make expand exec_prefix.
  2369. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  2370.  
  2371. # Any assignment to VPATH causes Sun make to only execute
  2372. # the first set of double-colon rules, so remove it if not needed.
  2373. # If there is a colon in the path, we need to keep it.
  2374. if test "x$srcdir" = x.; then
  2375.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2376. fi
  2377.  
  2378. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  2379.  
  2380. # Transform confdefs.h into DEFS.
  2381. # Protect against shell expansion while executing Makefile rules.
  2382. # Protect against Makefile macro expansion.
  2383. cat > conftest.defs <<\EOF
  2384. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
  2385. s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
  2386. s%\[%\\&%g
  2387. s%\]%\\&%g
  2388. s%\$%$$%g
  2389. EOF
  2390. DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
  2391. rm -f conftest.defs
  2392.  
  2393.  
  2394. # Without the "./", some shells look in PATH for config.status.
  2395. : ${CONFIG_STATUS=./config.status}
  2396.  
  2397. echo creating $CONFIG_STATUS
  2398. rm -f $CONFIG_STATUS
  2399. cat > $CONFIG_STATUS <<EOF
  2400. #! /bin/sh
  2401. # Generated automatically by configure.
  2402. # Run this file to recreate the current configuration.
  2403. # This directory was configured as follows,
  2404. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2405. #
  2406. # $0 $ac_configure_args
  2407. #
  2408. # Compiler output produced by configure, useful for debugging
  2409. # configure, is in ./config.log if it exists.
  2410.  
  2411. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  2412. for ac_option
  2413. do
  2414.   case "\$ac_option" in
  2415.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2416.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  2417.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  2418.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2419.     echo "$CONFIG_STATUS generated by autoconf version 2.2"
  2420.     exit 0 ;;
  2421.   -help | --help | --hel | --he | --h)
  2422.     echo "\$ac_cs_usage"; exit 0 ;;
  2423.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2424.   esac
  2425. done
  2426.  
  2427. ac_given_srcdir=$srcdir
  2428. ac_given_INSTALL="$INSTALL"
  2429.  
  2430. trap 'rm -f Makefile; exit 1' 1 2 15
  2431.  
  2432. # Protect against being on the right side of a sed subst in config.status. 
  2433. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  2434.  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  2435. $ac_vpsub
  2436. $extrasub
  2437. s%@CFLAGS@%$CFLAGS%g
  2438. s%@CPPFLAGS@%$CPPFLAGS%g
  2439. s%@CXXFLAGS@%$CXXFLAGS%g
  2440. s%@DEFS@%$DEFS%g
  2441. s%@LDFLAGS@%$LDFLAGS%g
  2442. s%@LIBS@%$LIBS%g
  2443. s%@exec_prefix@%$exec_prefix%g
  2444. s%@prefix@%$prefix%g
  2445. s%@program_transform_name@%$program_transform_name%g
  2446. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  2447. s%@INSTALL_DATA@%$INSTALL_DATA%g
  2448. s%@RANLIB@%$RANLIB%g
  2449. s%@TCLSH@%$TCLSH%g
  2450. s%@CC@%$CC%g
  2451. s%@LIBOBJS@%$LIBOBJS%g
  2452. s%@MATH_LIBS@%$MATH_LIBS%g
  2453. s%@CPP@%$CPP%g
  2454.  
  2455. CEOF
  2456. EOF
  2457. cat >> $CONFIG_STATUS <<EOF
  2458.  
  2459. CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  2460. EOF
  2461. cat >> $CONFIG_STATUS <<\EOF
  2462. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2463.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  2464.   case "$ac_file" in
  2465.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  2466.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2467.   *) ac_file_in="${ac_file}.in" ;;
  2468.   esac
  2469.  
  2470.   # Adjust relative srcdir, etc. for subdirectories.
  2471.  
  2472.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2473.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2474.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2475.     # The file is in a subdirectory.
  2476.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2477.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  2478.     # A "../" for each directory in $ac_dir_suffix.
  2479.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2480.   else
  2481.     ac_dir_suffix= ac_dots=
  2482.   fi
  2483.  
  2484.   case "$ac_given_srcdir" in
  2485.   .)  srcdir=.
  2486.       if test -z "$ac_dots"; then top_srcdir=.
  2487.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2488.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2489.   *) # Relative path.
  2490.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2491.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2492.   esac
  2493.  
  2494.   case "$ac_given_INSTALL" in
  2495.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  2496.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  2497.   esac
  2498.   echo creating "$ac_file"
  2499.   rm -f "$ac_file"
  2500.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  2501.   case "$ac_file" in
  2502.   *Makefile*) ac_comsub="1i\\
  2503. # $configure_input" ;;
  2504.   *) ac_comsub= ;;
  2505.   esac
  2506.   sed -e "$ac_comsub
  2507. s%@configure_input@%$configure_input%g
  2508. s%@srcdir@%$srcdir%g
  2509. s%@top_srcdir@%$top_srcdir%g
  2510. s%@INSTALL@%$INSTALL%g
  2511. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  2512. fi; done
  2513. rm -f conftest.subs
  2514.  
  2515.  
  2516.  
  2517. exit 0
  2518. EOF
  2519. chmod +x $CONFIG_STATUS
  2520. rm -fr confdefs* $ac_clean_files
  2521. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  2522.  
  2523.