home *** CD-ROM | disk | FTP | other *** search
/ Serving the Web / ServingTheWeb1995.disc1of1.iso / linux / slacksrce / tcl / tcl+tk+t / tclx7.3bl / tclx7 / tclX7.3b / configure < prev    next >
Encoding:
Text File  |  1994-07-16  |  74.8 KB  |  2,738 lines

  1. #!/bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf version 1.9 
  4. # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
  5.  
  6. # This configure script is free software; you can redistribute it and/or
  7. # modify it under the terms of the GNU General Public License as published
  8. # by the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10.  
  11. # This script is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
  14. # Public License for more details.
  15.  
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. # Save the original args to write them into config.status later.
  21. configure_args="$*"
  22.  
  23. # Only options that might do something get documented.
  24. ac_usage="Usage: configure [options] [host]
  25. Options: [defaults in brackets after descriptions]
  26. --build=BUILD        configure for building on BUILD [BUILD=HOST]
  27. --disable-FEATURE    do not include FEATURE (same as --enable-FEATURE=no)
  28. --enable-FEATURE[=ARG]    include FEATURE [ARG=yes]
  29. --exec-prefix=PREFIX    install host dependent files in PREFIX [/usr/local]
  30. --help            print this message
  31. --host=HOST        configure for HOST [guessed]
  32. --prefix=PREFIX        install host independent files in PREFIX [/usr/local]
  33. --quiet, --silent    do not print \`checking for...' messages
  34. --srcdir=DIR        find the sources in DIR [configure dir or ..]
  35. --target=TARGET        configure for TARGET [TARGET=HOST]
  36. --verbose        print results of checks
  37. --version        print the version of autoconf that created configure
  38. --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  39. --without-PACKAGE    do not use PACKAGE (same as --with-PACKAGE=no)
  40. --x-includes=DIR    X include files are in DIR
  41. --x-libraries=DIR    X library files are in DIR"
  42.  
  43. # Initialize some variables set by options.
  44. # The variables have the same names as the options, with
  45. # dashes changed to underlines.
  46. build=NONE
  47. exec_prefix=
  48. host=NONE
  49. no_create=
  50. nonopt=NONE
  51. norecursion=
  52. prefix=
  53. program_prefix=
  54. program_suffix=
  55. program_transform_name=
  56. silent=
  57. srcdir=
  58. target=NONE
  59. verbose=
  60. x_includes=
  61. x_libraries=
  62.  
  63. ac_prev=
  64. for ac_option
  65. do
  66.  
  67.   # If the previous option needs an argument, assign it.
  68.   if test -n "$ac_prev"; then
  69.     eval "$ac_prev=\$ac_option"
  70.     ac_prev=
  71.     continue
  72.   fi
  73.  
  74.   # Accept (but ignore some of) the important Cygnus configure
  75.   # options, so we can diagnose typos.
  76.  
  77.   case "$ac_option" in
  78.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  79.   *) ac_optarg= ;;
  80.   esac
  81.  
  82.   case "$ac_option" in
  83.  
  84.   -build | --build | --buil | --bui | --bu | --b)
  85.     ac_prev=build ;;
  86.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  87.     build="$ac_optarg" ;;
  88.  
  89.   -disable-* | --disable-*)
  90.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  91.     # Reject names that aren't valid shell variable names.
  92.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  93.       echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  94.     fi
  95.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  96.     eval "enable_${ac_feature}=no" ;;
  97.  
  98.   -enable-* | --enable-*)
  99.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  100.     # Reject names that aren't valid shell variable names.
  101.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  102.       echo "configure: $ac_feature: invalid feature name" >&2; exit 1
  103.     fi
  104.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  105.     case "$ac_option" in
  106.       *=*) ;;
  107.       *) ac_optarg=yes ;;
  108.     esac
  109.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  110.  
  111.   # For backward compatibility, recognize -exec-prefix and --exec_prefix.
  112.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  113.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  114.   | --exec | --exe | --ex)
  115.     ac_prev=exec_prefix ;;
  116.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  117.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  118.   | --exec=* | --exe=* | --ex=*)
  119.     exec_prefix="$ac_optarg" ;;
  120.  
  121.   -gas | --gas | --ga | --g)
  122.     with_gas=yes ;; # Obsolete; use --with-gas.
  123.  
  124.   -help | --help | --hel | --he)
  125.     cat << EOF
  126. $ac_usage
  127. EOF
  128.     exit 0 ;;
  129.  
  130.   -host | --host | --hos | --ho)
  131.     ac_prev=host ;;
  132.   -host=* | --host=* | --hos=* | --ho=*)
  133.     host="$ac_optarg" ;;
  134.  
  135.   -nfp | --nfp | --nf)
  136.     with_fp=no ;; # Obsolete; use --without-fp.
  137.  
  138.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  139.   | --no-cr | --no-c)
  140.     no_create=yes ;;
  141.  
  142.   -norecursion | --norecursion | --norecursio | --norecursi \
  143.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor)
  144.     norecursion=yes ;;
  145.  
  146.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  147.     ac_prev=prefix ;;
  148.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  149.     prefix="$ac_optarg" ;;
  150.  
  151.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  152.   | --program-pre | --program-pr | --program-p)
  153.     ac_prev=program_prefix ;;
  154.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  155.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  156.     program_prefix="$ac_optarg" ;;
  157.  
  158.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  159.   | --program-suf | --program-su | --program-s)
  160.     ac_prev=program_suffix ;;
  161.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  162.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  163.     program_suffix="$ac_optarg" ;;
  164.  
  165.   -program-transform-name | --program-transform-name \
  166.   | --program-transform-nam | --program-transform-na \
  167.   | --program-transform-n | --program-transform- \
  168.   | --program-transform | --program-transfor \
  169.   | --program-transfo | --program-transf \
  170.   | --program-trans | --program-tran \
  171.   | --progr-tra | --program-tr | --program-t)
  172.     ac_prev=program_transform_name ;;
  173.   -program-transform-name=* | --program-transform-name=* \
  174.   | --program-transform-nam=* | --program-transform-na=* \
  175.   | --program-transform-n=* | --program-transform-=* \
  176.   | --program-transform=* | --program-transfor=* \
  177.   | --program-transfo=* | --program-transf=* \
  178.   | --program-trans=* | --program-tran=* \
  179.   | --progr-tra=* | --program-tr=* | --program-t=*)
  180.     program_transform_name="$ac_optarg" ;;
  181.  
  182.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  183.   | -silent | --silent | --silen | --sile | --sil)
  184.     silent=yes ;;
  185.  
  186.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  187.     ac_prev=srcdir ;;
  188.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  189.     srcdir="$ac_optarg" ;;
  190.  
  191.   -target | --target | --targe | --targ | --tar | --ta | --t)
  192.     ac_prev=target ;;
  193.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  194.     target="$ac_optarg" ;;
  195.  
  196.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  197.     verbose=yes ;;
  198.  
  199.   -version | --version | --versio | --versi | --vers)
  200.     echo "configure generated by autoconf version 1.9"
  201.     exit 0 ;;
  202.  
  203.   -with-* | --with-*)
  204.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  205.     # Reject names that aren't valid shell variable names.
  206.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  207.       echo "configure: $ac_package: invalid package name" >&2; exit 1
  208.     fi
  209.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  210.     case "$ac_option" in
  211.       *=*) ;;
  212.       *) ac_optarg=yes ;;
  213.     esac
  214.     eval "with_${ac_package}='$ac_optarg'" ;;
  215.  
  216.   -without-* | --without-*)
  217.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  218.     # Reject names that aren't valid shell variable names.
  219.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  220.       echo "configure: $ac_package: invalid package name" >&2; exit 1
  221.     fi
  222.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  223.     eval "with_${ac_package}=no" ;;
  224.  
  225.   --x) with_x=yes ;; # Obsolete; use --with-x.
  226.  
  227.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  228.   | --x-incl | --x-inc | --x-in | --x-i)
  229.     ac_prev=x_includes ;;
  230.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  231.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  232.     x_includes="$ac_optarg" ;;
  233.  
  234.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  235.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  236.     ac_prev=x_libraries ;;
  237.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  238.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  239.     x_libraries="$ac_optarg" ;;
  240.  
  241.   -*) echo "configure: $ac_option: invalid option; use --help to show usage" >&2; exit 1
  242.     ;;
  243.  
  244.   *) 
  245.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  246.       echo "configure: warning: $ac_option: invalid host type" >&2
  247.     fi
  248.     if test "x$nonopt" != xNONE; then
  249.       echo "configure: can only configure for one host and one target at a time" >&2; exit 1
  250.     fi
  251.     nonopt="$ac_option"
  252.     ;;
  253.  
  254.   esac
  255. done
  256.  
  257. if test -n "$ac_prev"; then
  258.   echo "configure: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" >&2; exit 1
  259. fi
  260.  
  261. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  262. trap 'rm -fr confdefs* $ac_clean_files' 0
  263.  
  264. # Save the original args if we used an alternate arg parser.
  265. ac_configure_temp="${configure_args-$*}"
  266. # Strip out --no-create and --norecursion so they don't pile up.
  267. configure_args=
  268. for ac_arg in $ac_configure_temp; do
  269.   case "$ac_arg" in
  270.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  271.   | --no-cr | --no-c) ;;
  272.   -norecursion | --norecursion | --norecursio | --norecursi \
  273.   | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;;
  274.   *) configure_args="$configure_args $ac_arg" ;;
  275.   esac
  276. done
  277.  
  278. # NLS nuisances.
  279. # These must not be set unconditionally because not all systems understand
  280. # e.g. LANG=C (notably SCO).
  281. if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi
  282. if test "${LANG+set}"   = 'set'; then LANG=C;   export LANG;   fi
  283.  
  284. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  285. rm -rf conftest* confdefs.h
  286. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  287. echo > confdefs.h
  288.  
  289. # A filename unique to this package, relative to the directory that
  290. # configure is in, which we can look for to find out if srcdir is correct.
  291. ac_unique_file=src/tclExtend.h
  292.  
  293. # Find the source files, if location was not specified.
  294. if test -z "$srcdir"; then
  295.   ac_srcdir_defaulted=yes
  296.   # Try the directory containing this script, then `..'.
  297.   ac_prog=$0
  298.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  299.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  300.   srcdir=$ac_confdir
  301.   if test ! -r $srcdir/$ac_unique_file; then
  302.     srcdir=..
  303.   fi
  304. fi
  305. if test ! -r $srcdir/$ac_unique_file; then
  306.   if test x$ac_srcdir_defaulted = xyes; then
  307.     echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1
  308.   else
  309.     echo "configure: can not find sources in ${srcdir}" >&2; exit 1
  310.   fi
  311. fi
  312. ac_ext=c
  313. ac_cpp='${CPP} $CFLAGS'
  314. ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
  315.  
  316.  
  317. #!/bin/sh
  318. # From configure.in Revision: 3.17 
  319.  
  320.  
  321.  
  322. #------------------------------------------------------------------------------
  323. #      Check command line looking for the --arch= option.
  324. #------------------------------------------------------------------------------
  325.  
  326. # check whether --with-arch or --without-arch was given.
  327. withval="$with_arch"
  328. if test -n "$withval"; then
  329.   TCL_ARCH=.$withval
  330. fi
  331.  
  332. if test x$TCL_ARCH = x
  333. then
  334.   echo "No architecture suffix will be used"
  335. else
  336.   echo "An architecture suffix of \"$TCL_ARCH\" will be appended to bin and lib directories."
  337. fi
  338.  
  339.  
  340. #------------------------------------------------------------------------------
  341. #       Check for various programs used during the build.
  342. #------------------------------------------------------------------------------
  343.  
  344. for ac_prog in 'bison -y' byacc
  345. do
  346. if test -z "$YACC"; then
  347.   # Extract the first word of `$ac_prog', so it can be a program name with args.
  348.   set ac_dummy $ac_prog; ac_word=$2
  349.   test -n "$silent" || echo "checking for $ac_word"
  350.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  351.   for ac_dir in $PATH; do
  352.     test -z "$ac_dir" && ac_dir=.
  353.     if test -f $ac_dir/$ac_word; then
  354.       YACC="$ac_prog"
  355.       break
  356.     fi
  357.   done
  358.   IFS="$ac_save_ifs"
  359. fi
  360.  
  361. test -n "$YACC" && test -n "$verbose" && echo "    setting YACC to $YACC"
  362.  
  363. test -n "$YACC" && break
  364. done
  365. test -n "$YACC" || YACC="yacc"
  366.  
  367. if test -z "$RANLIB"; then
  368.   # Extract the first word of `ranlib', so it can be a program name with args.
  369.   set ac_dummy ranlib; ac_word=$2
  370.   test -n "$silent" || echo "checking for $ac_word"
  371.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  372.   for ac_dir in $PATH; do
  373.     test -z "$ac_dir" && ac_dir=.
  374.     if test -f $ac_dir/$ac_word; then
  375.       RANLIB="ranlib"
  376.       break
  377.     fi
  378.   done
  379.   IFS="$ac_save_ifs"
  380. fi
  381. test -z "$RANLIB" && RANLIB=":"
  382. test -n "$RANLIB" && test -n "$verbose" && echo "    setting RANLIB to $RANLIB"
  383.  
  384. CC=${CC-cc}
  385.  
  386. if test -z "$MCS_CMD"; then
  387.   # Extract the first word of `"mcs"', so it can be a program name with args.
  388.   set ac_dummy "mcs"; ac_word=$2
  389.   test -n "$silent" || echo "checking for $ac_word"
  390.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  391.   for ac_dir in $PATH; do
  392.     test -z "$ac_dir" && ac_dir=.
  393.     if test -f $ac_dir/$ac_word; then
  394.       MCS_CMD="mcs -d"
  395.       break
  396.     fi
  397.   done
  398.   IFS="$ac_save_ifs"
  399. fi
  400. test -z "$MCS_CMD" && MCS_CMD="touch"
  401. test -n "$MCS_CMD" && test -n "$verbose" && echo "    setting MCS_CMD to $MCS_CMD"
  402.  
  403.  
  404. #------------------------------------------------------------------------------
  405. # Purge the specific set of files that must be rebuild if the arch or prefix
  406. # flags are changed.
  407. #------------------------------------------------------------------------------
  408.  
  409. rm -f tclmaster/bin*/* tclmaster/lib*/* tclmaster/src/SYSLIBS* 2>/dev/null
  410. rm -f tkmaster/bin*/* tkmaster/lib*/* tkmaster/src/SYSLIBS* 2>/dev/null
  411. rm -f src/tclCmdIL.o src/tclXinit.o tksrc/tkWindow.o  */*.tmp 2>/dev/null
  412.  
  413. #------------------------------------------------------------------------------
  414. #       Some versions of Sun OS require -ldl to link anything, even the
  415. #       small, empty programs generated by configure.  I don't know why, but
  416. #       we must check for it up front or other configure tests will fail.
  417. #------------------------------------------------------------------------------
  418.  
  419. ac_save_LIBS="${LIBS}"
  420. LIBS="${LIBS} -ldl"
  421. ac_have_lib=""
  422. test -n "$silent" || echo "checking for -ldl"
  423. cat > conftest.${ac_ext} <<EOF
  424. #include "confdefs.h"
  425.  
  426. int main() { return 0; }
  427. int t() { main();; return 0; }
  428. EOF
  429. if eval $ac_compile; then
  430.   rm -rf conftest*
  431.   ac_have_lib="1"
  432.  
  433. fi
  434. rm -f conftest*
  435. LIBS="${ac_save_LIBS}"
  436. if test -n "${ac_have_lib}"; then
  437.    :; LIBS="$LIBS -ldl"
  438. else
  439.    :; 
  440. fi
  441.  
  442.  
  443.  
  444. #------------------------------------------------------------------------------
  445. #       Check for the existence of various libraries.  The order here
  446. #       is important, so that then end up in the right order in the
  447. #       command line generated by make.  On some SVR4, -lsocket must be
  448. #       used with -lnsl, so a special check with both libraries, or the
  449. #       check just fails since it doesn't link (yea, its strange).
  450. #------------------------------------------------------------------------------
  451.  
  452. ac_save_LIBS="${LIBS}"
  453. LIBS="${LIBS} -lXbsd"
  454. ac_have_lib=""
  455. test -n "$silent" || echo "checking for -lXbsd"
  456. cat > conftest.${ac_ext} <<EOF
  457. #include "confdefs.h"
  458.  
  459. int main() { return 0; }
  460. int t() { main();; return 0; }
  461. EOF
  462. if eval $ac_compile; then
  463.   rm -rf conftest*
  464.   ac_have_lib="1"
  465.  
  466. fi
  467. rm -f conftest*
  468. LIBS="${ac_save_LIBS}"
  469. if test -n "${ac_have_lib}"; then
  470.    :; LIBS="$LIBS -lXbsd"
  471. else
  472.    :; 
  473. fi
  474.  
  475.  
  476. socket_libs=""
  477. SAVED_LIBS=$LIBS
  478. LIBS="$LIBS -lsocket"
  479. ac_save_LIBS="${LIBS}"
  480. LIBS="${LIBS} -lnsl"
  481. ac_have_lib=""
  482. test -n "$silent" || echo "checking for -lnsl"
  483. cat > conftest.${ac_ext} <<EOF
  484. #include "confdefs.h"
  485.  
  486. int main() { return 0; }
  487. int t() { main();; return 0; }
  488. EOF
  489. if eval $ac_compile; then
  490.   rm -rf conftest*
  491.   ac_have_lib="1"
  492.  
  493. fi
  494. rm -f conftest*
  495. LIBS="${ac_save_LIBS}"
  496. if test -n "${ac_have_lib}"; then
  497.    :; socket_libs="-lsocket -lnsl"
  498. else
  499.    :; 
  500. fi
  501.  
  502. LIBS=$SAVED_LIBS
  503. if test -z "$socket_libs"; then
  504.     ac_save_LIBS="${LIBS}"
  505. LIBS="${LIBS} -lsocket"
  506. ac_have_lib=""
  507. test -n "$silent" || echo "checking for -lsocket"
  508. cat > conftest.${ac_ext} <<EOF
  509. #include "confdefs.h"
  510.  
  511. int main() { return 0; }
  512. int t() { main();; return 0; }
  513. EOF
  514. if eval $ac_compile; then
  515.   rm -rf conftest*
  516.   ac_have_lib="1"
  517.  
  518. fi
  519. rm -f conftest*
  520. LIBS="${ac_save_LIBS}"
  521. if test -n "${ac_have_lib}"; then
  522.    :; socket_libs="$socket_libs -lsocket"
  523. else
  524.    :; 
  525. fi
  526.  
  527.     ac_save_LIBS="${LIBS}"
  528. LIBS="${LIBS} -lnsl"
  529. ac_have_lib=""
  530. test -n "$silent" || echo "checking for -lnsl"
  531. cat > conftest.${ac_ext} <<EOF
  532. #include "confdefs.h"
  533.  
  534. int main() { return 0; }
  535. int t() { main();; return 0; }
  536. EOF
  537. if eval $ac_compile; then
  538.   rm -rf conftest*
  539.   ac_have_lib="1"
  540.  
  541. fi
  542. rm -f conftest*
  543. LIBS="${ac_save_LIBS}"
  544. if test -n "${ac_have_lib}"; then
  545.    :; socket_libs="$socket_libs -lnsl"
  546. else
  547.    :; 
  548. fi
  549.  
  550. fi
  551. LIBS="$LIBS $socket_libs"
  552.  
  553. ac_save_LIBS="${LIBS}"
  554. LIBS="${LIBS} -lbsd"
  555. ac_have_lib=""
  556. test -n "$silent" || echo "checking for -lbsd"
  557. cat > conftest.${ac_ext} <<EOF
  558. #include "confdefs.h"
  559.  
  560. int main() { return 0; }
  561. int t() { main();; return 0; }
  562. EOF
  563. if eval $ac_compile; then
  564.   rm -rf conftest*
  565.   ac_have_lib="1"
  566.  
  567. fi
  568. rm -f conftest*
  569. LIBS="${ac_save_LIBS}"
  570. if test -n "${ac_have_lib}"; then
  571.    :; LIBS="$LIBS -lbsd"
  572. else
  573.    :; 
  574. fi
  575.  
  576.  
  577. #------------------------------------------------------------------------------
  578. #       Check for additional libraries the Tcl/Tk does not check for.
  579. #------------------------------------------------------------------------------
  580.  
  581. ac_save_LIBS="${LIBS}"
  582. LIBS="${LIBS} -lsun"
  583. ac_have_lib=""
  584. test -n "$silent" || echo "checking for -lsun"
  585. cat > conftest.${ac_ext} <<EOF
  586. #include "confdefs.h"
  587.  
  588. int main() { return 0; }
  589. int t() { main();; return 0; }
  590. EOF
  591. if eval $ac_compile; then
  592.   rm -rf conftest*
  593.   ac_have_lib="1"
  594.  
  595. fi
  596. rm -f conftest*
  597. LIBS="${ac_save_LIBS}"
  598. if test -n "${ac_have_lib}"; then
  599.    :; LIBS="$LIBS -lsun"
  600. else
  601.    :; 
  602. fi
  603.  
  604. ac_save_LIBS="${LIBS}"
  605. LIBS="${LIBS} -lc_s"
  606. ac_have_lib=""
  607. test -n "$silent" || echo "checking for -lc_s"
  608. cat > conftest.${ac_ext} <<EOF
  609. #include "confdefs.h"
  610.  
  611. int main() { return 0; }
  612. int t() { main();; return 0; }
  613. EOF
  614. if eval $ac_compile; then
  615.   rm -rf conftest*
  616.   ac_have_lib="1"
  617.  
  618. fi
  619. rm -f conftest*
  620. LIBS="${ac_save_LIBS}"
  621. if test -n "${ac_have_lib}"; then
  622.    :; LIBS="$LIBS -lc_s"
  623. else
  624.    :; 
  625. fi
  626.  
  627. ac_save_LIBS="${LIBS}"
  628. LIBS="${LIBS} -lieee"
  629. ac_have_lib=""
  630. test -n "$silent" || echo "checking for -lieee"
  631. cat > conftest.${ac_ext} <<EOF
  632. #include "confdefs.h"
  633.  
  634. int main() { return 0; }
  635. int t() { main();; return 0; }
  636. EOF
  637. if eval $ac_compile; then
  638.   rm -rf conftest*
  639.   ac_have_lib="1"
  640.  
  641. fi
  642. rm -f conftest*
  643. LIBS="${ac_save_LIBS}"
  644. if test -n "${ac_have_lib}"; then
  645.    :; LIBS="$LIBS -lieee"
  646. else
  647.    :; 
  648. fi
  649.  
  650.  
  651. # This is needed for DEC Alphas
  652. ac_save_LIBS="${LIBS}"
  653. LIBS="${LIBS} -ldnet_stub"
  654. ac_have_lib=""
  655. test -n "$silent" || echo "checking for -ldnet_stub"
  656. cat > conftest.${ac_ext} <<EOF
  657. #include "confdefs.h"
  658.  
  659. int main() { return 0; }
  660. int t() { main();; return 0; }
  661. EOF
  662. if eval $ac_compile; then
  663.   rm -rf conftest*
  664.   ac_have_lib="1"
  665.  
  666. fi
  667. rm -f conftest*
  668. LIBS="${ac_save_LIBS}"
  669. if test -n "${ac_have_lib}"; then
  670.    :; LIBS="$LIBS -ldnet_stub"
  671. else
  672.    :; 
  673. fi
  674.  
  675.  
  676. #------------------------------------------------------------------------------
  677. #       Some make programs require includes to be 
  678. #         .include "file"
  679. #     others...
  680. #         include file
  681. #------------------------------------------------------------------------------
  682.  
  683. echo checking how make handles includes
  684. rm -fr conftestdir
  685. if mkdir conftestdir; then
  686.   cd conftestdir
  687.   cat > Makeinclude <<EOF
  688.  
  689. EOF
  690.   cat > Makefile <<EOF
  691. include Makeinclude
  692.  
  693. all:
  694. EOF
  695.   if make >/dev/null 2>/dev/null; then
  696.     MAKEINCLUDE="include"
  697.     MAKEQUOTE=''
  698.   else
  699.     MAKEINCLUDE=".include"
  700.     MAKEQUOTE='"'
  701.   fi
  702.   cd ..
  703.   rm -fr conftestdir
  704. fi
  705.  
  706.  
  707.  
  708. #------------------------------------------------------------------------------
  709. #       Check for system header files.
  710. #------------------------------------------------------------------------------
  711.  
  712. test -n "$silent" || echo "checking for values.h"
  713. test -n "$silent" || echo "checking how to run the C preprocessor"
  714. if test -z "$CPP"; then
  715.   # This must be in double quotes, not single quotes, because CPP may get
  716.   # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  717.   # make.  It must be expanded now.
  718.   CPP="${CC-cc} -E"
  719.   cat > conftest.${ac_ext} <<EOF
  720. #include "confdefs.h"
  721. #include <stdio.h>
  722. Syntax Error
  723. EOF
  724. # Some shells (Coherent) do redirections in the wrong order, so need
  725. # the parens.
  726. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  727. if test -z "$ac_err"; then
  728.   :
  729. else
  730.   rm -rf conftest*
  731.   CPP="${CC-cc} -E -traditional-cpp"
  732.   cat > conftest.${ac_ext} <<EOF
  733. #include "confdefs.h"
  734. #include <stdio.h>
  735. Syntax Error
  736. EOF
  737. # Some shells (Coherent) do redirections in the wrong order, so need
  738. # the parens.
  739. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  740. if test -z "$ac_err"; then
  741.   :
  742. else
  743.   rm -rf conftest*
  744.   CPP=/lib/cpp
  745. fi
  746. rm -f conftest*
  747. fi
  748. rm -f conftest*
  749. fi
  750. test -n "$verbose" && echo "    setting CPP to $CPP"
  751.  
  752. cat > conftest.${ac_ext} <<EOF
  753. #include "confdefs.h"
  754. #include <values.h>
  755. EOF
  756. # Some shells (Coherent) do redirections in the wrong order, so need
  757. # the parens.
  758. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  759. if test -z "$ac_err"; then
  760.   :
  761. else
  762.   rm -rf conftest*
  763.   
  764. {
  765. test -n "$verbose" && \
  766. echo "    defining NO_VALUES_H"
  767. echo "#define" NO_VALUES_H "1" >> confdefs.h
  768. DEFS="$DEFS -DNO_VALUES_H=1"
  769. ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_VALUES_H\${ac_dB}NO_VALUES_H\${ac_dC}1\${ac_dD}
  770. \${ac_uA}NO_VALUES_H\${ac_uB}NO_VALUES_H\${ac_uC}1\${ac_uD}
  771. \${ac_eA}NO_VALUES_H\${ac_eB}NO_VALUES_H\${ac_eC}1\${ac_eD}
  772. "
  773. }
  774.  
  775. fi
  776. rm -f conftest*
  777.  
  778. test -n "$silent" || echo "checking for sys/socket.h"
  779. cat > conftest.${ac_ext} <<EOF
  780. #include "confdefs.h"
  781. #include <sys/socket.h>
  782. EOF
  783. # Some shells (Coherent) do redirections in the wrong order, so need
  784. # the parens.
  785. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  786. if test -z "$ac_err"; then
  787.   :
  788. else
  789.   rm -rf conftest*
  790.   
  791. {
  792. test -n "$verbose" && \
  793. echo "    defining NO_SYS_SOCKET_H"
  794. echo "#define" NO_SYS_SOCKET_H "1" >> confdefs.h
  795. DEFS="$DEFS -DNO_SYS_SOCKET_H=1"
  796. ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_SYS_SOCKET_H\${ac_dB}NO_SYS_SOCKET_H\${ac_dC}1\${ac_dD}
  797. \${ac_uA}NO_SYS_SOCKET_H\${ac_uB}NO_SYS_SOCKET_H\${ac_uC}1\${ac_uD}
  798. \${ac_eA}NO_SYS_SOCKET_H\${ac_eB}NO_SYS_SOCKET_H\${ac_eC}1\${ac_eD}
  799. "
  800. }
  801.  
  802. fi
  803. rm -f conftest*
  804.  
  805.  
  806. #------------------------------------------------------------------------------
  807. #       Check for missing typedefs.
  808. #------------------------------------------------------------------------------
  809.  
  810. test -n "$silent" || echo "checking for time_t"
  811. cat > conftest.${ac_ext} <<EOF
  812. #include "confdefs.h"
  813. #include <sys/types.h>
  814. int main() { return 0; }
  815. int t() { ; return 0; }
  816. EOF
  817. if eval $ac_compile; then
  818.   :
  819. else
  820.   rm -rf conftest*
  821.   
  822. {
  823. test -n "$verbose" && \
  824. echo "    defining" time_t to be "long"
  825. echo "#define" time_t "long" >> confdefs.h
  826. DEFS="$DEFS -Dtime_t=long"
  827. ac_sed_defs="${ac_sed_defs}\${ac_dA}time_t\${ac_dB}time_t\${ac_dC}long\${ac_dD}
  828. \${ac_uA}time_t\${ac_uB}time_t\${ac_uC}long\${ac_uD}
  829. \${ac_eA}time_t\${ac_eB}time_t\${ac_eC}long\${ac_eD}
  830. "
  831. }
  832.  
  833. fi
  834. rm -f conftest*
  835.  
  836.  
  837. #------------------------------------------------------------------------------
  838. #       What type do signals return?
  839. #------------------------------------------------------------------------------
  840.  
  841. test -n "$silent" || echo "checking for return type of signal handlers"
  842. cat > conftest.${ac_ext} <<EOF
  843. #include "confdefs.h"
  844. #include <sys/types.h>
  845. #include <signal.h>
  846. #ifdef signal
  847. #undef signal
  848. #endif
  849. extern void (*signal ()) ();
  850. int main() { return 0; }
  851. int t() { int i;; return 0; }
  852. EOF
  853. if eval $ac_compile; then
  854.   rm -rf conftest*
  855.   
  856. {
  857. test -n "$verbose" && \
  858. echo "    defining" RETSIGTYPE to be "void"
  859. echo "#define" RETSIGTYPE "void" >> confdefs.h
  860. DEFS="$DEFS -DRETSIGTYPE=void"
  861. ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}void\${ac_dD}
  862. \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}void\${ac_uD}
  863. \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}void\${ac_eD}
  864. "
  865. }
  866.  
  867.  
  868. else
  869.   rm -rf conftest*
  870.   
  871. {
  872. test -n "$verbose" && \
  873. echo "    defining" RETSIGTYPE to be "int"
  874. echo "#define" RETSIGTYPE "int" >> confdefs.h
  875. DEFS="$DEFS -DRETSIGTYPE=int"
  876. ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}int\${ac_dD}
  877. \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}int\${ac_uD}
  878. \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}int\${ac_eD}
  879. "
  880. }
  881.  
  882. fi
  883. rm -f conftest*
  884.  
  885.  
  886.  
  887. #------------------------------------------------------------------------------
  888. #       Find out all about time handling differences.
  889. #------------------------------------------------------------------------------
  890.  
  891. test -n "$silent" || echo "checking for whether time.h and sys/time.h may both be included"
  892. cat > conftest.${ac_ext} <<EOF
  893. #include "confdefs.h"
  894. #include <sys/types.h>
  895. #include <sys/time.h>
  896. #include <time.h>
  897. int main() { return 0; }
  898. int t() { struct tm *tp;; return 0; }
  899. EOF
  900. if eval $ac_compile; then
  901.   rm -rf conftest*
  902.   
  903. {
  904. test -n "$verbose" && \
  905. echo "    defining TIME_WITH_SYS_TIME"
  906. echo "#define" TIME_WITH_SYS_TIME "1" >> confdefs.h
  907. DEFS="$DEFS -DTIME_WITH_SYS_TIME=1"
  908. ac_sed_defs="${ac_sed_defs}\${ac_dA}TIME_WITH_SYS_TIME\${ac_dB}TIME_WITH_SYS_TIME\${ac_dC}1\${ac_dD}
  909. \${ac_uA}TIME_WITH_SYS_TIME\${ac_uB}TIME_WITH_SYS_TIME\${ac_uC}1\${ac_uD}
  910. \${ac_eA}TIME_WITH_SYS_TIME\${ac_eB}TIME_WITH_SYS_TIME\${ac_eC}1\${ac_eD}
  911. "
  912. }
  913.  
  914.  
  915. fi
  916. rm -f conftest*
  917.  
  918. test -n "$silent" || echo "checking for struct tm in time.h"
  919. cat > conftest.${ac_ext} <<EOF
  920. #include "confdefs.h"
  921. #include <sys/types.h>
  922. #include <time.h>
  923. int main() { return 0; }
  924. int t() { struct tm *tp; tp->tm_sec;; return 0; }
  925. EOF
  926. if eval $ac_compile; then
  927.   :
  928. else
  929.   rm -rf conftest*
  930.   
  931. {
  932. test -n "$verbose" && \
  933. echo "    defining TM_IN_SYS_TIME"
  934. echo "#define" TM_IN_SYS_TIME "1" >> confdefs.h
  935. DEFS="$DEFS -DTM_IN_SYS_TIME=1"
  936. ac_sed_defs="${ac_sed_defs}\${ac_dA}TM_IN_SYS_TIME\${ac_dB}TM_IN_SYS_TIME\${ac_dC}1\${ac_dD}
  937. \${ac_uA}TM_IN_SYS_TIME\${ac_uB}TM_IN_SYS_TIME\${ac_uC}1\${ac_uD}
  938. \${ac_eA}TM_IN_SYS_TIME\${ac_eB}TM_IN_SYS_TIME\${ac_eC}1\${ac_eD}
  939. "
  940. }
  941.  
  942. fi
  943. rm -f conftest*
  944.  
  945. ac_decl='#include <sys/types.h>
  946. '
  947. case "$DEFS" in
  948.   *TM_IN_SYS_TIME*) ac_decl="$ac_decl
  949. #include <sys/time.h>
  950. " ;;
  951.   *) ac_decl="$ac_decl
  952. #include <time.h>
  953. " ;;
  954. esac
  955. test -n "$silent" || echo "checking for tm_zone in struct tm"
  956. cat > conftest.${ac_ext} <<EOF
  957. #include "confdefs.h"
  958. $ac_decl
  959. int main() { return 0; }
  960. int t() { struct tm tm; tm.tm_zone;; return 0; }
  961. EOF
  962. if eval $ac_compile; then
  963.   rm -rf conftest*
  964.   
  965. {
  966. test -n "$verbose" && \
  967. echo "    defining HAVE_TM_ZONE"
  968. echo "#define" HAVE_TM_ZONE "1" >> confdefs.h
  969. DEFS="$DEFS -DHAVE_TM_ZONE=1"
  970. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TM_ZONE\${ac_dB}HAVE_TM_ZONE\${ac_dC}1\${ac_dD}
  971. \${ac_uA}HAVE_TM_ZONE\${ac_uB}HAVE_TM_ZONE\${ac_uC}1\${ac_uD}
  972. \${ac_eA}HAVE_TM_ZONE\${ac_eB}HAVE_TM_ZONE\${ac_eC}1\${ac_eD}
  973. "
  974. }
  975.  
  976.  
  977. else
  978.   rm -rf conftest*
  979.   ac_no_tm_zone=1
  980. fi
  981. rm -f conftest*
  982.  
  983. if test -n "$ac_no_tm_zone"; then
  984. test -n "$silent" || echo "checking for tzname"
  985. cat > conftest.${ac_ext} <<EOF
  986. #include "confdefs.h"
  987. #include <time.h>
  988. #ifndef tzname /* For SGI.  */
  989. extern char *tzname[]; /* RS6000 and others want it this way.  */
  990. #endif
  991. int main() { return 0; }
  992. int t() { atoi(*tzname);; return 0; }
  993. EOF
  994. if eval $ac_compile; then
  995.   rm -rf conftest*
  996.   
  997. {
  998. test -n "$verbose" && \
  999. echo "    defining HAVE_TZNAME"
  1000. echo "#define" HAVE_TZNAME "1" >> confdefs.h
  1001. DEFS="$DEFS -DHAVE_TZNAME=1"
  1002. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TZNAME\${ac_dB}HAVE_TZNAME\${ac_dC}1\${ac_dD}
  1003. \${ac_uA}HAVE_TZNAME\${ac_uB}HAVE_TZNAME\${ac_uC}1\${ac_uD}
  1004. \${ac_eA}HAVE_TZNAME\${ac_eB}HAVE_TZNAME\${ac_eC}1\${ac_eD}
  1005. "
  1006. }
  1007.  
  1008.  
  1009. fi
  1010. rm -f conftest*
  1011.  
  1012. fi
  1013.  
  1014.  
  1015. test -n "$silent" || echo "checking for tm_tzadj in struct tm"
  1016. cat > conftest.${ac_ext} <<EOF
  1017. #include "confdefs.h"
  1018. #include <time.h>
  1019. int main() { return 0; }
  1020. int t() { struct tm tm; tm.tm_tzadj;; return 0; }
  1021. EOF
  1022. if eval $ac_compile; then
  1023.   rm -rf conftest*
  1024.   
  1025. {
  1026. test -n "$verbose" && \
  1027. echo "    defining HAVE_TM_TZADJ"
  1028. echo "#define" HAVE_TM_TZADJ "1" >> confdefs.h
  1029. DEFS="$DEFS -DHAVE_TM_TZADJ=1"
  1030. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TM_TZADJ\${ac_dB}HAVE_TM_TZADJ\${ac_dC}1\${ac_dD}
  1031. \${ac_uA}HAVE_TM_TZADJ\${ac_uB}HAVE_TM_TZADJ\${ac_uC}1\${ac_uD}
  1032. \${ac_eA}HAVE_TM_TZADJ\${ac_eB}HAVE_TM_TZADJ\${ac_eC}1\${ac_eD}
  1033. "
  1034. }
  1035.  
  1036.  
  1037. fi
  1038. rm -f conftest*
  1039.  
  1040.  
  1041. test -n "$silent" || echo "checking for tm_gmtoff in struct tm"
  1042. cat > conftest.${ac_ext} <<EOF
  1043. #include "confdefs.h"
  1044. #include <time.h>
  1045. int main() { return 0; }
  1046. int t() { struct tm tm; tm.tm_gmtoff;; return 0; }
  1047. EOF
  1048. if eval $ac_compile; then
  1049.   rm -rf conftest*
  1050.   
  1051. {
  1052. test -n "$verbose" && \
  1053. echo "    defining HAVE_TM_GMTOFF"
  1054. echo "#define" HAVE_TM_GMTOFF "1" >> confdefs.h
  1055. DEFS="$DEFS -DHAVE_TM_GMTOFF=1"
  1056. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TM_GMTOFF\${ac_dB}HAVE_TM_GMTOFF\${ac_dC}1\${ac_dD}
  1057. \${ac_uA}HAVE_TM_GMTOFF\${ac_uB}HAVE_TM_GMTOFF\${ac_uC}1\${ac_uD}
  1058. \${ac_eA}HAVE_TM_GMTOFF\${ac_eB}HAVE_TM_GMTOFF\${ac_eC}1\${ac_eD}
  1059. "
  1060. }
  1061.  
  1062.  
  1063. fi
  1064. rm -f conftest*
  1065.  
  1066.  
  1067. for ac_func in gettimeofday
  1068. do
  1069. ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  1070. test -n "$silent" || echo "checking for ${ac_func}"
  1071. cat > conftest.${ac_ext} <<EOF
  1072. #include "confdefs.h"
  1073. #include <ctype.h>
  1074. int main() { return 0; }
  1075. int t() { 
  1076. /* The GNU C library defines this for functions which it implements
  1077.     to always fail with ENOSYS.  Some functions are actually named
  1078.     something starting with __ and the normal name is an alias.  */
  1079. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  1080. choke me
  1081. #else
  1082. /* Override any gcc2 internal prototype to avoid an error.  */
  1083. extern char ${ac_func}(); ${ac_func}();
  1084. #endif
  1085. ; return 0; }
  1086. EOF
  1087. if eval $ac_compile; then
  1088.   rm -rf conftest*
  1089.   {
  1090. test -n "$verbose" && \
  1091. echo "    defining ${ac_tr_func}"
  1092. echo "#define" ${ac_tr_func} "1" >> confdefs.h
  1093. DEFS="$DEFS -D${ac_tr_func}=1"
  1094. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
  1095. \${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
  1096. \${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
  1097. "
  1098. }
  1099.  
  1100.  
  1101. fi
  1102. rm -f conftest*
  1103. done
  1104.  
  1105.  
  1106. #
  1107. # Its important to include time.h in this check, as some systems (like convex)
  1108. # have timezone functions, etc.
  1109. #
  1110. test -n "$silent" || echo "checking for timezone variable"
  1111. cat > conftest.${ac_ext} <<EOF
  1112. #include "confdefs.h"
  1113.  
  1114. int main() { return 0; }
  1115. int t() { 
  1116. #include <time.h>
  1117. extern long timezone;
  1118. timezone += 1;
  1119. exit (0);
  1120. ; return 0; }
  1121. EOF
  1122. if eval $ac_compile; then
  1123.   rm -rf conftest*
  1124.   
  1125. {
  1126. test -n "$verbose" && \
  1127. echo "    defining HAVE_TIMEZONE_VAR"
  1128. echo "#define" HAVE_TIMEZONE_VAR "1" >> confdefs.h
  1129. DEFS="$DEFS -DHAVE_TIMEZONE_VAR=1"
  1130. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TIMEZONE_VAR\${ac_dB}HAVE_TIMEZONE_VAR\${ac_dC}1\${ac_dD}
  1131. \${ac_uA}HAVE_TIMEZONE_VAR\${ac_uB}HAVE_TIMEZONE_VAR\${ac_uC}1\${ac_uD}
  1132. \${ac_eA}HAVE_TIMEZONE_VAR\${ac_eB}HAVE_TIMEZONE_VAR\${ac_eC}1\${ac_eD}
  1133. "
  1134. }
  1135.  
  1136.  
  1137. fi
  1138. rm -f conftest*
  1139.  
  1140.  
  1141. #------------------------------------------------------------------------------
  1142. #     Test to see if "times" returns a status or the amount of
  1143. #     elapsed real time.
  1144. #------------------------------------------------------------------------------
  1145.  
  1146. echo "checking to see if 'times' returns the elapsed real time"
  1147. cat > conftest.${ac_ext} <<EOF
  1148. #include "confdefs.h"
  1149.  
  1150. #include <sys/types.h>
  1151. #include <sys/times.h>
  1152. main() {
  1153. struct tms cpu;
  1154. times (&cpu);
  1155. sleep (2);
  1156. if (times (&cpu) > 0)
  1157.      exit (0);
  1158. else 
  1159.      exit (1);
  1160. }
  1161.  
  1162. EOF
  1163. eval $ac_compile
  1164. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1165.   
  1166. {
  1167. test -n "$verbose" && \
  1168. echo "    defining TIMES_RETS_REAL_TIME"
  1169. echo "#define" TIMES_RETS_REAL_TIME "1" >> confdefs.h
  1170. DEFS="$DEFS -DTIMES_RETS_REAL_TIME=1"
  1171. ac_sed_defs="${ac_sed_defs}\${ac_dA}TIMES_RETS_REAL_TIME\${ac_dB}TIMES_RETS_REAL_TIME\${ac_dC}1\${ac_dD}
  1172. \${ac_uA}TIMES_RETS_REAL_TIME\${ac_uB}TIMES_RETS_REAL_TIME\${ac_uC}1\${ac_uD}
  1173. \${ac_eA}TIMES_RETS_REAL_TIME\${ac_eB}TIMES_RETS_REAL_TIME\${ac_eC}1\${ac_eD}
  1174. "
  1175. }
  1176.  
  1177.  
  1178. fi
  1179. rm -fr conftest*
  1180.  
  1181. #------------------------------------------------------------------------------
  1182. #     Determine if "." is used as separator for the manual directory
  1183. #     names.  i.e. man/man.1 vs man/man1
  1184. #------------------------------------------------------------------------------
  1185.  
  1186. echo "checking man directory/section separator (man/man.1 vs man/man1)"
  1187. mandirs="/usr/man/man.1 /usr/man/cat.1 /usr/share/man.1 /usr/share/cat.1
  1188.          /usr/man/u_man/man.1 /usr/man/cat.C"
  1189. gotdotdir="NO"
  1190. for d in $mandirs
  1191. do
  1192.     if test -d $d
  1193.     then
  1194.         gotdotdir="YES"
  1195.     fi
  1196. done
  1197.  
  1198. mandirs="/usr/man/man1   /usr/man/cat1   /usr/share/man1   /usr/share/man1
  1199.          /usr/man/man1.Z /usr/man/cat1.Z /usr/share/man1.Z /usr/share/man1.Z
  1200.          /usr/man/u_man/man1"
  1201. gotnodotdir="NO"
  1202. for d in $mandirs
  1203. do
  1204.     if test -d $d
  1205.     then
  1206.         gotnodotdir="YES"
  1207.     fi
  1208. done
  1209.  
  1210. if test $gotdotdir = YES -a $gotnodotdir = NO
  1211. then
  1212.     MAN_DIR_SEPARATOR="."
  1213. elif test $gotdotdir = NO -a $gotnodotdir = YES
  1214. then
  1215.     MAN_DIR_SEPARATOR=""
  1216. else
  1217.     MAN_DIR_SEPARATOR="."
  1218.     echo "WARNING: could not determine man directory/section separator"
  1219.     echo "         assuming man/man.1 (can override in Config.mk)."
  1220. fi
  1221.  
  1222.  
  1223. #------------------------------------------------------------------------------
  1224. # Define srcbasedir and bldbasedir as absolute paths.
  1225. #------------------------------------------------------------------------------
  1226.  
  1227. srcbasedir=`cd $srcdir;pwd`
  1228.  
  1229. bldbasedir=`pwd`
  1230.  
  1231.  
  1232. #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  1233. #                      Begin code from Tcl configure.in
  1234. #------------------------------------------------------------------------------
  1235.  
  1236. #--------------------------------------------------------------------
  1237. #       Supply substitutes for missing POSIX library procedures, or
  1238. #       set flags so Tcl uses alternate procedures.
  1239. #--------------------------------------------------------------------
  1240.  
  1241. test -n "$silent" || echo "checking for gettimeofday"
  1242. cat > conftest.${ac_ext} <<EOF
  1243. #include "confdefs.h"
  1244. #include <ctype.h>
  1245. int main() { return 0; }
  1246. int t() { 
  1247. /* The GNU C library defines this for functions which it implements
  1248.     to always fail with ENOSYS.  Some functions are actually named
  1249.     something starting with __ and the normal name is an alias.  */
  1250. #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
  1251. choke me
  1252. #else
  1253. /* Override any gcc2 internal prototype to avoid an error.  */
  1254. extern char gettimeofday(); gettimeofday();
  1255. #endif
  1256. ; return 0; }
  1257. EOF
  1258. if eval $ac_compile; then
  1259.   :
  1260. else
  1261.   rm -rf conftest*
  1262.   {
  1263. test -n "$verbose" && \
  1264. echo "    defining NO_GETTOD"
  1265. echo "#define" NO_GETTOD "1" >> confdefs.h
  1266. DEFS="$DEFS -DNO_GETTOD=1"
  1267. ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_GETTOD\${ac_dB}NO_GETTOD\${ac_dC}1\${ac_dD}
  1268. \${ac_uA}NO_GETTOD\${ac_uB}NO_GETTOD\${ac_uC}1\${ac_uD}
  1269. \${ac_eA}NO_GETTOD\${ac_eB}NO_GETTOD\${ac_eC}1\${ac_eD}
  1270. "
  1271. }
  1272.  
  1273. fi
  1274. rm -f conftest*
  1275.  
  1276.  
  1277. #--------------------------------------------------------------------
  1278. #       Supply substitutes for missing POSIX header files.  Special
  1279. #       notes:
  1280. #           - Sprite's dirent.h exists but is bogus.
  1281. #           - stdlib.h doesn't define strtol, strtoul, or
  1282. #             strtod insome versions of SunOS
  1283. #           - some versions of string.h don't declare procedures such
  1284. #             as strstr
  1285. #--------------------------------------------------------------------
  1286.  
  1287. for ac_hdr in unistd.h
  1288. do
  1289. ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
  1290. test -n "$silent" || echo "checking for ${ac_hdr}"
  1291. cat > conftest.${ac_ext} <<EOF
  1292. #include "confdefs.h"
  1293. #include <${ac_hdr}>
  1294. EOF
  1295. # Some shells (Coherent) do redirections in the wrong order, so need
  1296. # the parens.
  1297. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1298. if test -z "$ac_err"; then
  1299.   rm -rf conftest*
  1300.   
  1301. {
  1302. test -n "$verbose" && \
  1303. echo "    defining ${ac_tr_hdr}"
  1304. echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
  1305. DEFS="$DEFS -D${ac_tr_hdr}=1"
  1306. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
  1307. \${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
  1308. \${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
  1309. "
  1310. }
  1311.  
  1312.  
  1313. fi
  1314. rm -f conftest*
  1315. done
  1316.  
  1317. test -n "$silent" || echo "checking for dirent.h"
  1318. cat > conftest.${ac_ext} <<EOF
  1319. #include "confdefs.h"
  1320. #include <sys/types.h>
  1321. #include <dirent.h>
  1322. int main() { return 0; }
  1323. int t() { 
  1324. DIR *d;
  1325. struct dirent *entryPtr;
  1326. char *p;
  1327. d = opendir("foobar");
  1328. entryPtr = readdir(d);
  1329. p = entryPtr->d_name;
  1330. closedir(d);
  1331. ; return 0; }
  1332. EOF
  1333. if eval $ac_compile; then
  1334.   rm -rf conftest*
  1335.   tcl_ok=1
  1336.  
  1337. else
  1338.   rm -rf conftest*
  1339.   tcl_ok=0
  1340. fi
  1341. rm -f conftest*
  1342.  
  1343. echo '#include "confdefs.h"
  1344. #include <tcl_ok=0>' > conftest.${ac_ext}
  1345. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1346. if egrep "Sprite version.* NOT POSIX" conftest.out >/dev/null 2>&1; then
  1347.   :
  1348. fi
  1349. rm -f conftest*
  1350.  
  1351. if test $tcl_ok = 0; then
  1352.     
  1353. {
  1354. test -n "$verbose" && \
  1355. echo "    defining NO_DIRENT_H"
  1356. echo "#define" NO_DIRENT_H "1" >> confdefs.h
  1357. DEFS="$DEFS -DNO_DIRENT_H=1"
  1358. ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_DIRENT_H\${ac_dB}NO_DIRENT_H\${ac_dC}1\${ac_dD}
  1359. \${ac_uA}NO_DIRENT_H\${ac_uB}NO_DIRENT_H\${ac_uC}1\${ac_uD}
  1360. \${ac_eA}NO_DIRENT_H\${ac_eB}NO_DIRENT_H\${ac_eC}1\${ac_eD}
  1361. "
  1362. }
  1363.  
  1364. fi
  1365. test -n "$silent" || echo "checking for errno.h"
  1366. cat > conftest.${ac_ext} <<EOF
  1367. #include "confdefs.h"
  1368. #include <errno.h>
  1369. EOF
  1370. # Some shells (Coherent) do redirections in the wrong order, so need
  1371. # the parens.
  1372. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1373. if test -z "$ac_err"; then
  1374.   :
  1375. else
  1376.   rm -rf conftest*
  1377.   
  1378. {
  1379. test -n "$verbose" && \
  1380. echo "    defining NO_ERRNO_H"
  1381. echo "#define" NO_ERRNO_H "1" >> confdefs.h
  1382. DEFS="$DEFS -DNO_ERRNO_H=1"
  1383. ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_ERRNO_H\${ac_dB}NO_ERRNO_H\${ac_dC}1\${ac_dD}
  1384. \${ac_uA}NO_ERRNO_H\${ac_uB}NO_ERRNO_H\${ac_uC}1\${ac_uD}
  1385. \${ac_eA}NO_ERRNO_H\${ac_eB}NO_ERRNO_H\${ac_eC}1\${ac_eD}
  1386. "
  1387. }
  1388.  
  1389. fi
  1390. rm -f conftest*
  1391.  
  1392. test -n "$silent" || echo "checking for float.h"
  1393. cat > conftest.${ac_ext} <<EOF
  1394. #include "confdefs.h"
  1395. #include <float.h>
  1396. EOF
  1397. # Some shells (Coherent) do redirections in the wrong order, so need
  1398. # the parens.
  1399. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1400. if test -z "$ac_err"; then
  1401.   :
  1402. else
  1403.   rm -rf conftest*
  1404.   
  1405. {
  1406. test -n "$verbose" && \
  1407. echo "    defining NO_FLOAT_H"
  1408. echo "#define" NO_FLOAT_H "1" >> confdefs.h
  1409. DEFS="$DEFS -DNO_FLOAT_H=1"
  1410. ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_FLOAT_H\${ac_dB}NO_FLOAT_H\${ac_dC}1\${ac_dD}
  1411. \${ac_uA}NO_FLOAT_H\${ac_uB}NO_FLOAT_H\${ac_uC}1\${ac_uD}
  1412. \${ac_eA}NO_FLOAT_H\${ac_eB}NO_FLOAT_H\${ac_eC}1\${ac_eD}
  1413. "
  1414. }
  1415.  
  1416. fi
  1417. rm -f conftest*
  1418.  
  1419. test -n "$silent" || echo "checking for limits.h"
  1420. cat > conftest.${ac_ext} <<EOF
  1421. #include "confdefs.h"
  1422. #include <limits.h>
  1423. EOF
  1424. # Some shells (Coherent) do redirections in the wrong order, so need
  1425. # the parens.
  1426. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1427. if test -z "$ac_err"; then
  1428.   :
  1429. else
  1430.   rm -rf conftest*
  1431.   
  1432. {
  1433. test -n "$verbose" && \
  1434. echo "    defining NO_LIMITS_H"
  1435. echo "#define" NO_LIMITS_H "1" >> confdefs.h
  1436. DEFS="$DEFS -DNO_LIMITS_H=1"
  1437. ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_LIMITS_H\${ac_dB}NO_LIMITS_H\${ac_dC}1\${ac_dD}
  1438. \${ac_uA}NO_LIMITS_H\${ac_uB}NO_LIMITS_H\${ac_uC}1\${ac_uD}
  1439. \${ac_eA}NO_LIMITS_H\${ac_eB}NO_LIMITS_H\${ac_eC}1\${ac_eD}
  1440. "
  1441. }
  1442.  
  1443. fi
  1444. rm -f conftest*
  1445.  
  1446. test -n "$silent" || echo "checking for stdlib.h"
  1447. cat > conftest.${ac_ext} <<EOF
  1448. #include "confdefs.h"
  1449. #include <stdlib.h>
  1450. EOF
  1451. # Some shells (Coherent) do redirections in the wrong order, so need
  1452. # the parens.
  1453. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1454. if test -z "$ac_err"; then
  1455.   rm -rf conftest*
  1456.   tcl_ok=1
  1457.  
  1458. else
  1459.   rm -rf conftest*
  1460.   tcl_ok=0
  1461. fi
  1462. rm -f conftest*
  1463.  
  1464. echo '#include "confdefs.h"
  1465. #include <stdlib.h>' > conftest.${ac_ext}
  1466. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1467. if egrep "strtol" conftest.out >/dev/null 2>&1; then
  1468.   :
  1469. else
  1470.   rm -rf conftest*
  1471.   tcl_ok=0
  1472. fi
  1473. rm -f conftest*
  1474.  
  1475. echo '#include "confdefs.h"
  1476. #include <stdlib.h>' > conftest.${ac_ext}
  1477. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1478. if egrep "strtoul" conftest.out >/dev/null 2>&1; then
  1479.   :
  1480. else
  1481.   rm -rf conftest*
  1482.   tcl_ok=0
  1483. fi
  1484. rm -f conftest*
  1485.  
  1486. echo '#include "confdefs.h"
  1487. #include <stdlib.h>' > conftest.${ac_ext}
  1488. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1489. if egrep "strtod" conftest.out >/dev/null 2>&1; then
  1490.   :
  1491. else
  1492.   rm -rf conftest*
  1493.   tcl_ok=0
  1494. fi
  1495. rm -f conftest*
  1496.  
  1497. if test $tcl_ok = 0; then
  1498.     
  1499. {
  1500. test -n "$verbose" && \
  1501. echo "    defining NO_STDLIB_H"
  1502. echo "#define" NO_STDLIB_H "1" >> confdefs.h
  1503. DEFS="$DEFS -DNO_STDLIB_H=1"
  1504. ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_STDLIB_H\${ac_dB}NO_STDLIB_H\${ac_dC}1\${ac_dD}
  1505. \${ac_uA}NO_STDLIB_H\${ac_uB}NO_STDLIB_H\${ac_uC}1\${ac_uD}
  1506. \${ac_eA}NO_STDLIB_H\${ac_eB}NO_STDLIB_H\${ac_eC}1\${ac_eD}
  1507. "
  1508. }
  1509.  
  1510. fi
  1511. test -n "$silent" || echo "checking for string.h"
  1512. cat > conftest.${ac_ext} <<EOF
  1513. #include "confdefs.h"
  1514. #include <string.h>
  1515. EOF
  1516. # Some shells (Coherent) do redirections in the wrong order, so need
  1517. # the parens.
  1518. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1519. if test -z "$ac_err"; then
  1520.   rm -rf conftest*
  1521.   tcl_ok=1
  1522.  
  1523. else
  1524.   rm -rf conftest*
  1525.   tcl_ok=0
  1526. fi
  1527. rm -f conftest*
  1528.  
  1529. echo '#include "confdefs.h"
  1530. #include <string.h>' > conftest.${ac_ext}
  1531. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1532. if egrep "strstr" conftest.out >/dev/null 2>&1; then
  1533.   :
  1534. else
  1535.   rm -rf conftest*
  1536.   tcl_ok=0
  1537. fi
  1538. rm -f conftest*
  1539.  
  1540. echo '#include "confdefs.h"
  1541. #include <string.h>' > conftest.${ac_ext}
  1542. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1543. if egrep "strerror" conftest.out >/dev/null 2>&1; then
  1544.   :
  1545. else
  1546.   rm -rf conftest*
  1547.   tcl_ok=0
  1548. fi
  1549. rm -f conftest*
  1550.  
  1551. if test $tcl_ok = 0; then
  1552.     
  1553. {
  1554. test -n "$verbose" && \
  1555. echo "    defining NO_STRING_H"
  1556. echo "#define" NO_STRING_H "1" >> confdefs.h
  1557. DEFS="$DEFS -DNO_STRING_H=1"
  1558. ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_STRING_H\${ac_dB}NO_STRING_H\${ac_dC}1\${ac_dD}
  1559. \${ac_uA}NO_STRING_H\${ac_uB}NO_STRING_H\${ac_uC}1\${ac_uD}
  1560. \${ac_eA}NO_STRING_H\${ac_eB}NO_STRING_H\${ac_eC}1\${ac_eD}
  1561. "
  1562. }
  1563.  
  1564. fi
  1565. test -n "$silent" || echo "checking for sys/time.h"
  1566. cat > conftest.${ac_ext} <<EOF
  1567. #include "confdefs.h"
  1568. #include <sys/time.h>
  1569. EOF
  1570. # Some shells (Coherent) do redirections in the wrong order, so need
  1571. # the parens.
  1572. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1573. if test -z "$ac_err"; then
  1574.   :
  1575. else
  1576.   rm -rf conftest*
  1577.   
  1578. {
  1579. test -n "$verbose" && \
  1580. echo "    defining NO_SYS_TIME_H"
  1581. echo "#define" NO_SYS_TIME_H "1" >> confdefs.h
  1582. DEFS="$DEFS -DNO_SYS_TIME_H=1"
  1583. ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_SYS_TIME_H\${ac_dB}NO_SYS_TIME_H\${ac_dC}1\${ac_dD}
  1584. \${ac_uA}NO_SYS_TIME_H\${ac_uB}NO_SYS_TIME_H\${ac_uC}1\${ac_uD}
  1585. \${ac_eA}NO_SYS_TIME_H\${ac_eB}NO_SYS_TIME_H\${ac_eC}1\${ac_eD}
  1586. "
  1587. }
  1588.  
  1589. fi
  1590. rm -f conftest*
  1591.  
  1592. test -n "$silent" || echo "checking for sys/wait.h"
  1593. cat > conftest.${ac_ext} <<EOF
  1594. #include "confdefs.h"
  1595. #include <sys/wait.h>
  1596. EOF
  1597. # Some shells (Coherent) do redirections in the wrong order, so need
  1598. # the parens.
  1599. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1600. if test -z "$ac_err"; then
  1601.   :
  1602. else
  1603.   rm -rf conftest*
  1604.   
  1605. {
  1606. test -n "$verbose" && \
  1607. echo "    defining NO_SYS_WAIT_H"
  1608. echo "#define" NO_SYS_WAIT_H "1" >> confdefs.h
  1609. DEFS="$DEFS -DNO_SYS_WAIT_H=1"
  1610. ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_SYS_WAIT_H\${ac_dB}NO_SYS_WAIT_H\${ac_dC}1\${ac_dD}
  1611. \${ac_uA}NO_SYS_WAIT_H\${ac_uB}NO_SYS_WAIT_H\${ac_uC}1\${ac_uD}
  1612. \${ac_eA}NO_SYS_WAIT_H\${ac_eB}NO_SYS_WAIT_H\${ac_eC}1\${ac_eD}
  1613. "
  1614. }
  1615.  
  1616. fi
  1617. rm -f conftest*
  1618.  
  1619.  
  1620. #--------------------------------------------------------------------
  1621. #       Check for various typedefs and provide substitutes if
  1622. #       they don't exist.
  1623. #--------------------------------------------------------------------
  1624.  
  1625. test -n "$silent" || echo "checking for mode_t in sys/types.h"
  1626. echo '#include "confdefs.h"
  1627. #include <sys/types.h>' > conftest.${ac_ext}
  1628. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1629. if egrep "mode_t" conftest.out >/dev/null 2>&1; then
  1630.   :
  1631. else
  1632.   rm -rf conftest*
  1633.   
  1634. {
  1635. test -n "$verbose" && \
  1636. echo "    defining" mode_t to be "int"
  1637. echo "#define" mode_t "int" >> confdefs.h
  1638. DEFS="$DEFS -Dmode_t=int"
  1639. ac_sed_defs="${ac_sed_defs}\${ac_dA}mode_t\${ac_dB}mode_t\${ac_dC}int\${ac_dD}
  1640. \${ac_uA}mode_t\${ac_uB}mode_t\${ac_uC}int\${ac_uD}
  1641. \${ac_eA}mode_t\${ac_eB}mode_t\${ac_eC}int\${ac_eD}
  1642. "
  1643. }
  1644.  
  1645. fi
  1646. rm -f conftest*
  1647.  
  1648. test -n "$silent" || echo "checking for pid_t in sys/types.h"
  1649. echo '#include "confdefs.h"
  1650. #include <sys/types.h>' > conftest.${ac_ext}
  1651. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1652. if egrep "pid_t" conftest.out >/dev/null 2>&1; then
  1653.   :
  1654. else
  1655.   rm -rf conftest*
  1656.   
  1657. {
  1658. test -n "$verbose" && \
  1659. echo "    defining" pid_t to be "int"
  1660. echo "#define" pid_t "int" >> confdefs.h
  1661. DEFS="$DEFS -Dpid_t=int"
  1662. ac_sed_defs="${ac_sed_defs}\${ac_dA}pid_t\${ac_dB}pid_t\${ac_dC}int\${ac_dD}
  1663. \${ac_uA}pid_t\${ac_uB}pid_t\${ac_uC}int\${ac_uD}
  1664. \${ac_eA}pid_t\${ac_eB}pid_t\${ac_eC}int\${ac_eD}
  1665. "
  1666. }
  1667.  
  1668. fi
  1669. rm -f conftest*
  1670.  
  1671. test -n "$silent" || echo "checking for size_t in sys/types.h"
  1672. echo '#include "confdefs.h"
  1673. #include <sys/types.h>' > conftest.${ac_ext}
  1674. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1675. if egrep "size_t" conftest.out >/dev/null 2>&1; then
  1676.   :
  1677. else
  1678.   rm -rf conftest*
  1679.   
  1680. {
  1681. test -n "$verbose" && \
  1682. echo "    defining" size_t to be "unsigned"
  1683. echo "#define" size_t "unsigned" >> confdefs.h
  1684. DEFS="$DEFS -Dsize_t=unsigned"
  1685. ac_sed_defs="${ac_sed_defs}\${ac_dA}size_t\${ac_dB}size_t\${ac_dC}unsigned\${ac_dD}
  1686. \${ac_uA}size_t\${ac_uB}size_t\${ac_uC}unsigned\${ac_uD}
  1687. \${ac_eA}size_t\${ac_eB}size_t\${ac_eC}unsigned\${ac_eD}
  1688. "
  1689. }
  1690.  
  1691. fi
  1692. rm -f conftest*
  1693.  
  1694. test -n "$silent" || echo "checking for uid_t in sys/types.h"
  1695. echo '#include "confdefs.h"
  1696. #include <sys/types.h>' > conftest.${ac_ext}
  1697. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1698. if egrep "uid_t" conftest.out >/dev/null 2>&1; then
  1699.   :
  1700. else
  1701.   rm -rf conftest*
  1702.   
  1703. {
  1704. test -n "$verbose" && \
  1705. echo "    defining" uid_t to be "int"
  1706. echo "#define" uid_t "int" >> confdefs.h
  1707. DEFS="$DEFS -Duid_t=int"
  1708. ac_sed_defs="${ac_sed_defs}\${ac_dA}uid_t\${ac_dB}uid_t\${ac_dC}int\${ac_dD}
  1709. \${ac_uA}uid_t\${ac_uB}uid_t\${ac_uC}int\${ac_uD}
  1710. \${ac_eA}uid_t\${ac_eB}uid_t\${ac_eC}int\${ac_eD}
  1711. "
  1712. }
  1713.  
  1714. {
  1715. test -n "$verbose" && \
  1716. echo "    defining" gid_t to be "int"
  1717. echo "#define" gid_t "int" >> confdefs.h
  1718. DEFS="$DEFS -Dgid_t=int"
  1719. ac_sed_defs="${ac_sed_defs}\${ac_dA}gid_t\${ac_dB}gid_t\${ac_dC}int\${ac_dD}
  1720. \${ac_uA}gid_t\${ac_uB}gid_t\${ac_uC}int\${ac_uD}
  1721. \${ac_eA}gid_t\${ac_eB}gid_t\${ac_eC}int\${ac_eD}
  1722. "
  1723. }
  1724.  
  1725. fi
  1726. rm -f conftest*
  1727.  
  1728.  
  1729. #--------------------------------------------------------------------
  1730. #       If a system doesn't have an opendir function (man, that's old!)
  1731. #       then we have to supply a different version of dirent.h which
  1732. #       is compatible with the substitute version of opendir that's
  1733. #       provided.  This version only works with V7-style directories.
  1734. #--------------------------------------------------------------------
  1735.  
  1736. test -n "$silent" || echo "checking for opendir"
  1737. cat > conftest.${ac_ext} <<EOF
  1738. #include "confdefs.h"
  1739. #include <ctype.h>
  1740. int main() { return 0; }
  1741. int t() { 
  1742. /* The GNU C library defines this for functions which it implements
  1743.     to always fail with ENOSYS.  Some functions are actually named
  1744.     something starting with __ and the normal name is an alias.  */
  1745. #if defined (__stub_opendir) || defined (__stub___opendir)
  1746. choke me
  1747. #else
  1748. /* Override any gcc2 internal prototype to avoid an error.  */
  1749. extern char opendir(); opendir();
  1750. #endif
  1751. ; return 0; }
  1752. EOF
  1753. if eval $ac_compile; then
  1754.   :
  1755. else
  1756.   rm -rf conftest*
  1757.   {
  1758. test -n "$verbose" && \
  1759. echo "    defining USE_DIRENT2_H"
  1760. echo "#define" USE_DIRENT2_H "1" >> confdefs.h
  1761. DEFS="$DEFS -DUSE_DIRENT2_H=1"
  1762. ac_sed_defs="${ac_sed_defs}\${ac_dA}USE_DIRENT2_H\${ac_dB}USE_DIRENT2_H\${ac_dC}1\${ac_dD}
  1763. \${ac_uA}USE_DIRENT2_H\${ac_uB}USE_DIRENT2_H\${ac_uC}1\${ac_uD}
  1764. \${ac_eA}USE_DIRENT2_H\${ac_eB}USE_DIRENT2_H\${ac_eC}1\${ac_eD}
  1765. "
  1766. }
  1767.  
  1768. fi
  1769. rm -f conftest*
  1770.  
  1771.  
  1772. #--------------------------------------------------------------------
  1773. #       The check below checks whether <sys/wait.h> defines the type
  1774. #       "union wait" correctly.  It's needed because of weirdness in
  1775. #       HP-UX where "union wait" is defined in both the BSD and SYS-V
  1776. #       environments.  Checking the usability of WIFEXITED seems to do
  1777. #       the trick.
  1778. #--------------------------------------------------------------------
  1779.  
  1780. test -n "$silent" || echo "checking for union wait"
  1781. cat > conftest.${ac_ext} <<EOF
  1782. #include "confdefs.h"
  1783. #include <sys/types.h> 
  1784. #include <sys/wait.h>
  1785. int main() { return 0; }
  1786. int t() { 
  1787. union wait x;
  1788. WIFEXITED(x);           /* Generates compiler error if WIFEXITED
  1789.                          * uses an int. */
  1790. ; return 0; }
  1791. EOF
  1792. if eval $ac_compile; then
  1793.   :
  1794. else
  1795.   rm -rf conftest*
  1796.   
  1797. {
  1798. test -n "$verbose" && \
  1799. echo "    defining NO_UNION_WAIT"
  1800. echo "#define" NO_UNION_WAIT "1" >> confdefs.h
  1801. DEFS="$DEFS -DNO_UNION_WAIT=1"
  1802. ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_UNION_WAIT\${ac_dB}NO_UNION_WAIT\${ac_dC}1\${ac_dD}
  1803. \${ac_uA}NO_UNION_WAIT\${ac_uB}NO_UNION_WAIT\${ac_uC}1\${ac_uD}
  1804. \${ac_eA}NO_UNION_WAIT\${ac_eB}NO_UNION_WAIT\${ac_eC}1\${ac_eD}
  1805. "
  1806. }
  1807.  
  1808. fi
  1809. rm -f conftest*
  1810.  
  1811.  
  1812. #------------------------------------------------------------------------------
  1813. #                       End code from Tcl configure.in
  1814. #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  1815.  
  1816.  
  1817. #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  1818. #                      Begin code from Tk configure.in
  1819. # Notes: Added check for X11_s.
  1820. #------------------------------------------------------------------------------
  1821.  
  1822. #--------------------------------------------------------------------
  1823. #    Include sys/select.h if it exists and if it supplies things
  1824. #    that appear to be useful and aren't already in sys/types.h.
  1825. #    This appears to be true only on the RS/6000 under AIX.  Some
  1826. #    systems like OSF/1 have a sys/select.h that's of no use, and
  1827. #    other systems like SCO UNIX have a sys/select.h that's
  1828. #    pernicious.  If "fd_set" isn't defined anywhere then set a
  1829. #    special flag.
  1830. #--------------------------------------------------------------------
  1831.  
  1832. echo checking for sys/select.h
  1833. test -n "$silent" || echo "checking for fd_set"
  1834. cat > conftest.${ac_ext} <<EOF
  1835. #include "confdefs.h"
  1836. #include <sys/types.h>
  1837. int main() { return 0; }
  1838. int t() { fd_set readMask, writeMask;; return 0; }
  1839. EOF
  1840. if eval $ac_compile; then
  1841.   :
  1842. else
  1843.   rm -rf conftest*
  1844.   echo '#include "confdefs.h"
  1845. #include <sys/select.h>' > conftest.${ac_ext}
  1846. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  1847. if egrep "fd_mask" conftest.out >/dev/null 2>&1; then
  1848.   rm -rf conftest*
  1849.   
  1850. {
  1851. test -n "$verbose" && \
  1852. echo "    defining HAVE_SYS_SELECT_H"
  1853. echo "#define" HAVE_SYS_SELECT_H "1" >> confdefs.h
  1854. DEFS="$DEFS -DHAVE_SYS_SELECT_H=1"
  1855. ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_SYS_SELECT_H\${ac_dB}HAVE_SYS_SELECT_H\${ac_dC}1\${ac_dD}
  1856. \${ac_uA}HAVE_SYS_SELECT_H\${ac_uB}HAVE_SYS_SELECT_H\${ac_uC}1\${ac_uD}
  1857. \${ac_eA}HAVE_SYS_SELECT_H\${ac_eB}HAVE_SYS_SELECT_H\${ac_eC}1\${ac_eD}
  1858. "
  1859. }
  1860.  
  1861.  
  1862. else
  1863.   rm -rf conftest*
  1864.   
  1865. {
  1866. test -n "$verbose" && \
  1867. echo "    defining NO_FD_SET"
  1868. echo "#define" NO_FD_SET "1" >> confdefs.h
  1869. DEFS="$DEFS -DNO_FD_SET=1"
  1870. ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_FD_SET\${ac_dB}NO_FD_SET\${ac_dC}1\${ac_dD}
  1871. \${ac_uA}NO_FD_SET\${ac_uB}NO_FD_SET\${ac_uC}1\${ac_uD}
  1872. \${ac_eA}NO_FD_SET\${ac_eB}NO_FD_SET\${ac_eC}1\${ac_eD}
  1873. "
  1874. }
  1875.  
  1876. fi
  1877. rm -f conftest*
  1878.  
  1879. fi
  1880. rm -f conftest*
  1881.  
  1882.  
  1883. #--------------------------------------------------------------------
  1884. #    Locate the X11 header files and the X11 library archive.  Try
  1885. #    the ac_find_x macro first, but if it doesn't find the X stuff
  1886. #    (e.g. because there's no xmkmf program) then check through
  1887. #    a list of possible directories.
  1888. #--------------------------------------------------------------------
  1889.  
  1890. if test -z "$tk_ok"; then
  1891.   # Extract the first word of `xmkmf', so it can be a program name with args.
  1892.   set ac_dummy xmkmf; ac_word=$2
  1893.   test -n "$silent" || echo "checking for $ac_word"
  1894.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1895.   for ac_dir in $PATH; do
  1896.     test -z "$ac_dir" && ac_dir=.
  1897.     if test -f $ac_dir/$ac_word; then
  1898.       tk_ok="1"
  1899.       break
  1900.     fi
  1901.   done
  1902.   IFS="$ac_save_ifs"
  1903. fi
  1904. test -z "$tk_ok" && tk_ok="0"
  1905. test -n "$tk_ok" && test -n "$verbose" && echo "    setting tk_ok to $tk_ok"
  1906.  
  1907. if test $tk_ok = 1; then
  1908.     # If we find X, set shell vars x_includes and x_libraries to the paths.
  1909. no_x=true
  1910. if test "x$with_x" != xno; then
  1911. test -n "$silent" || echo "checking for X include and library files with xmkmf"
  1912. rm -fr conftestdir
  1913. if mkdir conftestdir; then
  1914.   cd conftestdir
  1915.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  1916.   cat > Imakefile <<'EOF'
  1917. acfindx:
  1918.     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  1919. EOF
  1920.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  1921.     no_x=
  1922.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1923.     eval `make acfindx 2>/dev/null | grep -v make`
  1924.     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  1925.     if test ! -f $ac_im_usrlibdir/libX11.a && test -f $ac_im_libdir/libX11.a
  1926.     then
  1927.       ac_im_usrlibdir=$ac_im_libdir
  1928.     fi
  1929.     case "$ac_im_incroot" in
  1930.     /usr/include) ;;
  1931.     *) test -z "$x_includes" && x_includes="$ac_im_incroot" ;;
  1932.     esac
  1933.     case "$ac_im_usrlibdir" in
  1934.     /usr/lib | /lib) ;;
  1935.     *) test -z "$x_libraries" && x_libraries="$ac_im_usrlibdir" ;;
  1936.     esac
  1937.   fi
  1938.   cd ..
  1939.   rm -fr conftestdir
  1940. fi
  1941.  
  1942. if test -z "$ac_im_usrlibdir"; then
  1943. test -n "$silent" || echo "checking for X include and library files directly"
  1944. if test ".$x_direct_test_library" = . ; then
  1945.    x_direct_test_library='Xt'
  1946. fi
  1947. if test ".$x_direct_test_include" = . ; then
  1948.    x_direct_test_include='X11/Intrinsic.h'
  1949. fi
  1950. cat > conftest.${ac_ext} <<EOF
  1951. #include "confdefs.h"
  1952. #include <$x_direct_test_include>
  1953. EOF
  1954. # Some shells (Coherent) do redirections in the wrong order, so need
  1955. # the parens.
  1956. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  1957. if test -z "$ac_err"; then
  1958.   rm -rf conftest*
  1959.   no_x=
  1960.  
  1961. else
  1962.   rm -rf conftest*
  1963.   for ac_dir in               \
  1964.     /usr/X11R6/include        \
  1965.     /usr/X11R5/include        \
  1966.     /usr/X11R4/include        \
  1967.                               \
  1968.     /usr/include/X11R6        \
  1969.     /usr/include/X11R5        \
  1970.     /usr/include/X11R4        \
  1971.                               \
  1972.     /usr/local/X11R6/include  \
  1973.     /usr/local/X11R5/include  \
  1974.     /usr/local/X11R4/include  \
  1975.                               \
  1976.     /usr/local/include/X11R6  \
  1977.     /usr/local/include/X11R5  \
  1978.     /usr/local/include/X11R4  \
  1979.                               \
  1980.     /usr/X11/include          \
  1981.     /usr/include/X11          \
  1982.     /usr/local/X11/include    \
  1983.     /usr/local/include/X11    \
  1984.                               \
  1985.     /usr/X386/include         \
  1986.     /usr/x386/include         \
  1987.     /usr/XFree86/include/X11  \
  1988.                               \
  1989.     /usr/include              \
  1990.     /usr/local/include        \
  1991.     /usr/unsupported/include  \
  1992.     /usr/athena/include       \
  1993.     /usr/local/x11r5/include  \
  1994.     /usr/lpp/Xamples/include  \
  1995.                               \
  1996.     /usr/openwin/include      \
  1997.     /usr/openwin/share/include \
  1998.     ; \
  1999.   do
  2000.     if test -r "$ac_dir/$x_direct_test_include"; then
  2001.       test -z "$x_includes" && x_includes=$ac_dir
  2002.       no_x=
  2003.       break
  2004.     fi
  2005.   done
  2006. fi
  2007. rm -f conftest*
  2008.  
  2009. # Check for the libraries.  First see if replacing the `include' by
  2010. # `lib' works.
  2011. ac_save_LIBS="${LIBS}"
  2012. LIBS="${LIBS} -l"$x_direct_test_library""
  2013. ac_have_lib=""
  2014. test -n "$silent" || echo "checking for -l"$x_direct_test_library""
  2015. cat > conftest.${ac_ext} <<EOF
  2016. #include "confdefs.h"
  2017.  
  2018. int main() { return 0; }
  2019. int t() { main();; return 0; }
  2020. EOF
  2021. if eval $ac_compile; then
  2022.   rm -rf conftest*
  2023.   ac_have_lib="1"
  2024.  
  2025. fi
  2026. rm -f conftest*
  2027. LIBS="${ac_save_LIBS}"
  2028. if test -n "${ac_have_lib}"; then
  2029.    :; no_x=
  2030. else
  2031.    :; for ac_dir in `echo "$x_includes" | sed s/include/lib/` \
  2032.     /usr/X11R6/lib        \
  2033.     /usr/X11R5/lib        \
  2034.     /usr/X11R4/lib        \
  2035.                           \
  2036.     /usr/lib/X11R6        \
  2037.     /usr/lib/X11R5        \
  2038.     /usr/lib/X11R4        \
  2039.                           \
  2040.     /usr/local/X11R6/lib  \
  2041.     /usr/local/X11R5/lib  \
  2042.     /usr/local/X11R4/lib  \
  2043.                           \
  2044.     /usr/local/lib/X11R6  \
  2045.     /usr/local/lib/X11R5  \
  2046.     /usr/local/lib/X11R4  \
  2047.                           \
  2048.     /usr/X11/lib          \
  2049.     /usr/lib/X11          \
  2050.     /usr/local/X11/lib    \
  2051.     /usr/local/lib/X11    \
  2052.                           \
  2053.     /usr/X386/lib         \
  2054.     /usr/x386/lib         \
  2055.     /usr/XFree86/lib/X11  \
  2056.                           \
  2057.     /usr/lib              \
  2058.     /usr/local/lib        \
  2059.     /usr/unsupported/lib  \
  2060.     /usr/athena/lib       \
  2061.     /usr/local/x11r5/lib  \
  2062.     /usr/lpp/Xamples/lib  \
  2063.                           \
  2064.     /usr/openwin/lib      \
  2065.     /usr/openwin/share/lib \
  2066.     ; \
  2067. do
  2068.   for ac_extension in a so sl; do
  2069.     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  2070.       test -z "$x_libraries" && x_libraries=$ac_dir
  2071.       no_x=
  2072.       break 2
  2073.     fi
  2074.   done
  2075. done
  2076. fi
  2077.  
  2078. fi
  2079. test -n "$x_includes" && test -n "$verbose" && echo "    X11 headers are in $x_includes"
  2080. test -n "$x_libraries" && test -n "$verbose" && echo "    X11 libraries are in $x_libraries"
  2081. fi
  2082.  
  2083. fi
  2084. if test "$XINCLUDE_DIR" != ""; then
  2085.      x_includes="$XINCLUDE_DIR"
  2086. fi
  2087. if test "$x_includes" = /usr/include; then
  2088.     XINCLUDES="# no special path needed"
  2089. elif test "$x_includes" != ""; then
  2090.     XINCLUDES=" -I$x_includes"
  2091. else
  2092.     echo checking for X11 header files
  2093.     XINCLUDES="# no special path needed"
  2094.     cat > conftest.${ac_ext} <<EOF
  2095. #include "confdefs.h"
  2096. #include <X11/Intrinsic.h>
  2097. EOF
  2098. # Some shells (Coherent) do redirections in the wrong order, so need
  2099. # the parens.
  2100. ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
  2101. if test -z "$ac_err"; then
  2102.   :
  2103. else
  2104.   rm -rf conftest*
  2105.   XINCLUDES="nope"
  2106. fi
  2107. rm -f conftest*
  2108.     if test "$XINCLUDES" = nope; then
  2109.         dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/include/X11R4 /usr/X11R5/include /usr/include/X11R5 /usr/openwin/include /usr/X11/include"
  2110.         for i in $dirs ; do
  2111.         if test -r $i/X11/Intrinsic.h; then
  2112.             XINCLUDES=" -I$i"
  2113.         fi
  2114.         done
  2115.     fi
  2116. fi
  2117. if test "$XINCLUDES" = nope; then
  2118.   echo "Warning:  couldn't find any X11 include files."
  2119.   XINCLUDES="# no include files found"
  2120. fi
  2121.  
  2122.  
  2123. if test "$XLIBRARY_DIR" != ""; then
  2124.     x_libraries="$XLIBRARY_DIR"
  2125. fi
  2126. if test "$x_libraries" = /usr/lib; then
  2127.     XLIBSW=-lX11
  2128. elif test "$x_libraries" != ""; then
  2129.     XLIBSW="-L$x_libraries -lX11"
  2130. else
  2131.     echo "checking for X11 library archive"
  2132.     ac_save_LIBS="${LIBS}"
  2133. LIBS="${LIBS} -lX11_s"
  2134. ac_have_lib=""
  2135. test -n "$silent" || echo "checking for -lX11_s"
  2136. cat > conftest.${ac_ext} <<EOF
  2137. #include "confdefs.h"
  2138.  
  2139. int main() { return 0; }
  2140. int t() { main();; return 0; }
  2141. EOF
  2142. if eval $ac_compile; then
  2143.   rm -rf conftest*
  2144.   ac_have_lib="1"
  2145.  
  2146. fi
  2147. rm -f conftest*
  2148. LIBS="${ac_save_LIBS}"
  2149. if test -n "${ac_have_lib}"; then
  2150.    :; XLIBSW="-lX11_s"
  2151. else
  2152.    :; XLIBSW=nope
  2153. fi
  2154.  
  2155.     if test "$XLIBSW" = nope; then
  2156.         ac_save_LIBS="${LIBS}"
  2157. LIBS="${LIBS} -lX11"
  2158. ac_have_lib=""
  2159. test -n "$silent" || echo "checking for -lX11"
  2160. cat > conftest.${ac_ext} <<EOF
  2161. #include "confdefs.h"
  2162.  
  2163. int main() { return 0; }
  2164. int t() { main();; return 0; }
  2165. EOF
  2166. if eval $ac_compile; then
  2167.   rm -rf conftest*
  2168.   ac_have_lib="1"
  2169.  
  2170. fi
  2171. rm -f conftest*
  2172. LIBS="${ac_save_LIBS}"
  2173. if test -n "${ac_have_lib}"; then
  2174.    :; XLIBSW="-lX11"
  2175. else
  2176.    :; XLIBSW=nope
  2177. fi
  2178.  
  2179.     fi
  2180.     if test "$XLIBSW" = nope; then
  2181.     dirs=${XLIBRARY_DIR-"/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/lib/X11R4 /usr/X11R5/lib /usr/lib/X11R5 /usr/openwin/lib /usr/X11/lib"}
  2182.         for i in $dirs ; do
  2183.         if test -r $i/libX11.a; then
  2184.         XLIBSW="-L$i -lX11"
  2185.         fi
  2186.     done
  2187.     fi
  2188. fi
  2189. if test "$XLIBSW" = nope ; then
  2190.     ac_save_LIBS="${LIBS}"
  2191. LIBS="${LIBS} -lXwindow"
  2192. ac_have_lib=""
  2193. test -n "$silent" || echo "checking for -lXwindow"
  2194. cat > conftest.${ac_ext} <<EOF
  2195. #include "confdefs.h"
  2196.  
  2197. int main() { return 0; }
  2198. int t() { main();; return 0; }
  2199. EOF
  2200. if eval $ac_compile; then
  2201.   rm -rf conftest*
  2202.   ac_have_lib="1"
  2203.  
  2204. fi
  2205. rm -f conftest*
  2206. LIBS="${ac_save_LIBS}"
  2207. if test -n "${ac_have_lib}"; then
  2208.    :; XLIBSW=-lXwindow
  2209. else
  2210.    :; 
  2211. fi
  2212.  
  2213. fi
  2214. if test "$XLIBSW" = nope ; then
  2215.     echo "Warning:  couldn't find the X11 library archive.  Using -lX11."
  2216.     XLIBSW=-lX11
  2217. fi
  2218.  
  2219.  
  2220. #------------------------------------------------------------------------------
  2221. #                       End code from Tk configure.in
  2222. #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  2223.  
  2224. #------------------------------------------------------------------------------
  2225. #       Check for various Unix or library functions that can be used by TclX.
  2226. #       These must be after the library checks.
  2227. #------------------------------------------------------------------------------
  2228.  
  2229. for ac_func in catgets getcwd select setitimer setvbuf sigaction setpgid
  2230. do
  2231. ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  2232. test -n "$silent" || echo "checking for ${ac_func}"
  2233. cat > conftest.${ac_ext} <<EOF
  2234. #include "confdefs.h"
  2235. #include <ctype.h>
  2236. int main() { return 0; }
  2237. int t() { 
  2238. /* The GNU C library defines this for functions which it implements
  2239.     to always fail with ENOSYS.  Some functions are actually named
  2240.     something starting with __ and the normal name is an alias.  */
  2241. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  2242. choke me
  2243. #else
  2244. /* Override any gcc2 internal prototype to avoid an error.  */
  2245. extern char ${ac_func}(); ${ac_func}();
  2246. #endif
  2247. ; return 0; }
  2248. EOF
  2249. if eval $ac_compile; then
  2250.   rm -rf conftest*
  2251.   {
  2252. test -n "$verbose" && \
  2253. echo "    defining ${ac_tr_func}"
  2254. echo "#define" ${ac_tr_func} "1" >> confdefs.h
  2255. DEFS="$DEFS -D${ac_tr_func}=1"
  2256. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
  2257. \${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
  2258. \${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
  2259. "
  2260. }
  2261.  
  2262.  
  2263. fi
  2264. rm -f conftest*
  2265. done
  2266.  
  2267. for ac_func in bzero bcopy gethostbyname fsync getpriority
  2268. do
  2269. ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  2270. test -n "$silent" || echo "checking for ${ac_func}"
  2271. cat > conftest.${ac_ext} <<EOF
  2272. #include "confdefs.h"
  2273. #include <ctype.h>
  2274. int main() { return 0; }
  2275. int t() { 
  2276. /* The GNU C library defines this for functions which it implements
  2277.     to always fail with ENOSYS.  Some functions are actually named
  2278.     something starting with __ and the normal name is an alias.  */
  2279. #if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
  2280. choke me
  2281. #else
  2282. /* Override any gcc2 internal prototype to avoid an error.  */
  2283. extern char ${ac_func}(); ${ac_func}();
  2284. #endif
  2285. ; return 0; }
  2286. EOF
  2287. if eval $ac_compile; then
  2288.   rm -rf conftest*
  2289.   {
  2290. test -n "$verbose" && \
  2291. echo "    defining ${ac_tr_func}"
  2292. echo "#define" ${ac_tr_func} "1" >> confdefs.h
  2293. DEFS="$DEFS -D${ac_tr_func}=1"
  2294. ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
  2295. \${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
  2296. \${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
  2297. "
  2298. }
  2299.  
  2300.  
  2301. fi
  2302. rm -f conftest*
  2303. done
  2304.  
  2305.  
  2306. #------------------------------------------------------------------------------
  2307. #       Check for missing functions that we need.  They will be
  2308. #       compiled in the osSupport directory. Must check for SCO
  2309. #       -lintl, which is were strftime is hidden.  Also done after library
  2310. #       checks.
  2311. #------------------------------------------------------------------------------
  2312.  
  2313. ac_save_LIBS="${LIBS}"
  2314. LIBS="${LIBS} -lintl"
  2315. ac_have_lib=""
  2316. test -n "$silent" || echo "checking for -lintl"
  2317. cat > conftest.${ac_ext} <<EOF
  2318. #include "confdefs.h"
  2319.  
  2320. int main() { return 0; }
  2321. int t() { main();; return 0; }
  2322. EOF
  2323. if eval $ac_compile; then
  2324.   rm -rf conftest*
  2325.   ac_have_lib="1"
  2326.  
  2327. fi
  2328. rm -f conftest*
  2329. LIBS="${ac_save_LIBS}"
  2330. if test -n "${ac_have_lib}"; then
  2331.    :; LIBS="$LIBS -lintl"
  2332. else
  2333.    :; 
  2334. fi
  2335.  
  2336.  
  2337. test -n "$silent" || echo "checking for strftime"
  2338. cat > conftest.${ac_ext} <<EOF
  2339. #include "confdefs.h"
  2340. #include <ctype.h>
  2341. int main() { return 0; }
  2342. int t() { 
  2343. /* The GNU C library defines this for functions which it implements
  2344.     to always fail with ENOSYS.  Some functions are actually named
  2345.     something starting with __ and the normal name is an alias.  */
  2346. #if defined (__stub_strftime) || defined (__stub___strftime)
  2347. choke me
  2348. #else
  2349. /* Override any gcc2 internal prototype to avoid an error.  */
  2350. extern char strftime(); strftime();
  2351. #endif
  2352. ; return 0; }
  2353. EOF
  2354. if eval $ac_compile; then
  2355.   :
  2356. else
  2357.   rm -rf conftest*
  2358.   LIBOBJS="$LIBOBJS strftime.o"
  2359. fi
  2360. rm -f conftest*
  2361.  
  2362. test -n "$silent" || echo "checking for random"
  2363. cat > conftest.${ac_ext} <<EOF
  2364. #include "confdefs.h"
  2365. #include <ctype.h>
  2366. int main() { return 0; }
  2367. int t() { 
  2368. /* The GNU C library defines this for functions which it implements
  2369.     to always fail with ENOSYS.  Some functions are actually named
  2370.     something starting with __ and the normal name is an alias.  */
  2371. #if defined (__stub_random) || defined (__stub___random)
  2372. choke me
  2373. #else
  2374. /* Override any gcc2 internal prototype to avoid an error.  */
  2375. extern char random(); random();
  2376. #endif
  2377. ; return 0; }
  2378. EOF
  2379. if eval $ac_compile; then
  2380.   :
  2381. else
  2382.   rm -rf conftest*
  2383.   LIBOBJS="$LIBOBJS random.o" 
  2384. {
  2385. test -n "$verbose" && \
  2386. echo "    defining NO_RANDOM"
  2387. echo "#define" NO_RANDOM "1" >> confdefs.h
  2388. DEFS="$DEFS -DNO_RANDOM=1"
  2389. ac_sed_defs="${ac_sed_defs}\${ac_dA}NO_RANDOM\${ac_dB}NO_RANDOM\${ac_dC}1\${ac_dD}
  2390. \${ac_uA}NO_RANDOM\${ac_uB}NO_RANDOM\${ac_uC}1\${ac_uD}
  2391. \${ac_eA}NO_RANDOM\${ac_eB}NO_RANDOM\${ac_eC}1\${ac_eD}
  2392. "
  2393. }
  2394.  
  2395. fi
  2396. rm -f conftest*
  2397.  
  2398. test -n "$silent" || echo "checking for rename"
  2399. cat > conftest.${ac_ext} <<EOF
  2400. #include "confdefs.h"
  2401. #include <ctype.h>
  2402. int main() { return 0; }
  2403. int t() { 
  2404. /* The GNU C library defines this for functions which it implements
  2405.     to always fail with ENOSYS.  Some functions are actually named
  2406.     something starting with __ and the normal name is an alias.  */
  2407. #if defined (__stub_rename) || defined (__stub___rename)
  2408. choke me
  2409. #else
  2410. /* Override any gcc2 internal prototype to avoid an error.  */
  2411. extern char rename(); rename();
  2412. #endif
  2413. ; return 0; }
  2414. EOF
  2415. if eval $ac_compile; then
  2416.   :
  2417. else
  2418.   rm -rf conftest*
  2419.   LIBOBJS="$LIBOBJS rename.o"
  2420. fi
  2421. rm -f conftest*
  2422.  
  2423.  
  2424. # SGI IRIX 4.0.5 has a broken strftime.
  2425. case `uname -sr 2>/dev/null` in
  2426.   IRIX\ 4.0.1-5*) LIBOBJS="$LIBOBJS strftime.o" ;;
  2427. esac
  2428.  
  2429.  
  2430.  
  2431. #------------------------------------------------------------------------------
  2432. # Determine if random is declared in stdlib.h.  If it is, we don't want to
  2433. # redeclare it.  Some systems, such as the DEC Alpha, have random declared
  2434. # are returning int rather than long, since long is 64 bit.
  2435. #------------------------------------------------------------------------------
  2436.  
  2437. echo '#include "confdefs.h"
  2438. #include <stdlib.h>' > conftest.${ac_ext}
  2439. eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
  2440. if egrep ""random"" conftest.out >/dev/null 2>&1; then
  2441.   rm -rf conftest*
  2442.   
  2443. {
  2444. test -n "$verbose" && \
  2445. echo "    defining STDLIB_DEFS_RANDOM"
  2446. echo "#define" STDLIB_DEFS_RANDOM "1" >> confdefs.h
  2447. DEFS="$DEFS -DSTDLIB_DEFS_RANDOM=1"
  2448. ac_sed_defs="${ac_sed_defs}\${ac_dA}STDLIB_DEFS_RANDOM\${ac_dB}STDLIB_DEFS_RANDOM\${ac_dC}1\${ac_dD}
  2449. \${ac_uA}STDLIB_DEFS_RANDOM\${ac_uB}STDLIB_DEFS_RANDOM\${ac_uC}1\${ac_uD}
  2450. \${ac_eA}STDLIB_DEFS_RANDOM\${ac_eB}STDLIB_DEFS_RANDOM\${ac_eC}1\${ac_eD}
  2451. "
  2452. }
  2453.  
  2454.  
  2455. fi
  2456. rm -f conftest*
  2457.  
  2458.  
  2459. #------------------------------------------------------------------------------
  2460. #       If Config.mk is not in the build directory, copy it local.
  2461. #------------------------------------------------------------------------------
  2462.  
  2463. if test ! -r Config.mk
  2464. then
  2465.     echo "Copying $srcdir/Config.mk to build directory"
  2466.     cp $srcdir/Config.mk  Config.mk || exit 1
  2467. fi
  2468.  
  2469. #------------------------------------------------------------------------------
  2470. #       Copy the tests to the build directory if they are not there.
  2471. #       We could do something fancier, but this is easy for now.
  2472. #------------------------------------------------------------------------------
  2473.  
  2474. if test ! -d tests
  2475. then
  2476.     echo "Copying $srcdir/tests contents to build directory"
  2477.     mkdir tests
  2478.     # Prevent line to long on some systems.
  2479.     CURDIR=`pwd`
  2480.     cd $srcdir/tests
  2481.     cp *.test *.tcl all $CURDIR/tests || exit 1
  2482.     cd $CURDIR
  2483. fi
  2484.  
  2485. #------------------------------------------------------------------------------
  2486. # Generate the make files.
  2487. #------------------------------------------------------------------------------
  2488.  
  2489.  
  2490.  
  2491.  
  2492. # Set default prefixes.
  2493. if test -n "$prefix"; then
  2494.   test -z "$exec_prefix" && exec_prefix='${prefix}' # Let make expand it.
  2495.   ac_prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  2496. fi
  2497. if test -n "$exec_prefix"; then
  2498.   ac_prsub="$ac_prsub
  2499. s%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
  2500. fi
  2501. # Any assignment to VPATH causes Sun make to only execute
  2502. # the first set of double-colon rules, so remove it if not needed.
  2503. # If there is a colon in the path, we need to keep it.
  2504. if test "x$srcdir" = x.; then
  2505.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2506. fi
  2507.  
  2508. # Quote sed substitution magic chars in DEFS.
  2509. cat >conftest.def <<EOF
  2510. $DEFS
  2511. EOF
  2512. ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
  2513. DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
  2514. rm -f conftest.def
  2515. # Substitute for predefined variables.
  2516.  
  2517. trap 'rm -f config.status; exit 1' 1 2 15
  2518. echo creating config.status
  2519. rm -f config.status
  2520. cat > config.status <<EOF
  2521. #!/bin/sh
  2522. # Generated automatically by configure.
  2523. # Run this file to recreate the current configuration.
  2524. # This directory was configured as follows,
  2525. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2526. #
  2527. # $0 $configure_args
  2528.  
  2529. ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
  2530. for ac_option
  2531. do
  2532.   case "\$ac_option" in
  2533.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2534.     echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
  2535.     exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
  2536.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2537.     echo "config.status generated by autoconf version 1.9"
  2538.     exit 0 ;;
  2539.   -help | --help | --hel | --he | --h)
  2540.     echo "\$ac_cs_usage"; exit 0 ;;
  2541.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2542.   esac
  2543. done
  2544.  
  2545. trap 'rm -fr Makefile osSupport/Makefile src/Makefile tclsrc/Makefile tksrc/Makefile tktclsrc/Makefile tools/Makefile src/SYSLIBS tksrc/SYSLIBS src/tclXconfig.h conftest*; exit 1' 1 2 15
  2546. TCL_ARCH='$TCL_ARCH'
  2547. YACC='$YACC'
  2548. RANLIB='$RANLIB'
  2549. CC='$CC'
  2550. MCS_CMD='$MCS_CMD'
  2551. MAKEINCLUDE='$MAKEINCLUDE'
  2552. MAKEQUOTE='$MAKEQUOTE'
  2553. CPP='$CPP'
  2554. MAN_DIR_SEPARATOR='$MAN_DIR_SEPARATOR'
  2555. srcbasedir='$srcbasedir'
  2556. bldbasedir='$bldbasedir'
  2557. tk_ok='$tk_ok'
  2558. XINCLUDES='$XINCLUDES'
  2559. XLIBSW='$XLIBSW'
  2560. LIBOBJS='$LIBOBJS'
  2561. prefix='$prefix'
  2562. execprefix='$execprefix'
  2563. LIBS='$LIBS'
  2564. srcdir='$srcdir'
  2565. top_srcdir='$top_srcdir'
  2566. exec_prefix='$exec_prefix'
  2567. ac_prsub='$ac_prsub'
  2568. ac_vpsub='$ac_vpsub'
  2569. extrasub='$extrasub'
  2570. EOF
  2571. cat >> config.status <<\EOF
  2572.  
  2573. ac_given_srcdir=$srcdir
  2574.  
  2575. CONFIG_FILES=${CONFIG_FILES-"Makefile osSupport/Makefile src/Makefile tclsrc/Makefile tksrc/Makefile tktclsrc/Makefile tools/Makefile src/SYSLIBS tksrc/SYSLIBS"}
  2576. for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
  2577.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2578.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2579.   if test "$ac_dir" != "$ac_file"; then
  2580.     # The file is in a subdirectory.
  2581.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2582.     ac_dir_suffix="/$ac_dir"
  2583.   else
  2584.     ac_dir_suffix=
  2585.   fi
  2586.  
  2587.   # A "../" for each directory in $ac_dir_suffix.
  2588.   ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2589.   case "$ac_given_srcdir" in
  2590.   .)  srcdir=.; top_srcdir="$ac_dots." ;;
  2591.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2592.   *) # Relative path.
  2593.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2594.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2595.   esac
  2596.  
  2597.   echo creating "$ac_file"
  2598.   rm -f "$ac_file"
  2599.   comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure."
  2600.   case "$ac_file" in
  2601.     *.c | *.h | *.C | *.cc | *.m )  echo "/* $comment_str */" > "$ac_file" ;;
  2602.     * )          echo "# $comment_str"     > "$ac_file" ;;
  2603.   esac
  2604.   sed -e "
  2605. $ac_prsub
  2606. $ac_vpsub
  2607. $extrasub
  2608. s%@TCL_ARCH@%$TCL_ARCH%g
  2609. s%@YACC@%$YACC%g
  2610. s%@RANLIB@%$RANLIB%g
  2611. s%@CC@%$CC%g
  2612. s%@MCS_CMD@%$MCS_CMD%g
  2613. s%@MAKEINCLUDE@%$MAKEINCLUDE%g
  2614. s%@MAKEQUOTE@%$MAKEQUOTE%g
  2615. s%@CPP@%$CPP%g
  2616. s%@MAN_DIR_SEPARATOR@%$MAN_DIR_SEPARATOR%g
  2617. s%@srcbasedir@%$srcbasedir%g
  2618. s%@bldbasedir@%$bldbasedir%g
  2619. s%@tk_ok@%$tk_ok%g
  2620. s%@XINCLUDES@%$XINCLUDES%g
  2621. s%@XLIBSW@%$XLIBSW%g
  2622. s%@LIBOBJS@%$LIBOBJS%g
  2623. s%@prefix@%$prefix%g
  2624. s%@execprefix@%$execprefix%g
  2625. s%@LIBS@%$LIBS%g
  2626. s%@srcdir@%$srcdir%g
  2627. s%@top_srcdir@%$top_srcdir%g
  2628. s%@exec_prefix@%$exec_prefix%g
  2629. s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
  2630. fi; done
  2631.  
  2632. # These sed commands are put into ac_sed_defs when defining a macro.
  2633. # They are broken into pieces to make the sed script easier to manage.
  2634. # They are passed to sed as "A NAME B NAME C VALUE D", where NAME
  2635. # is the cpp macro being defined and VALUE is the value it is being given.
  2636. # Each defining turns into a single global substitution command.
  2637. # Hopefully no one uses "!" as a variable value.
  2638. # Other candidates for the sed separators, like , and @, do get used.
  2639. #
  2640. # ac_d sets the value in "#define NAME VALUE" lines.
  2641. ac_dA='s!^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  2642. ac_dB='\([     ][     ]*\)[^     ]*!\1#\2'
  2643. ac_dC='\3'
  2644. ac_dD='!g'
  2645. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2646. ac_uA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2647. ac_uB='\([     ]\)!\1#\2define\3'
  2648. ac_uC=' '
  2649. ac_uD='\4!g'
  2650. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2651. ac_eA='s!^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2652. ac_eB='$!\1#\2define\3'
  2653. ac_eC=' '
  2654. ac_eD='!g'
  2655. rm -f conftest.sed
  2656. EOF
  2657. # Turn off quoting long enough to insert the sed commands.
  2658. rm -f conftest.sh
  2659. cat > conftest.sh <<EOF
  2660. $ac_sed_defs
  2661. EOF
  2662.  
  2663. # Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
  2664. # on the size of here documents.
  2665.  
  2666. # Maximum number of lines to put in a single here document.
  2667. ac_max_sh_lines=9
  2668.  
  2669. while :
  2670. do
  2671.   # wc gives bogus results for an empty file on some AIX systems.
  2672.   ac_lines=`grep -c . conftest.sh`
  2673.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2674.   rm -f conftest.s1 conftest.s2
  2675.   sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -20.
  2676.   sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +21.
  2677.   # Write a limited-size here document to append to conftest.sed.
  2678.   echo 'cat >> conftest.sed <<CONFEOF' >> config.status
  2679.   cat conftest.s1 >> config.status
  2680.   echo 'CONFEOF' >> config.status
  2681.   rm -f conftest.s1 conftest.sh
  2682.   mv conftest.s2 conftest.sh
  2683. done
  2684. rm -f conftest.sh
  2685.  
  2686. # Now back to your regularly scheduled config.status.
  2687. cat >> config.status <<\EOF
  2688. # This sed command replaces #undef's with comments.  This is necessary, for
  2689. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2690. # on some systems where configure will not decide to define it in
  2691. # src/tclXconfig.h.
  2692. cat >> conftest.sed <<\CONFEOF
  2693. s,^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
  2694. CONFEOF
  2695. rm -f conftest.h
  2696. # Break up the sed commands because old seds have small limits.
  2697. ac_max_sed_lines=20
  2698.  
  2699. CONFIG_HEADERS=${CONFIG_HEADERS-"src/tclXconfig.h"}
  2700. for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
  2701.   echo creating $ac_file
  2702.  
  2703.   cp $ac_given_srcdir/$ac_file.in conftest.h1
  2704.   while :
  2705.   do
  2706.     ac_lines=`grep -c . conftest.sed`
  2707.     if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2708.     rm -f conftest.s1 conftest.s2 conftest.h2
  2709.     sed ${ac_max_sed_lines}q conftest.sed > conftest.s1 # Like head -20.
  2710.     sed 1,${ac_max_sed_lines}d conftest.sed > conftest.s2 # Like tail +21.
  2711.     sed -f conftest.s1 < conftest.h1 > conftest.h2
  2712.     rm -f conftest.s1 conftest.h1 conftest.sed
  2713.     mv conftest.h2 conftest.h1
  2714.     mv conftest.s2 conftest.sed
  2715.   done
  2716.   rm -f conftest.sed conftest.h
  2717.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  2718.   cat conftest.h1 >> conftest.h
  2719.   rm -f conftest.h1
  2720.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  2721.     # The file exists and we would not be changing it.
  2722.     echo "$ac_file is unchanged"
  2723.     rm -f conftest.h
  2724.   else
  2725.     rm -f $ac_file
  2726.     mv conftest.h $ac_file
  2727.   fi
  2728. fi; done
  2729.  
  2730.  
  2731.  
  2732. exit 0
  2733. EOF
  2734. chmod +x config.status
  2735. test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} config.status
  2736.  
  2737.