home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / Python 1.3 / source code / configure < prev    next >
Encoding:
Text File  |  1995-12-17  |  72.5 KB  |  3,038 lines  |  [TEXT/R*ch]

  1. #! /bin/sh
  2.  
  3. # From configure.in Revision: 1.24 
  4.  
  5. # Guess values for system-dependent variables and create Makefiles.
  6. # Generated automatically using autoconf version 2.4 
  7. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  8. #
  9. # This configure script is free software; the Free Software Foundation
  10. # gives unlimited permission to copy, distribute and modify it.
  11.  
  12. # Defaults:
  13. ac_help=
  14. ac_default_prefix=/usr/local
  15. # Any additions from configure.in:
  16. ac_help="$ac_help
  17. --without-gcc             never use gcc"
  18. ac_help="$ac_help
  19. --with-readline=DIRECTORY GNU readline"
  20. ac_help="$ac_help
  21. --with-thread[=DIRECTORY] make interpreter thread-safe"
  22. ac_help="$ac_help
  23. --with-sgi-dl=DIRECTORY   IRIX 4 dynamic linking"
  24. ac_help="$ac_help
  25. --with-dl-dld=DL_DIR,DLD_DIR  GNU dynamic linking"
  26. ac_help="$ac_help
  27. --with-libm=STRING        math library"
  28. ac_help="$ac_help
  29. --with-libc=STRING        C library"
  30.  
  31. # Initialize some variables set by options.
  32. # The variables have the same names as the options, with
  33. # dashes changed to underlines.
  34. build=NONE
  35. cache_file=./config.cache
  36. exec_prefix=NONE
  37. host=NONE
  38. no_create=
  39. nonopt=NONE
  40. no_recursion=
  41. prefix=NONE
  42. program_prefix=NONE
  43. program_suffix=NONE
  44. program_transform_name=s,x,x,
  45. silent=
  46. site=
  47. srcdir=
  48. target=NONE
  49. verbose=
  50. x_includes=NONE
  51. x_libraries=NONE
  52.  
  53. # Initialize some other variables.
  54. subdirs=
  55.  
  56. ac_prev=
  57. for ac_option
  58. do
  59.  
  60.   # If the previous option needs an argument, assign it.
  61.   if test -n "$ac_prev"; then
  62.     eval "$ac_prev=\$ac_option"
  63.     ac_prev=
  64.     continue
  65.   fi
  66.  
  67.   case "$ac_option" in
  68.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  69.   *) ac_optarg= ;;
  70.   esac
  71.  
  72.   # Accept the important Cygnus configure options, so we can diagnose typos.
  73.  
  74.   case "$ac_option" in
  75.  
  76.   -build | --build | --buil | --bui | --bu | --b)
  77.     ac_prev=build ;;
  78.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  79.     build="$ac_optarg" ;;
  80.  
  81.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  82.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  83.     ac_prev=cache_file ;;
  84.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  85.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  86.     cache_file="$ac_optarg" ;;
  87.  
  88.   -disable-* | --disable-*)
  89.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  90.     # Reject names that are not valid shell variable names.
  91.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  92.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  93.     fi
  94.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  95.     eval "enable_${ac_feature}=no" ;;
  96.  
  97.   -enable-* | --enable-*)
  98.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  99.     # Reject names that are not valid shell variable names.
  100.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  101.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  102.     fi
  103.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  104.     case "$ac_option" in
  105.       *=*) ;;
  106.       *) ac_optarg=yes ;;
  107.     esac
  108.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  109.  
  110.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  111.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  112.   | --exec | --exe | --ex)
  113.     ac_prev=exec_prefix ;;
  114.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  115.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  116.   | --exec=* | --exe=* | --ex=*)
  117.     exec_prefix="$ac_optarg" ;;
  118.  
  119.   -gas | --gas | --ga | --g)
  120.     # Obsolete; use --with-gas.
  121.     with_gas=yes ;;
  122.  
  123.   -help | --help | --hel | --he)
  124.     # Omit some internal or obsolete options to make the list less imposing.
  125.     # This message is too long to be a string in the A/UX 3.1 sh.
  126.     cat << EOF
  127. Usage: configure [options] [host]
  128. Options: [defaults in brackets after descriptions]
  129. Configuration:
  130.   --cache-file=FILE       cache test results in FILE
  131.   --help                  print this message
  132.   --no-create             do not create output files
  133.   --quiet, --silent       do not print \`checking...' messages
  134.   --version               print the version of autoconf that created configure
  135. Directory and file names:
  136.   --prefix=PREFIX         install architecture-independent files in PREFIX
  137.                           [$ac_default_prefix]
  138.   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
  139.                           [same as prefix]
  140.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  141.   --program-prefix=PREFIX prepend PREFIX to installed program names
  142.   --program-suffix=SUFFIX append SUFFIX to installed program names
  143.   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  144. Host type:
  145.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  146.   --host=HOST             configure for HOST [guessed]
  147.   --target=TARGET         configure for TARGET [TARGET=HOST]
  148. Features and packages:
  149.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  150.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  151.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  152.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  153.   --x-includes=DIR        X include files are in DIR
  154.   --x-libraries=DIR       X library files are in DIR
  155. --enable and --with options recognized:$ac_help
  156. EOF
  157.     exit 0 ;;
  158.  
  159.   -host | --host | --hos | --ho)
  160.     ac_prev=host ;;
  161.   -host=* | --host=* | --hos=* | --ho=*)
  162.     host="$ac_optarg" ;;
  163.  
  164.   -nfp | --nfp | --nf)
  165.     # Obsolete; use --without-fp.
  166.     with_fp=no ;;
  167.  
  168.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  169.   | --no-cr | --no-c)
  170.     no_create=yes ;;
  171.  
  172.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  173.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  174.     no_recursion=yes ;;
  175.  
  176.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  177.     ac_prev=prefix ;;
  178.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  179.     prefix="$ac_optarg" ;;
  180.  
  181.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  182.   | --program-pre | --program-pr | --program-p)
  183.     ac_prev=program_prefix ;;
  184.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  185.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  186.     program_prefix="$ac_optarg" ;;
  187.  
  188.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  189.   | --program-suf | --program-su | --program-s)
  190.     ac_prev=program_suffix ;;
  191.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  192.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  193.     program_suffix="$ac_optarg" ;;
  194.  
  195.   -program-transform-name | --program-transform-name \
  196.   | --program-transform-nam | --program-transform-na \
  197.   | --program-transform-n | --program-transform- \
  198.   | --program-transform | --program-transfor \
  199.   | --program-transfo | --program-transf \
  200.   | --program-trans | --program-tran \
  201.   | --progr-tra | --program-tr | --program-t)
  202.     ac_prev=program_transform_name ;;
  203.   -program-transform-name=* | --program-transform-name=* \
  204.   | --program-transform-nam=* | --program-transform-na=* \
  205.   | --program-transform-n=* | --program-transform-=* \
  206.   | --program-transform=* | --program-transfor=* \
  207.   | --program-transfo=* | --program-transf=* \
  208.   | --program-trans=* | --program-tran=* \
  209.   | --progr-tra=* | --program-tr=* | --program-t=*)
  210.     program_transform_name="$ac_optarg" ;;
  211.  
  212.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  213.   | -silent | --silent | --silen | --sile | --sil)
  214.     silent=yes ;;
  215.  
  216.   -site | --site | --sit)
  217.     ac_prev=site ;;
  218.   -site=* | --site=* | --sit=*)
  219.     site="$ac_optarg" ;;
  220.  
  221.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  222.     ac_prev=srcdir ;;
  223.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  224.     srcdir="$ac_optarg" ;;
  225.  
  226.   -target | --target | --targe | --targ | --tar | --ta | --t)
  227.     ac_prev=target ;;
  228.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  229.     target="$ac_optarg" ;;
  230.  
  231.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  232.     verbose=yes ;;
  233.  
  234.   -version | --version | --versio | --versi | --vers)
  235.     echo "configure generated by autoconf version 2.4"
  236.     exit 0 ;;
  237.  
  238.   -with-* | --with-*)
  239.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  240.     # Reject names that are not valid shell variable names.
  241.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  242.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  243.     fi
  244.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  245.     case "$ac_option" in
  246.       *=*) ;;
  247.       *) ac_optarg=yes ;;
  248.     esac
  249.     eval "with_${ac_package}='$ac_optarg'" ;;
  250.  
  251.   -without-* | --without-*)
  252.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  253.     # Reject names that are not valid shell variable names.
  254.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  255.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  256.     fi
  257.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  258.     eval "with_${ac_package}=no" ;;
  259.  
  260.   --x)
  261.     # Obsolete; use --with-x.
  262.     with_x=yes ;;
  263.  
  264.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  265.   | --x-incl | --x-inc | --x-in | --x-i)
  266.     ac_prev=x_includes ;;
  267.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  268.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  269.     x_includes="$ac_optarg" ;;
  270.  
  271.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  272.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  273.     ac_prev=x_libraries ;;
  274.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  275.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  276.     x_libraries="$ac_optarg" ;;
  277.  
  278.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  279.     ;;
  280.  
  281.   *) 
  282.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  283.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  284.     fi
  285.     if test "x$nonopt" != xNONE; then
  286.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  287.     fi
  288.     nonopt="$ac_option"
  289.     ;;
  290.  
  291.   esac
  292. done
  293.  
  294. if test -n "$ac_prev"; then
  295.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  296. fi
  297.  
  298. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  299.  
  300. # File descriptor usage:
  301. # 0 standard input
  302. # 1 file creation
  303. # 2 errors and warnings
  304. # 3 some systems may open it to /dev/tty
  305. # 4 used on the Kubota Titan
  306. # 6 checking for... messages and results
  307. # 5 compiler messages saved in config.log
  308. if test "$silent" = yes; then
  309.   exec 6>/dev/null
  310. else
  311.   exec 6>&1
  312. fi
  313. exec 5>./config.log
  314.  
  315. echo "\
  316. This file contains any messages produced by compilers while
  317. running configure, to aid debugging if configure makes a mistake.
  318. " 1>&5
  319.  
  320. # Strip out --no-create and --no-recursion so they do not pile up.
  321. # Also quote any args containing shell metacharacters.
  322. ac_configure_args=
  323. for ac_arg
  324. do
  325.   case "$ac_arg" in
  326.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  327.   | --no-cr | --no-c) ;;
  328.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  329.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  330.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  331.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  332.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  333.   esac
  334. done
  335.  
  336. # NLS nuisances.
  337. # Only set LANG and LC_ALL to C if already set.
  338. # These must not be set unconditionally because not all systems understand
  339. # e.g. LANG=C (notably SCO).
  340. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  341. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  342.  
  343. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  344. rm -rf conftest* confdefs.h
  345. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  346. echo > confdefs.h
  347.  
  348. # A filename unique to this package, relative to the directory that
  349. # configure is in, which we can look for to find out if srcdir is correct.
  350. ac_unique_file=Include/object.h
  351.  
  352. # Find the source files, if location was not specified.
  353. if test -z "$srcdir"; then
  354.   ac_srcdir_defaulted=yes
  355.   # Try the directory containing this script, then its parent.
  356.   ac_prog=$0
  357.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  358.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  359.   srcdir=$ac_confdir
  360.   if test ! -r $srcdir/$ac_unique_file; then
  361.     srcdir=..
  362.   fi
  363. else
  364.   ac_srcdir_defaulted=no
  365. fi
  366. if test ! -r $srcdir/$ac_unique_file; then
  367.   if test "$ac_srcdir_defaulted" = yes; then
  368.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  369.   else
  370.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  371.   fi
  372. fi
  373. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  374.  
  375. # Prefer explicitly selected file to automatically selected ones.
  376. if test -z "$CONFIG_SITE"; then
  377.   if test "x$prefix" != xNONE; then
  378.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  379.   else
  380.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  381.   fi
  382. fi
  383. for ac_site_file in $CONFIG_SITE; do
  384.   if test -r "$ac_site_file"; then
  385.     echo "loading site script $ac_site_file"
  386.     . "$ac_site_file"
  387.   fi
  388. done
  389.  
  390. if test -r "$cache_file"; then
  391.   echo "loading cache $cache_file"
  392.   . $cache_file
  393. else
  394.   echo "creating cache $cache_file"
  395.   > $cache_file
  396. fi
  397.  
  398. ac_ext=c
  399. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  400. ac_cpp='$CPP $CPPFLAGS'
  401. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
  402. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
  403.  
  404. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  405.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  406.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  407.     ac_n= ac_c='
  408. ' ac_t='    '
  409.   else
  410.     ac_n=-n ac_c= ac_t=
  411.   fi
  412. else
  413.   ac_n= ac_c='\c' ac_t=
  414. fi
  415.  
  416.  
  417.  
  418.  
  419. # checks for alternative programs
  420. echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
  421. # Check whether --with-gcc or --without-gcc was given.
  422. withval="$with_gcc"
  423. if test -n "$withval"; then
  424.   
  425.     case $withval in
  426.     no)    CC=cc
  427.         without_gcc=yes;;
  428.     yes)    CC=gcc
  429.         without_gcc=no;;
  430.     *)    CC=$withval
  431.         without_gcc=$withval;;
  432.     esac
  433. else
  434.   
  435.     case `uname -s` in
  436.     OSF1)    CC=cc
  437.         without_gcc=;;
  438.     *)    without_gcc=no;;
  439.     esac
  440. fi
  441.  
  442. echo "$ac_t""$without_gcc" 1>&6
  443.  
  444. # If the user switches compilers, we can't believe the cache
  445. if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
  446. then
  447.   { echo "configure: error: cached CC is different -- throw away $cache_file
  448. (it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
  449. fi
  450.  
  451. # Extract the first word of "gcc", so it can be a program name with args.
  452. set dummy gcc; ac_word=$2
  453. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  454. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  455.   echo $ac_n "(cached) $ac_c" 1>&6
  456. else
  457.   if test -n "$CC"; then
  458.   ac_cv_prog_CC="$CC" # Let the user override the test.
  459. else
  460.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  461.   for ac_dir in $PATH; do
  462.     test -z "$ac_dir" && ac_dir=.
  463.     if test -f $ac_dir/$ac_word; then
  464.       ac_cv_prog_CC="gcc"
  465.       break
  466.     fi
  467.   done
  468.   IFS="$ac_save_ifs"
  469.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  470. fi
  471. fi
  472. CC="$ac_cv_prog_CC"
  473. if test -n "$CC"; then
  474.   echo "$ac_t""$CC" 1>&6
  475. else
  476.   echo "$ac_t""no" 1>&6
  477. fi
  478.  
  479.  
  480. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  481. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  482.   echo $ac_n "(cached) $ac_c" 1>&6
  483. else
  484.   cat > conftest.c <<EOF
  485. #ifdef __GNUC__
  486.   yes;
  487. #endif
  488. EOF
  489. if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  490.   ac_cv_prog_gcc=yes
  491. else
  492.   ac_cv_prog_gcc=no
  493. fi
  494. fi
  495. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  496. if test $ac_cv_prog_gcc = yes; then
  497.   GCC=yes
  498.   if test "${CFLAGS+set}" != set; then
  499.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  500. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  501.   echo $ac_n "(cached) $ac_c" 1>&6
  502. else
  503.   echo 'void f(){}' > conftest.c
  504. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  505.   ac_cv_prog_gcc_g=yes
  506. else
  507.   ac_cv_prog_gcc_g=no
  508. fi
  509. rm -f conftest*
  510.  
  511. fi
  512.     echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  513.     if test $ac_cv_prog_gcc_g = yes; then
  514.       CFLAGS="-g -O"
  515.     else
  516.       CFLAGS="-O"
  517.     fi
  518.   fi
  519. else
  520.   GCC=
  521.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  522. fi
  523.  
  524. # Extract the first word of "ranlib", so it can be a program name with args.
  525. set dummy ranlib; ac_word=$2
  526. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  527. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  528.   echo $ac_n "(cached) $ac_c" 1>&6
  529. else
  530.   if test -n "$RANLIB"; then
  531.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  532. else
  533.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  534.   for ac_dir in $PATH; do
  535.     test -z "$ac_dir" && ac_dir=.
  536.     if test -f $ac_dir/$ac_word; then
  537.       ac_cv_prog_RANLIB="ranlib"
  538.       break
  539.     fi
  540.   done
  541.   IFS="$ac_save_ifs"
  542.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  543. fi
  544. fi
  545. RANLIB="$ac_cv_prog_RANLIB"
  546. if test -n "$RANLIB"; then
  547.   echo "$ac_t""$RANLIB" 1>&6
  548. else
  549.   echo "$ac_t""no" 1>&6
  550. fi
  551.  
  552.  
  553. for ac_prog in ar aal
  554. do
  555. # Extract the first word of "$ac_prog", so it can be a program name with args.
  556. set dummy $ac_prog; ac_word=$2
  557. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  558. if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
  559.   echo $ac_n "(cached) $ac_c" 1>&6
  560. else
  561.   if test -n "$AR"; then
  562.   ac_cv_prog_AR="$AR" # Let the user override the test.
  563. else
  564.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  565.   for ac_dir in $PATH; do
  566.     test -z "$ac_dir" && ac_dir=.
  567.     if test -f $ac_dir/$ac_word; then
  568.       ac_cv_prog_AR="$ac_prog"
  569.       break
  570.     fi
  571.   done
  572.   IFS="$ac_save_ifs"
  573. fi
  574. fi
  575. AR="$ac_cv_prog_AR"
  576. if test -n "$AR"; then
  577.   echo "$ac_t""$AR" 1>&6
  578. else
  579.   echo "$ac_t""no" 1>&6
  580. fi
  581.  
  582. test -n "$AR" && break
  583. done
  584. test -n "$AR" || AR="ar"
  585.  
  586.  
  587.  
  588.  
  589. # Install just never works :-(
  590. if test -z "$INSTALL"
  591. then
  592.     INSTALL=cp
  593.     INSTALL_PROGRAM=cp
  594.     INSTALL_DATA=cp
  595. else
  596.     INSTALL_PROGRAM="$INSTALL"
  597.     INSTALL_DATA="$INSTALL -m 644"
  598. fi
  599.  
  600. # Optimizer/debugger flags passed between Makefiles
  601. if test -z "$OPT"
  602. then OPT=-O
  603. fi
  604.  
  605. # checks for UNIX variants that set C preprocessor variables
  606. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  607. # On Suns, sometimes $CPP names a directory.
  608. if test -n "$CPP" && test -d "$CPP"; then
  609.   CPP=
  610. fi
  611. if test -z "$CPP"; then
  612. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  613.   echo $ac_n "(cached) $ac_c" 1>&6
  614. else
  615.     # This must be in double quotes, not single quotes, because CPP may get
  616.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  617.   CPP="${CC-cc} -E"
  618.   # On the NeXT, cc -E runs the code through the compiler's parser,
  619.   # not just through cpp.
  620.   cat > conftest.$ac_ext <<EOF
  621. #line 622 "configure"
  622. #include "confdefs.h"
  623. #include <assert.h>
  624. Syntax Error
  625. EOF
  626. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  627. ac_err=`grep -v '^ *+' conftest.out`
  628. if test -z "$ac_err"; then
  629.   :
  630. else
  631.   echo "$ac_err" >&5
  632.   rm -rf conftest*
  633.   CPP="${CC-cc} -E -traditional-cpp"
  634.   cat > conftest.$ac_ext <<EOF
  635. #line 636 "configure"
  636. #include "confdefs.h"
  637. #include <assert.h>
  638. Syntax Error
  639. EOF
  640. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  641. ac_err=`grep -v '^ *+' conftest.out`
  642. if test -z "$ac_err"; then
  643.   :
  644. else
  645.   echo "$ac_err" >&5
  646.   rm -rf conftest*
  647.   CPP=/lib/cpp
  648. fi
  649. rm -f conftest*
  650. fi
  651. rm -f conftest*
  652.   ac_cv_prog_CPP="$CPP"
  653. fi
  654.   CPP="$ac_cv_prog_CPP"
  655. else
  656.   ac_cv_prog_CPP="$CPP"
  657. fi
  658. echo "$ac_t""$CPP" 1>&6
  659.  
  660. echo $ac_n "checking for AIX""... $ac_c" 1>&6
  661. cat > conftest.$ac_ext <<EOF
  662. #line 663 "configure"
  663. #include "confdefs.h"
  664. #ifdef _AIX
  665.   yes
  666. #endif
  667.  
  668. EOF
  669. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  670.   egrep "yes" >/dev/null 2>&1; then
  671.   rm -rf conftest*
  672.   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
  673. #define _ALL_SOURCE 1
  674. EOF
  675.  
  676. else
  677.   rm -rf conftest*
  678.   echo "$ac_t""no" 1>&6
  679. fi
  680. rm -f conftest*
  681.  
  682.  
  683. ac_safe=`echo "minix/config.h" | tr './\055' '___'`
  684. echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
  685. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  686.   echo $ac_n "(cached) $ac_c" 1>&6
  687. else
  688.   cat > conftest.$ac_ext <<EOF
  689. #line 690 "configure"
  690. #include "confdefs.h"
  691. #include <minix/config.h>
  692. EOF
  693. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  694. ac_err=`grep -v '^ *+' conftest.out`
  695. if test -z "$ac_err"; then
  696.   rm -rf conftest*
  697.   eval "ac_cv_header_$ac_safe=yes"
  698. else
  699.   echo "$ac_err" >&5
  700.   rm -rf conftest*
  701.   eval "ac_cv_header_$ac_safe=no"
  702. fi
  703. rm -f conftest*
  704. fi
  705. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  706.   echo "$ac_t""yes" 1>&6
  707.   MINIX=yes
  708. else
  709.   echo "$ac_t""no" 1>&6
  710. MINIX=
  711. fi
  712.  
  713. if test "$MINIX" = yes; then
  714.   cat >> confdefs.h <<\EOF
  715. #define _POSIX_SOURCE 1
  716. EOF
  717.  
  718.   cat >> confdefs.h <<\EOF
  719. #define _POSIX_1_SOURCE 2
  720. EOF
  721.  
  722.   cat >> confdefs.h <<\EOF
  723. #define _MINIX 1
  724. EOF
  725.  
  726. fi
  727.  
  728.  
  729. # checks for header files
  730. # If we cannot run a trivial program, we must be cross compiling.
  731. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  732. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  733.   echo $ac_n "(cached) $ac_c" 1>&6
  734. else
  735.   if test "$cross_compiling" = yes; then
  736.   ac_cv_c_cross=yes
  737. else
  738. cat > conftest.$ac_ext <<EOF
  739. #line 740 "configure"
  740. #include "confdefs.h"
  741. main(){return(0);}
  742. EOF
  743. eval $ac_link
  744. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  745.   ac_cv_c_cross=no
  746. else
  747.   ac_cv_c_cross=yes
  748. fi
  749. fi
  750. rm -fr conftest*
  751. fi
  752. cross_compiling=$ac_cv_c_cross
  753. echo "$ac_t""$ac_cv_c_cross" 1>&6
  754.  
  755. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  756. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  757.   echo $ac_n "(cached) $ac_c" 1>&6
  758. else
  759.   cat > conftest.$ac_ext <<EOF
  760. #line 761 "configure"
  761. #include "confdefs.h"
  762. #include <stdlib.h>
  763. #include <stdarg.h>
  764. #include <string.h>
  765. #include <float.h>
  766. EOF
  767. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  768. ac_err=`grep -v '^ *+' conftest.out`
  769. if test -z "$ac_err"; then
  770.   rm -rf conftest*
  771.   ac_cv_header_stdc=yes
  772. else
  773.   echo "$ac_err" >&5
  774.   rm -rf conftest*
  775.   ac_cv_header_stdc=no
  776. fi
  777. rm -f conftest*
  778.  
  779. if test $ac_cv_header_stdc = yes; then
  780.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  781. cat > conftest.$ac_ext <<EOF
  782. #line 783 "configure"
  783. #include "confdefs.h"
  784. #include <string.h>
  785. EOF
  786. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  787.   egrep "memchr" >/dev/null 2>&1; then
  788.   :
  789. else
  790.   rm -rf conftest*
  791.   ac_cv_header_stdc=no
  792. fi
  793. rm -f conftest*
  794.  
  795. fi
  796.  
  797. if test $ac_cv_header_stdc = yes; then
  798.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  799. cat > conftest.$ac_ext <<EOF
  800. #line 801 "configure"
  801. #include "confdefs.h"
  802. #include <stdlib.h>
  803. EOF
  804. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  805.   egrep "free" >/dev/null 2>&1; then
  806.   :
  807. else
  808.   rm -rf conftest*
  809.   ac_cv_header_stdc=no
  810. fi
  811. rm -f conftest*
  812.  
  813. fi
  814.  
  815. if test $ac_cv_header_stdc = yes; then
  816.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  817. if test "$cross_compiling" = yes; then
  818.   ac_cv_header_stdc=no
  819. else
  820. cat > conftest.$ac_ext <<EOF
  821. #line 822 "configure"
  822. #include "confdefs.h"
  823. #include <ctype.h>
  824. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  825. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  826. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  827. int main () { int i; for (i = 0; i < 256; i++)
  828. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  829. exit (0); }
  830.  
  831. EOF
  832. eval $ac_link
  833. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  834.   :
  835. else
  836.   ac_cv_header_stdc=no
  837. fi
  838. fi
  839. rm -fr conftest*
  840. fi
  841. fi
  842. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  843. if test $ac_cv_header_stdc = yes; then
  844.   cat >> confdefs.h <<\EOF
  845. #define STDC_HEADERS 1
  846. EOF
  847.  
  848. fi
  849.  
  850. for ac_hdr in dlfcn.h fcntl.h limits.h signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h sys/audioio.h sys/param.h sys/select.h sys/time.h sys/times.h sys/un.h sys/utsname.h sys/wait.h
  851. do
  852. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  853. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  854. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  855.   echo $ac_n "(cached) $ac_c" 1>&6
  856. else
  857.   cat > conftest.$ac_ext <<EOF
  858. #line 859 "configure"
  859. #include "confdefs.h"
  860. #include <$ac_hdr>
  861. EOF
  862. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  863. ac_err=`grep -v '^ *+' conftest.out`
  864. if test -z "$ac_err"; then
  865.   rm -rf conftest*
  866.   eval "ac_cv_header_$ac_safe=yes"
  867. else
  868.   echo "$ac_err" >&5
  869.   rm -rf conftest*
  870.   eval "ac_cv_header_$ac_safe=no"
  871. fi
  872. rm -f conftest*
  873. fi
  874. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  875.   echo "$ac_t""yes" 1>&6
  876.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  877.   cat >> confdefs.h <<EOF
  878. #define $ac_tr_hdr 1
  879. EOF
  880.  
  881. else
  882.   echo "$ac_t""no" 1>&6
  883. fi
  884. done
  885.  
  886. ac_header_dirent=no
  887. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  888. do
  889. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  890. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  891. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  892.   echo $ac_n "(cached) $ac_c" 1>&6
  893. else
  894.   cat > conftest.$ac_ext <<EOF
  895. #line 896 "configure"
  896. #include "confdefs.h"
  897. #include <sys/types.h>
  898. #include <$ac_hdr>
  899. int main() { return 0; }
  900. int t() {
  901. DIR *dirp = 0;
  902. ; return 0; }
  903. EOF
  904. if eval $ac_compile; then
  905.   rm -rf conftest*
  906.   eval "ac_cv_header_dirent_$ac_safe=yes"
  907. else
  908.   rm -rf conftest*
  909.   eval "ac_cv_header_dirent_$ac_safe=no"
  910. fi
  911. rm -f conftest*
  912.  
  913. fi
  914. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  915.   echo "$ac_t""yes" 1>&6
  916.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  917.   cat >> confdefs.h <<EOF
  918. #define $ac_tr_hdr 1
  919. EOF
  920.  ac_header_dirent=$ac_hdr; break
  921. else
  922.   echo "$ac_t""no" 1>&6
  923. fi
  924. done
  925. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  926. if test $ac_header_dirent = dirent.h; then
  927. echo $ac_n "checking for -ldir""... $ac_c" 1>&6
  928. if eval "test \"`echo '$''{'ac_cv_lib_dir'+set}'`\" = set"; then
  929.   echo $ac_n "(cached) $ac_c" 1>&6
  930. else
  931.   ac_save_LIBS="$LIBS"
  932. LIBS="-ldir  $LIBS"
  933. cat > conftest.$ac_ext <<EOF
  934. #line 935 "configure"
  935. #include "confdefs.h"
  936.  
  937. int main() { return 0; }
  938. int t() {
  939. opendir()
  940. ; return 0; }
  941. EOF
  942. if eval $ac_link; then
  943.   rm -rf conftest*
  944.   eval "ac_cv_lib_dir=yes"
  945. else
  946.   rm -rf conftest*
  947.   eval "ac_cv_lib_dir=no"
  948. fi
  949. rm -f conftest*
  950. LIBS="$ac_save_LIBS"
  951.  
  952. fi
  953. if eval "test \"`echo '$ac_cv_lib_'dir`\" = yes"; then
  954.   echo "$ac_t""yes" 1>&6
  955.   LIBS="$LIBS -ldir"
  956. else
  957.   echo "$ac_t""no" 1>&6
  958. fi
  959.  
  960. else
  961. echo $ac_n "checking for -lx""... $ac_c" 1>&6
  962. if eval "test \"`echo '$''{'ac_cv_lib_x'+set}'`\" = set"; then
  963.   echo $ac_n "(cached) $ac_c" 1>&6
  964. else
  965.   ac_save_LIBS="$LIBS"
  966. LIBS="-lx  $LIBS"
  967. cat > conftest.$ac_ext <<EOF
  968. #line 969 "configure"
  969. #include "confdefs.h"
  970.  
  971. int main() { return 0; }
  972. int t() {
  973. opendir()
  974. ; return 0; }
  975. EOF
  976. if eval $ac_link; then
  977.   rm -rf conftest*
  978.   eval "ac_cv_lib_x=yes"
  979. else
  980.   rm -rf conftest*
  981.   eval "ac_cv_lib_x=no"
  982. fi
  983. rm -f conftest*
  984. LIBS="$ac_save_LIBS"
  985.  
  986. fi
  987. if eval "test \"`echo '$ac_cv_lib_'x`\" = yes"; then
  988.   echo "$ac_t""yes" 1>&6
  989.   LIBS="$LIBS -lx"
  990. else
  991.   echo "$ac_t""no" 1>&6
  992. fi
  993.  
  994. fi
  995.  
  996.  
  997. # checks for typedefs
  998. was_it_defined=no
  999. echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
  1000. cat > conftest.$ac_ext <<EOF
  1001. #line 1002 "configure"
  1002. #include "confdefs.h"
  1003. #include <time.h>
  1004. EOF
  1005. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1006.   egrep "clock_t" >/dev/null 2>&1; then
  1007.   rm -rf conftest*
  1008.   was_it_defined=yes
  1009. else
  1010.   rm -rf conftest*
  1011.   cat >> confdefs.h <<\EOF
  1012. #define clock_t long
  1013. EOF
  1014.  
  1015. fi
  1016. rm -f conftest*
  1017.  
  1018. echo "$ac_t""$was_it_defined" 1>&6
  1019.  
  1020. echo $ac_n "checking for mode_t""... $ac_c" 1>&6
  1021. if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  1022.   echo $ac_n "(cached) $ac_c" 1>&6
  1023. else
  1024.   cat > conftest.$ac_ext <<EOF
  1025. #line 1026 "configure"
  1026. #include "confdefs.h"
  1027. #include <sys/types.h>
  1028. #if STDC_HEADERS
  1029. #include <stdlib.h>
  1030. #endif
  1031. EOF
  1032. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1033.   egrep "mode_t" >/dev/null 2>&1; then
  1034.   rm -rf conftest*
  1035.   ac_cv_type_mode_t=yes
  1036. else
  1037.   rm -rf conftest*
  1038.   ac_cv_type_mode_t=no
  1039. fi
  1040. rm -f conftest*
  1041.  
  1042. fi
  1043. echo "$ac_t""$ac_cv_type_mode_t" 1>&6
  1044. if test $ac_cv_type_mode_t = no; then
  1045.   cat >> confdefs.h <<\EOF
  1046. #define mode_t int
  1047. EOF
  1048.  
  1049. fi
  1050.  
  1051. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  1052. if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
  1053.   echo $ac_n "(cached) $ac_c" 1>&6
  1054. else
  1055.   cat > conftest.$ac_ext <<EOF
  1056. #line 1057 "configure"
  1057. #include "confdefs.h"
  1058. #include <sys/types.h>
  1059. #if STDC_HEADERS
  1060. #include <stdlib.h>
  1061. #endif
  1062. EOF
  1063. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1064.   egrep "off_t" >/dev/null 2>&1; then
  1065.   rm -rf conftest*
  1066.   ac_cv_type_off_t=yes
  1067. else
  1068.   rm -rf conftest*
  1069.   ac_cv_type_off_t=no
  1070. fi
  1071. rm -f conftest*
  1072.  
  1073. fi
  1074. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  1075. if test $ac_cv_type_off_t = no; then
  1076.   cat >> confdefs.h <<\EOF
  1077. #define off_t long
  1078. EOF
  1079.  
  1080. fi
  1081.  
  1082. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  1083. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  1084.   echo $ac_n "(cached) $ac_c" 1>&6
  1085. else
  1086.   cat > conftest.$ac_ext <<EOF
  1087. #line 1088 "configure"
  1088. #include "confdefs.h"
  1089. #include <sys/types.h>
  1090. #if STDC_HEADERS
  1091. #include <stdlib.h>
  1092. #endif
  1093. EOF
  1094. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1095.   egrep "pid_t" >/dev/null 2>&1; then
  1096.   rm -rf conftest*
  1097.   ac_cv_type_pid_t=yes
  1098. else
  1099.   rm -rf conftest*
  1100.   ac_cv_type_pid_t=no
  1101. fi
  1102. rm -f conftest*
  1103.  
  1104. fi
  1105. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  1106. if test $ac_cv_type_pid_t = no; then
  1107.   cat >> confdefs.h <<\EOF
  1108. #define pid_t int
  1109. EOF
  1110.  
  1111. fi
  1112.  
  1113. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  1114. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  1115.   echo $ac_n "(cached) $ac_c" 1>&6
  1116. else
  1117.   cat > conftest.$ac_ext <<EOF
  1118. #line 1119 "configure"
  1119. #include "confdefs.h"
  1120. #include <sys/types.h>
  1121. #include <signal.h>
  1122. #ifdef signal
  1123. #undef signal
  1124. #endif
  1125. #ifdef __cplusplus
  1126. extern "C"
  1127. #endif
  1128. void (*signal ()) ();
  1129. int main() { return 0; }
  1130. int t() {
  1131. int i;
  1132. ; return 0; }
  1133. EOF
  1134. if eval $ac_compile; then
  1135.   rm -rf conftest*
  1136.   ac_cv_type_signal=void
  1137. else
  1138.   rm -rf conftest*
  1139.   ac_cv_type_signal=int
  1140. fi
  1141. rm -f conftest*
  1142.  
  1143. fi
  1144. echo "$ac_t""$ac_cv_type_signal" 1>&6
  1145. cat >> confdefs.h <<EOF
  1146. #define RETSIGTYPE $ac_cv_type_signal
  1147. EOF
  1148.  
  1149.  
  1150. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  1151. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  1152.   echo $ac_n "(cached) $ac_c" 1>&6
  1153. else
  1154.   cat > conftest.$ac_ext <<EOF
  1155. #line 1156 "configure"
  1156. #include "confdefs.h"
  1157. #include <sys/types.h>
  1158. #if STDC_HEADERS
  1159. #include <stdlib.h>
  1160. #endif
  1161. EOF
  1162. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1163.   egrep "size_t" >/dev/null 2>&1; then
  1164.   rm -rf conftest*
  1165.   ac_cv_type_size_t=yes
  1166. else
  1167.   rm -rf conftest*
  1168.   ac_cv_type_size_t=no
  1169. fi
  1170. rm -f conftest*
  1171.  
  1172. fi
  1173. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  1174. if test $ac_cv_type_size_t = no; then
  1175.   cat >> confdefs.h <<\EOF
  1176. #define size_t unsigned
  1177. EOF
  1178.  
  1179. fi
  1180.  
  1181. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  1182. if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  1183.   echo $ac_n "(cached) $ac_c" 1>&6
  1184. else
  1185.   cat > conftest.$ac_ext <<EOF
  1186. #line 1187 "configure"
  1187. #include "confdefs.h"
  1188. #include <sys/types.h>
  1189. EOF
  1190. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1191.   egrep "uid_t" >/dev/null 2>&1; then
  1192.   rm -rf conftest*
  1193.   ac_cv_type_uid_t=yes
  1194. else
  1195.   rm -rf conftest*
  1196.   ac_cv_type_uid_t=no
  1197. fi
  1198. rm -f conftest*
  1199.  
  1200. fi
  1201. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  1202. if test $ac_cv_type_uid_t = no; then
  1203.   cat >> confdefs.h <<\EOF
  1204. #define uid_t int
  1205. EOF
  1206.  
  1207.   cat >> confdefs.h <<\EOF
  1208. #define gid_t int
  1209. EOF
  1210.  
  1211. fi
  1212.  
  1213.  
  1214. # Set name for machine-dependent library files
  1215.  
  1216. echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
  1217. if test -z "$MACHDEP"
  1218. then
  1219.     ac_sys_system=`uname -s | tr -d '/ ' | tr '[A-Z]' '[a-z]'`
  1220.     ac_sys_release=`uname -r | tr -d '/ ' | sed 's/\..*//'`
  1221.     ac_sys_cpu=`(uname -p 2>/dev/null || uname -m) |
  1222.              tr '[A-Z]' '[a-z]'`
  1223. ##    MACHDEP="$ac_sys_system$ac_sys_release$ac_sys_cpu"
  1224.     MACHDEP="$ac_sys_system$ac_sys_release"
  1225.     case MACHDEP in
  1226.     '')    MACHDEP=unknown;;
  1227.     esac
  1228. fi
  1229. echo "$ac_t""$MACHDEP" 1>&6
  1230.  
  1231. # Set info about shared libraries.
  1232. # XXX This should try things out instead of testing uname!
  1233.  
  1234.  
  1235.  
  1236.  
  1237. ac_sys_system=`uname -s`
  1238. ac_sys_release=`uname -r`
  1239. # SO is the extension of shared libraries `(including the dot!)
  1240. # -- usually .so, .sl on HP-UX
  1241. echo $ac_n "checking SO""... $ac_c" 1>&6
  1242. if test -z "$SO"
  1243. then
  1244.     case $ac_sys_system in
  1245.     hp*|HP*) SO=.sl;;
  1246.     *)    SO=.so;;
  1247.     esac
  1248. fi
  1249. echo "$ac_t""$SO" 1>&6
  1250. # LDSHARED is the ld *command* used to create shared library
  1251. # -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
  1252. echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
  1253. if test -z "$LDSHARED"
  1254. then
  1255.     case $ac_sys_system/$ac_sys_release in
  1256.     IRIX*) LDSHARED="ld -shared";;
  1257.     SunOS/4*) LDSHARED="ld";;
  1258.     SunOS/5*) LDSHARED="ld -G";;
  1259.     hp*|HP*) LDSHARED="ld -b";;
  1260.     OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
  1261.     DYNIX/ptx*) LDSHARED="ld -G";;
  1262.     Linux*) LDSHARED="gcc-elf -shared";;
  1263.     *)    LDSHARED="ld";;
  1264.     esac
  1265. fi
  1266. echo "$ac_t""$LDSHARED" 1>&6
  1267. # CCSHARED are the C *flags* used to create objects to go into a shared
  1268. # library -- this is only needed for a few systems
  1269. echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
  1270. if test -z "$CCSHARED"
  1271. then
  1272.     case $ac_sys_system in
  1273.     hp*|HP*) if test "$GCC" = yes;
  1274.          then CCSHARED="-fpic";
  1275.          else CCSHARED="+z";
  1276.          fi;;
  1277.     Linux*) CCSHARED="-fpic";;
  1278.     esac
  1279. fi
  1280. echo "$ac_t""$CCSHARED" 1>&6
  1281. # LINKFORSHARED are the flags passed to the $(CC) command that links
  1282. # the python executable -- this is only needed for a few systems
  1283. echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
  1284. if test -z "$LINKFORSHARED"
  1285. then
  1286.     case $ac_sys_system in
  1287.     hp*|HP*) LINKFORSHARED="-Wl,-E";;
  1288.     Linux*) LINKFORSHARED="-rdynamic";;
  1289.     esac
  1290. fi
  1291. echo "$ac_t""$LINKFORSHARED" 1>&6
  1292.  
  1293. # checks for libraries
  1294. echo $ac_n "checking for -ldl""... $ac_c" 1>&6
  1295. if eval "test \"`echo '$''{'ac_cv_lib_dl'+set}'`\" = set"; then
  1296.   echo $ac_n "(cached) $ac_c" 1>&6
  1297. else
  1298.   ac_save_LIBS="$LIBS"
  1299. LIBS="-ldl  $LIBS"
  1300. cat > conftest.$ac_ext <<EOF
  1301. #line 1302 "configure"
  1302. #include "confdefs.h"
  1303.  
  1304. int main() { return 0; }
  1305. int t() {
  1306. dlopen()
  1307. ; return 0; }
  1308. EOF
  1309. if eval $ac_link; then
  1310.   rm -rf conftest*
  1311.   eval "ac_cv_lib_dl=yes"
  1312. else
  1313.   rm -rf conftest*
  1314.   eval "ac_cv_lib_dl=no"
  1315. fi
  1316. rm -f conftest*
  1317. LIBS="$ac_save_LIBS"
  1318.  
  1319. fi
  1320. if eval "test \"`echo '$ac_cv_lib_'dl`\" = yes"; then
  1321.   echo "$ac_t""yes" 1>&6
  1322.     ac_tr_lib=HAVE_LIB`echo dl | tr '[a-z]' '[A-Z]'`
  1323.   cat >> confdefs.h <<EOF
  1324. #define $ac_tr_lib 1
  1325. EOF
  1326.  
  1327.   LIBS="-ldl $LIBS"
  1328.  
  1329. else
  1330.   echo "$ac_t""no" 1>&6
  1331. fi
  1332.     # Dynamic linking for SunOS/Solaris and SYSV
  1333. echo $ac_n "checking for -ldld""... $ac_c" 1>&6
  1334. if eval "test \"`echo '$''{'ac_cv_lib_dld'+set}'`\" = set"; then
  1335.   echo $ac_n "(cached) $ac_c" 1>&6
  1336. else
  1337.   ac_save_LIBS="$LIBS"
  1338. LIBS="-ldld  $LIBS"
  1339. cat > conftest.$ac_ext <<EOF
  1340. #line 1341 "configure"
  1341. #include "confdefs.h"
  1342.  
  1343. int main() { return 0; }
  1344. int t() {
  1345. shl_load()
  1346. ; return 0; }
  1347. EOF
  1348. if eval $ac_link; then
  1349.   rm -rf conftest*
  1350.   eval "ac_cv_lib_dld=yes"
  1351. else
  1352.   rm -rf conftest*
  1353.   eval "ac_cv_lib_dld=no"
  1354. fi
  1355. rm -f conftest*
  1356. LIBS="$ac_save_LIBS"
  1357.  
  1358. fi
  1359. if eval "test \"`echo '$ac_cv_lib_'dld`\" = yes"; then
  1360.   echo "$ac_t""yes" 1>&6
  1361.     ac_tr_lib=HAVE_LIB`echo dld | tr '[a-z]' '[A-Z]'`
  1362.   cat >> confdefs.h <<EOF
  1363. #define $ac_tr_lib 1
  1364. EOF
  1365.  
  1366.   LIBS="-ldld $LIBS"
  1367.  
  1368. else
  1369.   echo "$ac_t""no" 1>&6
  1370. fi
  1371.     # Dynamic linking for HP-UX
  1372. echo $ac_n "checking for -lsun""... $ac_c" 1>&6
  1373. if eval "test \"`echo '$''{'ac_cv_lib_sun'+set}'`\" = set"; then
  1374.   echo $ac_n "(cached) $ac_c" 1>&6
  1375. else
  1376.   ac_save_LIBS="$LIBS"
  1377. LIBS="-lsun  $LIBS"
  1378. cat > conftest.$ac_ext <<EOF
  1379. #line 1380 "configure"
  1380. #include "confdefs.h"
  1381.  
  1382. int main() { return 0; }
  1383. int t() {
  1384. getpwnam()
  1385. ; return 0; }
  1386. EOF
  1387. if eval $ac_link; then
  1388.   rm -rf conftest*
  1389.   eval "ac_cv_lib_sun=yes"
  1390. else
  1391.   rm -rf conftest*
  1392.   eval "ac_cv_lib_sun=no"
  1393. fi
  1394. rm -f conftest*
  1395. LIBS="$ac_save_LIBS"
  1396.  
  1397. fi
  1398. if eval "test \"`echo '$ac_cv_lib_'sun`\" = yes"; then
  1399.   echo "$ac_t""yes" 1>&6
  1400.     ac_tr_lib=HAVE_LIB`echo sun | tr '[a-z]' '[A-Z]'`
  1401.   cat >> confdefs.h <<EOF
  1402. #define $ac_tr_lib 1
  1403. EOF
  1404.  
  1405.   LIBS="-lsun $LIBS"
  1406.  
  1407. else
  1408.   echo "$ac_t""no" 1>&6
  1409. fi
  1410.     # NIS (== YP) interface for IRIX 4
  1411. # The following three (nsl,inet,socket) are needed on Sequent;
  1412. # the order of checking must be this.  Most SVR4 platforms will
  1413. # need -lsocket and -lnsl.  However on SGI IRIX 5, these exist but
  1414. # broken.  I see no elegant solution (probably CHECK_LIB should be
  1415. # fixed to only add the library if the given entry point is not
  1416. # satisfied without it).
  1417. if test "`uname -s`" != IRIX
  1418. then
  1419. echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
  1420. if eval "test \"`echo '$''{'ac_cv_lib_nsl'+set}'`\" = set"; then
  1421.   echo $ac_n "(cached) $ac_c" 1>&6
  1422. else
  1423.   ac_save_LIBS="$LIBS"
  1424. LIBS="-lnsl  $LIBS"
  1425. cat > conftest.$ac_ext <<EOF
  1426. #line 1427 "configure"
  1427. #include "confdefs.h"
  1428.  
  1429. int main() { return 0; }
  1430. int t() {
  1431. t_open()
  1432. ; return 0; }
  1433. EOF
  1434. if eval $ac_link; then
  1435.   rm -rf conftest*
  1436.   eval "ac_cv_lib_nsl=yes"
  1437. else
  1438.   rm -rf conftest*
  1439.   eval "ac_cv_lib_nsl=no"
  1440. fi
  1441. rm -f conftest*
  1442. LIBS="$ac_save_LIBS"
  1443.  
  1444. fi
  1445. if eval "test \"`echo '$ac_cv_lib_'nsl`\" = yes"; then
  1446.   echo "$ac_t""yes" 1>&6
  1447.   LIBS="-lnsl $LIBS"
  1448. else
  1449.   echo "$ac_t""no" 1>&6
  1450. fi
  1451.  # SVR4
  1452. echo $ac_n "checking for -linet""... $ac_c" 1>&6
  1453. if eval "test \"`echo '$''{'ac_cv_lib_inet'+set}'`\" = set"; then
  1454.   echo $ac_n "(cached) $ac_c" 1>&6
  1455. else
  1456.   ac_save_LIBS="$LIBS"
  1457. LIBS="-linet -lnsl $LIBS"
  1458. cat > conftest.$ac_ext <<EOF
  1459. #line 1460 "configure"
  1460. #include "confdefs.h"
  1461.  
  1462. int main() { return 0; }
  1463. int t() {
  1464. gethostbyname()
  1465. ; return 0; }
  1466. EOF
  1467. if eval $ac_link; then
  1468.   rm -rf conftest*
  1469.   eval "ac_cv_lib_inet=yes"
  1470. else
  1471.   rm -rf conftest*
  1472.   eval "ac_cv_lib_inet=no"
  1473. fi
  1474. rm -f conftest*
  1475. LIBS="$ac_save_LIBS"
  1476.  
  1477. fi
  1478. if eval "test \"`echo '$ac_cv_lib_'inet`\" = yes"; then
  1479.   echo "$ac_t""yes" 1>&6
  1480.   LIBS="-linet $LIBS"
  1481. else
  1482.   echo "$ac_t""no" 1>&6
  1483. fi
  1484.  # Sequent
  1485. echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
  1486. if eval "test \"`echo '$''{'ac_cv_lib_socket'+set}'`\" = set"; then
  1487.   echo $ac_n "(cached) $ac_c" 1>&6
  1488. else
  1489.   ac_save_LIBS="$LIBS"
  1490. LIBS="-lsocket $LIBS $LIBS"
  1491. cat > conftest.$ac_ext <<EOF
  1492. #line 1493 "configure"
  1493. #include "confdefs.h"
  1494.  
  1495. int main() { return 0; }
  1496. int t() {
  1497. socket()
  1498. ; return 0; }
  1499. EOF
  1500. if eval $ac_link; then
  1501.   rm -rf conftest*
  1502.   eval "ac_cv_lib_socket=yes"
  1503. else
  1504.   rm -rf conftest*
  1505.   eval "ac_cv_lib_socket=no"
  1506. fi
  1507. rm -f conftest*
  1508. LIBS="$ac_save_LIBS"
  1509.  
  1510. fi
  1511. if eval "test \"`echo '$ac_cv_lib_'socket`\" = yes"; then
  1512.   echo "$ac_t""yes" 1>&6
  1513.   LIBS="-lsocket $LIBS"
  1514. else
  1515.   echo "$ac_t""no" 1>&6
  1516. fi
  1517.  # SVR4 sockets
  1518. fi
  1519.  
  1520. echo $ac_n "checking for --with-readline""... $ac_c" 1>&6
  1521. # Check whether --with-readline or --without-readline was given.
  1522. withval="$with_readline"
  1523. if test -n "$withval"; then
  1524.   
  1525. echo "$ac_t""$withval" 1>&6
  1526. cat >> confdefs.h <<\EOF
  1527. #define WITH_READLINE 1
  1528. EOF
  1529.  
  1530. if test ! -d "$withval"
  1531. then { echo "configure: error: proper usage is --with-readline=DIRECTORY" 1>&2; exit 1; }
  1532. fi
  1533. termcap=
  1534. echo $ac_n "checking for -ltermcap""... $ac_c" 1>&6
  1535. if eval "test \"`echo '$''{'ac_cv_lib_termcap'+set}'`\" = set"; then
  1536.   echo $ac_n "(cached) $ac_c" 1>&6
  1537. else
  1538.   ac_save_LIBS="$LIBS"
  1539. LIBS="-ltermcap  $LIBS"
  1540. cat > conftest.$ac_ext <<EOF
  1541. #line 1542 "configure"
  1542. #include "confdefs.h"
  1543.  
  1544. int main() { return 0; }
  1545. int t() {
  1546. tgetent()
  1547. ; return 0; }
  1548. EOF
  1549. if eval $ac_link; then
  1550.   rm -rf conftest*
  1551.   eval "ac_cv_lib_termcap=yes"
  1552. else
  1553.   rm -rf conftest*
  1554.   eval "ac_cv_lib_termcap=no"
  1555. fi
  1556. rm -f conftest*
  1557. LIBS="$ac_save_LIBS"
  1558.  
  1559. fi
  1560. if eval "test \"`echo '$ac_cv_lib_'termcap`\" = yes"; then
  1561.   echo "$ac_t""yes" 1>&6
  1562.   termcap=termcap
  1563. else
  1564.   echo "$ac_t""no" 1>&6
  1565.  
  1566. echo $ac_n "checking for -ltermlib""... $ac_c" 1>&6
  1567. if eval "test \"`echo '$''{'ac_cv_lib_termlib'+set}'`\" = set"; then
  1568.   echo $ac_n "(cached) $ac_c" 1>&6
  1569. else
  1570.   ac_save_LIBS="$LIBS"
  1571. LIBS="-ltermlib  $LIBS"
  1572. cat > conftest.$ac_ext <<EOF
  1573. #line 1574 "configure"
  1574. #include "confdefs.h"
  1575.  
  1576. int main() { return 0; }
  1577. int t() {
  1578. tgetent()
  1579. ; return 0; }
  1580. EOF
  1581. if eval $ac_link; then
  1582.   rm -rf conftest*
  1583.   eval "ac_cv_lib_termlib=yes"
  1584. else
  1585.   rm -rf conftest*
  1586.   eval "ac_cv_lib_termlib=no"
  1587. fi
  1588. rm -f conftest*
  1589. LIBS="$ac_save_LIBS"
  1590.  
  1591. fi
  1592. if eval "test \"`echo '$ac_cv_lib_'termlib`\" = yes"; then
  1593.   echo "$ac_t""yes" 1>&6
  1594.   termcap=termlib
  1595. else
  1596.   echo "$ac_t""no" 1>&6
  1597. fi
  1598.  
  1599. fi
  1600.  
  1601. if test ! -z "$termcap"
  1602. then LIBS="$LIBS $withval/libreadline.a"
  1603.      # Avoid possible conflict between shared libraries termcap and gl
  1604.      # on IRIX 5: both contain a routine called clear.
  1605.      if test -f /usr/lib/lib$termcap.a
  1606.      then LIBS="$LIBS /usr/lib/lib$termcap.a"
  1607.      else LIBS="$LIBS -l$termcap"
  1608.      fi
  1609. else { echo "configure: error: no working termcap/termlib" 1>&2; exit 1; }
  1610. fi
  1611. else
  1612.   echo "$ac_t""no" 1>&6
  1613. fi
  1614.  
  1615.  
  1616. echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
  1617. # Check whether --with-thread or --without-thread was given.
  1618. withval="$with_thread"
  1619. if test -n "$withval"; then
  1620.   
  1621. echo "$ac_t""$withval" 1>&6
  1622. if test -d "$withval"
  1623. then LIBS="$LIBS -L$withval"
  1624. fi
  1625. echo $ac_n "checking for -lpthreads""... $ac_c" 1>&6
  1626. if eval "test \"`echo '$''{'ac_cv_lib_pthreads'+set}'`\" = set"; then
  1627.   echo $ac_n "(cached) $ac_c" 1>&6
  1628. else
  1629.   ac_save_LIBS="$LIBS"
  1630. LIBS="-lpthreads  $LIBS"
  1631. cat > conftest.$ac_ext <<EOF
  1632. #line 1633 "configure"
  1633. #include "confdefs.h"
  1634.  
  1635. int main() { return 0; }
  1636. int t() {
  1637. pthread_create()
  1638. ; return 0; }
  1639. EOF
  1640. if eval $ac_link; then
  1641.   rm -rf conftest*
  1642.   eval "ac_cv_lib_pthreads=yes"
  1643. else
  1644.   rm -rf conftest*
  1645.   eval "ac_cv_lib_pthreads=no"
  1646. fi
  1647. rm -f conftest*
  1648. LIBS="$ac_save_LIBS"
  1649.  
  1650. fi
  1651. if eval "test \"`echo '$ac_cv_lib_'pthreads`\" = yes"; then
  1652.   echo "$ac_t""yes" 1>&6
  1653.   cat >> confdefs.h <<\EOF
  1654. #define WITH_THREAD 1
  1655. EOF
  1656.  
  1657. cat >> confdefs.h <<\EOF
  1658. #define _POSIX_THREADS 1
  1659. EOF
  1660.  
  1661. LIBS="$LIBS -lpthreads"
  1662. LIBOBJS="$LIBOBJS thread.o"
  1663. else
  1664.   echo "$ac_t""no" 1>&6
  1665. fi
  1666.  
  1667. echo $ac_n "checking for -lmpc""... $ac_c" 1>&6
  1668. if eval "test \"`echo '$''{'ac_cv_lib_mpc'+set}'`\" = set"; then
  1669.   echo $ac_n "(cached) $ac_c" 1>&6
  1670. else
  1671.   ac_save_LIBS="$LIBS"
  1672. LIBS="-lmpc  $LIBS"
  1673. cat > conftest.$ac_ext <<EOF
  1674. #line 1675 "configure"
  1675. #include "confdefs.h"
  1676.  
  1677. int main() { return 0; }
  1678. int t() {
  1679. usconfig()
  1680. ; return 0; }
  1681. EOF
  1682. if eval $ac_link; then
  1683.   rm -rf conftest*
  1684.   eval "ac_cv_lib_mpc=yes"
  1685. else
  1686.   rm -rf conftest*
  1687.   eval "ac_cv_lib_mpc=no"
  1688. fi
  1689. rm -f conftest*
  1690. LIBS="$ac_save_LIBS"
  1691.  
  1692. fi
  1693. if eval "test \"`echo '$ac_cv_lib_'mpc`\" = yes"; then
  1694.   echo "$ac_t""yes" 1>&6
  1695.   cat >> confdefs.h <<\EOF
  1696. #define WITH_THREAD 1
  1697. EOF
  1698.  
  1699. LIBS="$LIBS -lmpc"
  1700. LIBOBJS="$LIBOBJS thread.o"
  1701. else
  1702.   echo "$ac_t""no" 1>&6
  1703. fi
  1704.  
  1705. echo $ac_n "checking for -lthread""... $ac_c" 1>&6
  1706. if eval "test \"`echo '$''{'ac_cv_lib_thread'+set}'`\" = set"; then
  1707.   echo $ac_n "(cached) $ac_c" 1>&6
  1708. else
  1709.   ac_save_LIBS="$LIBS"
  1710. LIBS="-lthread  $LIBS"
  1711. cat > conftest.$ac_ext <<EOF
  1712. #line 1713 "configure"
  1713. #include "confdefs.h"
  1714.  
  1715. int main() { return 0; }
  1716. int t() {
  1717. thr_create()
  1718. ; return 0; }
  1719. EOF
  1720. if eval $ac_link; then
  1721.   rm -rf conftest*
  1722.   eval "ac_cv_lib_thread=yes"
  1723. else
  1724.   rm -rf conftest*
  1725.   eval "ac_cv_lib_thread=no"
  1726. fi
  1727. rm -f conftest*
  1728. LIBS="$ac_save_LIBS"
  1729.  
  1730. fi
  1731. if eval "test \"`echo '$ac_cv_lib_'thread`\" = yes"; then
  1732.   echo "$ac_t""yes" 1>&6
  1733.   cat >> confdefs.h <<\EOF
  1734. #define WITH_THREAD 1
  1735. EOF
  1736.  
  1737. LIBS="$LIBS -lthread"
  1738. LIBOBJS="$LIBOBJS thread.o"
  1739. else
  1740.   echo "$ac_t""no" 1>&6
  1741. fi
  1742.  
  1743.  
  1744. else
  1745.   echo "$ac_t""no" 1>&6
  1746. fi
  1747.  
  1748.  
  1749. # -I${DLINCLDIR} is added to the compile rule for import.o
  1750.  
  1751. DLINCLDIR=/
  1752.  
  1753. echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
  1754. # Check whether --with-sgi-dl or --without-sgi-dl was given.
  1755. withval="$with_sgi_dl"
  1756. if test -n "$withval"; then
  1757.   
  1758. echo "$ac_t""$withval" 1>&6
  1759. cat >> confdefs.h <<\EOF
  1760. #define WITH_SGI_DL 1
  1761. EOF
  1762.  
  1763. dldir=$withval
  1764. if test -d "$dldir"
  1765. then LIBS="$LIBS -L$dldir"
  1766. else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
  1767. fi
  1768. DLINCLDIR=${dldir}
  1769. LIBS="$LIBS -ldl -lmld"
  1770. else
  1771.   echo "$ac_t""no" 1>&6
  1772. fi
  1773.  
  1774.  
  1775. echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
  1776. # Check whether --with-dl-dld or --without-dl-dld was given.
  1777. withval="$with_dl_dld"
  1778. if test -n "$withval"; then
  1779.   
  1780. echo "$ac_t""$withval" 1>&6
  1781. cat >> confdefs.h <<\EOF
  1782. #define WITH_DL_DLD 1
  1783. EOF
  1784.  
  1785. dldir=`echo "$withval" | sed 's/,.*//'`
  1786. dlddir=`echo "$withval" | sed 's/.*,//'`
  1787. if test -d "$dldir" -a -d "$dlddir"
  1788. then LIBS="$LIBS -L$dldir -L$dlddir"
  1789. else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
  1790. fi
  1791. DLINCLDIR=${dldir}
  1792. LIBS="$LIBS -ldl -ldld"
  1793. else
  1794.   echo "$ac_t""no" 1>&6
  1795. fi
  1796.  
  1797.  
  1798. # checks for library functions
  1799. for ac_func in chown clock dlopen ftime ftruncate gethostname_r gettimeofday getpeername getpgrp getpid getwd link lstat nice readlink select setgid setuid setsid setpgid setpgrp setvbuf siginterrupt strftime symlink tcgetpgrp tcsetpgrp times truncate uname waitpid
  1800. do
  1801. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1802. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1803.   echo $ac_n "(cached) $ac_c" 1>&6
  1804. else
  1805.   cat > conftest.$ac_ext <<EOF
  1806. #line 1807 "configure"
  1807. #include "confdefs.h"
  1808. /* System header to define __stub macros and hopefully few prototypes,
  1809.     which can conflict with char $ac_func(); below.  */
  1810. #include <assert.h>
  1811. /* Override any gcc2 internal prototype to avoid an error.  */
  1812. char $ac_func(); 
  1813.  
  1814. int main() { return 0; }
  1815. int t() {
  1816.  
  1817. /* The GNU C library defines this for functions which it implements
  1818.     to always fail with ENOSYS.  Some functions are actually named
  1819.     something starting with __ and the normal name is an alias.  */
  1820. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1821. choke me
  1822. #else
  1823. $ac_func();
  1824. #endif
  1825.  
  1826. ; return 0; }
  1827. EOF
  1828. if eval $ac_link; then
  1829.   rm -rf conftest*
  1830.   eval "ac_cv_func_$ac_func=yes"
  1831. else
  1832.   rm -rf conftest*
  1833.   eval "ac_cv_func_$ac_func=no"
  1834. fi
  1835. rm -f conftest*
  1836.  
  1837. fi
  1838. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1839.   echo "$ac_t""yes" 1>&6
  1840.     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  1841.   cat >> confdefs.h <<EOF
  1842. #define $ac_tr_func 1
  1843. EOF
  1844.  
  1845. else
  1846.   echo "$ac_t""no" 1>&6
  1847. fi
  1848. done
  1849.  
  1850. for ac_func in dup2 getcwd strerror memmove
  1851. do
  1852. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1853. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1854.   echo $ac_n "(cached) $ac_c" 1>&6
  1855. else
  1856.   cat > conftest.$ac_ext <<EOF
  1857. #line 1858 "configure"
  1858. #include "confdefs.h"
  1859. /* System header to define __stub macros and hopefully few prototypes,
  1860.     which can conflict with char $ac_func(); below.  */
  1861. #include <assert.h>
  1862. /* Override any gcc2 internal prototype to avoid an error.  */
  1863. char $ac_func(); 
  1864.  
  1865. int main() { return 0; }
  1866. int t() {
  1867.  
  1868. /* The GNU C library defines this for functions which it implements
  1869.     to always fail with ENOSYS.  Some functions are actually named
  1870.     something starting with __ and the normal name is an alias.  */
  1871. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1872. choke me
  1873. #else
  1874. $ac_func();
  1875. #endif
  1876.  
  1877. ; return 0; }
  1878. EOF
  1879. if eval $ac_link; then
  1880.   rm -rf conftest*
  1881.   eval "ac_cv_func_$ac_func=yes"
  1882. else
  1883.   rm -rf conftest*
  1884.   eval "ac_cv_func_$ac_func=no"
  1885. fi
  1886. rm -f conftest*
  1887.  
  1888. fi
  1889. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1890.   echo "$ac_t""yes" 1>&6
  1891.   :
  1892. else
  1893.   echo "$ac_t""no" 1>&6
  1894. LIBOBJS="$LIBOBJS ${ac_func}.o"
  1895. fi
  1896.  
  1897. done
  1898.  
  1899. echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
  1900. if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
  1901.   echo $ac_n "(cached) $ac_c" 1>&6
  1902. else
  1903.   cat > conftest.$ac_ext <<EOF
  1904. #line 1905 "configure"
  1905. #include "confdefs.h"
  1906. /* System header to define __stub macros and hopefully few prototypes,
  1907.     which can conflict with char getpgrp(); below.  */
  1908. #include <assert.h>
  1909. /* Override any gcc2 internal prototype to avoid an error.  */
  1910. char getpgrp(); 
  1911.  
  1912. int main() { return 0; }
  1913. int t() {
  1914.  
  1915. /* The GNU C library defines this for functions which it implements
  1916.     to always fail with ENOSYS.  Some functions are actually named
  1917.     something starting with __ and the normal name is an alias.  */
  1918. #if defined (__stub_getpgrp) || defined (__stub___getpgrp)
  1919. choke me
  1920. #else
  1921. getpgrp();
  1922. #endif
  1923.  
  1924. ; return 0; }
  1925. EOF
  1926. if eval $ac_link; then
  1927.   rm -rf conftest*
  1928.   eval "ac_cv_func_getpgrp=yes"
  1929. else
  1930.   rm -rf conftest*
  1931.   eval "ac_cv_func_getpgrp=no"
  1932. fi
  1933. rm -f conftest*
  1934.  
  1935. fi
  1936. if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
  1937.   echo "$ac_t""yes" 1>&6
  1938.   cat > conftest.$ac_ext <<EOF
  1939. #line 1940 "configure"
  1940. #include "confdefs.h"
  1941. #include <unistd.h>
  1942. int main() { return 0; }
  1943. int t() {
  1944. getpgrp(0);
  1945. ; return 0; }
  1946. EOF
  1947. if eval $ac_compile; then
  1948.   rm -rf conftest*
  1949.   cat >> confdefs.h <<\EOF
  1950. #define GETPGRP_HAVE_ARG 1
  1951. EOF
  1952.  
  1953. fi
  1954. rm -f conftest*
  1955.  
  1956. else
  1957.   echo "$ac_t""no" 1>&6
  1958. fi
  1959.  
  1960. echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
  1961. if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
  1962.   echo $ac_n "(cached) $ac_c" 1>&6
  1963. else
  1964.   cat > conftest.$ac_ext <<EOF
  1965. #line 1966 "configure"
  1966. #include "confdefs.h"
  1967. /* System header to define __stub macros and hopefully few prototypes,
  1968.     which can conflict with char setpgrp(); below.  */
  1969. #include <assert.h>
  1970. /* Override any gcc2 internal prototype to avoid an error.  */
  1971. char setpgrp(); 
  1972.  
  1973. int main() { return 0; }
  1974. int t() {
  1975.  
  1976. /* The GNU C library defines this for functions which it implements
  1977.     to always fail with ENOSYS.  Some functions are actually named
  1978.     something starting with __ and the normal name is an alias.  */
  1979. #if defined (__stub_setpgrp) || defined (__stub___setpgrp)
  1980. choke me
  1981. #else
  1982. setpgrp();
  1983. #endif
  1984.  
  1985. ; return 0; }
  1986. EOF
  1987. if eval $ac_link; then
  1988.   rm -rf conftest*
  1989.   eval "ac_cv_func_setpgrp=yes"
  1990. else
  1991.   rm -rf conftest*
  1992.   eval "ac_cv_func_setpgrp=no"
  1993. fi
  1994. rm -f conftest*
  1995.  
  1996. fi
  1997. if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
  1998.   echo "$ac_t""yes" 1>&6
  1999.   cat > conftest.$ac_ext <<EOF
  2000. #line 2001 "configure"
  2001. #include "confdefs.h"
  2002. #include <unistd.h>
  2003. int main() { return 0; }
  2004. int t() {
  2005. setpgrp(0,0);
  2006. ; return 0; }
  2007. EOF
  2008. if eval $ac_compile; then
  2009.   rm -rf conftest*
  2010.   cat >> confdefs.h <<\EOF
  2011. #define SETPGRP_HAVE_ARG 1
  2012. EOF
  2013.  
  2014. fi
  2015. rm -f conftest*
  2016.  
  2017. else
  2018.   echo "$ac_t""no" 1>&6
  2019. fi
  2020.  
  2021. echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
  2022. if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
  2023.   echo $ac_n "(cached) $ac_c" 1>&6
  2024. else
  2025.   cat > conftest.$ac_ext <<EOF
  2026. #line 2027 "configure"
  2027. #include "confdefs.h"
  2028. /* System header to define __stub macros and hopefully few prototypes,
  2029.     which can conflict with char gettimeofday(); below.  */
  2030. #include <assert.h>
  2031. /* Override any gcc2 internal prototype to avoid an error.  */
  2032. char gettimeofday(); 
  2033.  
  2034. int main() { return 0; }
  2035. int t() {
  2036.  
  2037. /* The GNU C library defines this for functions which it implements
  2038.     to always fail with ENOSYS.  Some functions are actually named
  2039.     something starting with __ and the normal name is an alias.  */
  2040. #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
  2041. choke me
  2042. #else
  2043. gettimeofday();
  2044. #endif
  2045.  
  2046. ; return 0; }
  2047. EOF
  2048. if eval $ac_link; then
  2049.   rm -rf conftest*
  2050.   eval "ac_cv_func_gettimeofday=yes"
  2051. else
  2052.   rm -rf conftest*
  2053.   eval "ac_cv_func_gettimeofday=no"
  2054. fi
  2055. rm -f conftest*
  2056.  
  2057. fi
  2058. if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
  2059.   echo "$ac_t""yes" 1>&6
  2060.   cat > conftest.$ac_ext <<EOF
  2061. #line 2062 "configure"
  2062. #include "confdefs.h"
  2063. #include <sys/time.h>
  2064. int main() { return 0; }
  2065. int t() {
  2066. gettimeofday((struct timeval*)0,(struct timezone*)0);
  2067. ; return 0; }
  2068. EOF
  2069. if eval $ac_compile; then
  2070.   :
  2071. else
  2072.   rm -rf conftest*
  2073.   cat >> confdefs.h <<\EOF
  2074. #define GETTIMEOFDAY_NO_TZ 1
  2075. EOF
  2076.  
  2077. fi
  2078. rm -f conftest*
  2079.  
  2080. else
  2081.   echo "$ac_t""no" 1>&6
  2082. fi
  2083.  
  2084.  
  2085. # checks for structures
  2086. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  2087. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  2088.   echo $ac_n "(cached) $ac_c" 1>&6
  2089. else
  2090.   cat > conftest.$ac_ext <<EOF
  2091. #line 2092 "configure"
  2092. #include "confdefs.h"
  2093. #include <sys/types.h>
  2094. #include <sys/time.h>
  2095. #include <time.h>
  2096. int main() { return 0; }
  2097. int t() {
  2098. struct tm *tp;
  2099. ; return 0; }
  2100. EOF
  2101. if eval $ac_compile; then
  2102.   rm -rf conftest*
  2103.   ac_cv_header_time=yes
  2104. else
  2105.   rm -rf conftest*
  2106.   ac_cv_header_time=no
  2107. fi
  2108. rm -f conftest*
  2109.  
  2110. fi
  2111. echo "$ac_t""$ac_cv_header_time" 1>&6
  2112. if test $ac_cv_header_time = yes; then
  2113.   cat >> confdefs.h <<\EOF
  2114. #define TIME_WITH_SYS_TIME 1
  2115. EOF
  2116.  
  2117. fi
  2118.  
  2119. echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
  2120. if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
  2121.   echo $ac_n "(cached) $ac_c" 1>&6
  2122. else
  2123.   cat > conftest.$ac_ext <<EOF
  2124. #line 2125 "configure"
  2125. #include "confdefs.h"
  2126. #include <sys/types.h>
  2127. #include <time.h>
  2128. int main() { return 0; }
  2129. int t() {
  2130. struct tm *tp; tp->tm_sec;
  2131. ; return 0; }
  2132. EOF
  2133. if eval $ac_compile; then
  2134.   rm -rf conftest*
  2135.   ac_cv_struct_tm=time.h
  2136. else
  2137.   rm -rf conftest*
  2138.   ac_cv_struct_tm=sys/time.h
  2139. fi
  2140. rm -f conftest*
  2141.  
  2142. fi
  2143. echo "$ac_t""$ac_cv_struct_tm" 1>&6
  2144. if test $ac_cv_struct_tm = sys/time.h; then
  2145.   cat >> confdefs.h <<\EOF
  2146. #define TM_IN_SYS_TIME 1
  2147. EOF
  2148.  
  2149. fi
  2150.  
  2151. echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
  2152. if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
  2153.   echo $ac_n "(cached) $ac_c" 1>&6
  2154. else
  2155.   cat > conftest.$ac_ext <<EOF
  2156. #line 2157 "configure"
  2157. #include "confdefs.h"
  2158. #include <sys/types.h>
  2159. #include <$ac_cv_struct_tm>
  2160. int main() { return 0; }
  2161. int t() {
  2162. struct tm tm; tm.tm_zone;
  2163. ; return 0; }
  2164. EOF
  2165. if eval $ac_compile; then
  2166.   rm -rf conftest*
  2167.   ac_cv_struct_tm_zone=yes
  2168. else
  2169.   rm -rf conftest*
  2170.   ac_cv_struct_tm_zone=no
  2171. fi
  2172. rm -f conftest*
  2173.  
  2174. fi
  2175. echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
  2176. if test "$ac_cv_struct_tm_zone" = yes; then
  2177.   cat >> confdefs.h <<\EOF
  2178. #define HAVE_TM_ZONE 1
  2179. EOF
  2180.  
  2181. else
  2182.   echo $ac_n "checking for tzname""... $ac_c" 1>&6
  2183. if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
  2184.   echo $ac_n "(cached) $ac_c" 1>&6
  2185. else
  2186.   cat > conftest.$ac_ext <<EOF
  2187. #line 2188 "configure"
  2188. #include "confdefs.h"
  2189. #include <time.h>
  2190. #ifndef tzname /* For SGI.  */
  2191. extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
  2192. #endif
  2193. int main() { return 0; }
  2194. int t() {
  2195. atoi(*tzname);
  2196. ; return 0; }
  2197. EOF
  2198. if eval $ac_link; then
  2199.   rm -rf conftest*
  2200.   ac_cv_var_tzname=yes
  2201. else
  2202.   rm -rf conftest*
  2203.   ac_cv_var_tzname=no
  2204. fi
  2205. rm -f conftest*
  2206.  
  2207. fi
  2208.   echo "$ac_t""$ac_cv_var_tzname" 1>&6
  2209.   if test $ac_cv_var_tzname = yes; then
  2210.     cat >> confdefs.h <<\EOF
  2211. #define HAVE_TZNAME 1
  2212. EOF
  2213.  
  2214.   fi
  2215. fi
  2216.  
  2217.  
  2218. echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
  2219. if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
  2220.   echo $ac_n "(cached) $ac_c" 1>&6
  2221. else
  2222.   cat > conftest.$ac_ext <<EOF
  2223. #line 2224 "configure"
  2224. #include "confdefs.h"
  2225. #include <time.h>
  2226. int main() { return 0; }
  2227. int t() {
  2228. return altzone;
  2229. ; return 0; }
  2230. EOF
  2231. if eval $ac_compile; then
  2232.   rm -rf conftest*
  2233.   ac_cv_header_time_altzone=yes
  2234. else
  2235.   rm -rf conftest*
  2236.   ac_cv_header_time_altzone=no
  2237. fi
  2238. rm -f conftest*
  2239.  
  2240. fi
  2241.  
  2242. echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
  2243. if test $ac_cv_header_time_altzone = yes; then
  2244.   cat >> confdefs.h <<\EOF
  2245. #define HAVE_ALTZONE 1
  2246. EOF
  2247.  
  2248. fi
  2249.  
  2250. was_it_defined=no
  2251. echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
  2252. cat > conftest.$ac_ext <<EOF
  2253. #line 2254 "configure"
  2254. #include "confdefs.h"
  2255.  
  2256. #include <sys/types.h>
  2257. #include <sys/select.h>
  2258. #include <sys/time.h>
  2259.  
  2260. int main() { return 0; }
  2261. int t() {
  2262. ;
  2263. ; return 0; }
  2264. EOF
  2265. if eval $ac_compile; then
  2266.   rm -rf conftest*
  2267.   cat >> confdefs.h <<\EOF
  2268. #define SYS_SELECT_WITH_SYS_TIME 1
  2269. EOF
  2270.  was_it_defined=yes
  2271. fi
  2272. rm -f conftest*
  2273.  
  2274. echo "$ac_t""$was_it_defined" 1>&6
  2275.  
  2276. # checks for compiler characteristics
  2277.  
  2278. echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
  2279. if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
  2280.   echo $ac_n "(cached) $ac_c" 1>&6
  2281. else
  2282.   if test "$GCC" = yes; then
  2283.   # GCC predefines this symbol on systems where it applies.
  2284. cat > conftest.$ac_ext <<EOF
  2285. #line 2286 "configure"
  2286. #include "confdefs.h"
  2287. #ifdef __CHAR_UNSIGNED__
  2288.   yes
  2289. #endif
  2290.  
  2291. EOF
  2292. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2293.   egrep "yes" >/dev/null 2>&1; then
  2294.   rm -rf conftest*
  2295.   ac_cv_c_char_unsigned=yes
  2296. else
  2297.   rm -rf conftest*
  2298.   ac_cv_c_char_unsigned=no
  2299. fi
  2300. rm -f conftest*
  2301.  
  2302. else
  2303. if test "$cross_compiling" = yes; then
  2304.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2305. else
  2306. cat > conftest.$ac_ext <<EOF
  2307. #line 2308 "configure"
  2308. #include "confdefs.h"
  2309. /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
  2310. #if !defined(__STDC__) || __STDC__ != 1
  2311. #define volatile
  2312. #endif
  2313. main() {
  2314.   volatile char c = 255; exit(c < 0);
  2315. }
  2316. EOF
  2317. eval $ac_link
  2318. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2319.   ac_cv_c_char_unsigned=yes
  2320. else
  2321.   ac_cv_c_char_unsigned=no
  2322. fi
  2323. fi
  2324. rm -fr conftest*
  2325. fi
  2326. fi
  2327. echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
  2328. if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
  2329.   cat >> confdefs.h <<\EOF
  2330. #define __CHAR_UNSIGNED__ 1
  2331. EOF
  2332.  
  2333. fi
  2334.  
  2335.  
  2336. echo $ac_n "checking for working const""... $ac_c" 1>&6
  2337. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  2338.   echo $ac_n "(cached) $ac_c" 1>&6
  2339. else
  2340.   cat > conftest.$ac_ext <<EOF
  2341. #line 2342 "configure"
  2342. #include "confdefs.h"
  2343.  
  2344. int main() { return 0; }
  2345. int t() {
  2346.  
  2347. /* Ultrix mips cc rejects this.  */
  2348. typedef int charset[2]; const charset x;
  2349. /* SunOS 4.1.1 cc rejects this.  */
  2350. char const *const *ccp;
  2351. char **p;
  2352. /* NEC SVR4.0.2 mips cc rejects this.  */
  2353. struct point {int x, y;};
  2354. static struct point const zero;
  2355. /* AIX XL C 1.02.0.0 rejects this.
  2356.    It does not let you subtract one const X* pointer from another in an arm
  2357.    of an if-expression whose if-part is not a constant expression */
  2358. const char *g = "string";
  2359. ccp = &g + (g ? g-g : 0);
  2360. /* HPUX 7.0 cc rejects these. */
  2361. ++ccp;
  2362. p = (char**) ccp;
  2363. ccp = (char const *const *) p;
  2364. { /* SCO 3.2v4 cc rejects this.  */
  2365.   char *t;
  2366.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  2367.  
  2368.   *t++ = 0;
  2369. }
  2370. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  2371.   int x[] = {25, 17};
  2372.   const int *foo = &x[0];
  2373.   ++foo;
  2374. }
  2375. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  2376.   typedef const int *iptr;
  2377.   iptr p = 0;
  2378.   ++p;
  2379. }
  2380. { /* AIX XL C 1.02.0.0 rejects this saying
  2381.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  2382.   struct s { int j; const int *ap[3]; };
  2383.   struct s *b; b->j = 5;
  2384. }
  2385. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  2386.   const int foo = 10;
  2387. }
  2388.  
  2389. ; return 0; }
  2390. EOF
  2391. if eval $ac_compile; then
  2392.   rm -rf conftest*
  2393.   ac_cv_c_const=yes
  2394. else
  2395.   rm -rf conftest*
  2396.   ac_cv_c_const=no
  2397. fi
  2398. rm -f conftest*
  2399.  
  2400. fi
  2401. echo "$ac_t""$ac_cv_c_const" 1>&6
  2402. if test $ac_cv_c_const = no; then
  2403.   cat >> confdefs.h <<\EOF
  2404. #define const 
  2405. EOF
  2406.  
  2407. fi
  2408.  
  2409.  
  2410. works=no
  2411. echo $ac_n "checking for working volatile""... $ac_c" 1>&6
  2412. cat > conftest.$ac_ext <<EOF
  2413. #line 2414 "configure"
  2414. #include "confdefs.h"
  2415.  
  2416. int main() { return 0; }
  2417. int t() {
  2418. volatile int x; x = 0;
  2419. ; return 0; }
  2420. EOF
  2421. if eval $ac_compile; then
  2422.   rm -rf conftest*
  2423.   works=yes
  2424. else
  2425.   rm -rf conftest*
  2426.   cat >> confdefs.h <<\EOF
  2427. #define volatile 
  2428. EOF
  2429.  
  2430. fi
  2431. rm -f conftest*
  2432.  
  2433. echo "$ac_t""$works" 1>&6
  2434.  
  2435. works=no
  2436. echo $ac_n "checking for working signed char""... $ac_c" 1>&6
  2437. cat > conftest.$ac_ext <<EOF
  2438. #line 2439 "configure"
  2439. #include "confdefs.h"
  2440.  
  2441. int main() { return 0; }
  2442. int t() {
  2443. signed char c;
  2444. ; return 0; }
  2445. EOF
  2446. if eval $ac_compile; then
  2447.   rm -rf conftest*
  2448.   works=yes
  2449. else
  2450.   rm -rf conftest*
  2451.   cat >> confdefs.h <<\EOF
  2452. #define signed 
  2453. EOF
  2454.  
  2455. fi
  2456. rm -f conftest*
  2457.  
  2458. echo "$ac_t""$works" 1>&6
  2459.  
  2460. have_prototypes=no
  2461. echo $ac_n "checking for prototypes""... $ac_c" 1>&6
  2462. cat > conftest.$ac_ext <<EOF
  2463. #line 2464 "configure"
  2464. #include "confdefs.h"
  2465. int foo(int x) { return 0; }
  2466. int main() { return 0; }
  2467. int t() {
  2468. return foo(10);
  2469. ; return 0; }
  2470. EOF
  2471. if eval $ac_compile; then
  2472.   rm -rf conftest*
  2473.   cat >> confdefs.h <<\EOF
  2474. #define HAVE_PROTOTYPES 1
  2475. EOF
  2476.  have_prototypes=yes
  2477. fi
  2478. rm -f conftest*
  2479.  
  2480. echo "$ac_t""$have_prototypes" 1>&6
  2481.  
  2482. works=no
  2483. echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
  2484. cat > conftest.$ac_ext <<EOF
  2485. #line 2486 "configure"
  2486. #include "confdefs.h"
  2487.  
  2488. #include <stdarg.h>
  2489. int foo(int x, ...) { return 0; }
  2490.  
  2491. int main() { return 0; }
  2492. int t() {
  2493. return foo(10, 11, 12);
  2494. ; return 0; }
  2495. EOF
  2496. if eval $ac_compile; then
  2497.   rm -rf conftest*
  2498.   cat >> confdefs.h <<\EOF
  2499. #define HAVE_STDARG_PROTOTYPES 1
  2500. EOF
  2501.  works=yes
  2502. fi
  2503. rm -f conftest*
  2504.  
  2505. echo "$ac_t""$works" 1>&6
  2506.  
  2507. if test "$have_prototypes" = yes; then
  2508. bad_prototypes=no
  2509. echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
  2510. cat > conftest.$ac_ext <<EOF
  2511. #line 2512 "configure"
  2512. #include "confdefs.h"
  2513. #include <unistd.h>
  2514. int main() { return 0; }
  2515. int t() {
  2516. char **t;execve("@",t,t);
  2517. ; return 0; }
  2518. EOF
  2519. if eval $ac_compile; then
  2520.   :
  2521. else
  2522.   rm -rf conftest*
  2523.   cat >> confdefs.h <<\EOF
  2524. #define BAD_EXEC_PROTOTYPES 1
  2525. EOF
  2526.  bad_prototypes=yes
  2527. fi
  2528. rm -f conftest*
  2529.  
  2530. echo "$ac_t""$bad_prototypes" 1>&6
  2531. fi
  2532.  
  2533. bad_forward=no
  2534. echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
  2535. if test "$cross_compiling" = yes; then
  2536.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2537. else
  2538. cat > conftest.$ac_ext <<EOF
  2539. #line 2540 "configure"
  2540. #include "confdefs.h"
  2541.  
  2542. struct s { int a; int b; };
  2543. static struct s foo;
  2544. int foobar() {
  2545.  static int random;
  2546.  random = (int) &foo;
  2547.  return random;
  2548. }
  2549. static struct s foo = { 1, 2 };
  2550. main() {
  2551.  exit(!((int)&foo == foobar()));
  2552. }
  2553.  
  2554. EOF
  2555. eval $ac_link
  2556. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2557.   :
  2558. else
  2559.   cat >> confdefs.h <<\EOF
  2560. #define BAD_STATIC_FORWARD 1
  2561. EOF
  2562.  bad_forward=yes
  2563. fi
  2564. fi
  2565. rm -fr conftest*
  2566. echo "$ac_t""$bad_forward" 1>&6
  2567.  
  2568. va_list_is_array=no
  2569. echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
  2570. cat > conftest.$ac_ext <<EOF
  2571. #line 2572 "configure"
  2572. #include "confdefs.h"
  2573.  
  2574. #ifdef HAVE_STDARG_PROTOTYPES
  2575. #include <stdarg.h>
  2576. #else
  2577. #include <varargs.h>
  2578. #endif
  2579.  
  2580. int main() { return 0; }
  2581. int t() {
  2582. va_list list1, list2; list1 = list2;
  2583. ; return 0; }
  2584. EOF
  2585. if eval $ac_compile; then
  2586.   :
  2587. else
  2588.   rm -rf conftest*
  2589.   cat >> confdefs.h <<\EOF
  2590. #define VA_LIST_IS_ARRAY 1
  2591. EOF
  2592.  va_list_is_array=yes
  2593. fi
  2594. rm -f conftest*
  2595.  
  2596. echo "$ac_t""$va_list_is_array" 1>&6
  2597.  
  2598. # checks for system services
  2599. # (none yet)
  2600.  
  2601. # Linux requires this for correct f.p. operations
  2602. echo $ac_n "checking for -lieee""... $ac_c" 1>&6
  2603. if eval "test \"`echo '$''{'ac_cv_lib_ieee'+set}'`\" = set"; then
  2604.   echo $ac_n "(cached) $ac_c" 1>&6
  2605. else
  2606.   ac_save_LIBS="$LIBS"
  2607. LIBS="-lieee  $LIBS"
  2608. cat > conftest.$ac_ext <<EOF
  2609. #line 2610 "configure"
  2610. #include "confdefs.h"
  2611.  
  2612. int main() { return 0; }
  2613. int t() {
  2614. __fpu_control()
  2615. ; return 0; }
  2616. EOF
  2617. if eval $ac_link; then
  2618.   rm -rf conftest*
  2619.   eval "ac_cv_lib_ieee=yes"
  2620. else
  2621.   rm -rf conftest*
  2622.   eval "ac_cv_lib_ieee=no"
  2623. fi
  2624. rm -f conftest*
  2625. LIBS="$ac_save_LIBS"
  2626.  
  2627. fi
  2628. if eval "test \"`echo '$ac_cv_lib_'ieee`\" = yes"; then
  2629.   echo "$ac_t""yes" 1>&6
  2630.     ac_tr_lib=HAVE_LIB`echo ieee | tr '[a-z]' '[A-Z]'`
  2631.   cat >> confdefs.h <<EOF
  2632. #define $ac_tr_lib 1
  2633. EOF
  2634.  
  2635.   LIBS="-lieee $LIBS"
  2636.  
  2637. else
  2638.   echo "$ac_t""no" 1>&6
  2639. fi
  2640.  
  2641.  
  2642. # check for --with-libm=...
  2643.  
  2644. LIBM=-lm
  2645. # Check whether --with-libm or --without-libm was given.
  2646. withval="$with_libm"
  2647. if test -n "$withval"; then
  2648.   
  2649. if test "$withval" != yes
  2650. then LIBM=$withval
  2651. else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
  2652. fi
  2653. fi
  2654.  
  2655.  
  2656. # check for --with-libc=...
  2657.  
  2658. # Check whether --with-libc or --without-libc was given.
  2659. withval="$with_libc"
  2660. if test -n "$withval"; then
  2661.   
  2662. if test "$withval" != yes
  2663. then LIBC=$withval
  2664. else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
  2665. fi
  2666. fi
  2667.  
  2668.  
  2669. # check for hypot() in math library
  2670. LIBS_SAVE=$LIBS
  2671. LIBS="$LIBS $LIBM"
  2672. for ac_func in hypot
  2673. do
  2674. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2675. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2676.   echo $ac_n "(cached) $ac_c" 1>&6
  2677. else
  2678.   cat > conftest.$ac_ext <<EOF
  2679. #line 2680 "configure"
  2680. #include "confdefs.h"
  2681. /* System header to define __stub macros and hopefully few prototypes,
  2682.     which can conflict with char $ac_func(); below.  */
  2683. #include <assert.h>
  2684. /* Override any gcc2 internal prototype to avoid an error.  */
  2685. char $ac_func(); 
  2686.  
  2687. int main() { return 0; }
  2688. int t() {
  2689.  
  2690. /* The GNU C library defines this for functions which it implements
  2691.     to always fail with ENOSYS.  Some functions are actually named
  2692.     something starting with __ and the normal name is an alias.  */
  2693. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2694. choke me
  2695. #else
  2696. $ac_func();
  2697. #endif
  2698.  
  2699. ; return 0; }
  2700. EOF
  2701. if eval $ac_link; then
  2702.   rm -rf conftest*
  2703.   eval "ac_cv_func_$ac_func=yes"
  2704. else
  2705.   rm -rf conftest*
  2706.   eval "ac_cv_func_$ac_func=no"
  2707. fi
  2708. rm -f conftest*
  2709.  
  2710. fi
  2711. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2712.   echo "$ac_t""yes" 1>&6
  2713.     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  2714.   cat >> confdefs.h <<EOF
  2715. #define $ac_tr_func 1
  2716. EOF
  2717.  
  2718. else
  2719.   echo "$ac_t""no" 1>&6
  2720. fi
  2721. done
  2722.  
  2723. LIBS=$LIBS_SAVE
  2724.  
  2725. # check for getopt
  2726. echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
  2727. if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
  2728.   echo $ac_n "(cached) $ac_c" 1>&6
  2729. else
  2730.   if test "$cross_compiling" = yes; then
  2731.   ac_cv_func_getopt=no
  2732. else
  2733. cat > conftest.$ac_ext <<EOF
  2734. #line 2735 "configure"
  2735. #include "confdefs.h"
  2736. #include <stdio.h>
  2737. extern int optind, opterr, getopt();
  2738. extern char* optarg;
  2739. int main() {
  2740.     char* av[] = { "testprog", "parameter", "-fFlag", NULL };
  2741.     opterr = 0;
  2742.     if (getopt(3, av, "f:") == 'f') { exit(1); }
  2743.     exit(0);
  2744. }
  2745. EOF
  2746. eval $ac_link
  2747. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2748.   ac_cv_func_getopt=yes
  2749. else
  2750.   ac_cv_func_getopt=no
  2751. fi
  2752. fi
  2753. rm -fr conftest*
  2754. fi
  2755. echo "$ac_t""$ac_cv_func_getopt" 1>&6
  2756. test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
  2757.  
  2758. # generate output files
  2759. trap '' 1 2 15
  2760. cat > confcache <<\EOF
  2761. # This file is a shell script that caches the results of configure
  2762. # tests run on this system so they can be shared between configure
  2763. # scripts and configure runs.  It is not useful on other systems.
  2764. # If it contains results you don't want to keep, you may remove or edit it.
  2765. #
  2766. # By default, configure uses ./config.cache as the cache file,
  2767. # creating it if it does not exist already.  You can give configure
  2768. # the --cache-file=FILE option to use a different cache file; that is
  2769. # what configure does when it calls configure scripts in
  2770. # subdirectories, so they share the cache.
  2771. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2772. # config.status only pays attention to the cache file if you give it the
  2773. # --recheck option to rerun configure.
  2774. #
  2775. EOF
  2776. # Ultrix sh set writes to stderr and can't be redirected directly,
  2777. # and sets the high bit in the cache file unless we assign to the vars.
  2778. (set) 2>&1 |
  2779.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  2780.   >> confcache
  2781. if cmp -s $cache_file confcache; then
  2782.   :
  2783. else
  2784.   if test -w $cache_file; then
  2785.     echo "updating cache $cache_file"
  2786.     cat confcache > $cache_file
  2787.   else
  2788.     echo "not updating unwritable cache $cache_file"
  2789.   fi
  2790. fi
  2791. rm -f confcache
  2792.  
  2793. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  2794.  
  2795. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  2796. # Let make expand exec_prefix.
  2797. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  2798.  
  2799. # Any assignment to VPATH causes Sun make to only execute
  2800. # the first set of double-colon rules, so remove it if not needed.
  2801. # If there is a colon in the path, we need to keep it.
  2802. if test "x$srcdir" = x.; then
  2803.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2804. fi
  2805.  
  2806. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  2807.  
  2808. DEFS=-DHAVE_CONFIG_H
  2809.  
  2810. # Without the "./", some shells look in PATH for config.status.
  2811. : ${CONFIG_STATUS=./config.status}
  2812.  
  2813. echo creating $CONFIG_STATUS
  2814. rm -f $CONFIG_STATUS
  2815. cat > $CONFIG_STATUS <<EOF
  2816. #! /bin/sh
  2817. # Generated automatically by configure.
  2818. # Run this file to recreate the current configuration.
  2819. # This directory was configured as follows,
  2820. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2821. #
  2822. # $0 $ac_configure_args
  2823. #
  2824. # Compiler output produced by configure, useful for debugging
  2825. # configure, is in ./config.log if it exists.
  2826.  
  2827. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  2828. for ac_option
  2829. do
  2830.   case "\$ac_option" in
  2831.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2832.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  2833.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  2834.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2835.     echo "$CONFIG_STATUS generated by autoconf version 2.4"
  2836.     exit 0 ;;
  2837.   -help | --help | --hel | --he | --h)
  2838.     echo "\$ac_cs_usage"; exit 0 ;;
  2839.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2840.   esac
  2841. done
  2842.  
  2843. ac_given_srcdir=$srcdir
  2844.  
  2845. trap 'rm -fr `echo "Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pre config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  2846.  
  2847. # Protect against being on the right side of a sed subst in config.status. 
  2848. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  2849.  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  2850. $ac_vpsub
  2851. $extrasub
  2852. s%@CFLAGS@%$CFLAGS%g
  2853. s%@CPPFLAGS@%$CPPFLAGS%g
  2854. s%@CXXFLAGS@%$CXXFLAGS%g
  2855. s%@DEFS@%$DEFS%g
  2856. s%@LDFLAGS@%$LDFLAGS%g
  2857. s%@LIBS@%$LIBS%g
  2858. s%@exec_prefix@%$exec_prefix%g
  2859. s%@prefix@%$prefix%g
  2860. s%@program_transform_name@%$program_transform_name%g
  2861. s%@CC@%$CC%g
  2862. s%@RANLIB@%$RANLIB%g
  2863. s%@AR@%$AR%g
  2864. s%@INSTALL@%$INSTALL%g
  2865. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  2866. s%@INSTALL_DATA@%$INSTALL_DATA%g
  2867. s%@OPT@%$OPT%g
  2868. s%@CPP@%$CPP%g
  2869. s%@MACHDEP@%$MACHDEP%g
  2870. s%@SO@%$SO%g
  2871. s%@LDSHARED@%$LDSHARED%g
  2872. s%@CCSHARED@%$CCSHARED%g
  2873. s%@LINKFORSHARED@%$LINKFORSHARED%g
  2874. s%@DLINCLDIR@%$DLINCLDIR%g
  2875. s%@LIBOBJS@%$LIBOBJS%g
  2876. s%@LIBM@%$LIBM%g
  2877. s%@LIBC@%$LIBC%g
  2878.  
  2879. CEOF
  2880. EOF
  2881. cat >> $CONFIG_STATUS <<EOF
  2882.  
  2883. CONFIG_FILES=\${CONFIG_FILES-"Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pre"}
  2884. EOF
  2885. cat >> $CONFIG_STATUS <<\EOF
  2886. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2887.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  2888.   case "$ac_file" in
  2889.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  2890.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2891.   *) ac_file_in="${ac_file}.in" ;;
  2892.   esac
  2893.  
  2894.   # Adjust relative srcdir, etc. for subdirectories.
  2895.  
  2896.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2897.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2898.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2899.     # The file is in a subdirectory.
  2900.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2901.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  2902.     # A "../" for each directory in $ac_dir_suffix.
  2903.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2904.   else
  2905.     ac_dir_suffix= ac_dots=
  2906.   fi
  2907.  
  2908.   case "$ac_given_srcdir" in
  2909.   .)  srcdir=.
  2910.       if test -z "$ac_dots"; then top_srcdir=.
  2911.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2912.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2913.   *) # Relative path.
  2914.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2915.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2916.   esac
  2917.  
  2918.   echo creating "$ac_file"
  2919.   rm -f "$ac_file"
  2920.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  2921.   case "$ac_file" in
  2922.   *Makefile*) ac_comsub="1i\\
  2923. # $configure_input" ;;
  2924.   *) ac_comsub= ;;
  2925.   esac
  2926.   sed -e "$ac_comsub
  2927. s%@configure_input@%$configure_input%g
  2928. s%@srcdir@%$srcdir%g
  2929. s%@top_srcdir@%$top_srcdir%g
  2930. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  2931. fi; done
  2932. rm -f conftest.subs
  2933.  
  2934. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  2935. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  2936. #
  2937. # ac_d sets the value in "#define NAME VALUE" lines.
  2938. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  2939. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  2940. ac_dC='\3'
  2941. ac_dD='%g'
  2942. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2943. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2944. ac_uB='\([     ]\)%\1#\2define\3'
  2945. ac_uC=' '
  2946. ac_uD='\4%g'
  2947. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2948. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2949. ac_eB='$%\1#\2define\3'
  2950. ac_eC=' '
  2951. ac_eD='%g'
  2952.  
  2953. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  2954. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  2955.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  2956.   case "$ac_file" in
  2957.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  2958.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2959.   *) ac_file_in="${ac_file}.in" ;;
  2960.   esac
  2961.  
  2962.   echo creating $ac_file
  2963.  
  2964.   rm -f conftest.frag conftest.in conftest.out
  2965.   cp $ac_given_srcdir/$ac_file_in conftest.in
  2966.  
  2967. EOF
  2968.  
  2969. # Transform confdefs.h into a sed script conftest.vals that substitutes
  2970. # the proper values into config.h.in to produce config.h.  And first:
  2971. # Protect against being on the right side of a sed subst in config.status. 
  2972. # Protect against being in an unquoted here document in config.status.
  2973. rm -f conftest.vals
  2974. cat > conftest.hdr <<\EOF
  2975. s/[\\&%]/\\&/g
  2976. s%[\\$`]%\\&%g
  2977. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  2978. s%ac_d%ac_u%gp
  2979. s%ac_u%ac_e%gp
  2980. EOF
  2981. sed -n -f conftest.hdr confdefs.h > conftest.vals
  2982. rm -f conftest.hdr
  2983.  
  2984. # This sed command replaces #undef with comments.  This is necessary, for
  2985. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2986. # on some systems where configure will not decide to define it.
  2987. cat >> conftest.vals <<\EOF
  2988. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  2989. EOF
  2990.  
  2991. # Break up conftest.vals because some shells have a limit on
  2992. # the size of here documents, and old seds have small limits too.
  2993. # Maximum number of lines to put in a single here document.
  2994. ac_max_here_lines=12
  2995.  
  2996. rm -f conftest.tail
  2997. while :
  2998. do
  2999.   ac_lines=`grep -c . conftest.vals`
  3000.   # grep -c gives empty output for an empty file on some AIX systems.
  3001.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  3002.   # Write a limited-size here document to conftest.frag.
  3003.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  3004.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  3005.   echo 'CEOF
  3006.   sed -f conftest.frag conftest.in > conftest.out
  3007.   rm -f conftest.in
  3008.   mv conftest.out conftest.in
  3009. ' >> $CONFIG_STATUS
  3010.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  3011.   rm -f conftest.vals
  3012.   mv conftest.tail conftest.vals
  3013. done
  3014. rm -f conftest.vals
  3015.  
  3016. cat >> $CONFIG_STATUS <<\EOF
  3017.   rm -f conftest.frag conftest.h
  3018.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  3019.   cat conftest.in >> conftest.h
  3020.   rm -f conftest.in
  3021.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  3022.     echo "$ac_file is unchanged"
  3023.     rm -f conftest.h
  3024.   else
  3025.     rm -f $ac_file
  3026.     mv conftest.h $ac_file
  3027.   fi
  3028. fi; done
  3029.  
  3030.  
  3031.  
  3032. exit 0
  3033. EOF
  3034. chmod +x $CONFIG_STATUS
  3035. rm -fr confdefs* $ac_clean_files
  3036. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  3037.  
  3038.