home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / ObjectTcl-1.1 / configure < prev    next >
Encoding:
Text File  |  1995-06-30  |  46.5 KB  |  1,639 lines

  1. #!/bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.1 
  5. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15.   --with-x                use the X Window System"
  16. ac_help="$ac_help
  17.   --with-x                use the X Window System"
  18.  
  19. # Initialize some variables set by options.
  20. # The variables have the same names as the options, with
  21. # dashes changed to underlines.
  22. build=NONE
  23. cache_file=./config.cache
  24. exec_prefix=NONE
  25. host=NONE
  26. no_create=
  27. nonopt=NONE
  28. no_recursion=
  29. prefix=NONE
  30. program_prefix=NONE
  31. program_suffix=NONE
  32. program_transform_name=s,x,x,
  33. silent=
  34. site=
  35. srcdir=
  36. target=NONE
  37. verbose=
  38. x_includes=NONE
  39. x_libraries=NONE
  40.  
  41. # Initialize some other variables.
  42. subdirs=
  43.  
  44. ac_prev=
  45. for ac_option
  46. do
  47.  
  48.   # If the previous option needs an argument, assign it.
  49.   if test -n "$ac_prev"; then
  50.     eval "$ac_prev=\$ac_option"
  51.     ac_prev=
  52.     continue
  53.   fi
  54.  
  55.   case "$ac_option" in
  56.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  57.   *) ac_optarg= ;;
  58.   esac
  59.  
  60.   # Accept the important Cygnus configure options, so we can diagnose typos.
  61.  
  62.   case "$ac_option" in
  63.  
  64.   -build | --build | --buil | --bui | --bu | --b)
  65.     ac_prev=build ;;
  66.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  67.     build="$ac_optarg" ;;
  68.  
  69.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  70.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  71.     ac_prev=cache_file ;;
  72.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  73.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  74.     cache_file="$ac_optarg" ;;
  75.  
  76.   -disable-* | --disable-*)
  77.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  78.     # Reject names that are not valid shell variable names.
  79.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  80.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  81.     fi
  82.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  83.     eval "enable_${ac_feature}=no" ;;
  84.  
  85.   -enable-* | --enable-*)
  86.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  87.     # Reject names that are not valid shell variable names.
  88.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  89.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  90.     fi
  91.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  92.     case "$ac_option" in
  93.       *=*) ;;
  94.       *) ac_optarg=yes ;;
  95.     esac
  96.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  97.  
  98.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  99.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  100.   | --exec | --exe | --ex)
  101.     ac_prev=exec_prefix ;;
  102.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  103.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  104.   | --exec=* | --exe=* | --ex=*)
  105.     exec_prefix="$ac_optarg" ;;
  106.  
  107.   -gas | --gas | --ga | --g)
  108.     # Obsolete; use --with-gas.
  109.     with_gas=yes ;;
  110.  
  111.   -help | --help | --hel | --he)
  112.     # Omit some internal or obsolete options to make the list less imposing.
  113.     # This message is too long to be a string in the A/UX 3.1 sh.
  114.     cat << EOF
  115. Usage: configure [options] [host]
  116. Options: [defaults in brackets after descriptions]
  117. Configuration:
  118.   --cache-file=FILE       cache test results in FILE
  119.   --help                  print this message
  120.   --no-create             do not create output files
  121.   --quiet, --silent       do not print \`checking...' messages
  122.   --version               print the version of autoconf that created configure
  123. Directory and file names:
  124.   --prefix=PREFIX         install architecture-independent files in PREFIX
  125.                           [$ac_default_prefix]
  126.   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
  127.                           [same as prefix]
  128.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  129.   --program-prefix=PREFIX prepend PREFIX to installed program names
  130.   --program-suffix=SUFFIX append SUFFIX to installed program names
  131.   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  132. Host type:
  133.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  134.   --host=HOST             configure for HOST [guessed]
  135.   --target=TARGET         configure for TARGET [TARGET=HOST]
  136. Features and packages:
  137.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  138.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  139.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  140.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  141.   --x-includes=DIR        X include files are in DIR
  142.   --x-libraries=DIR       X library files are in DIR
  143. --enable and --with options recognized:$ac_help
  144. EOF
  145.     exit 0 ;;
  146.  
  147.   -host | --host | --hos | --ho)
  148.     ac_prev=host ;;
  149.   -host=* | --host=* | --hos=* | --ho=*)
  150.     host="$ac_optarg" ;;
  151.  
  152.   -nfp | --nfp | --nf)
  153.     # Obsolete; use --without-fp.
  154.     with_fp=no ;;
  155.  
  156.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  157.   | --no-cr | --no-c)
  158.     no_create=yes ;;
  159.  
  160.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  161.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  162.     no_recursion=yes ;;
  163.  
  164.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  165.     ac_prev=prefix ;;
  166.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  167.     prefix="$ac_optarg" ;;
  168.  
  169.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  170.   | --program-pre | --program-pr | --program-p)
  171.     ac_prev=program_prefix ;;
  172.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  173.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  174.     program_prefix="$ac_optarg" ;;
  175.  
  176.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  177.   | --program-suf | --program-su | --program-s)
  178.     ac_prev=program_suffix ;;
  179.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  180.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  181.     program_suffix="$ac_optarg" ;;
  182.  
  183.   -program-transform-name | --program-transform-name \
  184.   | --program-transform-nam | --program-transform-na \
  185.   | --program-transform-n | --program-transform- \
  186.   | --program-transform | --program-transfor \
  187.   | --program-transfo | --program-transf \
  188.   | --program-trans | --program-tran \
  189.   | --progr-tra | --program-tr | --program-t)
  190.     ac_prev=program_transform_name ;;
  191.   -program-transform-name=* | --program-transform-name=* \
  192.   | --program-transform-nam=* | --program-transform-na=* \
  193.   | --program-transform-n=* | --program-transform-=* \
  194.   | --program-transform=* | --program-transfor=* \
  195.   | --program-transfo=* | --program-transf=* \
  196.   | --program-trans=* | --program-tran=* \
  197.   | --progr-tra=* | --program-tr=* | --program-t=*)
  198.     program_transform_name="$ac_optarg" ;;
  199.  
  200.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  201.   | -silent | --silent | --silen | --sile | --sil)
  202.     silent=yes ;;
  203.  
  204.   -site | --site | --sit)
  205.     ac_prev=site ;;
  206.   -site=* | --site=* | --sit=*)
  207.     site="$ac_optarg" ;;
  208.  
  209.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  210.     ac_prev=srcdir ;;
  211.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  212.     srcdir="$ac_optarg" ;;
  213.  
  214.   -target | --target | --targe | --targ | --tar | --ta | --t)
  215.     ac_prev=target ;;
  216.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  217.     target="$ac_optarg" ;;
  218.  
  219.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  220.     verbose=yes ;;
  221.  
  222.   -version | --version | --versio | --versi | --vers)
  223.     echo "configure generated by autoconf version 2.1"
  224.     exit 0 ;;
  225.  
  226.   -with-* | --with-*)
  227.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  228.     # Reject names that are not valid shell variable names.
  229.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  230.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  231.     fi
  232.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  233.     case "$ac_option" in
  234.       *=*) ;;
  235.       *) ac_optarg=yes ;;
  236.     esac
  237.     eval "with_${ac_package}='$ac_optarg'" ;;
  238.  
  239.   -without-* | --without-*)
  240.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  241.     # Reject names that are not valid shell variable names.
  242.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  243.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  244.     fi
  245.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  246.     eval "with_${ac_package}=no" ;;
  247.  
  248.   --x)
  249.     # Obsolete; use --with-x.
  250.     with_x=yes ;;
  251.  
  252.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  253.   | --x-incl | --x-inc | --x-in | --x-i)
  254.     ac_prev=x_includes ;;
  255.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  256.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  257.     x_includes="$ac_optarg" ;;
  258.  
  259.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  260.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  261.     ac_prev=x_libraries ;;
  262.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  263.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  264.     x_libraries="$ac_optarg" ;;
  265.  
  266.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  267.     ;;
  268.  
  269.   *) 
  270.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  271.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  272.     fi
  273.     if test "x$nonopt" != xNONE; then
  274.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  275.     fi
  276.     nonopt="$ac_option"
  277.     ;;
  278.  
  279.   esac
  280. done
  281.  
  282. if test -n "$ac_prev"; then
  283.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  284. fi
  285.  
  286. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  287.  
  288. # File descriptor usage:
  289. # 0 unused; standard input
  290. # 1 file creation
  291. # 2 errors and warnings
  292. # 3 unused; some systems may open it to /dev/tty
  293. # 4 checking for... messages and results
  294. # 5 compiler messages saved in config.log
  295. if test "$silent" = yes; then
  296.   exec 4>/dev/null
  297. else
  298.   exec 4>&1
  299. fi
  300. exec 5>./config.log
  301.  
  302. echo "\
  303. This file contains any messages produced by compilers while
  304. running configure, to aid debugging if configure makes a mistake.
  305. " 1>&5
  306.  
  307. # Strip out --no-create and --no-recursion so they do not pile up.
  308. # Also quote any args containing shell metacharacters.
  309. ac_configure_args=
  310. for ac_arg
  311. do
  312.   case "$ac_arg" in
  313.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  314.   | --no-cr | --no-c) ;;
  315.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  316.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  317.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  318.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  319.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  320.   esac
  321. done
  322.  
  323. # NLS nuisances.
  324. # Only set LANG and LC_ALL to C if already set.
  325. # These must not be set unconditionally because not all systems understand
  326. # e.g. LANG=C (notably SCO).
  327. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  328. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  329.  
  330. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  331. rm -rf conftest* confdefs.h
  332. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  333. echo > confdefs.h
  334.  
  335. # A filename unique to this package, relative to the directory that
  336. # configure is in, which we can look for to find out if srcdir is correct.
  337. ac_unique_file=Otcl.H
  338.  
  339. # Find the source files, if location was not specified.
  340. if test -z "$srcdir"; then
  341.   ac_srcdir_defaulted=yes
  342.   # Try the directory containing this script, then its parent.
  343.   ac_prog=$0
  344.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  345.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  346.   srcdir=$ac_confdir
  347.   if test ! -r $srcdir/$ac_unique_file; then
  348.     srcdir=..
  349.   fi
  350. else
  351.   ac_srcdir_defaulted=no
  352. fi
  353. if test ! -r $srcdir/$ac_unique_file; then
  354.   if test "$ac_srcdir_defaulted" = yes; then
  355.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  356.   else
  357.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  358.   fi
  359. fi
  360. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  361.  
  362. # Prefer explicitly selected file to automatically selected ones.
  363. if test -z "$CONFIG_SITE"; then
  364.   if test "x$prefix" != xNONE; then
  365.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  366.   else
  367.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  368.   fi
  369. fi
  370. for ac_site_file in $CONFIG_SITE; do
  371.   if test -r "$ac_site_file"; then
  372.     echo "loading site script $ac_site_file"
  373.     . "$ac_site_file"
  374.   fi
  375. done
  376.  
  377. if test -r "$cache_file"; then
  378.   echo "loading cache $cache_file"
  379.   . $cache_file
  380. else
  381.   echo "creating cache $cache_file"
  382.   > $cache_file
  383. fi
  384.  
  385. ac_ext=c
  386. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  387. ac_cpp='$CPP $CPPFLAGS'
  388. ac_compile='${CC-cc} $CFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&5 2>&5'
  389. ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5'
  390.  
  391. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  392.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  393.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  394.     ac_n= ac_c='
  395. ' ac_t='    '
  396.   else
  397.     ac_n=-n ac_c= ac_t=
  398.   fi
  399. else
  400.   ac_n= ac_c='\c' ac_t=
  401. fi
  402.  
  403.  
  404.  
  405. # From configure.in Revision: 1.3 dnl
  406.  
  407. for ac_prog in $CCC c++ g++ gcc CC cxx
  408. do
  409. # Extract the first word of "$ac_prog", so it can be a program name with args.
  410. set dummy $ac_prog; ac_word=$2
  411. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  412. if eval "test \"`echo '${'ac_cv_prog_CXX'+set}'`\" = set"; then
  413.   echo $ac_n "(cached) $ac_c" 1>&4
  414. else
  415.   if test -n "$CXX"; then
  416.   ac_cv_prog_CXX="$CXX" # Let the user override the test.
  417. else
  418.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  419.   for ac_dir in $PATH; do
  420.     test -z "$ac_dir" && ac_dir=.
  421.     if test -f $ac_dir/$ac_word; then
  422.       ac_cv_prog_CXX="$ac_prog"
  423.       break
  424.     fi
  425.   done
  426.   IFS="$ac_save_ifs"
  427. fi
  428. fi
  429. CXX="$ac_cv_prog_CXX"
  430. if test -n "$CXX"; then
  431.   echo "$ac_t""$CXX" 1>&4
  432. else
  433.   echo "$ac_t""no" 1>&4
  434. fi
  435.  
  436. test -n "$CXX" && break
  437. done
  438. test -n "$CXX" || CXX="gcc"
  439.  
  440.  
  441. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&4
  442. if eval "test \"`echo '${'ac_cv_prog_gxx'+set}'`\" = set"; then
  443.   echo $ac_n "(cached) $ac_c" 1>&4
  444. else
  445.   cat > conftest.C <<EOF
  446. #ifdef __GNUC__
  447.   yes;
  448. #endif
  449. EOF
  450. if ${CXX-g++} -E conftest.C 2>&5 | egrep yes >/dev/null 2>&1; then
  451.   ac_cv_prog_gxx=yes
  452. else
  453.   ac_cv_prog_gxx=no
  454. fi
  455. fi
  456. echo "$ac_t""$ac_cv_prog_gxx" 1>&4
  457. if test $ac_cv_prog_gxx = yes; then
  458.   GXX=yes
  459.   if test "${CXXFLAGS+set}" != set; then
  460.     echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&4
  461. if eval "test \"`echo '${'ac_cv_prog_gxx_g'+set}'`\" = set"; then
  462.   echo $ac_n "(cached) $ac_c" 1>&4
  463. else
  464.   echo 'void f(){}' > conftest.cc
  465. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  466.   ac_cv_prog_gxx_g=yes
  467. else
  468.   ac_cv_prog_gxx_g=no
  469. fi
  470. rm -f conftest*
  471.  
  472. fi
  473.     echo "$ac_t""$ac_cv_prog_gxx_g" 1>&4
  474.     if test $ac_cv_prog_gxx_g = yes; then
  475.       CXXFLAGS="-g -O"
  476.     else
  477.       CXXFLAGS="-O"
  478.     fi
  479.   fi
  480. else
  481.   GXX=
  482.   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
  483. fi
  484.  
  485. ac_ext=C
  486. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  487. ac_cpp='$CXXCPP $CPPFLAGS'
  488. ac_compile='${CXX-g++} $CXXFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&5 2>&5'
  489. ac_link='${CXX-g++} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5'
  490.  
  491.  
  492. # Extract the first word of "ranlib", so it can be a program name with args.
  493. set dummy ranlib; ac_word=$2
  494. echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
  495. if eval "test \"`echo '${'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  496.   echo $ac_n "(cached) $ac_c" 1>&4
  497. else
  498.   if test -n "$RANLIB"; then
  499.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  500. else
  501.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  502.   for ac_dir in $PATH; do
  503.     test -z "$ac_dir" && ac_dir=.
  504.     if test -f $ac_dir/$ac_word; then
  505.       ac_cv_prog_RANLIB="ranlib"
  506.       break
  507.     fi
  508.   done
  509.   IFS="$ac_save_ifs"
  510.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  511. fi
  512. fi
  513. RANLIB="$ac_cv_prog_RANLIB"
  514. if test -n "$RANLIB"; then
  515.   echo "$ac_t""$RANLIB" 1>&4
  516. else
  517.   echo "$ac_t""no" 1>&4
  518. fi
  519.  
  520. ac_aux_dir=
  521. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  522.   if test -f $ac_dir/install-sh; then
  523.     ac_aux_dir=$ac_dir
  524.     ac_install_sh="$ac_aux_dir/install-sh -c"
  525.     break
  526.   elif test -f $ac_dir/install.sh; then
  527.     ac_aux_dir=$ac_dir
  528.     ac_install_sh="$ac_aux_dir/install.sh -c"
  529.     break
  530.   fi
  531. done
  532. if test -z "$ac_aux_dir"; then
  533.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  534. fi
  535. ac_config_guess=$ac_aux_dir/config.guess
  536. ac_config_sub=$ac_aux_dir/config.sub
  537. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  538.  
  539. # Find a good install program.  We prefer a C program (faster),
  540. # so one script is as good as another.  But avoid the broken or
  541. # incompatible versions:
  542. # SysV /etc/install, /usr/sbin/install
  543. # SunOS /usr/etc/install
  544. # IRIX /sbin/install
  545. # AIX /bin/install
  546. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  547. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  548. # ./install, which can be erroneously created by make from ./install.sh.
  549. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&4
  550. if test -z "$INSTALL"; then
  551. if eval "test \"`echo '${'ac_cv_path_install'+set}'`\" = set"; then
  552.   echo $ac_n "(cached) $ac_c" 1>&4
  553. else
  554.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  555.   for ac_dir in $PATH; do
  556.     case "$ac_dir" in
  557.     ''|.|/etc|/usr/sbin|/usr/etc|/sbin|/usr/afsws/bin|/usr/ucb) ;;
  558.     *)
  559.       # OSF1 and SCO ODT 3.0 have their own names for install.
  560.       for ac_prog in ginstall installbsd scoinst install; do
  561.         if test -f $ac_dir/$ac_prog; then
  562.       if test $ac_prog = install &&
  563.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  564.         # AIX install.  It has an incompatible calling convention.
  565.         # OSF/1 installbsd also uses dspmsg, but is usable.
  566.         :
  567.       else
  568.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  569.         break 2
  570.       fi
  571.     fi
  572.       done
  573.       ;;
  574.     esac
  575.   done
  576.   IFS="$ac_save_ifs"
  577.   # As a last resort, use the slow shell script.
  578.   test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
  579. fi
  580.   INSTALL="$ac_cv_path_install"
  581. fi
  582. echo "$ac_t""$INSTALL" 1>&4
  583.  
  584. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  585. # It thinks the first close brace ends the variable substitution.
  586. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  587.  
  588. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  589.  
  590.  
  591. #====================================================================
  592. # Begin code from Tk configure script.
  593.  
  594. #--------------------------------------------------------------------
  595. #    Locate the X11 header files and the X11 library archive.  Try
  596. #    the ac_path_x macro first, but if it doesn't find the X stuff
  597. #    (e.g. because there's no xmkmf program) then check through
  598. #    a list of possible directories.  Under some conditions the
  599. #    autoconf macro will return an include directory that contains
  600. #    no include files, so double-check its result just to be safe.
  601. #--------------------------------------------------------------------
  602.  
  603. echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&4
  604. if test -z "$CXXCPP"; then
  605. if eval "test \"`echo '${'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
  606.   echo $ac_n "(cached) $ac_c" 1>&4
  607. else
  608.   ac_ext=C
  609. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  610. ac_cpp='$CXXCPP $CPPFLAGS'
  611. ac_compile='${CXX-g++} $CXXFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&5 2>&5'
  612. ac_link='${CXX-g++} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5'
  613.   CXXCPP="${CXX-g++} -E"
  614.   cat > conftest.$ac_ext <<EOF
  615. #line 616 "configure"
  616. #include "confdefs.h"
  617. #include <stdlib.h>
  618. EOF
  619. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  620. ac_err=`grep -v '^ *+' conftest.out`
  621. if test -z "$ac_err"; then
  622.   :
  623. else
  624.   echo "$ac_err" >&5
  625.   rm -rf conftest*
  626.   CXXCPP=/lib/cpp
  627. fi
  628. rm -f conftest*
  629.   ac_cv_prog_CXXCPP="$CXXCPP"
  630. fi
  631. fi
  632. CXXCPP="$ac_cv_prog_CXXCPP"
  633. echo "$ac_t""$CXXCPP" 1>&4
  634.  
  635. # If we find X, set shell vars x_includes and x_libraries to the
  636. # paths, otherwise set no_x=yes.
  637. # Uses ac_ vars as temps to allow command line to override cache and checks.
  638. # --without-x overrides everything else, but does not touch the cache.
  639. echo $ac_n "checking for X""... $ac_c" 1>&4
  640.  
  641. # Check whether --with-x or --without-x was given.
  642. withval="$with_x"
  643. if test -n "$withval"; then
  644.   :
  645. fi
  646.  
  647. if test "x$with_x" = xno; then
  648.   no_x=yes
  649. else
  650.   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  651.     no_x=
  652.   else
  653. if eval "test \"`echo '${'ac_cv_path_x'+set}'`\" = set"; then
  654.   echo $ac_n "(cached) $ac_c" 1>&4
  655. else
  656.   # One or both of the vars are not set, and there is no cached value.
  657. no_x=yes
  658. rm -fr conftestdir
  659. if mkdir conftestdir; then
  660.   cd conftestdir
  661.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  662.   cat > Imakefile <<'EOF'
  663. acfindx:
  664.     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  665. EOF
  666.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  667.     no_x=
  668.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  669.     eval `make acfindx 2>/dev/null | grep -v make`
  670.     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  671.     if test ! -f $ac_im_usrlibdir/libX11.a && test -f $ac_im_libdir/libX11.a
  672.     then
  673.       ac_im_usrlibdir=$ac_im_libdir
  674.     fi
  675.     case "$ac_im_incroot" in
  676.     /usr/include) ;;
  677.     *) ac_x_includes="$ac_im_incroot" ;;
  678.     esac
  679.     case "$ac_im_usrlibdir" in
  680.     /usr/lib | /lib) ;;
  681.     *) ac_x_libraries="$ac_im_usrlibdir" ;;
  682.     esac
  683.   fi
  684.   cd ..
  685.   rm -fr conftestdir
  686. fi
  687.  
  688. if test "$no_x" = yes; then
  689. test -z "$x_direct_test_library" && x_direct_test_library=Xt
  690. test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  691. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  692. cat > conftest.$ac_ext <<EOF
  693. #line 694 "configure"
  694. #include "confdefs.h"
  695. #include <$x_direct_test_include>
  696. EOF
  697. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  698. ac_err=`grep -v '^ *+' conftest.out`
  699. if test -z "$ac_err"; then
  700.   rm -rf conftest*
  701.   no_x= ac_x_includes=
  702. else
  703.   echo "$ac_err" >&5
  704.   rm -rf conftest*
  705.     for ac_dir in               \
  706.     /usr/X11R6/include        \
  707.     /usr/X11R5/include        \
  708.     /usr/X11R4/include        \
  709.                               \
  710.     /usr/include/X11R6        \
  711.     /usr/include/X11R5        \
  712.     /usr/include/X11R4        \
  713.                               \
  714.     /usr/local/X11R6/include  \
  715.     /usr/local/X11R5/include  \
  716.     /usr/local/X11R4/include  \
  717.                               \
  718.     /usr/local/include/X11R6  \
  719.     /usr/local/include/X11R5  \
  720.     /usr/local/include/X11R4  \
  721.                               \
  722.     /usr/X11/include          \
  723.     /usr/include/X11          \
  724.     /usr/local/X11/include    \
  725.     /usr/local/include/X11    \
  726.                               \
  727.     /usr/X386/include         \
  728.     /usr/x386/include         \
  729.     /usr/XFree86/include/X11  \
  730.                               \
  731.     /usr/include              \
  732.     /usr/local/include        \
  733.     /usr/unsupported/include  \
  734.     /usr/athena/include       \
  735.     /usr/local/x11r5/include  \
  736.     /usr/lpp/Xamples/include  \
  737.                               \
  738.     /usr/openwin/include      \
  739.     /usr/openwin/share/include \
  740.     ; \
  741.   do
  742.     if test -r "$ac_dir/$x_direct_test_include"; then
  743.       no_x= ac_x_includes=$ac_dir
  744.       break
  745.     fi
  746.   done
  747. fi
  748. rm -f conftest*
  749.  
  750. # Check for the libraries.
  751. # See if we find them without any special options.
  752. # Don't add to $LIBS permanently.
  753. ac_save_LIBS="$LIBS"
  754. LIBS="$LIBS -l$x_direct_test_library"
  755. cat > conftest.$ac_ext <<EOF
  756. #line 757 "configure"
  757. #include "confdefs.h"
  758.  
  759. int main() { return 0; }
  760. int t() {
  761. ${x_direct_test_function}()
  762. ; return 0; }
  763. EOF
  764. if eval $ac_link; then
  765.   rm -rf conftest*
  766.   LIBS="$ac_save_LIBS" no_x= ac_x_libraries=
  767. else
  768.   rm -rf conftest*
  769.   LIBS="$ac_save_LIBS"
  770. # First see if replacing the include by lib works.
  771. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  772.     /usr/X11R6/lib        \
  773.     /usr/X11R5/lib        \
  774.     /usr/X11R4/lib        \
  775.                           \
  776.     /usr/lib/X11R6        \
  777.     /usr/lib/X11R5        \
  778.     /usr/lib/X11R4        \
  779.                           \
  780.     /usr/local/X11R6/lib  \
  781.     /usr/local/X11R5/lib  \
  782.     /usr/local/X11R4/lib  \
  783.                           \
  784.     /usr/local/lib/X11R6  \
  785.     /usr/local/lib/X11R5  \
  786.     /usr/local/lib/X11R4  \
  787.                           \
  788.     /usr/X11/lib          \
  789.     /usr/lib/X11          \
  790.     /usr/local/X11/lib    \
  791.     /usr/local/lib/X11    \
  792.                           \
  793.     /usr/X386/lib         \
  794.     /usr/x386/lib         \
  795.     /usr/XFree86/lib/X11  \
  796.                           \
  797.     /usr/lib              \
  798.     /usr/local/lib        \
  799.     /usr/unsupported/lib  \
  800.     /usr/athena/lib       \
  801.     /usr/local/x11r5/lib  \
  802.     /usr/lpp/Xamples/lib  \
  803.                           \
  804.     /usr/openwin/lib      \
  805.     /usr/openwin/share/lib \
  806.     ; \
  807. do
  808.   for ac_extension in a so sl; do
  809.     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  810.       no_x= ac_x_libraries=$ac_dir
  811.       break 2
  812.     fi
  813.   done
  814. done
  815. fi
  816. rm -f conftest*
  817.  
  818. fi
  819. if test "$no_x" = yes; then
  820.   ac_cv_path_x="no_x=yes"
  821. else
  822.   ac_cv_path_x="no_x= ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  823. fi
  824. fi
  825.   fi
  826.   eval "$ac_cv_path_x"
  827. fi # $with_x != no
  828.  
  829. if test "$no_x" = yes; then
  830.   echo "$ac_t""no" 1>&4
  831. else
  832.   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  833.   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  834.   ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  835.   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&4
  836. fi
  837.  
  838. if test "$no_x" = yes; then
  839.     XLIBSW=nope
  840.     if test "$XLIBSW" = nope; then
  841.     dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/lib/X11R4 /usr/X11R5/lib /usr/lib/X11R5 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
  842.     for i in $dirs ; do
  843.         if test -r $i/libX11.a; then
  844.         XLIBSW="-L$i -lX11"
  845.         fi
  846.     done
  847.     fi
  848. else
  849.     if test "$x_libraries" = ""; then
  850.     XLIBSW=-lX11
  851.     else
  852.     XLIBSW="-L$x_libraries -lX11"
  853.     fi
  854. fi
  855. if test "$XLIBSW" = nope ; then
  856.     echo $ac_n "checking for -lXwindow""... $ac_c" 1>&4
  857. if eval "test \"`echo '${'ac_cv_lib_Xwindow'+set}'`\" = set"; then
  858.   echo $ac_n "(cached) $ac_c" 1>&4
  859. else
  860.   ac_save_LIBS="$LIBS"
  861. LIBS="$LIBS -lXwindow "
  862. cat > conftest.$ac_ext <<EOF
  863. #line 864 "configure"
  864. #include "confdefs.h"
  865.  
  866. int main() { return 0; }
  867. int t() {
  868. XCreateWindow()
  869. ; return 0; }
  870. EOF
  871. if eval $ac_link; then
  872.   rm -rf conftest*
  873.   eval "ac_cv_lib_Xwindow=yes"
  874. else
  875.   rm -rf conftest*
  876.   eval "ac_cv_lib_Xwindow=no"
  877. fi
  878. rm -f conftest*
  879. LIBS="$ac_save_LIBS"
  880.  
  881. fi
  882. if eval "test \"`echo '$ac_cv_lib_'Xwindow`\" = yes"; then
  883.   echo "$ac_t""yes" 1>&4
  884.   XLIBSW=-lXwindow
  885. else
  886.   echo "$ac_t""no" 1>&4
  887. fi
  888.  
  889. fi
  890. if test "$XLIBSW" = nope ; then
  891.     echo "Warning:  couldn't find the X11 library archive.  Using -lX11."
  892.     XLIBSW=-lX11
  893. fi
  894.  
  895.  
  896. #--------------------------------------------------------------------
  897. #    Check for the existence of various libraries.  The order here
  898. #    is important, so that then end up in the right order in the
  899. #    command line generated by make.  The -lsocket and -lnsl libraries
  900. #    require a couple of special tricks:
  901. #    1. Use "connect" and "accept" to check for -lsocket, and
  902. #       "gethostbyname" to check for -lnsl.
  903. #    2. Use each function name only once:  can't redo a check because
  904. #       autoconf caches the results of the last check and won't redo it.
  905. #    3. Use -lnsl and -lsocket only if they supply procedures that
  906. #       aren't already present in the normal libraries.  This is because
  907. #       IRIX 5.2 has libraries, but they aren't needed and they're
  908. #       bogus:  they goof up name resolution if used.
  909. #    4. On some SVR4 systems, can't use -lsocket without -lnsl too.
  910. #       To get around this problem, check for both libraries together
  911. #       if -lsocket doesn't work by itself.
  912. #--------------------------------------------------------------------
  913.  
  914. echo $ac_n "checking for -lXbsd""... $ac_c" 1>&4
  915. if eval "test \"`echo '${'ac_cv_lib_Xbsd'+set}'`\" = set"; then
  916.   echo $ac_n "(cached) $ac_c" 1>&4
  917. else
  918.   ac_save_LIBS="$LIBS"
  919. LIBS="$LIBS -lXbsd "
  920. cat > conftest.$ac_ext <<EOF
  921. #line 922 "configure"
  922. #include "confdefs.h"
  923.  
  924. int main() { return 0; }
  925. int t() {
  926. main()
  927. ; return 0; }
  928. EOF
  929. if eval $ac_link; then
  930.   rm -rf conftest*
  931.   eval "ac_cv_lib_Xbsd=yes"
  932. else
  933.   rm -rf conftest*
  934.   eval "ac_cv_lib_Xbsd=no"
  935. fi
  936. rm -f conftest*
  937. LIBS="$ac_save_LIBS"
  938.  
  939. fi
  940. if eval "test \"`echo '$ac_cv_lib_'Xbsd`\" = yes"; then
  941.   echo "$ac_t""yes" 1>&4
  942.   LIBS="$LIBS -lXbsd"
  943. else
  944.   echo "$ac_t""no" 1>&4
  945. fi
  946.  
  947.  
  948. tk_checkBoth=0
  949. echo $ac_n "checking for connect""... $ac_c" 1>&4
  950. if eval "test \"`echo '${'ac_cv_func_connect'+set}'`\" = set"; then
  951.   echo $ac_n "(cached) $ac_c" 1>&4
  952. else
  953.   cat > conftest.$ac_ext <<EOF
  954. #line 955 "configure"
  955. #include "confdefs.h"
  956. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  957. /* Override any gcc2 internal prototype to avoid an error.  */
  958. #ifdef __cplusplus
  959. extern "C"
  960. #endif
  961. char connect(); 
  962.  
  963. int main() { return 0; }
  964. int t() {
  965.  
  966. /* The GNU C library defines this for functions which it implements
  967.     to always fail with ENOSYS.  Some functions are actually named
  968.     something starting with __ and the normal name is an alias.  */
  969. #if defined (__stub_connect) || defined (__stub___connect)
  970. choke me
  971. #else
  972. connect();
  973. #endif
  974.  
  975. ; return 0; }
  976. EOF
  977. if eval $ac_link; then
  978.   rm -rf conftest*
  979.   eval "ac_cv_func_connect=yes"
  980. else
  981.   rm -rf conftest*
  982.   eval "ac_cv_func_connect=no"
  983. fi
  984. rm -f conftest*
  985.  
  986. fi
  987. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  988.   echo "$ac_t""yes" 1>&4
  989.   tk_checkSocket=0
  990. else
  991.   echo "$ac_t""no" 1>&4
  992. tk_checkSocket=1
  993. fi
  994.  
  995. if test "$tk_checkSocket" = 1; then
  996.     echo $ac_n "checking for -lsocket""... $ac_c" 1>&4
  997. if eval "test \"`echo '${'ac_cv_lib_socket'+set}'`\" = set"; then
  998.   echo $ac_n "(cached) $ac_c" 1>&4
  999. else
  1000.   ac_save_LIBS="$LIBS"
  1001. LIBS="$LIBS -lsocket "
  1002. cat > conftest.$ac_ext <<EOF
  1003. #line 1004 "configure"
  1004. #include "confdefs.h"
  1005.  
  1006. int main() { return 0; }
  1007. int t() {
  1008. main()
  1009. ; return 0; }
  1010. EOF
  1011. if eval $ac_link; then
  1012.   rm -rf conftest*
  1013.   eval "ac_cv_lib_socket=yes"
  1014. else
  1015.   rm -rf conftest*
  1016.   eval "ac_cv_lib_socket=no"
  1017. fi
  1018. rm -f conftest*
  1019. LIBS="$ac_save_LIBS"
  1020.  
  1021. fi
  1022. if eval "test \"`echo '$ac_cv_lib_'socket`\" = yes"; then
  1023.   echo "$ac_t""yes" 1>&4
  1024.   LIBS="$LIBS -lsocket"
  1025. else
  1026.   echo "$ac_t""no" 1>&4
  1027. tk_checkBoth=1
  1028. fi
  1029.  
  1030. fi
  1031. if test "$tk_checkBoth" = 1; then
  1032.     tk_oldLibs=$LIBS
  1033.     LIBS="$LIBS -lsocket -lnsl"
  1034.     echo $ac_n "checking for accept""... $ac_c" 1>&4
  1035. if eval "test \"`echo '${'ac_cv_func_accept'+set}'`\" = set"; then
  1036.   echo $ac_n "(cached) $ac_c" 1>&4
  1037. else
  1038.   cat > conftest.$ac_ext <<EOF
  1039. #line 1040 "configure"
  1040. #include "confdefs.h"
  1041. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1042. /* Override any gcc2 internal prototype to avoid an error.  */
  1043. #ifdef __cplusplus
  1044. extern "C"
  1045. #endif
  1046. char accept(); 
  1047.  
  1048. int main() { return 0; }
  1049. int t() {
  1050.  
  1051. /* The GNU C library defines this for functions which it implements
  1052.     to always fail with ENOSYS.  Some functions are actually named
  1053.     something starting with __ and the normal name is an alias.  */
  1054. #if defined (__stub_accept) || defined (__stub___accept)
  1055. choke me
  1056. #else
  1057. accept();
  1058. #endif
  1059.  
  1060. ; return 0; }
  1061. EOF
  1062. if eval $ac_link; then
  1063.   rm -rf conftest*
  1064.   eval "ac_cv_func_accept=yes"
  1065. else
  1066.   rm -rf conftest*
  1067.   eval "ac_cv_func_accept=no"
  1068. fi
  1069. rm -f conftest*
  1070.  
  1071. fi
  1072. if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
  1073.   echo "$ac_t""yes" 1>&4
  1074.   tk_checkNsl=0
  1075. else
  1076.   echo "$ac_t""no" 1>&4
  1077. LIBS=$tk_oldLibs
  1078. fi
  1079.  
  1080. fi
  1081. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&4
  1082. if eval "test \"`echo '${'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  1083.   echo $ac_n "(cached) $ac_c" 1>&4
  1084. else
  1085.   cat > conftest.$ac_ext <<EOF
  1086. #line 1087 "configure"
  1087. #include "confdefs.h"
  1088. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1089. /* Override any gcc2 internal prototype to avoid an error.  */
  1090. #ifdef __cplusplus
  1091. extern "C"
  1092. #endif
  1093. char gethostbyname(); 
  1094.  
  1095. int main() { return 0; }
  1096. int t() {
  1097.  
  1098. /* The GNU C library defines this for functions which it implements
  1099.     to always fail with ENOSYS.  Some functions are actually named
  1100.     something starting with __ and the normal name is an alias.  */
  1101. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  1102. choke me
  1103. #else
  1104. gethostbyname();
  1105. #endif
  1106.  
  1107. ; return 0; }
  1108. EOF
  1109. if eval $ac_link; then
  1110.   rm -rf conftest*
  1111.   eval "ac_cv_func_gethostbyname=yes"
  1112. else
  1113.   rm -rf conftest*
  1114.   eval "ac_cv_func_gethostbyname=no"
  1115. fi
  1116. rm -f conftest*
  1117.  
  1118. fi
  1119. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  1120.   echo "$ac_t""yes" 1>&4
  1121.   :
  1122. else
  1123.   echo "$ac_t""no" 1>&4
  1124. echo $ac_n "checking for -lnsl""... $ac_c" 1>&4
  1125. if eval "test \"`echo '${'ac_cv_lib_nsl'+set}'`\" = set"; then
  1126.   echo $ac_n "(cached) $ac_c" 1>&4
  1127. else
  1128.   ac_save_LIBS="$LIBS"
  1129. LIBS="$LIBS -lnsl "
  1130. cat > conftest.$ac_ext <<EOF
  1131. #line 1132 "configure"
  1132. #include "confdefs.h"
  1133.  
  1134. int main() { return 0; }
  1135. int t() {
  1136. main()
  1137. ; return 0; }
  1138. EOF
  1139. if eval $ac_link; then
  1140.   rm -rf conftest*
  1141.   eval "ac_cv_lib_nsl=yes"
  1142. else
  1143.   rm -rf conftest*
  1144.   eval "ac_cv_lib_nsl=no"
  1145. fi
  1146. rm -f conftest*
  1147. LIBS="$ac_save_LIBS"
  1148.  
  1149. fi
  1150. if eval "test \"`echo '$ac_cv_lib_'nsl`\" = yes"; then
  1151.   echo "$ac_t""yes" 1>&4
  1152.   LIBS="$LIBS -lnsl"
  1153. else
  1154.   echo "$ac_t""no" 1>&4
  1155. fi
  1156.  
  1157. fi
  1158.  
  1159.  
  1160. #--------------------------------------------------------------------
  1161. #    On a few very rare systems, all of the libm.a stuff is
  1162. #    already in libc.a.  Set compiler flags accordingly.
  1163. #    Also, Linux requires the "ieee" library for math to
  1164. #    work right.
  1165. #--------------------------------------------------------------------
  1166.  
  1167. MATHLIBS=""
  1168. echo $ac_n "checking for sin""... $ac_c" 1>&4
  1169. if eval "test \"`echo '${'ac_cv_func_sin'+set}'`\" = set"; then
  1170.   echo $ac_n "(cached) $ac_c" 1>&4
  1171. else
  1172.   cat > conftest.$ac_ext <<EOF
  1173. #line 1174 "configure"
  1174. #include "confdefs.h"
  1175. #include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1176. /* Override any gcc2 internal prototype to avoid an error.  */
  1177. #ifdef __cplusplus
  1178. extern "C"
  1179. #endif
  1180. char sin(); 
  1181.  
  1182. int main() { return 0; }
  1183. int t() {
  1184.  
  1185. /* The GNU C library defines this for functions which it implements
  1186.     to always fail with ENOSYS.  Some functions are actually named
  1187.     something starting with __ and the normal name is an alias.  */
  1188. #if defined (__stub_sin) || defined (__stub___sin)
  1189. choke me
  1190. #else
  1191. sin();
  1192. #endif
  1193.  
  1194. ; return 0; }
  1195. EOF
  1196. if eval $ac_link; then
  1197.   rm -rf conftest*
  1198.   eval "ac_cv_func_sin=yes"
  1199. else
  1200.   rm -rf conftest*
  1201.   eval "ac_cv_func_sin=no"
  1202. fi
  1203. rm -f conftest*
  1204.  
  1205. fi
  1206. if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
  1207.   echo "$ac_t""yes" 1>&4
  1208.   :
  1209. else
  1210.   echo "$ac_t""no" 1>&4
  1211. MATH_LIBS="-lm"
  1212. fi
  1213.  
  1214. echo $ac_n "checking for -lieee""... $ac_c" 1>&4
  1215. if eval "test \"`echo '${'ac_cv_lib_ieee'+set}'`\" = set"; then
  1216.   echo $ac_n "(cached) $ac_c" 1>&4
  1217. else
  1218.   ac_save_LIBS="$LIBS"
  1219. LIBS="$LIBS -lieee "
  1220. cat > conftest.$ac_ext <<EOF
  1221. #line 1222 "configure"
  1222. #include "confdefs.h"
  1223.  
  1224. int main() { return 0; }
  1225. int t() {
  1226. main()
  1227. ; return 0; }
  1228. EOF
  1229. if eval $ac_link; then
  1230.   rm -rf conftest*
  1231.   eval "ac_cv_lib_ieee=yes"
  1232. else
  1233.   rm -rf conftest*
  1234.   eval "ac_cv_lib_ieee=no"
  1235. fi
  1236. rm -f conftest*
  1237. LIBS="$ac_save_LIBS"
  1238.  
  1239. fi
  1240. if eval "test \"`echo '$ac_cv_lib_'ieee`\" = yes"; then
  1241.   echo "$ac_t""yes" 1>&4
  1242.   MATHLIBS="$MATHLIBS -lieee"
  1243. else
  1244.   echo "$ac_t""no" 1>&4
  1245. fi
  1246.  
  1247.  
  1248.  
  1249. # End code from Tk configure script.
  1250. #====================================================================
  1251.  
  1252. # If we find X, set shell vars x_includes and x_libraries to the
  1253. # paths, otherwise set no_x=yes.
  1254. # Uses ac_ vars as temps to allow command line to override cache and checks.
  1255. # --without-x overrides everything else, but does not touch the cache.
  1256. echo $ac_n "checking for X""... $ac_c" 1>&4
  1257.  
  1258. # Check whether --with-x or --without-x was given.
  1259. withval="$with_x"
  1260. if test -n "$withval"; then
  1261.   :
  1262. fi
  1263.  
  1264. if test "x$with_x" = xno; then
  1265.   no_x=yes
  1266. else
  1267.   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  1268.     no_x=
  1269.   else
  1270. if eval "test \"`echo '${'ac_cv_path_x'+set}'`\" = set"; then
  1271.   echo $ac_n "(cached) $ac_c" 1>&4
  1272. else
  1273.   # One or both of the vars are not set, and there is no cached value.
  1274. no_x=yes
  1275. rm -fr conftestdir
  1276. if mkdir conftestdir; then
  1277.   cd conftestdir
  1278.   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  1279.   cat > Imakefile <<'EOF'
  1280. acfindx:
  1281.     @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  1282. EOF
  1283.   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  1284.     no_x=
  1285.     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1286.     eval `make acfindx 2>/dev/null | grep -v make`
  1287.     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  1288.     if test ! -f $ac_im_usrlibdir/libX11.a && test -f $ac_im_libdir/libX11.a
  1289.     then
  1290.       ac_im_usrlibdir=$ac_im_libdir
  1291.     fi
  1292.     case "$ac_im_incroot" in
  1293.     /usr/include) ;;
  1294.     *) ac_x_includes="$ac_im_incroot" ;;
  1295.     esac
  1296.     case "$ac_im_usrlibdir" in
  1297.     /usr/lib | /lib) ;;
  1298.     *) ac_x_libraries="$ac_im_usrlibdir" ;;
  1299.     esac
  1300.   fi
  1301.   cd ..
  1302.   rm -fr conftestdir
  1303. fi
  1304.  
  1305. if test "$no_x" = yes; then
  1306. test -z "$x_direct_test_library" && x_direct_test_library=Xt
  1307. test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  1308. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  1309. cat > conftest.$ac_ext <<EOF
  1310. #line 1311 "configure"
  1311. #include "confdefs.h"
  1312. #include <$x_direct_test_include>
  1313. EOF
  1314. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1315. ac_err=`grep -v '^ *+' conftest.out`
  1316. if test -z "$ac_err"; then
  1317.   rm -rf conftest*
  1318.   no_x= ac_x_includes=
  1319. else
  1320.   echo "$ac_err" >&5
  1321.   rm -rf conftest*
  1322.     for ac_dir in               \
  1323.     /usr/X11R6/include        \
  1324.     /usr/X11R5/include        \
  1325.     /usr/X11R4/include        \
  1326.                               \
  1327.     /usr/include/X11R6        \
  1328.     /usr/include/X11R5        \
  1329.     /usr/include/X11R4        \
  1330.                               \
  1331.     /usr/local/X11R6/include  \
  1332.     /usr/local/X11R5/include  \
  1333.     /usr/local/X11R4/include  \
  1334.                               \
  1335.     /usr/local/include/X11R6  \
  1336.     /usr/local/include/X11R5  \
  1337.     /usr/local/include/X11R4  \
  1338.                               \
  1339.     /usr/X11/include          \
  1340.     /usr/include/X11          \
  1341.     /usr/local/X11/include    \
  1342.     /usr/local/include/X11    \
  1343.                               \
  1344.     /usr/X386/include         \
  1345.     /usr/x386/include         \
  1346.     /usr/XFree86/include/X11  \
  1347.                               \
  1348.     /usr/include              \
  1349.     /usr/local/include        \
  1350.     /usr/unsupported/include  \
  1351.     /usr/athena/include       \
  1352.     /usr/local/x11r5/include  \
  1353.     /usr/lpp/Xamples/include  \
  1354.                               \
  1355.     /usr/openwin/include      \
  1356.     /usr/openwin/share/include \
  1357.     ; \
  1358.   do
  1359.     if test -r "$ac_dir/$x_direct_test_include"; then
  1360.       no_x= ac_x_includes=$ac_dir
  1361.       break
  1362.     fi
  1363.   done
  1364. fi
  1365. rm -f conftest*
  1366.  
  1367. # Check for the libraries.
  1368. # See if we find them without any special options.
  1369. # Don't add to $LIBS permanently.
  1370. ac_save_LIBS="$LIBS"
  1371. LIBS="$LIBS -l$x_direct_test_library"
  1372. cat > conftest.$ac_ext <<EOF
  1373. #line 1374 "configure"
  1374. #include "confdefs.h"
  1375.  
  1376. int main() { return 0; }
  1377. int t() {
  1378. ${x_direct_test_function}()
  1379. ; return 0; }
  1380. EOF
  1381. if eval $ac_link; then
  1382.   rm -rf conftest*
  1383.   LIBS="$ac_save_LIBS" no_x= ac_x_libraries=
  1384. else
  1385.   rm -rf conftest*
  1386.   LIBS="$ac_save_LIBS"
  1387. # First see if replacing the include by lib works.
  1388. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  1389.     /usr/X11R6/lib        \
  1390.     /usr/X11R5/lib        \
  1391.     /usr/X11R4/lib        \
  1392.                           \
  1393.     /usr/lib/X11R6        \
  1394.     /usr/lib/X11R5        \
  1395.     /usr/lib/X11R4        \
  1396.                           \
  1397.     /usr/local/X11R6/lib  \
  1398.     /usr/local/X11R5/lib  \
  1399.     /usr/local/X11R4/lib  \
  1400.                           \
  1401.     /usr/local/lib/X11R6  \
  1402.     /usr/local/lib/X11R5  \
  1403.     /usr/local/lib/X11R4  \
  1404.                           \
  1405.     /usr/X11/lib          \
  1406.     /usr/lib/X11          \
  1407.     /usr/local/X11/lib    \
  1408.     /usr/local/lib/X11    \
  1409.                           \
  1410.     /usr/X386/lib         \
  1411.     /usr/x386/lib         \
  1412.     /usr/XFree86/lib/X11  \
  1413.                           \
  1414.     /usr/lib              \
  1415.     /usr/local/lib        \
  1416.     /usr/unsupported/lib  \
  1417.     /usr/athena/lib       \
  1418.     /usr/local/x11r5/lib  \
  1419.     /usr/lpp/Xamples/lib  \
  1420.                           \
  1421.     /usr/openwin/lib      \
  1422.     /usr/openwin/share/lib \
  1423.     ; \
  1424. do
  1425.   for ac_extension in a so sl; do
  1426.     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  1427.       no_x= ac_x_libraries=$ac_dir
  1428.       break 2
  1429.     fi
  1430.   done
  1431. done
  1432. fi
  1433. rm -f conftest*
  1434.  
  1435. fi
  1436. if test "$no_x" = yes; then
  1437.   ac_cv_path_x="no_x=yes"
  1438. else
  1439.   ac_cv_path_x="no_x= ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  1440. fi
  1441. fi
  1442.   fi
  1443.   eval "$ac_cv_path_x"
  1444. fi # $with_x != no
  1445.  
  1446. if test "$no_x" = yes; then
  1447.   echo "$ac_t""no" 1>&4
  1448. else
  1449.   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  1450.   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  1451.   ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  1452.   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&4
  1453. fi
  1454.  
  1455. trap '' 1 2 15
  1456. if test -w $cache_file; then
  1457. echo "updating cache $cache_file"
  1458. cat > $cache_file <<\EOF
  1459. # This file is a shell script that caches the results of configure
  1460. # tests run on this system so they can be shared between configure
  1461. # scripts and configure runs.  It is not useful on other systems.
  1462. # If it contains results you don't want to keep, you may remove or edit it.
  1463. #
  1464. # By default, configure uses ./config.cache as the cache file,
  1465. # creating it if it does not exist already.  You can give configure
  1466. # the --cache-file=FILE option to use a different cache file; that is
  1467. # what configure does when it calls configure scripts in
  1468. # subdirectories, so they share the cache.
  1469. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  1470. # config.status only pays attention to the cache file if you give it the
  1471. # --recheck option to rerun configure.
  1472. #
  1473. EOF
  1474. # Ultrix sh set writes to stderr and can't be redirected directly.
  1475. (set) 2>&1 |
  1476.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \
  1477.   >> $cache_file
  1478. else
  1479. echo "not updating unwritable cache $cache_file"
  1480. fi
  1481.  
  1482. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  1483.  
  1484. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  1485. # Let make expand exec_prefix.
  1486. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1487.  
  1488. # Any assignment to VPATH causes Sun make to only execute
  1489. # the first set of double-colon rules, so remove it if not needed.
  1490. # If there is a colon in the path, we need to keep it.
  1491. if test "x$srcdir" = x.; then
  1492.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1493. fi
  1494.  
  1495. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1496.  
  1497. # Transform confdefs.h into DEFS.
  1498. # Protect against shell expansion while executing Makefile rules.
  1499. # Protect against Makefile macro expansion.
  1500. cat > conftest.defs <<\EOF
  1501. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
  1502. s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
  1503. s%\[%\\&%g
  1504. s%\]%\\&%g
  1505. s%\$%$$%g
  1506. EOF
  1507. DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
  1508. rm -f conftest.defs
  1509.  
  1510.  
  1511. # Without the "./", some shells look in PATH for config.status.
  1512. : ${CONFIG_STATUS=./config.status}
  1513.  
  1514. echo creating $CONFIG_STATUS
  1515. rm -f $CONFIG_STATUS
  1516. cat > $CONFIG_STATUS <<EOF
  1517. #!/bin/sh
  1518. # Generated automatically by configure.
  1519. # Run this file to recreate the current configuration.
  1520. # This directory was configured as follows,
  1521. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1522. #
  1523. # $0 $ac_configure_args
  1524. #
  1525. # Compiler output produced by configure, useful for debugging
  1526. # configure, is in ./config.log if it exists.
  1527.  
  1528. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1529. for ac_option
  1530. do
  1531.   case "\$ac_option" in
  1532.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1533.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  1534.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  1535.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1536.     echo "$CONFIG_STATUS generated by autoconf version 2.1"
  1537.     exit 0 ;;
  1538.   -help | --help | --hel | --he | --h)
  1539.     echo "\$ac_cs_usage"; exit 0 ;;
  1540.   *) echo "\$ac_cs_usage"; exit 1 ;;
  1541.   esac
  1542. done
  1543.  
  1544. ac_given_srcdir=$srcdir
  1545. ac_given_INSTALL="$INSTALL"
  1546.  
  1547. trap 'rm -f Makefile; exit 1' 1 2 15
  1548.  
  1549. # Protect against being on the right side of a sed subst in config.status. 
  1550. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  1551.  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  1552. $ac_vpsub
  1553. $extrasub
  1554. s%@CFLAGS@%$CFLAGS%g
  1555. s%@CPPFLAGS@%$CPPFLAGS%g
  1556. s%@CXXFLAGS@%$CXXFLAGS%g
  1557. s%@DEFS@%$DEFS%g
  1558. s%@LDFLAGS@%$LDFLAGS%g
  1559. s%@LIBS@%$LIBS%g
  1560. s%@exec_prefix@%$exec_prefix%g
  1561. s%@prefix@%$prefix%g
  1562. s%@program_transform_name@%$program_transform_name%g
  1563. s%@CXX@%$CXX%g
  1564. s%@RANLIB@%$RANLIB%g
  1565. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1566. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1567. s%@CXXCPP@%$CXXCPP%g
  1568. s%@XLIBSW@%$XLIBSW%g
  1569. s%@MATH_LIBS@%$MATH_LIBS%g
  1570.  
  1571. CEOF
  1572. EOF
  1573. cat >> $CONFIG_STATUS <<EOF
  1574.  
  1575. CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  1576. EOF
  1577. cat >> $CONFIG_STATUS <<\EOF
  1578. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  1579.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1580.   case "$ac_file" in
  1581.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1582.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1583.   *) ac_file_in="${ac_file}.in" ;;
  1584.   esac
  1585.  
  1586.   # Adjust relative srcdir, etc. for subdirectories.
  1587.  
  1588.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1589.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1590.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1591.     # The file is in a subdirectory.
  1592.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1593.     ac_dir_suffix="/$ac_dir"
  1594.     # A "../" for each directory in $ac_dir_suffix.
  1595.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1596.   else
  1597.     ac_dir_suffix= ac_dots=
  1598.   fi
  1599.  
  1600.   case "$ac_given_srcdir" in
  1601.   .)  srcdir=.
  1602.       if test -z "$ac_dots"; then top_srcdir=.
  1603.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  1604.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1605.   *) # Relative path.
  1606.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1607.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1608.   esac
  1609.  
  1610.   case "$ac_given_INSTALL" in
  1611.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  1612.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  1613.   esac
  1614.   echo creating "$ac_file"
  1615.   rm -f "$ac_file"
  1616.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  1617.   case "$ac_file" in
  1618.   *Makefile*) ac_comsub="1i\\
  1619. # $configure_input" ;;
  1620.   *) ac_comsub= ;;
  1621.   esac
  1622.   sed -e "$ac_comsub
  1623. s%@configure_input@%$configure_input%g
  1624. s%@srcdir@%$srcdir%g
  1625. s%@top_srcdir@%$top_srcdir%g
  1626. s%@INSTALL@%$INSTALL%g
  1627. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  1628. fi; done
  1629. rm -f conftest.subs
  1630.  
  1631.  
  1632.  
  1633. exit 0
  1634. EOF
  1635. chmod +x $CONFIG_STATUS
  1636. rm -fr confdefs* $ac_clean_files
  1637. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS
  1638.  
  1639.