home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / OPENSTEP / Languages / Python / python-14-src / configure < prev    next >
Encoding:
Text File  |  1997-01-17  |  102.7 KB  |  3,957 lines

  1. #! /bin/sh
  2.  
  3. # From configure.in Revision: 1.1.1.1 
  4.  
  5. # Guess values for system-dependent variables and create Makefiles.
  6. # Generated automatically using autoconf version 2.10 
  7. # Copyright (C) 1992, 93, 94, 95, 96 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. --with-next-archs='arch1 arch2 ..'   build MAB binary"
  18. ac_help="$ac_help
  19. --without-gcc             never use gcc"
  20. ac_help="$ac_help
  21. --with-libs='lib1 ...'    link against additional libs"
  22. ac_help="$ac_help
  23. --with-readline[=DIRECTORY] use GNU readline library"
  24. ac_help="$ac_help
  25. --with-thread[=DIRECTORY] make interpreter thread-safe"
  26. ac_help="$ac_help
  27. --with-sgi-dl=DIRECTORY   IRIX 4 dynamic linking"
  28. ac_help="$ac_help
  29. --with-dl-dld=DL_DIR,DLD_DIR  GNU dynamic linking"
  30. ac_help="$ac_help
  31. --with-libm=STRING        math library"
  32. ac_help="$ac_help
  33. --with-libc=STRING        C library"
  34.  
  35. # Initialize some variables set by options.
  36. # The variables have the same names as the options, with
  37. # dashes changed to underlines.
  38. build=NONE
  39. cache_file=./config.cache
  40. exec_prefix=NONE
  41. host=NONE
  42. no_create=
  43. nonopt=NONE
  44. no_recursion=
  45. prefix=NONE
  46. program_prefix=NONE
  47. program_suffix=NONE
  48. program_transform_name=s,x,x,
  49. silent=
  50. site=
  51. srcdir=
  52. target=NONE
  53. verbose=
  54. x_includes=NONE
  55. x_libraries=NONE
  56. bindir='${exec_prefix}/bin'
  57. sbindir='${exec_prefix}/sbin'
  58. libexecdir='${exec_prefix}/libexec'
  59. datadir='${prefix}/share'
  60. sysconfdir='${prefix}/etc'
  61. sharedstatedir='${prefix}/com'
  62. localstatedir='${prefix}/var'
  63. libdir='${exec_prefix}/lib'
  64. includedir='${prefix}/include'
  65. oldincludedir='/usr/include'
  66. infodir='${prefix}/info'
  67. mandir='${prefix}/man'
  68.  
  69. # Initialize some other variables.
  70. subdirs=
  71. MFLAGS= MAKEFLAGS=
  72.  
  73. ac_prev=
  74. for ac_option
  75. do
  76.  
  77.   # If the previous option needs an argument, assign it.
  78.   if test -n "$ac_prev"; then
  79.     eval "$ac_prev=\$ac_option"
  80.     ac_prev=
  81.     continue
  82.   fi
  83.  
  84.   case "$ac_option" in
  85.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  86.   *) ac_optarg= ;;
  87.   esac
  88.  
  89.   # Accept the important Cygnus configure options, so we can diagnose typos.
  90.  
  91.   case "$ac_option" in
  92.  
  93.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  94.     ac_prev=bindir ;;
  95.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  96.     bindir="$ac_optarg" ;;
  97.  
  98.   -build | --build | --buil | --bui | --bu)
  99.     ac_prev=build ;;
  100.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  101.     build="$ac_optarg" ;;
  102.  
  103.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  104.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  105.     ac_prev=cache_file ;;
  106.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  107.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  108.     cache_file="$ac_optarg" ;;
  109.  
  110.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  111.     ac_prev=datadir ;;
  112.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  113.   | --da=*)
  114.     datadir="$ac_optarg" ;;
  115.  
  116.   -disable-* | --disable-*)
  117.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  118.     # Reject names that are not valid shell variable names.
  119.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  120.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  121.     fi
  122.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  123.     eval "enable_${ac_feature}=no" ;;
  124.  
  125.   -enable-* | --enable-*)
  126.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  127.     # Reject names that are not valid shell variable names.
  128.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  129.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  130.     fi
  131.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  132.     case "$ac_option" in
  133.       *=*) ;;
  134.       *) ac_optarg=yes ;;
  135.     esac
  136.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  137.  
  138.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  139.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  140.   | --exec | --exe | --ex)
  141.     ac_prev=exec_prefix ;;
  142.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  143.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  144.   | --exec=* | --exe=* | --ex=*)
  145.     exec_prefix="$ac_optarg" ;;
  146.  
  147.   -gas | --gas | --ga | --g)
  148.     # Obsolete; use --with-gas.
  149.     with_gas=yes ;;
  150.  
  151.   -help | --help | --hel | --he)
  152.     # Omit some internal or obsolete options to make the list less imposing.
  153.     # This message is too long to be a string in the A/UX 3.1 sh.
  154.     cat << EOF
  155. Usage: configure [options] [host]
  156. Options: [defaults in brackets after descriptions]
  157. Configuration:
  158.   --cache-file=FILE       cache test results in FILE
  159.   --help                  print this message
  160.   --no-create             do not create output files
  161.   --quiet, --silent       do not print \`checking...' messages
  162.   --version               print the version of autoconf that created configure
  163. Directory and file names:
  164.   --prefix=PREFIX         install architecture-independent files in PREFIX
  165.                           [$ac_default_prefix]
  166.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  167.                           [same as prefix]
  168.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  169.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  170.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  171.   --datadir=DIR           read-only architecture-independent data in DIR
  172.                           [PREFIX/share]
  173.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  174.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  175.                           [PREFIX/com]
  176.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  177.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  178.   --includedir=DIR        C header files in DIR [PREFIX/include]
  179.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  180.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  181.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  182.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  183.   --program-prefix=PREFIX prepend PREFIX to installed program names
  184.   --program-suffix=SUFFIX append SUFFIX to installed program names
  185.   --program-transform-name=PROGRAM
  186.                           run sed PROGRAM on installed program names
  187. EOF
  188.     cat << EOF
  189. Host type:
  190.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  191.   --host=HOST             configure for HOST [guessed]
  192.   --target=TARGET         configure for TARGET [TARGET=HOST]
  193. Features and packages:
  194.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  195.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  196.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  197.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  198.   --x-includes=DIR        X include files are in DIR
  199.   --x-libraries=DIR       X library files are in DIR
  200. EOF
  201.     if test -n "$ac_help"; then
  202.       echo "--enable and --with options recognized:$ac_help"
  203.     fi
  204.     exit 0 ;;
  205.  
  206.   -host | --host | --hos | --ho)
  207.     ac_prev=host ;;
  208.   -host=* | --host=* | --hos=* | --ho=*)
  209.     host="$ac_optarg" ;;
  210.  
  211.   -includedir | --includedir | --includedi | --included | --include \
  212.   | --includ | --inclu | --incl | --inc)
  213.     ac_prev=includedir ;;
  214.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  215.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  216.     includedir="$ac_optarg" ;;
  217.  
  218.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  219.     ac_prev=infodir ;;
  220.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  221.     infodir="$ac_optarg" ;;
  222.  
  223.   -libdir | --libdir | --libdi | --libd)
  224.     ac_prev=libdir ;;
  225.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  226.     libdir="$ac_optarg" ;;
  227.  
  228.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  229.   | --libexe | --libex | --libe)
  230.     ac_prev=libexecdir ;;
  231.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  232.   | --libexe=* | --libex=* | --libe=*)
  233.     libexecdir="$ac_optarg" ;;
  234.  
  235.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  236.   | --localstate | --localstat | --localsta | --localst \
  237.   | --locals | --local | --loca | --loc | --lo)
  238.     ac_prev=localstatedir ;;
  239.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  240.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  241.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  242.     localstatedir="$ac_optarg" ;;
  243.  
  244.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  245.     ac_prev=mandir ;;
  246.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  247.     mandir="$ac_optarg" ;;
  248.  
  249.   -nfp | --nfp | --nf)
  250.     # Obsolete; use --without-fp.
  251.     with_fp=no ;;
  252.  
  253.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  254.   | --no-cr | --no-c)
  255.     no_create=yes ;;
  256.  
  257.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  258.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  259.     no_recursion=yes ;;
  260.  
  261.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  262.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  263.   | --oldin | --oldi | --old | --ol | --o)
  264.     ac_prev=oldincludedir ;;
  265.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  266.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  267.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  268.     oldincludedir="$ac_optarg" ;;
  269.  
  270.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  271.     ac_prev=prefix ;;
  272.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  273.     prefix="$ac_optarg" ;;
  274.  
  275.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  276.   | --program-pre | --program-pr | --program-p)
  277.     ac_prev=program_prefix ;;
  278.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  279.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  280.     program_prefix="$ac_optarg" ;;
  281.  
  282.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  283.   | --program-suf | --program-su | --program-s)
  284.     ac_prev=program_suffix ;;
  285.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  286.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  287.     program_suffix="$ac_optarg" ;;
  288.  
  289.   -program-transform-name | --program-transform-name \
  290.   | --program-transform-nam | --program-transform-na \
  291.   | --program-transform-n | --program-transform- \
  292.   | --program-transform | --program-transfor \
  293.   | --program-transfo | --program-transf \
  294.   | --program-trans | --program-tran \
  295.   | --progr-tra | --program-tr | --program-t)
  296.     ac_prev=program_transform_name ;;
  297.   -program-transform-name=* | --program-transform-name=* \
  298.   | --program-transform-nam=* | --program-transform-na=* \
  299.   | --program-transform-n=* | --program-transform-=* \
  300.   | --program-transform=* | --program-transfor=* \
  301.   | --program-transfo=* | --program-transf=* \
  302.   | --program-trans=* | --program-tran=* \
  303.   | --progr-tra=* | --program-tr=* | --program-t=*)
  304.     program_transform_name="$ac_optarg" ;;
  305.  
  306.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  307.   | -silent | --silent | --silen | --sile | --sil)
  308.     silent=yes ;;
  309.  
  310.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  311.     ac_prev=sbindir ;;
  312.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  313.   | --sbi=* | --sb=*)
  314.     sbindir="$ac_optarg" ;;
  315.  
  316.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  317.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  318.   | --sharedst | --shareds | --shared | --share | --shar \
  319.   | --sha | --sh)
  320.     ac_prev=sharedstatedir ;;
  321.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  322.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  323.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  324.   | --sha=* | --sh=*)
  325.     sharedstatedir="$ac_optarg" ;;
  326.  
  327.   -site | --site | --sit)
  328.     ac_prev=site ;;
  329.   -site=* | --site=* | --sit=*)
  330.     site="$ac_optarg" ;;
  331.  
  332.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  333.     ac_prev=srcdir ;;
  334.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  335.     srcdir="$ac_optarg" ;;
  336.  
  337.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  338.   | --syscon | --sysco | --sysc | --sys | --sy)
  339.     ac_prev=sysconfdir ;;
  340.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  341.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  342.     sysconfdir="$ac_optarg" ;;
  343.  
  344.   -target | --target | --targe | --targ | --tar | --ta | --t)
  345.     ac_prev=target ;;
  346.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  347.     target="$ac_optarg" ;;
  348.  
  349.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  350.     verbose=yes ;;
  351.  
  352.   -version | --version | --versio | --versi | --vers)
  353.     echo "configure generated by autoconf version 2.10"
  354.     exit 0 ;;
  355.  
  356.   -with-* | --with-*)
  357.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  358.     # Reject names that are not valid shell variable names.
  359.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  360.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  361.     fi
  362.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  363.     case "$ac_option" in
  364.       *=*) ;;
  365.       *) ac_optarg=yes ;;
  366.     esac
  367.     eval "with_${ac_package}='$ac_optarg'" ;;
  368.  
  369.   -without-* | --without-*)
  370.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  371.     # Reject names that are not valid shell variable names.
  372.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  373.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  374.     fi
  375.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  376.     eval "with_${ac_package}=no" ;;
  377.  
  378.   --x)
  379.     # Obsolete; use --with-x.
  380.     with_x=yes ;;
  381.  
  382.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  383.   | --x-incl | --x-inc | --x-in | --x-i)
  384.     ac_prev=x_includes ;;
  385.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  386.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  387.     x_includes="$ac_optarg" ;;
  388.  
  389.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  390.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  391.     ac_prev=x_libraries ;;
  392.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  393.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  394.     x_libraries="$ac_optarg" ;;
  395.  
  396.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  397.     ;;
  398.  
  399.   *)
  400.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  401.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  402.     fi
  403.     if test "x$nonopt" != xNONE; then
  404.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  405.     fi
  406.     nonopt="$ac_option"
  407.     ;;
  408.  
  409.   esac
  410. done
  411.  
  412. if test -n "$ac_prev"; then
  413.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  414. fi
  415.  
  416. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  417.  
  418. # File descriptor usage:
  419. # 0 standard input
  420. # 1 file creation
  421. # 2 errors and warnings
  422. # 3 some systems may open it to /dev/tty
  423. # 4 used on the Kubota Titan
  424. # 6 checking for... messages and results
  425. # 5 compiler messages saved in config.log
  426. if test "$silent" = yes; then
  427.   exec 6>/dev/null
  428. else
  429.   exec 6>&1
  430. fi
  431. exec 5>./config.log
  432.  
  433. echo "\
  434. This file contains any messages produced by compilers while
  435. running configure, to aid debugging if configure makes a mistake.
  436. " 1>&5
  437.  
  438. # Strip out --no-create and --no-recursion so they do not pile up.
  439. # Also quote any args containing shell metacharacters.
  440. ac_configure_args=
  441. for ac_arg
  442. do
  443.   case "$ac_arg" in
  444.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  445.   | --no-cr | --no-c) ;;
  446.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  447.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  448.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  449.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  450.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  451.   esac
  452. done
  453.  
  454. # NLS nuisances.
  455. # Only set LANG and LC_ALL to C if already set.
  456. # These must not be set unconditionally because not all systems understand
  457. # e.g. LANG=C (notably SCO).
  458. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  459. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  460.  
  461. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  462. rm -rf conftest* confdefs.h
  463. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  464. echo > confdefs.h
  465.  
  466. # A filename unique to this package, relative to the directory that
  467. # configure is in, which we can look for to find out if srcdir is correct.
  468. ac_unique_file=Include/object.h
  469.  
  470. # Find the source files, if location was not specified.
  471. if test -z "$srcdir"; then
  472.   ac_srcdir_defaulted=yes
  473.   # Try the directory containing this script, then its parent.
  474.   ac_prog=$0
  475.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  476.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  477.   srcdir=$ac_confdir
  478.   if test ! -r $srcdir/$ac_unique_file; then
  479.     srcdir=..
  480.   fi
  481. else
  482.   ac_srcdir_defaulted=no
  483. fi
  484. if test ! -r $srcdir/$ac_unique_file; then
  485.   if test "$ac_srcdir_defaulted" = yes; then
  486.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  487.   else
  488.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  489.   fi
  490. fi
  491. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  492.  
  493. # Prefer explicitly selected file to automatically selected ones.
  494. if test -z "$CONFIG_SITE"; then
  495.   if test "x$prefix" != xNONE; then
  496.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  497.   else
  498.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  499.   fi
  500. fi
  501. for ac_site_file in $CONFIG_SITE; do
  502.   if test -r "$ac_site_file"; then
  503.     echo "loading site script $ac_site_file"
  504.     . "$ac_site_file"
  505.   fi
  506. done
  507.  
  508. if test -r "$cache_file"; then
  509.   echo "loading cache $cache_file"
  510.   . $cache_file
  511. else
  512.   echo "creating cache $cache_file"
  513.   > $cache_file
  514. fi
  515.  
  516. ac_ext=c
  517. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  518. ac_cpp='$CPP $CPPFLAGS'
  519. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  520. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  521.  
  522. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  523.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  524.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  525.     ac_n= ac_c='
  526. ' ac_t='    '
  527.   else
  528.     ac_n=-n ac_c= ac_t=
  529.   fi
  530. else
  531.   ac_n= ac_c='\c' ac_t=
  532. fi
  533.  
  534.  
  535.  
  536.  
  537. # !!! Keep this the same as Makefile.in::VERSION !!!
  538. PYTHON_VERSION=1.4
  539.  
  540.  
  541. PYTHON_PATCHLEVEL=Final
  542.  
  543.  
  544. # NEXTSTEP stuff
  545. if test -f /usr/lib/NextStep/software_version; then
  546.  
  547.     echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
  548.     # Check whether --with-next-archs or --without-next-archs was given.
  549. if test "${with_next_archs+set}" = set; then
  550.   withval="$with_next_archs"
  551.   
  552.         if test -n "$withval"; then
  553.             ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
  554.             # GCC does not currently support multi archs on the NeXT
  555.             with_gcc=no
  556.         fi
  557.         echo "$ac_t""$with_next_archs" 1>&6
  558.     
  559. else
  560.   echo "$ac_t""none: using `arch`" 1>&6
  561. fi
  562.  
  563.     
  564.     if test -z "$MACHDEP"
  565.     then
  566.         set X `hostinfo | grep 'NeXT Mach.*:' | \
  567.              sed -e 's/://' -e 's/\./ /'` && \
  568.             ac_sys_system=next && ac_sys_release=$4
  569.  
  570.         MACHDEP="$ac_sys_system$ac_sys_release"
  571.     fi
  572. fi
  573.  
  574. # Set name for machine-dependent library files
  575.  
  576. echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
  577. if test -z "$MACHDEP"
  578. then
  579.     ac_sys_system=`uname -s`
  580.     if test "$ac_sys_system" = "AIX" ; then
  581.         ac_sys_release=`uname -v`
  582.     else
  583.         ac_sys_release=`uname -r`
  584.     fi
  585.     ac_md_system=`echo $ac_sys_system |
  586.                tr -d '/ ' | tr '[A-Z]' '[a-z]'`
  587.     ac_md_release=`echo $ac_sys_release |
  588.                tr -d '/ ' | sed 's/\..*//'`
  589.     MACHDEP="$ac_md_system$ac_md_release"
  590.  
  591.     case MACHDEP in
  592.     '')    MACHDEP=unknown;;
  593.     esac
  594. fi
  595. echo "$ac_t""$MACHDEP" 1>&6
  596.  
  597. # checks for alternative programs
  598. echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
  599. # Check whether --with-gcc or --without-gcc was given.
  600. if test "${with_gcc+set}" = set; then
  601.   withval="$with_gcc"
  602.   
  603.     case $withval in
  604.     no)    CC=cc
  605.         without_gcc=yes;;
  606.     yes)    CC=gcc
  607.         without_gcc=no;;
  608.     *)    CC=$withval
  609.         without_gcc=$withval;;
  610.     esac
  611. else
  612.   
  613.     case $ac_sys_system in
  614.     OSF1)    CC=cc
  615.         without_gcc=;;
  616.     *)    without_gcc=no;;
  617.     esac
  618. fi
  619.  
  620. echo "$ac_t""$without_gcc" 1>&6
  621.  
  622. # If the user switches compilers, we can't believe the cache
  623. if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
  624. then
  625.   { echo "configure: error: cached CC is different -- throw away $cache_file
  626. (it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
  627. fi
  628.  
  629. # Extract the first word of "gcc", so it can be a program name with args.
  630. set dummy gcc; ac_word=$2
  631. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  632. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  633.   echo $ac_n "(cached) $ac_c" 1>&6
  634. else
  635.   if test -n "$CC"; then
  636.   ac_cv_prog_CC="$CC" # Let the user override the test.
  637. else
  638.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  639.   for ac_dir in $PATH; do
  640.     test -z "$ac_dir" && ac_dir=.
  641.     if test -f $ac_dir/$ac_word; then
  642.       ac_cv_prog_CC="gcc"
  643.       break
  644.     fi
  645.   done
  646.   IFS="$ac_save_ifs"
  647. fi
  648. fi
  649. CC="$ac_cv_prog_CC"
  650. if test -n "$CC"; then
  651.   echo "$ac_t""$CC" 1>&6
  652. else
  653.   echo "$ac_t""no" 1>&6
  654. fi
  655.  
  656. if test -z "$CC"; then
  657.   # Extract the first word of "cc", so it can be a program name with args.
  658. set dummy cc; ac_word=$2
  659. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  660. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  661.   echo $ac_n "(cached) $ac_c" 1>&6
  662. else
  663.   if test -n "$CC"; then
  664.   ac_cv_prog_CC="$CC" # Let the user override the test.
  665. else
  666.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  667.   ac_prog_rejected=no
  668.   for ac_dir in $PATH; do
  669.     test -z "$ac_dir" && ac_dir=.
  670.     if test -f $ac_dir/$ac_word; then
  671.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  672.         ac_prog_rejected=yes
  673.     continue
  674.       fi
  675.       ac_cv_prog_CC="cc"
  676.       break
  677.     fi
  678.   done
  679.   IFS="$ac_save_ifs"
  680. if test $ac_prog_rejected = yes; then
  681.   # We found a bogon in the path, so make sure we never use it.
  682.   set dummy $ac_cv_prog_CC
  683.   shift
  684.   if test $# -gt 0; then
  685.     # We chose a different compiler from the bogus one.
  686.     # However, it has the same basename, so the bogon will be chosen
  687.     # first if we set CC to just the basename; use the full file name.
  688.     shift
  689.     set dummy "$ac_dir/$ac_word" "$@"
  690.     shift
  691.     ac_cv_prog_CC="$@"
  692.   fi
  693. fi
  694. fi
  695. fi
  696. CC="$ac_cv_prog_CC"
  697. if test -n "$CC"; then
  698.   echo "$ac_t""$CC" 1>&6
  699. else
  700.   echo "$ac_t""no" 1>&6
  701. fi
  702.  
  703.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  704. fi
  705.  
  706. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  707. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  708.   echo $ac_n "(cached) $ac_c" 1>&6
  709. else
  710.   cat > conftest.c <<EOF
  711. #ifdef __GNUC__
  712.   yes;
  713. #endif
  714. EOF
  715. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  716.   ac_cv_prog_gcc=yes
  717. else
  718.   ac_cv_prog_gcc=no
  719. fi
  720. fi
  721.  
  722. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  723. if test $ac_cv_prog_gcc = yes; then
  724.   GCC=yes
  725.   if test "${CFLAGS+set}" != set; then
  726.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  727. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  728.   echo $ac_n "(cached) $ac_c" 1>&6
  729. else
  730.   echo 'void f(){}' > conftest.c
  731. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  732.   ac_cv_prog_gcc_g=yes
  733. else
  734.   ac_cv_prog_gcc_g=no
  735. fi
  736. rm -f conftest*
  737.  
  738. fi
  739.  
  740. echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  741.     if test $ac_cv_prog_gcc_g = yes; then
  742.       CFLAGS="-g -O"
  743.     else
  744.       CFLAGS="-O"
  745.     fi
  746.   fi
  747. else
  748.   GCC=
  749.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  750. fi
  751.  
  752. # Extract the first word of "ranlib", so it can be a program name with args.
  753. set dummy ranlib; ac_word=$2
  754. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  755. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  756.   echo $ac_n "(cached) $ac_c" 1>&6
  757. else
  758.   if test -n "$RANLIB"; then
  759.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  760. else
  761.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  762.   for ac_dir in $PATH; do
  763.     test -z "$ac_dir" && ac_dir=.
  764.     if test -f $ac_dir/$ac_word; then
  765.       ac_cv_prog_RANLIB="ranlib"
  766.       break
  767.     fi
  768.   done
  769.   IFS="$ac_save_ifs"
  770.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  771. fi
  772. fi
  773. RANLIB="$ac_cv_prog_RANLIB"
  774. if test -n "$RANLIB"; then
  775.   echo "$ac_t""$RANLIB" 1>&6
  776. else
  777.   echo "$ac_t""no" 1>&6
  778. fi
  779.  
  780.  
  781. for ac_prog in ar aal
  782. do
  783. # Extract the first word of "$ac_prog", so it can be a program name with args.
  784. set dummy $ac_prog; ac_word=$2
  785. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  786. if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
  787.   echo $ac_n "(cached) $ac_c" 1>&6
  788. else
  789.   if test -n "$AR"; then
  790.   ac_cv_prog_AR="$AR" # Let the user override the test.
  791. else
  792.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  793.   for ac_dir in $PATH; do
  794.     test -z "$ac_dir" && ac_dir=.
  795.     if test -f $ac_dir/$ac_word; then
  796.       ac_cv_prog_AR="$ac_prog"
  797.       break
  798.     fi
  799.   done
  800.   IFS="$ac_save_ifs"
  801. fi
  802. fi
  803. AR="$ac_cv_prog_AR"
  804. if test -n "$AR"; then
  805.   echo "$ac_t""$AR" 1>&6
  806. else
  807.   echo "$ac_t""no" 1>&6
  808. fi
  809.  
  810. test -n "$AR" && break
  811. done
  812. test -n "$AR" || AR="ar"
  813.  
  814. ac_aux_dir=
  815. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  816.   if test -f $ac_dir/install-sh; then
  817.     ac_aux_dir=$ac_dir
  818.     ac_install_sh="$ac_aux_dir/install-sh -c"
  819.     break
  820.   elif test -f $ac_dir/install.sh; then
  821.     ac_aux_dir=$ac_dir
  822.     ac_install_sh="$ac_aux_dir/install.sh -c"
  823.     break
  824.   fi
  825. done
  826. if test -z "$ac_aux_dir"; then
  827.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  828. fi
  829. ac_config_guess=$ac_aux_dir/config.guess
  830. ac_config_sub=$ac_aux_dir/config.sub
  831. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  832.  
  833. # Find a good install program.  We prefer a C program (faster),
  834. # so one script is as good as another.  But avoid the broken or
  835. # incompatible versions:
  836. # SysV /etc/install, /usr/sbin/install
  837. # SunOS /usr/etc/install
  838. # IRIX /sbin/install
  839. # AIX /bin/install
  840. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  841. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  842. # ./install, which can be erroneously created by make from ./install.sh.
  843. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  844. if test -z "$INSTALL"; then
  845. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  846.   echo $ac_n "(cached) $ac_c" 1>&6
  847. else
  848.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  849.   for ac_dir in $PATH; do
  850.     # Account for people who put trailing slashes in PATH elements.
  851.     case "$ac_dir/" in
  852.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  853.     *)
  854.       # OSF1 and SCO ODT 3.0 have their own names for install.
  855.       for ac_prog in ginstall installbsd scoinst install; do
  856.         if test -f $ac_dir/$ac_prog; then
  857.       if test $ac_prog = install &&
  858.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  859.         # AIX install.  It has an incompatible calling convention.
  860.         # OSF/1 installbsd also uses dspmsg, but is usable.
  861.         :
  862.       else
  863.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  864.         break 2
  865.       fi
  866.     fi
  867.       done
  868.       ;;
  869.     esac
  870.   done
  871.   IFS="$ac_save_ifs"
  872.  
  873. fi
  874.   if test "${ac_cv_path_install+set}" = set; then
  875.     INSTALL="$ac_cv_path_install"
  876.   else
  877.     # As a last resort, use the slow shell script.  We don't cache a
  878.     # path for INSTALL within a source directory, because that will
  879.     # break other packages using the cache if that directory is
  880.     # removed, or if the path is relative.
  881.     INSTALL="$ac_install_sh"
  882.   fi
  883. fi
  884. echo "$ac_t""$INSTALL" 1>&6
  885.  
  886. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  887. # It thinks the first close brace ends the variable substitution.
  888. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  889.  
  890. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  891.  
  892.  
  893. # Optimizer/debugger flags passed between Makefiles
  894.  
  895. if test -z "$OPT"
  896. then
  897.     case $ac_sys_system in
  898.     *)    OPT="-O";;
  899.     esac
  900. fi
  901.  
  902. if test "$ac_arch_flags"
  903. then
  904.     OPT="$OPT $ac_arch_flags"
  905. fi
  906. # checks for UNIX variants that set C preprocessor variables
  907. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  908. # On Suns, sometimes $CPP names a directory.
  909. if test -n "$CPP" && test -d "$CPP"; then
  910.   CPP=
  911. fi
  912. if test -z "$CPP"; then
  913. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  914.   echo $ac_n "(cached) $ac_c" 1>&6
  915. else
  916.     # This must be in double quotes, not single quotes, because CPP may get
  917.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  918.   CPP="${CC-cc} -E"
  919.   # On the NeXT, cc -E runs the code through the compiler's parser,
  920.   # not just through cpp.
  921.   cat > conftest.$ac_ext <<EOF
  922. #line 923 "configure"
  923. #include "confdefs.h"
  924. #include <assert.h>
  925. Syntax Error
  926. EOF
  927. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  928. { (eval echo configure:929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  929. ac_err=`grep -v '^ *+' conftest.out`
  930. if test -z "$ac_err"; then
  931.   :
  932. else
  933.   echo "$ac_err" >&5
  934.   rm -rf conftest*
  935.   CPP="${CC-cc} -E -traditional-cpp"
  936.   cat > conftest.$ac_ext <<EOF
  937. #line 938 "configure"
  938. #include "confdefs.h"
  939. #include <assert.h>
  940. Syntax Error
  941. EOF
  942. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  943. { (eval echo configure:944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  944. ac_err=`grep -v '^ *+' conftest.out`
  945. if test -z "$ac_err"; then
  946.   :
  947. else
  948.   echo "$ac_err" >&5
  949.   rm -rf conftest*
  950.   CPP=/lib/cpp
  951. fi
  952. rm -f conftest*
  953. fi
  954. rm -f conftest*
  955.   ac_cv_prog_CPP="$CPP"
  956. fi
  957.   CPP="$ac_cv_prog_CPP"
  958. else
  959.   ac_cv_prog_CPP="$CPP"
  960. fi
  961. echo "$ac_t""$CPP" 1>&6
  962.  
  963. echo $ac_n "checking for AIX""... $ac_c" 1>&6
  964. cat > conftest.$ac_ext <<EOF
  965. #line 966 "configure"
  966. #include "confdefs.h"
  967. #ifdef _AIX
  968.   yes
  969. #endif
  970.  
  971. EOF
  972. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  973.   egrep "yes" >/dev/null 2>&1; then
  974.   rm -rf conftest*
  975.   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
  976. #define _ALL_SOURCE 1
  977. EOF
  978.  
  979. else
  980.   rm -rf conftest*
  981.   echo "$ac_t""no" 1>&6
  982. fi
  983. rm -f conftest*
  984.  
  985.  
  986. ac_safe=`echo "minix/config.h" | tr './\055' '___'`
  987. echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
  988. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  989.   echo $ac_n "(cached) $ac_c" 1>&6
  990. else
  991.   cat > conftest.$ac_ext <<EOF
  992. #line 993 "configure"
  993. #include "confdefs.h"
  994. #include <minix/config.h>
  995. EOF
  996. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  997. { (eval echo configure:998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  998. ac_err=`grep -v '^ *+' conftest.out`
  999. if test -z "$ac_err"; then
  1000.   rm -rf conftest*
  1001.   eval "ac_cv_header_$ac_safe=yes"
  1002. else
  1003.   echo "$ac_err" >&5
  1004.   rm -rf conftest*
  1005.   eval "ac_cv_header_$ac_safe=no"
  1006. fi
  1007. rm -f conftest*
  1008. fi
  1009. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1010.   echo "$ac_t""yes" 1>&6
  1011.   MINIX=yes
  1012. else
  1013.   echo "$ac_t""no" 1>&6
  1014. MINIX=
  1015. fi
  1016.  
  1017. if test "$MINIX" = yes; then
  1018.   cat >> confdefs.h <<\EOF
  1019. #define _POSIX_SOURCE 1
  1020. EOF
  1021.  
  1022.   cat >> confdefs.h <<\EOF
  1023. #define _POSIX_1_SOURCE 2
  1024. EOF
  1025.  
  1026.   cat >> confdefs.h <<\EOF
  1027. #define _MINIX 1
  1028. EOF
  1029.  
  1030. fi
  1031.  
  1032.  
  1033. # check for ANSI or K&R ("traditional") preprocessor
  1034. echo $ac_n "checking for C preprocessor type""... $ac_c" 1>&6
  1035. cat > conftest.$ac_ext <<EOF
  1036. #line 1037 "configure"
  1037. #include "confdefs.h"
  1038.  
  1039. #define spam(name, doc) {#name, &name, #name "() -- " doc}
  1040. int foo;
  1041. struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
  1042.  
  1043. int main() { return 0; }
  1044. int t() {
  1045. ;
  1046. ; return 0; }
  1047. EOF
  1048. if { (eval echo configure:1049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1049.   rm -rf conftest*
  1050.   cpp_type=ansi
  1051. else
  1052.   rm -rf conftest*
  1053.   cat >> confdefs.h <<\EOF
  1054. #define HAVE_OLD_CPP 1
  1055. EOF
  1056.  cpp_type=traditional
  1057. fi
  1058. rm -f conftest*
  1059.  
  1060. echo "$ac_t""$cpp_type" 1>&6
  1061.  
  1062. # checks for header files
  1063. # If we cannot run a trivial program, we must be cross compiling.
  1064. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  1065. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  1066.   echo $ac_n "(cached) $ac_c" 1>&6
  1067. else
  1068.   if test "$cross_compiling" = yes; then
  1069.   ac_cv_c_cross=yes
  1070. else
  1071. cat > conftest.$ac_ext <<EOF
  1072. #line 1073 "configure"
  1073. #include "confdefs.h"
  1074. main(){return(0);}
  1075. EOF
  1076. { (eval echo configure:1077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1077. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1078.   ac_cv_c_cross=no
  1079. else
  1080.   ac_cv_c_cross=yes
  1081. fi
  1082. fi
  1083. rm -fr conftest*
  1084. fi
  1085.  
  1086. echo "$ac_t""$ac_cv_c_cross" 1>&6
  1087. cross_compiling=$ac_cv_c_cross
  1088.  
  1089. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1090. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1091.   echo $ac_n "(cached) $ac_c" 1>&6
  1092. else
  1093.   cat > conftest.$ac_ext <<EOF
  1094. #line 1095 "configure"
  1095. #include "confdefs.h"
  1096. #include <stdlib.h>
  1097. #include <stdarg.h>
  1098. #include <string.h>
  1099. #include <float.h>
  1100. EOF
  1101. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1102. { (eval echo configure:1103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1103. ac_err=`grep -v '^ *+' conftest.out`
  1104. if test -z "$ac_err"; then
  1105.   rm -rf conftest*
  1106.   ac_cv_header_stdc=yes
  1107. else
  1108.   echo "$ac_err" >&5
  1109.   rm -rf conftest*
  1110.   ac_cv_header_stdc=no
  1111. fi
  1112. rm -f conftest*
  1113.  
  1114. if test $ac_cv_header_stdc = yes; then
  1115.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1116. cat > conftest.$ac_ext <<EOF
  1117. #line 1118 "configure"
  1118. #include "confdefs.h"
  1119. #include <string.h>
  1120. EOF
  1121. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1122.   egrep "memchr" >/dev/null 2>&1; then
  1123.   :
  1124. else
  1125.   rm -rf conftest*
  1126.   ac_cv_header_stdc=no
  1127. fi
  1128. rm -f conftest*
  1129.  
  1130. fi
  1131.  
  1132. if test $ac_cv_header_stdc = yes; then
  1133.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1134. cat > conftest.$ac_ext <<EOF
  1135. #line 1136 "configure"
  1136. #include "confdefs.h"
  1137. #include <stdlib.h>
  1138. EOF
  1139. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1140.   egrep "free" >/dev/null 2>&1; then
  1141.   :
  1142. else
  1143.   rm -rf conftest*
  1144.   ac_cv_header_stdc=no
  1145. fi
  1146. rm -f conftest*
  1147.  
  1148. fi
  1149.  
  1150. if test $ac_cv_header_stdc = yes; then
  1151.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1152. if test "$cross_compiling" = yes; then
  1153.   :
  1154. else
  1155. cat > conftest.$ac_ext <<EOF
  1156. #line 1157 "configure"
  1157. #include "confdefs.h"
  1158. #include <ctype.h>
  1159. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1160. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1161. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1162. int main () { int i; for (i = 0; i < 256; i++)
  1163. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1164. exit (0); }
  1165.  
  1166. EOF
  1167. { (eval echo configure:1168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  1168. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1169.   :
  1170. else
  1171.   ac_cv_header_stdc=no
  1172. fi
  1173. fi
  1174. rm -fr conftest*
  1175. fi
  1176. fi
  1177.  
  1178. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1179. if test $ac_cv_header_stdc = yes; then
  1180.   cat >> confdefs.h <<\EOF
  1181. #define STDC_HEADERS 1
  1182. EOF
  1183.  
  1184. fi
  1185.  
  1186. for ac_hdr in dlfcn.h fcntl.h limits.h ncurses.h \
  1187. signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
  1188. sys/audioio.h sys/lock.h sys/param.h sys/select.h sys/time.h sys/times.h \
  1189. sys/un.h sys/utsname.h sys/wait.h
  1190. do
  1191. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1192. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1193. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1194.   echo $ac_n "(cached) $ac_c" 1>&6
  1195. else
  1196.   cat > conftest.$ac_ext <<EOF
  1197. #line 1198 "configure"
  1198. #include "confdefs.h"
  1199. #include <$ac_hdr>
  1200. EOF
  1201. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1202. { (eval echo configure:1203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1203. ac_err=`grep -v '^ *+' conftest.out`
  1204. if test -z "$ac_err"; then
  1205.   rm -rf conftest*
  1206.   eval "ac_cv_header_$ac_safe=yes"
  1207. else
  1208.   echo "$ac_err" >&5
  1209.   rm -rf conftest*
  1210.   eval "ac_cv_header_$ac_safe=no"
  1211. fi
  1212. rm -f conftest*
  1213. fi
  1214. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1215.   echo "$ac_t""yes" 1>&6
  1216.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
  1217.   cat >> confdefs.h <<EOF
  1218. #define $ac_tr_hdr 1
  1219. EOF
  1220.  
  1221. else
  1222.   echo "$ac_t""no" 1>&6
  1223. fi
  1224. done
  1225.  
  1226. ac_header_dirent=no
  1227. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  1228. do
  1229. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1230. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  1231. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  1232.   echo $ac_n "(cached) $ac_c" 1>&6
  1233. else
  1234.   cat > conftest.$ac_ext <<EOF
  1235. #line 1236 "configure"
  1236. #include "confdefs.h"
  1237. #include <sys/types.h>
  1238. #include <$ac_hdr>
  1239. int main() { return 0; }
  1240. int t() {
  1241. DIR *dirp = 0;
  1242. ; return 0; }
  1243. EOF
  1244. if { (eval echo configure:1245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1245.   rm -rf conftest*
  1246.   eval "ac_cv_header_dirent_$ac_safe=yes"
  1247. else
  1248.   rm -rf conftest*
  1249.   eval "ac_cv_header_dirent_$ac_safe=no"
  1250. fi
  1251. rm -f conftest*
  1252.  
  1253. fi
  1254. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  1255.   echo "$ac_t""yes" 1>&6
  1256.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
  1257.   cat >> confdefs.h <<EOF
  1258. #define $ac_tr_hdr 1
  1259. EOF
  1260.  ac_header_dirent=$ac_hdr; break
  1261. else
  1262.   echo "$ac_t""no" 1>&6
  1263. fi
  1264. done
  1265. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  1266. if test $ac_header_dirent = dirent.h; then
  1267. echo $ac_n "checking for -ldir""... $ac_c" 1>&6
  1268. ac_lib_var=`echo dir'_'opendir | tr './+\055' '__p_'`
  1269. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1270.   echo $ac_n "(cached) $ac_c" 1>&6
  1271. else
  1272.   ac_save_LIBS="$LIBS"
  1273. LIBS="-ldir  $LIBS"
  1274. cat > conftest.$ac_ext <<EOF
  1275. #line 1276 "configure"
  1276. #include "confdefs.h"
  1277. /* Override any gcc2 internal prototype to avoid an error.  */
  1278. /* We use char because int might match the return type of a gcc2
  1279.     builtin and then its argument prototype would still apply.  */
  1280. char opendir();
  1281.  
  1282. int main() { return 0; }
  1283. int t() {
  1284. opendir()
  1285. ; return 0; }
  1286. EOF
  1287. if { (eval echo configure:1288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1288.   rm -rf conftest*
  1289.   eval "ac_cv_lib_$ac_lib_var=yes"
  1290. else
  1291.   rm -rf conftest*
  1292.   eval "ac_cv_lib_$ac_lib_var=no"
  1293. fi
  1294. rm -f conftest*
  1295. LIBS="$ac_save_LIBS"
  1296.  
  1297. fi
  1298. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1299.   echo "$ac_t""yes" 1>&6
  1300.   LIBS="$LIBS -ldir"
  1301. else
  1302.   echo "$ac_t""no" 1>&6
  1303. fi
  1304.  
  1305. else
  1306. echo $ac_n "checking for -lx""... $ac_c" 1>&6
  1307. ac_lib_var=`echo x'_'opendir | tr './+\055' '__p_'`
  1308. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1309.   echo $ac_n "(cached) $ac_c" 1>&6
  1310. else
  1311.   ac_save_LIBS="$LIBS"
  1312. LIBS="-lx  $LIBS"
  1313. cat > conftest.$ac_ext <<EOF
  1314. #line 1315 "configure"
  1315. #include "confdefs.h"
  1316. /* Override any gcc2 internal prototype to avoid an error.  */
  1317. /* We use char because int might match the return type of a gcc2
  1318.     builtin and then its argument prototype would still apply.  */
  1319. char opendir();
  1320.  
  1321. int main() { return 0; }
  1322. int t() {
  1323. opendir()
  1324. ; return 0; }
  1325. EOF
  1326. if { (eval echo configure:1327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1327.   rm -rf conftest*
  1328.   eval "ac_cv_lib_$ac_lib_var=yes"
  1329. else
  1330.   rm -rf conftest*
  1331.   eval "ac_cv_lib_$ac_lib_var=no"
  1332. fi
  1333. rm -f conftest*
  1334. LIBS="$ac_save_LIBS"
  1335.  
  1336. fi
  1337. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1338.   echo "$ac_t""yes" 1>&6
  1339.   LIBS="$LIBS -lx"
  1340. else
  1341.   echo "$ac_t""no" 1>&6
  1342. fi
  1343.  
  1344. fi
  1345.  
  1346.  
  1347. # checks for typedefs
  1348. was_it_defined=no
  1349. echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
  1350. cat > conftest.$ac_ext <<EOF
  1351. #line 1352 "configure"
  1352. #include "confdefs.h"
  1353. #include <time.h>
  1354. EOF
  1355. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1356.   egrep "clock_t" >/dev/null 2>&1; then
  1357.   rm -rf conftest*
  1358.   was_it_defined=yes
  1359. else
  1360.   rm -rf conftest*
  1361.   cat >> confdefs.h <<\EOF
  1362. #define clock_t long
  1363. EOF
  1364.  
  1365. fi
  1366. rm -f conftest*
  1367.  
  1368. echo "$ac_t""$was_it_defined" 1>&6
  1369.  
  1370. # Add some code to confdefs.h so that the test for off_t works on SCO
  1371. cat >> confdefs.h <<\EOF
  1372. #if defined(SCO_DS)
  1373. #undef _OFF_T
  1374. #endif
  1375. EOF
  1376.  
  1377. echo $ac_n "checking for mode_t""... $ac_c" 1>&6
  1378. if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  1379.   echo $ac_n "(cached) $ac_c" 1>&6
  1380. else
  1381.   cat > conftest.$ac_ext <<EOF
  1382. #line 1383 "configure"
  1383. #include "confdefs.h"
  1384. #include <sys/types.h>
  1385. #if STDC_HEADERS
  1386. #include <stdlib.h>
  1387. #endif
  1388. EOF
  1389. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1390.   egrep "mode_t" >/dev/null 2>&1; then
  1391.   rm -rf conftest*
  1392.   ac_cv_type_mode_t=yes
  1393. else
  1394.   rm -rf conftest*
  1395.   ac_cv_type_mode_t=no
  1396. fi
  1397. rm -f conftest*
  1398.  
  1399. fi
  1400. echo "$ac_t""$ac_cv_type_mode_t" 1>&6
  1401. if test $ac_cv_type_mode_t = no; then
  1402.   cat >> confdefs.h <<\EOF
  1403. #define mode_t int
  1404. EOF
  1405.  
  1406. fi
  1407.  
  1408. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  1409. if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
  1410.   echo $ac_n "(cached) $ac_c" 1>&6
  1411. else
  1412.   cat > conftest.$ac_ext <<EOF
  1413. #line 1414 "configure"
  1414. #include "confdefs.h"
  1415. #include <sys/types.h>
  1416. #if STDC_HEADERS
  1417. #include <stdlib.h>
  1418. #endif
  1419. EOF
  1420. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1421.   egrep "off_t" >/dev/null 2>&1; then
  1422.   rm -rf conftest*
  1423.   ac_cv_type_off_t=yes
  1424. else
  1425.   rm -rf conftest*
  1426.   ac_cv_type_off_t=no
  1427. fi
  1428. rm -f conftest*
  1429.  
  1430. fi
  1431. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  1432. if test $ac_cv_type_off_t = no; then
  1433.   cat >> confdefs.h <<\EOF
  1434. #define off_t long
  1435. EOF
  1436.  
  1437. fi
  1438.  
  1439. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  1440. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  1441.   echo $ac_n "(cached) $ac_c" 1>&6
  1442. else
  1443.   cat > conftest.$ac_ext <<EOF
  1444. #line 1445 "configure"
  1445. #include "confdefs.h"
  1446. #include <sys/types.h>
  1447. #if STDC_HEADERS
  1448. #include <stdlib.h>
  1449. #endif
  1450. EOF
  1451. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1452.   egrep "pid_t" >/dev/null 2>&1; then
  1453.   rm -rf conftest*
  1454.   ac_cv_type_pid_t=yes
  1455. else
  1456.   rm -rf conftest*
  1457.   ac_cv_type_pid_t=no
  1458. fi
  1459. rm -f conftest*
  1460.  
  1461. fi
  1462. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  1463. if test $ac_cv_type_pid_t = no; then
  1464.   cat >> confdefs.h <<\EOF
  1465. #define pid_t int
  1466. EOF
  1467.  
  1468. fi
  1469.  
  1470. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  1471. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  1472.   echo $ac_n "(cached) $ac_c" 1>&6
  1473. else
  1474.   cat > conftest.$ac_ext <<EOF
  1475. #line 1476 "configure"
  1476. #include "confdefs.h"
  1477. #include <sys/types.h>
  1478. #include <signal.h>
  1479. #ifdef signal
  1480. #undef signal
  1481. #endif
  1482. #ifdef __cplusplus
  1483. extern "C" void (*signal (int, void (*)(int)))(int);
  1484. #else
  1485. void (*signal ()) ();
  1486. #endif
  1487.  
  1488. int main() { return 0; }
  1489. int t() {
  1490. int i;
  1491. ; return 0; }
  1492. EOF
  1493. if { (eval echo configure:1494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1494.   rm -rf conftest*
  1495.   ac_cv_type_signal=void
  1496. else
  1497.   rm -rf conftest*
  1498.   ac_cv_type_signal=int
  1499. fi
  1500. rm -f conftest*
  1501.  
  1502. fi
  1503.  
  1504. echo "$ac_t""$ac_cv_type_signal" 1>&6
  1505. cat >> confdefs.h <<EOF
  1506. #define RETSIGTYPE $ac_cv_type_signal
  1507. EOF
  1508.  
  1509.  
  1510. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  1511. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  1512.   echo $ac_n "(cached) $ac_c" 1>&6
  1513. else
  1514.   cat > conftest.$ac_ext <<EOF
  1515. #line 1516 "configure"
  1516. #include "confdefs.h"
  1517. #include <sys/types.h>
  1518. #if STDC_HEADERS
  1519. #include <stdlib.h>
  1520. #endif
  1521. EOF
  1522. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1523.   egrep "size_t" >/dev/null 2>&1; then
  1524.   rm -rf conftest*
  1525.   ac_cv_type_size_t=yes
  1526. else
  1527.   rm -rf conftest*
  1528.   ac_cv_type_size_t=no
  1529. fi
  1530. rm -f conftest*
  1531.  
  1532. fi
  1533. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  1534. if test $ac_cv_type_size_t = no; then
  1535.   cat >> confdefs.h <<\EOF
  1536. #define size_t unsigned
  1537. EOF
  1538.  
  1539. fi
  1540.  
  1541. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  1542. if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  1543.   echo $ac_n "(cached) $ac_c" 1>&6
  1544. else
  1545.   cat > conftest.$ac_ext <<EOF
  1546. #line 1547 "configure"
  1547. #include "confdefs.h"
  1548. #include <sys/types.h>
  1549. EOF
  1550. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1551.   egrep "uid_t" >/dev/null 2>&1; then
  1552.   rm -rf conftest*
  1553.   ac_cv_type_uid_t=yes
  1554. else
  1555.   rm -rf conftest*
  1556.   ac_cv_type_uid_t=no
  1557. fi
  1558. rm -f conftest*
  1559.  
  1560. fi
  1561.  
  1562. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  1563. if test $ac_cv_type_uid_t = no; then
  1564.   cat >> confdefs.h <<\EOF
  1565. #define uid_t int
  1566. EOF
  1567.  
  1568.   cat >> confdefs.h <<\EOF
  1569. #define gid_t int
  1570. EOF
  1571.  
  1572. fi
  1573.  
  1574.  
  1575.  
  1576. # Set info about shared libraries.
  1577.  
  1578.  
  1579.  
  1580.  
  1581. # SO is the extension of shared libraries `(including the dot!)
  1582. # -- usually .so, .sl on HP-UX
  1583. echo $ac_n "checking SO""... $ac_c" 1>&6
  1584. if test -z "$SO"
  1585. then
  1586.     case $ac_sys_system in
  1587.     hp*|HP*)   SO=.sl;;
  1588.     *)       SO=.so;;
  1589.     esac
  1590. fi
  1591. echo "$ac_t""$SO" 1>&6
  1592. # LDSHARED is the ld *command* used to create shared library
  1593. # -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
  1594. echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
  1595. if test -z "$LDSHARED"
  1596. then
  1597.     case $ac_sys_system/$ac_sys_release in
  1598.     AIX*) LDSHARED="ld_so_aix \$(CC)";;
  1599.     IRIX*) LDSHARED="ld -shared";;
  1600.     SunOS/4*) LDSHARED="ld";;
  1601.     SunOS/5*) LDSHARED="ld -G";;
  1602.     hp*|HP*) LDSHARED="ld -b";;
  1603.     OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
  1604.     DYNIX/ptx*) LDSHARED="ld -G";;
  1605.     next/*) LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';;
  1606.     Linux*) LDSHARED="gcc -shared";;
  1607.     FreeBSD*) LDSHARED="ld -Bshareable";;
  1608.     SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
  1609.     *)    LDSHARED="ld";;
  1610.     esac
  1611. fi
  1612. echo "$ac_t""$LDSHARED" 1>&6
  1613. # CCSHARED are the C *flags* used to create objects to go into a shared
  1614. # library -- this is only needed for a few systems
  1615. echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
  1616. if test -z "$CCSHARED"
  1617. then
  1618.     case $ac_sys_system in
  1619.     hp*|HP*) if test "$GCC" = yes;
  1620.          then CCSHARED="-fpic";
  1621.          else CCSHARED="+z";
  1622.          fi;;
  1623.     Linux*) CCSHARED="-fpic";;
  1624.     FreeBSD*) CCSHARED="-fpic";;
  1625.     SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
  1626.     esac
  1627. fi
  1628. echo "$ac_t""$CCSHARED" 1>&6
  1629. # LINKFORSHARED are the flags passed to the $(CC) command that links
  1630. # the python executable -- this is only needed for a few systems
  1631. echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
  1632. if test -z "$LINKFORSHARED"
  1633. then
  1634.     case $ac_sys_system in
  1635.     AIX*)    LINKFORSHARED="-Wl,-bE:python.exp";;
  1636.     hp*|HP*) LINKFORSHARED="-Wl,-E";;
  1637.     Linux*) LINKFORSHARED="-rdynamic";;
  1638.     next3*) LINKFORSHARED="-u libsys_s";;
  1639.     SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
  1640.     esac
  1641. fi
  1642. echo "$ac_t""$LINKFORSHARED" 1>&6
  1643.  
  1644. # checks for libraries
  1645. echo $ac_n "checking for -ldl""... $ac_c" 1>&6
  1646. ac_lib_var=`echo dl'_'dlopen | tr './+\055' '__p_'`
  1647. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1648.   echo $ac_n "(cached) $ac_c" 1>&6
  1649. else
  1650.   ac_save_LIBS="$LIBS"
  1651. LIBS="-ldl  $LIBS"
  1652. cat > conftest.$ac_ext <<EOF
  1653. #line 1654 "configure"
  1654. #include "confdefs.h"
  1655. /* Override any gcc2 internal prototype to avoid an error.  */
  1656. /* We use char because int might match the return type of a gcc2
  1657.     builtin and then its argument prototype would still apply.  */
  1658. char dlopen();
  1659.  
  1660. int main() { return 0; }
  1661. int t() {
  1662. dlopen()
  1663. ; return 0; }
  1664. EOF
  1665. if { (eval echo configure:1666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1666.   rm -rf conftest*
  1667.   eval "ac_cv_lib_$ac_lib_var=yes"
  1668. else
  1669.   rm -rf conftest*
  1670.   eval "ac_cv_lib_$ac_lib_var=no"
  1671. fi
  1672. rm -f conftest*
  1673. LIBS="$ac_save_LIBS"
  1674.  
  1675. fi
  1676. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1677.   echo "$ac_t""yes" 1>&6
  1678.     ac_tr_lib=HAVE_LIB`echo dl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1679.   cat >> confdefs.h <<EOF
  1680. #define $ac_tr_lib 1
  1681. EOF
  1682.  
  1683.   LIBS="-ldl $LIBS"
  1684.  
  1685. else
  1686.   echo "$ac_t""no" 1>&6
  1687. fi
  1688.     # Dynamic linking for SunOS/Solaris and SYSV
  1689. echo $ac_n "checking for -ldld""... $ac_c" 1>&6
  1690. ac_lib_var=`echo dld'_'shl_load | tr './+\055' '__p_'`
  1691. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1692.   echo $ac_n "(cached) $ac_c" 1>&6
  1693. else
  1694.   ac_save_LIBS="$LIBS"
  1695. LIBS="-ldld  $LIBS"
  1696. cat > conftest.$ac_ext <<EOF
  1697. #line 1698 "configure"
  1698. #include "confdefs.h"
  1699. /* Override any gcc2 internal prototype to avoid an error.  */
  1700. /* We use char because int might match the return type of a gcc2
  1701.     builtin and then its argument prototype would still apply.  */
  1702. char shl_load();
  1703.  
  1704. int main() { return 0; }
  1705. int t() {
  1706. shl_load()
  1707. ; return 0; }
  1708. EOF
  1709. if { (eval echo configure:1710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1710.   rm -rf conftest*
  1711.   eval "ac_cv_lib_$ac_lib_var=yes"
  1712. else
  1713.   rm -rf conftest*
  1714.   eval "ac_cv_lib_$ac_lib_var=no"
  1715. fi
  1716. rm -f conftest*
  1717. LIBS="$ac_save_LIBS"
  1718.  
  1719. fi
  1720. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1721.   echo "$ac_t""yes" 1>&6
  1722.     ac_tr_lib=HAVE_LIB`echo dld | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1723.   cat >> confdefs.h <<EOF
  1724. #define $ac_tr_lib 1
  1725. EOF
  1726.  
  1727.   LIBS="-ldld $LIBS"
  1728.  
  1729. else
  1730.   echo "$ac_t""no" 1>&6
  1731. fi
  1732.     # Dynamic linking for HP-UX
  1733. echo $ac_n "checking for -lsun""... $ac_c" 1>&6
  1734. ac_lib_var=`echo sun'_'getpwnam | tr './+\055' '__p_'`
  1735. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1736.   echo $ac_n "(cached) $ac_c" 1>&6
  1737. else
  1738.   ac_save_LIBS="$LIBS"
  1739. LIBS="-lsun  $LIBS"
  1740. cat > conftest.$ac_ext <<EOF
  1741. #line 1742 "configure"
  1742. #include "confdefs.h"
  1743. /* Override any gcc2 internal prototype to avoid an error.  */
  1744. /* We use char because int might match the return type of a gcc2
  1745.     builtin and then its argument prototype would still apply.  */
  1746. char getpwnam();
  1747.  
  1748. int main() { return 0; }
  1749. int t() {
  1750. getpwnam()
  1751. ; return 0; }
  1752. EOF
  1753. if { (eval echo configure:1754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1754.   rm -rf conftest*
  1755.   eval "ac_cv_lib_$ac_lib_var=yes"
  1756. else
  1757.   rm -rf conftest*
  1758.   eval "ac_cv_lib_$ac_lib_var=no"
  1759. fi
  1760. rm -f conftest*
  1761. LIBS="$ac_save_LIBS"
  1762.  
  1763. fi
  1764. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1765.   echo "$ac_t""yes" 1>&6
  1766.     ac_tr_lib=HAVE_LIB`echo sun | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1767.   cat >> confdefs.h <<EOF
  1768. #define $ac_tr_lib 1
  1769. EOF
  1770.  
  1771.   LIBS="-lsun $LIBS"
  1772.  
  1773. else
  1774.   echo "$ac_t""no" 1>&6
  1775. fi
  1776.     # NIS (== YP) interface for IRIX 4
  1777. # The following three (nsl,inet,socket) are needed on Sequent;
  1778. # the order of checking must be this.  Most SVR4 platforms will
  1779. # need -lsocket and -lnsl.  However on SGI IRIX 5, these exist but
  1780. # broken.  I see no elegant solution (probably CHECK_LIB should be
  1781. # fixed to only add the library if the given entry point is not
  1782. # satisfied without it).
  1783. if test "$ac_sys_system" != IRIX
  1784. then
  1785. echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
  1786. ac_lib_var=`echo nsl'_'t_open | tr './+\055' '__p_'`
  1787. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1788.   echo $ac_n "(cached) $ac_c" 1>&6
  1789. else
  1790.   ac_save_LIBS="$LIBS"
  1791. LIBS="-lnsl  $LIBS"
  1792. cat > conftest.$ac_ext <<EOF
  1793. #line 1794 "configure"
  1794. #include "confdefs.h"
  1795. /* Override any gcc2 internal prototype to avoid an error.  */
  1796. /* We use char because int might match the return type of a gcc2
  1797.     builtin and then its argument prototype would still apply.  */
  1798. char t_open();
  1799.  
  1800. int main() { return 0; }
  1801. int t() {
  1802. t_open()
  1803. ; return 0; }
  1804. EOF
  1805. if { (eval echo configure:1806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1806.   rm -rf conftest*
  1807.   eval "ac_cv_lib_$ac_lib_var=yes"
  1808. else
  1809.   rm -rf conftest*
  1810.   eval "ac_cv_lib_$ac_lib_var=no"
  1811. fi
  1812. rm -f conftest*
  1813. LIBS="$ac_save_LIBS"
  1814.  
  1815. fi
  1816. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1817.   echo "$ac_t""yes" 1>&6
  1818.   LIBS="-lnsl $LIBS"
  1819. else
  1820.   echo "$ac_t""no" 1>&6
  1821. fi
  1822.  # SVR4
  1823. echo $ac_n "checking for -linet""... $ac_c" 1>&6
  1824. ac_lib_var=`echo inet'_'gethostbyname | tr './+\055' '__p_'`
  1825. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1826.   echo $ac_n "(cached) $ac_c" 1>&6
  1827. else
  1828.   ac_save_LIBS="$LIBS"
  1829. LIBS="-linet -lnsl $LIBS"
  1830. cat > conftest.$ac_ext <<EOF
  1831. #line 1832 "configure"
  1832. #include "confdefs.h"
  1833. /* Override any gcc2 internal prototype to avoid an error.  */
  1834. /* We use char because int might match the return type of a gcc2
  1835.     builtin and then its argument prototype would still apply.  */
  1836. char gethostbyname();
  1837.  
  1838. int main() { return 0; }
  1839. int t() {
  1840. gethostbyname()
  1841. ; return 0; }
  1842. EOF
  1843. if { (eval echo configure:1844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1844.   rm -rf conftest*
  1845.   eval "ac_cv_lib_$ac_lib_var=yes"
  1846. else
  1847.   rm -rf conftest*
  1848.   eval "ac_cv_lib_$ac_lib_var=no"
  1849. fi
  1850. rm -f conftest*
  1851. LIBS="$ac_save_LIBS"
  1852.  
  1853. fi
  1854. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1855.   echo "$ac_t""yes" 1>&6
  1856.   LIBS="-linet $LIBS"
  1857. else
  1858.   echo "$ac_t""no" 1>&6
  1859. fi
  1860.  # Sequent
  1861. echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
  1862. ac_lib_var=`echo socket'_'socket | tr './+\055' '__p_'`
  1863. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1864.   echo $ac_n "(cached) $ac_c" 1>&6
  1865. else
  1866.   ac_save_LIBS="$LIBS"
  1867. LIBS="-lsocket $LIBS $LIBS"
  1868. cat > conftest.$ac_ext <<EOF
  1869. #line 1870 "configure"
  1870. #include "confdefs.h"
  1871. /* Override any gcc2 internal prototype to avoid an error.  */
  1872. /* We use char because int might match the return type of a gcc2
  1873.     builtin and then its argument prototype would still apply.  */
  1874. char socket();
  1875.  
  1876. int main() { return 0; }
  1877. int t() {
  1878. socket()
  1879. ; return 0; }
  1880. EOF
  1881. if { (eval echo configure:1882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1882.   rm -rf conftest*
  1883.   eval "ac_cv_lib_$ac_lib_var=yes"
  1884. else
  1885.   rm -rf conftest*
  1886.   eval "ac_cv_lib_$ac_lib_var=no"
  1887. fi
  1888. rm -f conftest*
  1889. LIBS="$ac_save_LIBS"
  1890.  
  1891. fi
  1892. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1893.   echo "$ac_t""yes" 1>&6
  1894.   LIBS="-lsocket $LIBS"
  1895. else
  1896.   echo "$ac_t""no" 1>&6
  1897. fi
  1898.  # SVR4 sockets
  1899. fi
  1900. echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
  1901. # Check whether --with-libs or --without-libs was given.
  1902. if test "${with_libs+set}" = set; then
  1903.   withval="$with_libs"
  1904.   
  1905. echo "$ac_t""$withval" 1>&6
  1906. LIBS="$withval $LIBS"
  1907.  
  1908. else
  1909.   echo "$ac_t""no" 1>&6
  1910. fi
  1911.  
  1912.  
  1913. echo $ac_n "checking for --with-readline""... $ac_c" 1>&6
  1914. # Check whether --with-readline or --without-readline was given.
  1915. if test "${with_readline+set}" = set; then
  1916.   withval="$with_readline"
  1917.   
  1918. echo "$ac_t""$withval" 1>&6
  1919. cat >> confdefs.h <<\EOF
  1920. #define WITH_READLINE 1
  1921. EOF
  1922.  
  1923. if test -d "$withval"
  1924. then LDFLAGS="$LDFLAGS -L$withval"
  1925. fi
  1926. # first check if we can compile without lib termcap
  1927.  
  1928. PYRL_LIBS="-lreadline"
  1929. echo $ac_n "checking for -lreadline without -ltermcap""... $ac_c" 1>&6
  1930. old_LIBS=$LIBS
  1931. # check if a libreadline exists
  1932. LIBS="$LIBS -lreadline"
  1933. cat > conftest.$ac_ext <<EOF
  1934. #line 1935 "configure"
  1935. #include "confdefs.h"
  1936. extern char *readline();
  1937. int main() { return 0; }
  1938. int t() {
  1939. char *line=readline();
  1940. ; return 0; }
  1941. EOF
  1942. if { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1943.   rm -rf conftest*
  1944.   
  1945.       echo "$ac_t""yes" 1>&6
  1946. else
  1947.   rm -rf conftest*
  1948.   
  1949.       echo "$ac_t""no" 1>&6
  1950.       echo "checking for -lreadline that needs -ltermcap" 1>&6
  1951.       termcap=
  1952.       echo $ac_n "checking for -ltermcap""... $ac_c" 1>&6
  1953. ac_lib_var=`echo termcap'_'tgetent | tr './+\055' '__p_'`
  1954. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1955.   echo $ac_n "(cached) $ac_c" 1>&6
  1956. else
  1957.   ac_save_LIBS="$LIBS"
  1958. LIBS="-ltermcap  $LIBS"
  1959. cat > conftest.$ac_ext <<EOF
  1960. #line 1961 "configure"
  1961. #include "confdefs.h"
  1962. /* Override any gcc2 internal prototype to avoid an error.  */
  1963. /* We use char because int might match the return type of a gcc2
  1964.     builtin and then its argument prototype would still apply.  */
  1965. char tgetent();
  1966.  
  1967. int main() { return 0; }
  1968. int t() {
  1969. tgetent()
  1970. ; return 0; }
  1971. EOF
  1972. if { (eval echo configure:1973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  1973.   rm -rf conftest*
  1974.   eval "ac_cv_lib_$ac_lib_var=yes"
  1975. else
  1976.   rm -rf conftest*
  1977.   eval "ac_cv_lib_$ac_lib_var=no"
  1978. fi
  1979. rm -f conftest*
  1980. LIBS="$ac_save_LIBS"
  1981.  
  1982. fi
  1983. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1984.   echo "$ac_t""yes" 1>&6
  1985.   termcap=termcap
  1986. else
  1987.   echo "$ac_t""no" 1>&6
  1988.  
  1989.       echo $ac_n "checking for -ltermlib""... $ac_c" 1>&6
  1990. ac_lib_var=`echo termlib'_'tgetent | tr './+\055' '__p_'`
  1991. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1992.   echo $ac_n "(cached) $ac_c" 1>&6
  1993. else
  1994.   ac_save_LIBS="$LIBS"
  1995. LIBS="-ltermlib  $LIBS"
  1996. cat > conftest.$ac_ext <<EOF
  1997. #line 1998 "configure"
  1998. #include "confdefs.h"
  1999. /* Override any gcc2 internal prototype to avoid an error.  */
  2000. /* We use char because int might match the return type of a gcc2
  2001.     builtin and then its argument prototype would still apply.  */
  2002. char tgetent();
  2003.  
  2004. int main() { return 0; }
  2005. int t() {
  2006. tgetent()
  2007. ; return 0; }
  2008. EOF
  2009. if { (eval echo configure:2010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2010.   rm -rf conftest*
  2011.   eval "ac_cv_lib_$ac_lib_var=yes"
  2012. else
  2013.   rm -rf conftest*
  2014.   eval "ac_cv_lib_$ac_lib_var=no"
  2015. fi
  2016. rm -f conftest*
  2017. LIBS="$ac_save_LIBS"
  2018.  
  2019. fi
  2020. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2021.   echo "$ac_t""yes" 1>&6
  2022.   termcap=termlib
  2023. else
  2024.   echo "$ac_t""no" 1>&6
  2025.  
  2026.       { echo "configure: error: no working -ltermcap/termlib found -- do not use --with-readline" 1>&2; exit 1; }
  2027. fi
  2028.  
  2029. fi
  2030.  
  2031.       # Avoid possible conflict between shared libraries termcap and gl
  2032.       # on IRIX 5: both contain a routine called clear.
  2033.       if test -f /usr/lib/lib$termcap.a
  2034.       then termcap="/usr/lib/lib$termcap.a"
  2035.       else termcap="-l$termcap"
  2036.       fi
  2037.       LIBS="$LIBS $termcap"
  2038.       echo $ac_n "checking for -lreadline with $termcap""... $ac_c" 1>&6
  2039.       cat > conftest.$ac_ext <<EOF
  2040. #line 2041 "configure"
  2041. #include "confdefs.h"
  2042. extern char *readline();
  2043. int main() { return 0; }
  2044. int t() {
  2045. char *line=readline();
  2046. ; return 0; }
  2047. EOF
  2048. if { (eval echo configure:2049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2049.   rm -rf conftest*
  2050.   
  2051.          PYRL_LIBS="$PYRL_LIBS $termcap"
  2052.          echo "$ac_t""yes" 1>&6
  2053. else
  2054.   rm -rf conftest*
  2055.   
  2056.      { echo "configure: error: no working GNU readline library found -- do not use --with-readline" 1>&2; exit 1; }
  2057. fi
  2058. rm -f conftest*
  2059.  
  2060.       
  2061. fi
  2062. rm -f conftest*
  2063.  
  2064.  
  2065. else
  2066.   echo "$ac_t""no" 1>&6
  2067. fi
  2068.  
  2069. LIBS=$old_LIBS
  2070.  
  2071. echo $ac_n "checking for --with-thread""... $ac_c" 1>&6
  2072. # Check whether --with-thread or --without-thread was given.
  2073. if test "${with_thread+set}" = set; then
  2074.   withval="$with_thread"
  2075.   
  2076. echo "$ac_t""$withval" 1>&6
  2077. if test -d "$withval"
  2078. then LDFLAGS="$LDFLAGS -L$withval"
  2079. fi
  2080. cat >> confdefs.h <<\EOF
  2081. #define _REENTRANT 1
  2082. EOF
  2083.  
  2084. ac_safe=`echo "mach/cthreads.h" | tr './\055' '___'`
  2085. echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
  2086. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2087.   echo $ac_n "(cached) $ac_c" 1>&6
  2088. else
  2089.   cat > conftest.$ac_ext <<EOF
  2090. #line 2091 "configure"
  2091. #include "confdefs.h"
  2092. #include <mach/cthreads.h>
  2093. EOF
  2094. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2095. { (eval echo configure:2096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2096. ac_err=`grep -v '^ *+' conftest.out`
  2097. if test -z "$ac_err"; then
  2098.   rm -rf conftest*
  2099.   eval "ac_cv_header_$ac_safe=yes"
  2100. else
  2101.   echo "$ac_err" >&5
  2102.   rm -rf conftest*
  2103.   eval "ac_cv_header_$ac_safe=no"
  2104. fi
  2105. rm -f conftest*
  2106. fi
  2107. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2108.   echo "$ac_t""yes" 1>&6
  2109.   cat >> confdefs.h <<\EOF
  2110. #define WITH_THREAD 1
  2111. EOF
  2112.  
  2113. cat >> confdefs.h <<\EOF
  2114. #define C_THREADS 1
  2115. EOF
  2116.  
  2117. LIBOBJS="$LIBOBJS thread.o"
  2118. else
  2119.   echo "$ac_t""no" 1>&6
  2120.  
  2121. echo $ac_n "checking for -lpthreads""... $ac_c" 1>&6
  2122. ac_lib_var=`echo pthreads'_'pthread_create | tr './+\055' '__p_'`
  2123. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2124.   echo $ac_n "(cached) $ac_c" 1>&6
  2125. else
  2126.   ac_save_LIBS="$LIBS"
  2127. LIBS="-lpthreads  $LIBS"
  2128. cat > conftest.$ac_ext <<EOF
  2129. #line 2130 "configure"
  2130. #include "confdefs.h"
  2131. /* Override any gcc2 internal prototype to avoid an error.  */
  2132. /* We use char because int might match the return type of a gcc2
  2133.     builtin and then its argument prototype would still apply.  */
  2134. char pthread_create();
  2135.  
  2136. int main() { return 0; }
  2137. int t() {
  2138. pthread_create()
  2139. ; return 0; }
  2140. EOF
  2141. if { (eval echo configure:2142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2142.   rm -rf conftest*
  2143.   eval "ac_cv_lib_$ac_lib_var=yes"
  2144. else
  2145.   rm -rf conftest*
  2146.   eval "ac_cv_lib_$ac_lib_var=no"
  2147. fi
  2148. rm -f conftest*
  2149. LIBS="$ac_save_LIBS"
  2150.  
  2151. fi
  2152. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2153.   echo "$ac_t""yes" 1>&6
  2154.   cat >> confdefs.h <<\EOF
  2155. #define WITH_THREAD 1
  2156. EOF
  2157.  
  2158. cat >> confdefs.h <<\EOF
  2159. #define _POSIX_THREADS 1
  2160. EOF
  2161.  
  2162. LIBS="$LIBS -lpthreads"
  2163. LIBOBJS="$LIBOBJS thread.o"
  2164. else
  2165.   echo "$ac_t""no" 1>&6
  2166.  
  2167. echo $ac_n "checking for -lpthread""... $ac_c" 1>&6
  2168. ac_lib_var=`echo pthread'_'pthread_create | tr './+\055' '__p_'`
  2169. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2170.   echo $ac_n "(cached) $ac_c" 1>&6
  2171. else
  2172.   ac_save_LIBS="$LIBS"
  2173. LIBS="-lpthread  $LIBS"
  2174. cat > conftest.$ac_ext <<EOF
  2175. #line 2176 "configure"
  2176. #include "confdefs.h"
  2177. /* Override any gcc2 internal prototype to avoid an error.  */
  2178. /* We use char because int might match the return type of a gcc2
  2179.     builtin and then its argument prototype would still apply.  */
  2180. char pthread_create();
  2181.  
  2182. int main() { return 0; }
  2183. int t() {
  2184. pthread_create()
  2185. ; return 0; }
  2186. EOF
  2187. if { (eval echo configure:2188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2188.   rm -rf conftest*
  2189.   eval "ac_cv_lib_$ac_lib_var=yes"
  2190. else
  2191.   rm -rf conftest*
  2192.   eval "ac_cv_lib_$ac_lib_var=no"
  2193. fi
  2194. rm -f conftest*
  2195. LIBS="$ac_save_LIBS"
  2196.  
  2197. fi
  2198. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2199.   echo "$ac_t""yes" 1>&6
  2200.   cat >> confdefs.h <<\EOF
  2201. #define WITH_THREAD 1
  2202. EOF
  2203.  
  2204. cat >> confdefs.h <<\EOF
  2205. #define _POSIX_THREADS 1
  2206. EOF
  2207.  
  2208. LIBS="$LIBS -lpthread"
  2209. LIBOBJS="$LIBOBJS thread.o"
  2210. else
  2211.   echo "$ac_t""no" 1>&6
  2212. fi
  2213.  
  2214.  
  2215. fi
  2216.  
  2217. fi
  2218.  
  2219. echo $ac_n "checking for -lmpc""... $ac_c" 1>&6
  2220. ac_lib_var=`echo mpc'_'usconfig | tr './+\055' '__p_'`
  2221. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2222.   echo $ac_n "(cached) $ac_c" 1>&6
  2223. else
  2224.   ac_save_LIBS="$LIBS"
  2225. LIBS="-lmpc  $LIBS"
  2226. cat > conftest.$ac_ext <<EOF
  2227. #line 2228 "configure"
  2228. #include "confdefs.h"
  2229. /* Override any gcc2 internal prototype to avoid an error.  */
  2230. /* We use char because int might match the return type of a gcc2
  2231.     builtin and then its argument prototype would still apply.  */
  2232. char usconfig();
  2233.  
  2234. int main() { return 0; }
  2235. int t() {
  2236. usconfig()
  2237. ; return 0; }
  2238. EOF
  2239. if { (eval echo configure:2240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2240.   rm -rf conftest*
  2241.   eval "ac_cv_lib_$ac_lib_var=yes"
  2242. else
  2243.   rm -rf conftest*
  2244.   eval "ac_cv_lib_$ac_lib_var=no"
  2245. fi
  2246. rm -f conftest*
  2247. LIBS="$ac_save_LIBS"
  2248.  
  2249. fi
  2250. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2251.   echo "$ac_t""yes" 1>&6
  2252.   cat >> confdefs.h <<\EOF
  2253. #define WITH_THREAD 1
  2254. EOF
  2255.  
  2256. LIBS="$LIBS -lmpc"
  2257. LIBOBJS="$LIBOBJS thread.o"
  2258. else
  2259.   echo "$ac_t""no" 1>&6
  2260. fi
  2261.  
  2262. echo $ac_n "checking for -lthread""... $ac_c" 1>&6
  2263. ac_lib_var=`echo thread'_'thr_create | tr './+\055' '__p_'`
  2264. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2265.   echo $ac_n "(cached) $ac_c" 1>&6
  2266. else
  2267.   ac_save_LIBS="$LIBS"
  2268. LIBS="-lthread  $LIBS"
  2269. cat > conftest.$ac_ext <<EOF
  2270. #line 2271 "configure"
  2271. #include "confdefs.h"
  2272. /* Override any gcc2 internal prototype to avoid an error.  */
  2273. /* We use char because int might match the return type of a gcc2
  2274.     builtin and then its argument prototype would still apply.  */
  2275. char thr_create();
  2276.  
  2277. int main() { return 0; }
  2278. int t() {
  2279. thr_create()
  2280. ; return 0; }
  2281. EOF
  2282. if { (eval echo configure:2283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2283.   rm -rf conftest*
  2284.   eval "ac_cv_lib_$ac_lib_var=yes"
  2285. else
  2286.   rm -rf conftest*
  2287.   eval "ac_cv_lib_$ac_lib_var=no"
  2288. fi
  2289. rm -f conftest*
  2290. LIBS="$ac_save_LIBS"
  2291.  
  2292. fi
  2293. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2294.   echo "$ac_t""yes" 1>&6
  2295.   cat >> confdefs.h <<\EOF
  2296. #define WITH_THREAD 1
  2297. EOF
  2298.  
  2299. LIBS="$LIBS -lthread"
  2300. LIBOBJS="$LIBOBJS thread.o"
  2301. else
  2302.   echo "$ac_t""no" 1>&6
  2303. fi
  2304.  
  2305.  
  2306. else
  2307.   echo "$ac_t""no" 1>&6
  2308. fi
  2309.  
  2310.  
  2311. # -I${DLINCLDIR} is added to the compile rule for importdl.o
  2312.  
  2313. DLINCLDIR=/
  2314.  
  2315. echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
  2316. # Check whether --with-sgi-dl or --without-sgi-dl was given.
  2317. if test "${with_sgi_dl+set}" = set; then
  2318.   withval="$with_sgi_dl"
  2319.   
  2320. echo "$ac_t""$withval" 1>&6
  2321. cat >> confdefs.h <<\EOF
  2322. #define WITH_SGI_DL 1
  2323. EOF
  2324.  
  2325. dldir=$withval
  2326. if test -d "$dldir"
  2327. then LDFLAGS="$LDFLAGS -L$dldir"
  2328. else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
  2329. fi
  2330. DLINCLDIR=${dldir}
  2331. LIBS="$LIBS -ldl -lmld"
  2332. else
  2333.   echo "$ac_t""no" 1>&6
  2334. fi
  2335.  
  2336.  
  2337. echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
  2338. # Check whether --with-dl-dld or --without-dl-dld was given.
  2339. if test "${with_dl_dld+set}" = set; then
  2340.   withval="$with_dl_dld"
  2341.   
  2342. echo "$ac_t""$withval" 1>&6
  2343. cat >> confdefs.h <<\EOF
  2344. #define WITH_DL_DLD 1
  2345. EOF
  2346.  
  2347. dldir=`echo "$withval" | sed 's/,.*//'`
  2348. dlddir=`echo "$withval" | sed 's/.*,//'`
  2349. if test -d "$dldir" -a -d "$dlddir"
  2350. then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
  2351. else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
  2352. fi
  2353. DLINCLDIR=${dldir}
  2354. LIBS="$LIBS -ldl -ldld"
  2355. else
  2356.   echo "$ac_t""no" 1>&6
  2357. fi
  2358.  
  2359.  
  2360. # checks for library functions
  2361. for ac_func in chown clock dlopen flock ftime ftruncate \
  2362.  gethostname_r getpeername getpgrp getpid gettimeofday getwd \
  2363.  link lstat mkfifo nice plock putenv readlink \
  2364.  select setgid setuid setsid setpgid setpgrp setvbuf \
  2365.  sigaction siginterrupt sigrelse strftime symlink \
  2366.  tcgetpgrp tcsetpgrp times truncate uname waitpid
  2367. do
  2368. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2369. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2370.   echo $ac_n "(cached) $ac_c" 1>&6
  2371. else
  2372.   cat > conftest.$ac_ext <<EOF
  2373. #line 2374 "configure"
  2374. #include "confdefs.h"
  2375. /* System header to define __stub macros and hopefully few prototypes,
  2376.     which can conflict with char $ac_func(); below.  */
  2377. #include <assert.h>
  2378. /* Override any gcc2 internal prototype to avoid an error.  */
  2379. /* We use char because int might match the return type of a gcc2
  2380.     builtin and then its argument prototype would still apply.  */
  2381. char $ac_func();
  2382.  
  2383. int main() { return 0; }
  2384. int t() {
  2385.  
  2386. /* The GNU C library defines this for functions which it implements
  2387.     to always fail with ENOSYS.  Some functions are actually named
  2388.     something starting with __ and the normal name is an alias.  */
  2389. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2390. choke me
  2391. #else
  2392. $ac_func();
  2393. #endif
  2394.  
  2395. ; return 0; }
  2396. EOF
  2397. if { (eval echo configure:2398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2398.   rm -rf conftest*
  2399.   eval "ac_cv_func_$ac_func=yes"
  2400. else
  2401.   rm -rf conftest*
  2402.   eval "ac_cv_func_$ac_func=no"
  2403. fi
  2404. rm -f conftest*
  2405.  
  2406. fi
  2407. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2408.   echo "$ac_t""yes" 1>&6
  2409.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2410.   cat >> confdefs.h <<EOF
  2411. #define $ac_tr_func 1
  2412. EOF
  2413.  
  2414. else
  2415.   echo "$ac_t""no" 1>&6
  2416. fi
  2417. done
  2418.  
  2419. for ac_func in dup2 getcwd strdup strerror memmove
  2420. do
  2421. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2422. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2423.   echo $ac_n "(cached) $ac_c" 1>&6
  2424. else
  2425.   cat > conftest.$ac_ext <<EOF
  2426. #line 2427 "configure"
  2427. #include "confdefs.h"
  2428. /* System header to define __stub macros and hopefully few prototypes,
  2429.     which can conflict with char $ac_func(); below.  */
  2430. #include <assert.h>
  2431. /* Override any gcc2 internal prototype to avoid an error.  */
  2432. /* We use char because int might match the return type of a gcc2
  2433.     builtin and then its argument prototype would still apply.  */
  2434. char $ac_func();
  2435.  
  2436. int main() { return 0; }
  2437. int t() {
  2438.  
  2439. /* The GNU C library defines this for functions which it implements
  2440.     to always fail with ENOSYS.  Some functions are actually named
  2441.     something starting with __ and the normal name is an alias.  */
  2442. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2443. choke me
  2444. #else
  2445. $ac_func();
  2446. #endif
  2447.  
  2448. ; return 0; }
  2449. EOF
  2450. if { (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2451.   rm -rf conftest*
  2452.   eval "ac_cv_func_$ac_func=yes"
  2453. else
  2454.   rm -rf conftest*
  2455.   eval "ac_cv_func_$ac_func=no"
  2456. fi
  2457. rm -f conftest*
  2458.  
  2459. fi
  2460. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2461.   echo "$ac_t""yes" 1>&6
  2462.   :
  2463. else
  2464.   echo "$ac_t""no" 1>&6
  2465. LIBOBJS="$LIBOBJS ${ac_func}.o"
  2466. fi
  2467.  
  2468. done
  2469.  
  2470. echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
  2471. if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
  2472.   echo $ac_n "(cached) $ac_c" 1>&6
  2473. else
  2474.   cat > conftest.$ac_ext <<EOF
  2475. #line 2476 "configure"
  2476. #include "confdefs.h"
  2477. /* System header to define __stub macros and hopefully few prototypes,
  2478.     which can conflict with char getpgrp(); below.  */
  2479. #include <assert.h>
  2480. /* Override any gcc2 internal prototype to avoid an error.  */
  2481. /* We use char because int might match the return type of a gcc2
  2482.     builtin and then its argument prototype would still apply.  */
  2483. char getpgrp();
  2484.  
  2485. int main() { return 0; }
  2486. int t() {
  2487.  
  2488. /* The GNU C library defines this for functions which it implements
  2489.     to always fail with ENOSYS.  Some functions are actually named
  2490.     something starting with __ and the normal name is an alias.  */
  2491. #if defined (__stub_getpgrp) || defined (__stub___getpgrp)
  2492. choke me
  2493. #else
  2494. getpgrp();
  2495. #endif
  2496.  
  2497. ; return 0; }
  2498. EOF
  2499. if { (eval echo configure:2500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2500.   rm -rf conftest*
  2501.   eval "ac_cv_func_getpgrp=yes"
  2502. else
  2503.   rm -rf conftest*
  2504.   eval "ac_cv_func_getpgrp=no"
  2505. fi
  2506. rm -f conftest*
  2507.  
  2508. fi
  2509. if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
  2510.   echo "$ac_t""yes" 1>&6
  2511.   cat > conftest.$ac_ext <<EOF
  2512. #line 2513 "configure"
  2513. #include "confdefs.h"
  2514. #include <unistd.h>
  2515. int main() { return 0; }
  2516. int t() {
  2517. getpgrp(0);
  2518. ; return 0; }
  2519. EOF
  2520. if { (eval echo configure:2521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2521.   rm -rf conftest*
  2522.   cat >> confdefs.h <<\EOF
  2523. #define GETPGRP_HAVE_ARG 1
  2524. EOF
  2525.  
  2526. fi
  2527. rm -f conftest*
  2528.  
  2529. else
  2530.   echo "$ac_t""no" 1>&6
  2531. fi
  2532.  
  2533. echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
  2534. if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
  2535.   echo $ac_n "(cached) $ac_c" 1>&6
  2536. else
  2537.   cat > conftest.$ac_ext <<EOF
  2538. #line 2539 "configure"
  2539. #include "confdefs.h"
  2540. /* System header to define __stub macros and hopefully few prototypes,
  2541.     which can conflict with char setpgrp(); below.  */
  2542. #include <assert.h>
  2543. /* Override any gcc2 internal prototype to avoid an error.  */
  2544. /* We use char because int might match the return type of a gcc2
  2545.     builtin and then its argument prototype would still apply.  */
  2546. char setpgrp();
  2547.  
  2548. int main() { return 0; }
  2549. int t() {
  2550.  
  2551. /* The GNU C library defines this for functions which it implements
  2552.     to always fail with ENOSYS.  Some functions are actually named
  2553.     something starting with __ and the normal name is an alias.  */
  2554. #if defined (__stub_setpgrp) || defined (__stub___setpgrp)
  2555. choke me
  2556. #else
  2557. setpgrp();
  2558. #endif
  2559.  
  2560. ; return 0; }
  2561. EOF
  2562. if { (eval echo configure:2563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2563.   rm -rf conftest*
  2564.   eval "ac_cv_func_setpgrp=yes"
  2565. else
  2566.   rm -rf conftest*
  2567.   eval "ac_cv_func_setpgrp=no"
  2568. fi
  2569. rm -f conftest*
  2570.  
  2571. fi
  2572. if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
  2573.   echo "$ac_t""yes" 1>&6
  2574.   cat > conftest.$ac_ext <<EOF
  2575. #line 2576 "configure"
  2576. #include "confdefs.h"
  2577. #include <unistd.h>
  2578. int main() { return 0; }
  2579. int t() {
  2580. setpgrp(0,0);
  2581. ; return 0; }
  2582. EOF
  2583. if { (eval echo configure:2584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2584.   rm -rf conftest*
  2585.   cat >> confdefs.h <<\EOF
  2586. #define SETPGRP_HAVE_ARG 1
  2587. EOF
  2588.  
  2589. fi
  2590. rm -f conftest*
  2591.  
  2592. else
  2593.   echo "$ac_t""no" 1>&6
  2594. fi
  2595.  
  2596. echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
  2597. if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
  2598.   echo $ac_n "(cached) $ac_c" 1>&6
  2599. else
  2600.   cat > conftest.$ac_ext <<EOF
  2601. #line 2602 "configure"
  2602. #include "confdefs.h"
  2603. /* System header to define __stub macros and hopefully few prototypes,
  2604.     which can conflict with char gettimeofday(); below.  */
  2605. #include <assert.h>
  2606. /* Override any gcc2 internal prototype to avoid an error.  */
  2607. /* We use char because int might match the return type of a gcc2
  2608.     builtin and then its argument prototype would still apply.  */
  2609. char gettimeofday();
  2610.  
  2611. int main() { return 0; }
  2612. int t() {
  2613.  
  2614. /* The GNU C library defines this for functions which it implements
  2615.     to always fail with ENOSYS.  Some functions are actually named
  2616.     something starting with __ and the normal name is an alias.  */
  2617. #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
  2618. choke me
  2619. #else
  2620. gettimeofday();
  2621. #endif
  2622.  
  2623. ; return 0; }
  2624. EOF
  2625. if { (eval echo configure:2626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2626.   rm -rf conftest*
  2627.   eval "ac_cv_func_gettimeofday=yes"
  2628. else
  2629.   rm -rf conftest*
  2630.   eval "ac_cv_func_gettimeofday=no"
  2631. fi
  2632. rm -f conftest*
  2633.  
  2634. fi
  2635. if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
  2636.   echo "$ac_t""yes" 1>&6
  2637.   cat > conftest.$ac_ext <<EOF
  2638. #line 2639 "configure"
  2639. #include "confdefs.h"
  2640. #include <sys/time.h>
  2641. int main() { return 0; }
  2642. int t() {
  2643. gettimeofday((struct timeval*)0,(struct timezone*)0);
  2644. ; return 0; }
  2645. EOF
  2646. if { (eval echo configure:2647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2647.   :
  2648. else
  2649.   rm -rf conftest*
  2650.   cat >> confdefs.h <<\EOF
  2651. #define GETTIMEOFDAY_NO_TZ 1
  2652. EOF
  2653.  
  2654. fi
  2655. rm -f conftest*
  2656.  
  2657. else
  2658.   echo "$ac_t""no" 1>&6
  2659. fi
  2660.  
  2661. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
  2662. # for constant arguments.  Useless!
  2663. echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
  2664. if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
  2665.   echo $ac_n "(cached) $ac_c" 1>&6
  2666. else
  2667.   cat > conftest.$ac_ext <<EOF
  2668. #line 2669 "configure"
  2669. #include "confdefs.h"
  2670. #include <alloca.h>
  2671. int main() { return 0; }
  2672. int t() {
  2673. char *p = alloca(2 * sizeof(int));
  2674. ; return 0; }
  2675. EOF
  2676. if { (eval echo configure:2677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2677.   rm -rf conftest*
  2678.   ac_cv_header_alloca_h=yes
  2679. else
  2680.   rm -rf conftest*
  2681.   ac_cv_header_alloca_h=no
  2682. fi
  2683. rm -f conftest*
  2684.  
  2685. fi
  2686.  
  2687. echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
  2688. if test $ac_cv_header_alloca_h = yes; then
  2689.   cat >> confdefs.h <<\EOF
  2690. #define HAVE_ALLOCA_H 1
  2691. EOF
  2692.  
  2693. fi
  2694.  
  2695. echo $ac_n "checking for alloca""... $ac_c" 1>&6
  2696. if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
  2697.   echo $ac_n "(cached) $ac_c" 1>&6
  2698. else
  2699.   cat > conftest.$ac_ext <<EOF
  2700. #line 2701 "configure"
  2701. #include "confdefs.h"
  2702.  
  2703. #ifdef __GNUC__
  2704. # define alloca __builtin_alloca
  2705. #else
  2706. # if HAVE_ALLOCA_H
  2707. #  include <alloca.h>
  2708. # else
  2709. #  ifdef _AIX
  2710.  #pragma alloca
  2711. #  else
  2712. #   ifndef alloca /* predefined by HP cc +Olibcalls */
  2713. char *alloca ();
  2714. #   endif
  2715. #  endif
  2716. # endif
  2717. #endif
  2718.  
  2719. int main() { return 0; }
  2720. int t() {
  2721. char *p = (char *) alloca(1);
  2722. ; return 0; }
  2723. EOF
  2724. if { (eval echo configure:2725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2725.   rm -rf conftest*
  2726.   ac_cv_func_alloca=yes
  2727. else
  2728.   rm -rf conftest*
  2729.   ac_cv_func_alloca=no
  2730. fi
  2731. rm -f conftest*
  2732.  
  2733. fi
  2734.  
  2735. echo "$ac_t""$ac_cv_func_alloca" 1>&6
  2736. if test $ac_cv_func_alloca = yes; then
  2737.   cat >> confdefs.h <<\EOF
  2738. #define HAVE_ALLOCA 1
  2739. EOF
  2740.  
  2741. fi
  2742.  
  2743. if test $ac_cv_func_alloca = no; then
  2744.   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  2745.   # that cause trouble.  Some versions do not even contain alloca or
  2746.   # contain a buggy version.  If you still want to use their alloca,
  2747.   # use ar to extract alloca.o from them instead of compiling alloca.c.
  2748.   ALLOCA=alloca.o
  2749.   cat >> confdefs.h <<\EOF
  2750. #define C_ALLOCA 1
  2751. EOF
  2752.  
  2753.  
  2754. echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
  2755. if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
  2756.   echo $ac_n "(cached) $ac_c" 1>&6
  2757. else
  2758.   cat > conftest.$ac_ext <<EOF
  2759. #line 2760 "configure"
  2760. #include "confdefs.h"
  2761. #if defined(CRAY) && ! defined(CRAY2)
  2762. webecray
  2763. #else
  2764. wenotbecray
  2765. #endif
  2766.  
  2767. EOF
  2768. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2769.   egrep "webecray" >/dev/null 2>&1; then
  2770.   rm -rf conftest*
  2771.   ac_cv_os_cray=yes
  2772. else
  2773.   rm -rf conftest*
  2774.   ac_cv_os_cray=no
  2775. fi
  2776. rm -f conftest*
  2777.  
  2778. fi
  2779.  
  2780. echo "$ac_t""$ac_cv_os_cray" 1>&6
  2781. if test $ac_cv_os_cray = yes; then
  2782. for ac_func in _getb67 GETB67 getb67; do
  2783.   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2784. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2785.   echo $ac_n "(cached) $ac_c" 1>&6
  2786. else
  2787.   cat > conftest.$ac_ext <<EOF
  2788. #line 2789 "configure"
  2789. #include "confdefs.h"
  2790. /* System header to define __stub macros and hopefully few prototypes,
  2791.     which can conflict with char $ac_func(); below.  */
  2792. #include <assert.h>
  2793. /* Override any gcc2 internal prototype to avoid an error.  */
  2794. /* We use char because int might match the return type of a gcc2
  2795.     builtin and then its argument prototype would still apply.  */
  2796. char $ac_func();
  2797.  
  2798. int main() { return 0; }
  2799. int t() {
  2800.  
  2801. /* The GNU C library defines this for functions which it implements
  2802.     to always fail with ENOSYS.  Some functions are actually named
  2803.     something starting with __ and the normal name is an alias.  */
  2804. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2805. choke me
  2806. #else
  2807. $ac_func();
  2808. #endif
  2809.  
  2810. ; return 0; }
  2811. EOF
  2812. if { (eval echo configure:2813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2813.   rm -rf conftest*
  2814.   eval "ac_cv_func_$ac_func=yes"
  2815. else
  2816.   rm -rf conftest*
  2817.   eval "ac_cv_func_$ac_func=no"
  2818. fi
  2819. rm -f conftest*
  2820.  
  2821. fi
  2822. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2823.   echo "$ac_t""yes" 1>&6
  2824.   cat >> confdefs.h <<EOF
  2825. #define CRAY_STACKSEG_END $ac_func
  2826. EOF
  2827.  
  2828.   break
  2829. else
  2830.   echo "$ac_t""no" 1>&6
  2831. fi
  2832.  
  2833. done
  2834. fi
  2835.  
  2836. echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
  2837. if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
  2838.   echo $ac_n "(cached) $ac_c" 1>&6
  2839. else
  2840.   if test "$cross_compiling" = yes; then
  2841.   ac_cv_c_stack_direction=0
  2842. else
  2843. cat > conftest.$ac_ext <<EOF
  2844. #line 2845 "configure"
  2845. #include "confdefs.h"
  2846. find_stack_direction ()
  2847. {
  2848.   static char *addr = 0;
  2849.   auto char dummy;
  2850.   if (addr == 0)
  2851.     {
  2852.       addr = &dummy;
  2853.       return find_stack_direction ();
  2854.     }
  2855.   else
  2856.     return (&dummy > addr) ? 1 : -1;
  2857. }
  2858. main ()
  2859. {
  2860.   exit (find_stack_direction() < 0);
  2861. }
  2862. EOF
  2863. { (eval echo configure:2864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  2864. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  2865.   ac_cv_c_stack_direction=1
  2866. else
  2867.   ac_cv_c_stack_direction=-1
  2868. fi
  2869. fi
  2870. rm -fr conftest*
  2871. fi
  2872.  
  2873. echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
  2874. cat >> confdefs.h <<EOF
  2875. #define STACK_DIRECTION $ac_cv_c_stack_direction
  2876. EOF
  2877.  
  2878. fi
  2879.  
  2880.  
  2881. # checks for structures
  2882. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  2883. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  2884.   echo $ac_n "(cached) $ac_c" 1>&6
  2885. else
  2886.   cat > conftest.$ac_ext <<EOF
  2887. #line 2888 "configure"
  2888. #include "confdefs.h"
  2889. #include <sys/types.h>
  2890. #include <sys/time.h>
  2891. #include <time.h>
  2892. int main() { return 0; }
  2893. int t() {
  2894. struct tm *tp;
  2895. ; return 0; }
  2896. EOF
  2897. if { (eval echo configure:2898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2898.   rm -rf conftest*
  2899.   ac_cv_header_time=yes
  2900. else
  2901.   rm -rf conftest*
  2902.   ac_cv_header_time=no
  2903. fi
  2904. rm -f conftest*
  2905.  
  2906. fi
  2907.  
  2908. echo "$ac_t""$ac_cv_header_time" 1>&6
  2909. if test $ac_cv_header_time = yes; then
  2910.   cat >> confdefs.h <<\EOF
  2911. #define TIME_WITH_SYS_TIME 1
  2912. EOF
  2913.  
  2914. fi
  2915.  
  2916. echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
  2917. if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
  2918.   echo $ac_n "(cached) $ac_c" 1>&6
  2919. else
  2920.   cat > conftest.$ac_ext <<EOF
  2921. #line 2922 "configure"
  2922. #include "confdefs.h"
  2923. #include <sys/types.h>
  2924. #include <time.h>
  2925. int main() { return 0; }
  2926. int t() {
  2927. struct tm *tp; tp->tm_sec;
  2928. ; return 0; }
  2929. EOF
  2930. if { (eval echo configure:2931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2931.   rm -rf conftest*
  2932.   ac_cv_struct_tm=time.h
  2933. else
  2934.   rm -rf conftest*
  2935.   ac_cv_struct_tm=sys/time.h
  2936. fi
  2937. rm -f conftest*
  2938.  
  2939. fi
  2940.  
  2941. echo "$ac_t""$ac_cv_struct_tm" 1>&6
  2942. if test $ac_cv_struct_tm = sys/time.h; then
  2943.   cat >> confdefs.h <<\EOF
  2944. #define TM_IN_SYS_TIME 1
  2945. EOF
  2946.  
  2947. fi
  2948.  
  2949. echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
  2950. if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
  2951.   echo $ac_n "(cached) $ac_c" 1>&6
  2952. else
  2953.   cat > conftest.$ac_ext <<EOF
  2954. #line 2955 "configure"
  2955. #include "confdefs.h"
  2956. #include <sys/types.h>
  2957. #include <$ac_cv_struct_tm>
  2958. int main() { return 0; }
  2959. int t() {
  2960. struct tm tm; tm.tm_zone;
  2961. ; return 0; }
  2962. EOF
  2963. if { (eval echo configure:2964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2964.   rm -rf conftest*
  2965.   ac_cv_struct_tm_zone=yes
  2966. else
  2967.   rm -rf conftest*
  2968.   ac_cv_struct_tm_zone=no
  2969. fi
  2970. rm -f conftest*
  2971.  
  2972. fi
  2973.  
  2974. echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
  2975. if test "$ac_cv_struct_tm_zone" = yes; then
  2976.   cat >> confdefs.h <<\EOF
  2977. #define HAVE_TM_ZONE 1
  2978. EOF
  2979.  
  2980. else
  2981.   echo $ac_n "checking for tzname""... $ac_c" 1>&6
  2982. if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
  2983.   echo $ac_n "(cached) $ac_c" 1>&6
  2984. else
  2985.   cat > conftest.$ac_ext <<EOF
  2986. #line 2987 "configure"
  2987. #include "confdefs.h"
  2988. #include <time.h>
  2989. #ifndef tzname /* For SGI.  */
  2990. extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
  2991. #endif
  2992. int main() { return 0; }
  2993. int t() {
  2994. atoi(*tzname);
  2995. ; return 0; }
  2996. EOF
  2997. if { (eval echo configure:2998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2998.   rm -rf conftest*
  2999.   ac_cv_var_tzname=yes
  3000. else
  3001.   rm -rf conftest*
  3002.   ac_cv_var_tzname=no
  3003. fi
  3004. rm -f conftest*
  3005.  
  3006. fi
  3007.  
  3008. echo "$ac_t""$ac_cv_var_tzname" 1>&6
  3009.   if test $ac_cv_var_tzname = yes; then
  3010.     cat >> confdefs.h <<\EOF
  3011. #define HAVE_TZNAME 1
  3012. EOF
  3013.  
  3014.   fi
  3015. fi
  3016.  
  3017.  
  3018. echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
  3019. if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
  3020.   echo $ac_n "(cached) $ac_c" 1>&6
  3021. else
  3022.   cat > conftest.$ac_ext <<EOF
  3023. #line 3024 "configure"
  3024. #include "confdefs.h"
  3025. #include <time.h>
  3026. int main() { return 0; }
  3027. int t() {
  3028. return altzone;
  3029. ; return 0; }
  3030. EOF
  3031. if { (eval echo configure:3032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3032.   rm -rf conftest*
  3033.   ac_cv_header_time_altzone=yes
  3034. else
  3035.   rm -rf conftest*
  3036.   ac_cv_header_time_altzone=no
  3037. fi
  3038. rm -f conftest*
  3039.  
  3040. fi
  3041.  
  3042. echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
  3043. if test $ac_cv_header_time_altzone = yes; then
  3044.   cat >> confdefs.h <<\EOF
  3045. #define HAVE_ALTZONE 1
  3046. EOF
  3047.  
  3048. fi
  3049.  
  3050. was_it_defined=no
  3051. echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
  3052. cat > conftest.$ac_ext <<EOF
  3053. #line 3054 "configure"
  3054. #include "confdefs.h"
  3055.  
  3056. #include <sys/types.h>
  3057. #include <sys/select.h>
  3058. #include <sys/time.h>
  3059.  
  3060. int main() { return 0; }
  3061. int t() {
  3062. ;
  3063. ; return 0; }
  3064. EOF
  3065. if { (eval echo configure:3066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3066.   rm -rf conftest*
  3067.   cat >> confdefs.h <<\EOF
  3068. #define SYS_SELECT_WITH_SYS_TIME 1
  3069. EOF
  3070.  was_it_defined=yes
  3071. fi
  3072. rm -f conftest*
  3073.  
  3074. echo "$ac_t""$was_it_defined" 1>&6
  3075.  
  3076. # checks for compiler characteristics
  3077.  
  3078. echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
  3079. if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
  3080.   echo $ac_n "(cached) $ac_c" 1>&6
  3081. else
  3082.   if test "$GCC" = yes; then
  3083.   # GCC predefines this symbol on systems where it applies.
  3084. cat > conftest.$ac_ext <<EOF
  3085. #line 3086 "configure"
  3086. #include "confdefs.h"
  3087. #ifdef __CHAR_UNSIGNED__
  3088.   yes
  3089. #endif
  3090.  
  3091. EOF
  3092. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  3093.   egrep "yes" >/dev/null 2>&1; then
  3094.   rm -rf conftest*
  3095.   ac_cv_c_char_unsigned=yes
  3096. else
  3097.   rm -rf conftest*
  3098.   ac_cv_c_char_unsigned=no
  3099. fi
  3100. rm -f conftest*
  3101.  
  3102. else
  3103. if test "$cross_compiling" = yes; then
  3104.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  3105. else
  3106. cat > conftest.$ac_ext <<EOF
  3107. #line 3108 "configure"
  3108. #include "confdefs.h"
  3109. /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
  3110. #if !defined(__STDC__) || __STDC__ != 1
  3111. #define volatile
  3112. #endif
  3113. main() {
  3114.   volatile char c = 255; exit(c < 0);
  3115. }
  3116. EOF
  3117. { (eval echo configure:3118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  3118. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  3119.   ac_cv_c_char_unsigned=yes
  3120. else
  3121.   ac_cv_c_char_unsigned=no
  3122. fi
  3123. fi
  3124. rm -fr conftest*
  3125. fi
  3126. fi
  3127.  
  3128. echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
  3129. if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
  3130.   cat >> confdefs.h <<\EOF
  3131. #define __CHAR_UNSIGNED__ 1
  3132. EOF
  3133.  
  3134. fi
  3135.  
  3136.  
  3137. echo $ac_n "checking for working const""... $ac_c" 1>&6
  3138. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  3139.   echo $ac_n "(cached) $ac_c" 1>&6
  3140. else
  3141.   cat > conftest.$ac_ext <<EOF
  3142. #line 3143 "configure"
  3143. #include "confdefs.h"
  3144.  
  3145. int main() { return 0; }
  3146. int t() {
  3147.  
  3148. /* Ultrix mips cc rejects this.  */
  3149. typedef int charset[2]; const charset x;
  3150. /* SunOS 4.1.1 cc rejects this.  */
  3151. char const *const *ccp;
  3152. char **p;
  3153. /* NEC SVR4.0.2 mips cc rejects this.  */
  3154. struct point {int x, y;};
  3155. static struct point const zero = {0,0};
  3156. /* AIX XL C 1.02.0.0 rejects this.
  3157.    It does not let you subtract one const X* pointer from another in an arm
  3158.    of an if-expression whose if-part is not a constant expression */
  3159. const char *g = "string";
  3160. ccp = &g + (g ? g-g : 0);
  3161. /* HPUX 7.0 cc rejects these. */
  3162. ++ccp;
  3163. p = (char**) ccp;
  3164. ccp = (char const *const *) p;
  3165. { /* SCO 3.2v4 cc rejects this.  */
  3166.   char *t;
  3167.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  3168.  
  3169.   *t++ = 0;
  3170. }
  3171. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  3172.   int x[] = {25, 17};
  3173.   const int *foo = &x[0];
  3174.   ++foo;
  3175. }
  3176. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  3177.   typedef const int *iptr;
  3178.   iptr p = 0;
  3179.   ++p;
  3180. }
  3181. { /* AIX XL C 1.02.0.0 rejects this saying
  3182.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  3183.   struct s { int j; const int *ap[3]; };
  3184.   struct s *b; b->j = 5;
  3185. }
  3186. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  3187.   const int foo = 10;
  3188. }
  3189.  
  3190. ; return 0; }
  3191. EOF
  3192. if { (eval echo configure:3193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3193.   rm -rf conftest*
  3194.   ac_cv_c_const=yes
  3195. else
  3196.   rm -rf conftest*
  3197.   ac_cv_c_const=no
  3198. fi
  3199. rm -f conftest*
  3200.  
  3201. fi
  3202.  
  3203. echo "$ac_t""$ac_cv_c_const" 1>&6
  3204. if test $ac_cv_c_const = no; then
  3205.   cat >> confdefs.h <<\EOF
  3206. #define const 
  3207. EOF
  3208.  
  3209. fi
  3210.  
  3211.  
  3212. works=no
  3213. echo $ac_n "checking for working volatile""... $ac_c" 1>&6
  3214. cat > conftest.$ac_ext <<EOF
  3215. #line 3216 "configure"
  3216. #include "confdefs.h"
  3217.  
  3218. int main() { return 0; }
  3219. int t() {
  3220. volatile int x; x = 0;
  3221. ; return 0; }
  3222. EOF
  3223. if { (eval echo configure:3224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3224.   rm -rf conftest*
  3225.   works=yes
  3226. else
  3227.   rm -rf conftest*
  3228.   cat >> confdefs.h <<\EOF
  3229. #define volatile 
  3230. EOF
  3231.  
  3232. fi
  3233. rm -f conftest*
  3234.  
  3235. echo "$ac_t""$works" 1>&6
  3236.  
  3237. works=no
  3238. echo $ac_n "checking for working signed char""... $ac_c" 1>&6
  3239. cat > conftest.$ac_ext <<EOF
  3240. #line 3241 "configure"
  3241. #include "confdefs.h"
  3242.  
  3243. int main() { return 0; }
  3244. int t() {
  3245. signed char c;
  3246. ; return 0; }
  3247. EOF
  3248. if { (eval echo configure:3249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3249.   rm -rf conftest*
  3250.   works=yes
  3251. else
  3252.   rm -rf conftest*
  3253.   cat >> confdefs.h <<\EOF
  3254. #define signed 
  3255. EOF
  3256.  
  3257. fi
  3258. rm -f conftest*
  3259.  
  3260. echo "$ac_t""$works" 1>&6
  3261.  
  3262. have_prototypes=no
  3263. echo $ac_n "checking for prototypes""... $ac_c" 1>&6
  3264. cat > conftest.$ac_ext <<EOF
  3265. #line 3266 "configure"
  3266. #include "confdefs.h"
  3267. int foo(int x) { return 0; }
  3268. int main() { return 0; }
  3269. int t() {
  3270. return foo(10);
  3271. ; return 0; }
  3272. EOF
  3273. if { (eval echo configure:3274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3274.   rm -rf conftest*
  3275.   cat >> confdefs.h <<\EOF
  3276. #define HAVE_PROTOTYPES 1
  3277. EOF
  3278.  have_prototypes=yes
  3279. fi
  3280. rm -f conftest*
  3281.  
  3282. echo "$ac_t""$have_prototypes" 1>&6
  3283.  
  3284. works=no
  3285. echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
  3286. cat > conftest.$ac_ext <<EOF
  3287. #line 3288 "configure"
  3288. #include "confdefs.h"
  3289.  
  3290. #include <stdarg.h>
  3291. int foo(int x, ...) {
  3292.     va_list va;
  3293.     va_start(va, x);
  3294.     va_arg(va, int);
  3295.     va_arg(va, char *);
  3296.     va_arg(va, double);
  3297.     return 0;
  3298. }
  3299.  
  3300. int main() { return 0; }
  3301. int t() {
  3302. return foo(10, "", 3.14);
  3303. ; return 0; }
  3304. EOF
  3305. if { (eval echo configure:3306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3306.   rm -rf conftest*
  3307.   cat >> confdefs.h <<\EOF
  3308. #define HAVE_STDARG_PROTOTYPES 1
  3309. EOF
  3310.  works=yes
  3311. fi
  3312. rm -f conftest*
  3313.  
  3314. echo "$ac_t""$works" 1>&6
  3315.  
  3316. if test "$have_prototypes" = yes; then
  3317. bad_prototypes=no
  3318. echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
  3319. cat > conftest.$ac_ext <<EOF
  3320. #line 3321 "configure"
  3321. #include "confdefs.h"
  3322. #include <unistd.h>
  3323. int main() { return 0; }
  3324. int t() {
  3325. char **t;execve("@",t,t);
  3326. ; return 0; }
  3327. EOF
  3328. if { (eval echo configure:3329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3329.   :
  3330. else
  3331.   rm -rf conftest*
  3332.   cat >> confdefs.h <<\EOF
  3333. #define BAD_EXEC_PROTOTYPES 1
  3334. EOF
  3335.  bad_prototypes=yes
  3336. fi
  3337. rm -f conftest*
  3338.  
  3339. echo "$ac_t""$bad_prototypes" 1>&6
  3340. fi
  3341.  
  3342. bad_forward=no
  3343. echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
  3344. if test "$cross_compiling" = yes; then
  3345.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  3346. else
  3347. cat > conftest.$ac_ext <<EOF
  3348. #line 3349 "configure"
  3349. #include "confdefs.h"
  3350.  
  3351. struct s { int a; int b; };
  3352. static struct s foo;
  3353. int foobar() {
  3354.  static int random;
  3355.  random = (int) &foo;
  3356.  return random;
  3357. }
  3358. static struct s foo = { 1, 2 };
  3359. main() {
  3360.  exit(!((int)&foo == foobar()));
  3361. }
  3362.  
  3363. EOF
  3364. { (eval echo configure:3365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  3365. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  3366.   :
  3367. else
  3368.   cat >> confdefs.h <<\EOF
  3369. #define BAD_STATIC_FORWARD 1
  3370. EOF
  3371.  bad_forward=yes
  3372. fi
  3373. fi
  3374. rm -fr conftest*
  3375. echo "$ac_t""$bad_forward" 1>&6
  3376.  
  3377. va_list_is_array=no
  3378. echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
  3379. cat > conftest.$ac_ext <<EOF
  3380. #line 3381 "configure"
  3381. #include "confdefs.h"
  3382.  
  3383. #ifdef HAVE_STDARG_PROTOTYPES
  3384. #include <stdarg.h>
  3385. #else
  3386. #include <varargs.h>
  3387. #endif
  3388.  
  3389. int main() { return 0; }
  3390. int t() {
  3391. va_list list1, list2; list1 = list2;
  3392. ; return 0; }
  3393. EOF
  3394. if { (eval echo configure:3395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  3395.   :
  3396. else
  3397.   rm -rf conftest*
  3398.   cat >> confdefs.h <<\EOF
  3399. #define VA_LIST_IS_ARRAY 1
  3400. EOF
  3401.  va_list_is_array=yes
  3402. fi
  3403. rm -f conftest*
  3404.  
  3405. echo "$ac_t""$va_list_is_array" 1>&6
  3406.  
  3407. # checks for system services
  3408. # (none yet)
  3409.  
  3410. # Linux requires this for correct f.p. operations
  3411. echo $ac_n "checking for -lieee""... $ac_c" 1>&6
  3412. ac_lib_var=`echo ieee'_'__fpu_control | tr './+\055' '__p_'`
  3413. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3414.   echo $ac_n "(cached) $ac_c" 1>&6
  3415. else
  3416.   ac_save_LIBS="$LIBS"
  3417. LIBS="-lieee  $LIBS"
  3418. cat > conftest.$ac_ext <<EOF
  3419. #line 3420 "configure"
  3420. #include "confdefs.h"
  3421. /* Override any gcc2 internal prototype to avoid an error.  */
  3422. /* We use char because int might match the return type of a gcc2
  3423.     builtin and then its argument prototype would still apply.  */
  3424. char __fpu_control();
  3425.  
  3426. int main() { return 0; }
  3427. int t() {
  3428. __fpu_control()
  3429. ; return 0; }
  3430. EOF
  3431. if { (eval echo configure:3432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  3432.   rm -rf conftest*
  3433.   eval "ac_cv_lib_$ac_lib_var=yes"
  3434. else
  3435.   rm -rf conftest*
  3436.   eval "ac_cv_lib_$ac_lib_var=no"
  3437. fi
  3438. rm -f conftest*
  3439. LIBS="$ac_save_LIBS"
  3440.  
  3441. fi
  3442. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3443.   echo "$ac_t""yes" 1>&6
  3444.     ac_tr_lib=HAVE_LIB`echo ieee | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3445.   cat >> confdefs.h <<EOF
  3446. #define $ac_tr_lib 1
  3447. EOF
  3448.  
  3449.   LIBS="-lieee $LIBS"
  3450.  
  3451. else
  3452.   echo "$ac_t""no" 1>&6
  3453. fi
  3454.  
  3455.  
  3456. # check for --with-libm=...
  3457.  
  3458. case $ac_sys_system in
  3459. next) ;;
  3460. *) LIBM=-lm
  3461. esac
  3462. # Check whether --with-libm or --without-libm was given.
  3463. if test "${with_libm+set}" = set; then
  3464.   withval="$with_libm"
  3465.   
  3466. if test "$withval" != yes
  3467. then LIBM=$withval
  3468. else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
  3469. fi
  3470. fi
  3471.  
  3472.  
  3473. # check for --with-libc=...
  3474.  
  3475. # Check whether --with-libc or --without-libc was given.
  3476. if test "${with_libc+set}" = set; then
  3477.   withval="$with_libc"
  3478.   
  3479. if test "$withval" != yes
  3480. then LIBC=$withval
  3481. else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
  3482. fi
  3483. fi
  3484.  
  3485.  
  3486. # check for hypot() in math library
  3487. LIBS_SAVE=$LIBS
  3488. LIBS="$LIBS $LIBM"
  3489. for ac_func in hypot
  3490. do
  3491. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3492. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3493.   echo $ac_n "(cached) $ac_c" 1>&6
  3494. else
  3495.   cat > conftest.$ac_ext <<EOF
  3496. #line 3497 "configure"
  3497. #include "confdefs.h"
  3498. /* System header to define __stub macros and hopefully few prototypes,
  3499.     which can conflict with char $ac_func(); below.  */
  3500. #include <assert.h>
  3501. /* Override any gcc2 internal prototype to avoid an error.  */
  3502. /* We use char because int might match the return type of a gcc2
  3503.     builtin and then its argument prototype would still apply.  */
  3504. char $ac_func();
  3505.  
  3506. int main() { return 0; }
  3507. int t() {
  3508.  
  3509. /* The GNU C library defines this for functions which it implements
  3510.     to always fail with ENOSYS.  Some functions are actually named
  3511.     something starting with __ and the normal name is an alias.  */
  3512. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3513. choke me
  3514. #else
  3515. $ac_func();
  3516. #endif
  3517.  
  3518. ; return 0; }
  3519. EOF
  3520. if { (eval echo configure:3521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  3521.   rm -rf conftest*
  3522.   eval "ac_cv_func_$ac_func=yes"
  3523. else
  3524.   rm -rf conftest*
  3525.   eval "ac_cv_func_$ac_func=no"
  3526. fi
  3527. rm -f conftest*
  3528.  
  3529. fi
  3530. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3531.   echo "$ac_t""yes" 1>&6
  3532.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3533.   cat >> confdefs.h <<EOF
  3534. #define $ac_tr_func 1
  3535. EOF
  3536.  
  3537. else
  3538.   echo "$ac_t""no" 1>&6
  3539. fi
  3540. done
  3541.  
  3542. for ac_func in hypot
  3543. do
  3544. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3545. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3546.   echo $ac_n "(cached) $ac_c" 1>&6
  3547. else
  3548.   cat > conftest.$ac_ext <<EOF
  3549. #line 3550 "configure"
  3550. #include "confdefs.h"
  3551. /* System header to define __stub macros and hopefully few prototypes,
  3552.     which can conflict with char $ac_func(); below.  */
  3553. #include <assert.h>
  3554. /* Override any gcc2 internal prototype to avoid an error.  */
  3555. /* We use char because int might match the return type of a gcc2
  3556.     builtin and then its argument prototype would still apply.  */
  3557. char $ac_func();
  3558.  
  3559. int main() { return 0; }
  3560. int t() {
  3561.  
  3562. /* The GNU C library defines this for functions which it implements
  3563.     to always fail with ENOSYS.  Some functions are actually named
  3564.     something starting with __ and the normal name is an alias.  */
  3565. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3566. choke me
  3567. #else
  3568. $ac_func();
  3569. #endif
  3570.  
  3571. ; return 0; }
  3572. EOF
  3573. if { (eval echo configure:3574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  3574.   rm -rf conftest*
  3575.   eval "ac_cv_func_$ac_func=yes"
  3576. else
  3577.   rm -rf conftest*
  3578.   eval "ac_cv_func_$ac_func=no"
  3579. fi
  3580. rm -f conftest*
  3581.  
  3582. fi
  3583. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3584.   echo "$ac_t""yes" 1>&6
  3585.   :
  3586. else
  3587.   echo "$ac_t""no" 1>&6
  3588. LIBOBJS="$LIBOBJS ${ac_func}.o"
  3589. fi
  3590.  
  3591. done
  3592.  
  3593. LIBS=$LIBS_SAVE
  3594.  
  3595. # check for getopt
  3596. echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
  3597. if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
  3598.   echo $ac_n "(cached) $ac_c" 1>&6
  3599. else
  3600.   if test "$cross_compiling" = yes; then
  3601.   ac_cv_func_getopt=no
  3602. else
  3603. cat > conftest.$ac_ext <<EOF
  3604. #line 3605 "configure"
  3605. #include "confdefs.h"
  3606. #include <stdio.h>
  3607. extern int optind, opterr, getopt();
  3608. extern char* optarg;
  3609. int main() {
  3610.     char* av[] = { "testprog", "parameter", "-fFlag", NULL };
  3611.     opterr = 0;
  3612.     if (getopt(3, av, "f:") == 'f') { exit(1); }
  3613.     exit(0);
  3614. }
  3615. EOF
  3616. { (eval echo configure:3617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
  3617. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  3618.   ac_cv_func_getopt=yes
  3619. else
  3620.   ac_cv_func_getopt=no
  3621. fi
  3622. fi
  3623. rm -fr conftest*
  3624. fi
  3625. echo "$ac_t""$ac_cv_func_getopt" 1>&6
  3626. test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
  3627.  
  3628. # generate output files
  3629. trap '' 1 2 15
  3630. cat > confcache <<\EOF
  3631. # This file is a shell script that caches the results of configure
  3632. # tests run on this system so they can be shared between configure
  3633. # scripts and configure runs.  It is not useful on other systems.
  3634. # If it contains results you don't want to keep, you may remove or edit it.
  3635. #
  3636. # By default, configure uses ./config.cache as the cache file,
  3637. # creating it if it does not exist already.  You can give configure
  3638. # the --cache-file=FILE option to use a different cache file; that is
  3639. # what configure does when it calls configure scripts in
  3640. # subdirectories, so they share the cache.
  3641. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  3642. # config.status only pays attention to the cache file if you give it the
  3643. # --recheck option to rerun configure.
  3644. #
  3645. EOF
  3646. # Ultrix sh set writes to stderr and can't be redirected directly,
  3647. # and sets the high bit in the cache file unless we assign to the vars.
  3648. (set) 2>&1 |
  3649.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  3650.   >> confcache
  3651. if cmp -s $cache_file confcache; then
  3652.   :
  3653. else
  3654.   if test -w $cache_file; then
  3655.     echo "updating cache $cache_file"
  3656.     cat confcache > $cache_file
  3657.   else
  3658.     echo "not updating unwritable cache $cache_file"
  3659.   fi
  3660. fi
  3661. rm -f confcache
  3662.  
  3663. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  3664.  
  3665. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  3666. # Let make expand exec_prefix.
  3667. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  3668.  
  3669. # Any assignment to VPATH causes Sun make to only execute
  3670. # the first set of double-colon rules, so remove it if not needed.
  3671. # If there is a colon in the path, we need to keep it.
  3672. if test "x$srcdir" = x.; then
  3673.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  3674. fi
  3675.  
  3676. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  3677.  
  3678. DEFS=-DHAVE_CONFIG_H
  3679.  
  3680. # Without the "./", some shells look in PATH for config.status.
  3681. : ${CONFIG_STATUS=./config.status}
  3682.  
  3683. echo creating $CONFIG_STATUS
  3684. rm -f $CONFIG_STATUS
  3685. cat > $CONFIG_STATUS <<EOF
  3686. #! /bin/sh
  3687. # Generated automatically by configure.
  3688. # Run this file to recreate the current configuration.
  3689. # This directory was configured as follows,
  3690. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3691. #
  3692. # $0 $ac_configure_args
  3693. #
  3694. # Compiler output produced by configure, useful for debugging
  3695. # configure, is in ./config.log if it exists.
  3696.  
  3697. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  3698. for ac_option
  3699. do
  3700.   case "\$ac_option" in
  3701.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  3702.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  3703.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  3704.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  3705.     echo "$CONFIG_STATUS generated by autoconf version 2.10"
  3706.     exit 0 ;;
  3707.   -help | --help | --hel | --he | --h)
  3708.     echo "\$ac_cs_usage"; exit 0 ;;
  3709.   *) echo "\$ac_cs_usage"; exit 1 ;;
  3710.   esac
  3711. done
  3712.  
  3713. ac_given_srcdir=$srcdir
  3714. ac_given_INSTALL="$INSTALL"
  3715.  
  3716. trap 'rm -fr `echo "Makefile \
  3717.  Objects/Makefile \
  3718.  Parser/Makefile \
  3719.  Python/Makefile \
  3720.  Modules/Makefile.pre \
  3721.  Contrib/NeXT/Python-bin.info \
  3722.  Contrib/NeXT/Python-bin.post_install \
  3723.  Contrib/NeXT/Python-bin.pre_install \
  3724.  Contrib/NeXT/Python.info \
  3725.  Contrib/NeXT/Python.post_install \
  3726.  Contrib/NeXT/Python.pre_install config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  3727. EOF
  3728. cat >> $CONFIG_STATUS <<EOF
  3729.  
  3730. # Protect against being on the right side of a sed subst in config.status.
  3731. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  3732.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  3733. $ac_vpsub
  3734. $extrasub
  3735. s%@CFLAGS@%$CFLAGS%g
  3736. s%@CPPFLAGS@%$CPPFLAGS%g
  3737. s%@CXXFLAGS@%$CXXFLAGS%g
  3738. s%@DEFS@%$DEFS%g
  3739. s%@LDFLAGS@%$LDFLAGS%g
  3740. s%@LIBS@%$LIBS%g
  3741. s%@exec_prefix@%$exec_prefix%g
  3742. s%@prefix@%$prefix%g
  3743. s%@program_transform_name@%$program_transform_name%g
  3744. s%@bindir@%$bindir%g
  3745. s%@sbindir@%$sbindir%g
  3746. s%@libexecdir@%$libexecdir%g
  3747. s%@datadir@%$datadir%g
  3748. s%@sysconfdir@%$sysconfdir%g
  3749. s%@sharedstatedir@%$sharedstatedir%g
  3750. s%@localstatedir@%$localstatedir%g
  3751. s%@libdir@%$libdir%g
  3752. s%@includedir@%$includedir%g
  3753. s%@oldincludedir@%$oldincludedir%g
  3754. s%@infodir@%$infodir%g
  3755. s%@mandir@%$mandir%g
  3756. s%@PYTHON_VERSION@%$PYTHON_VERSION%g
  3757. s%@PYTHON_PATCHLEVEL@%$PYTHON_PATCHLEVEL%g
  3758. s%@MACHDEP@%$MACHDEP%g
  3759. s%@CC@%$CC%g
  3760. s%@RANLIB@%$RANLIB%g
  3761. s%@AR@%$AR%g
  3762. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  3763. s%@INSTALL_DATA@%$INSTALL_DATA%g
  3764. s%@OPT@%$OPT%g
  3765. s%@CPP@%$CPP%g
  3766. s%@SO@%$SO%g
  3767. s%@LDSHARED@%$LDSHARED%g
  3768. s%@CCSHARED@%$CCSHARED%g
  3769. s%@LINKFORSHARED@%$LINKFORSHARED%g
  3770. s%@PYRL_LIBS@%$PYRL_LIBS%g
  3771. s%@DLINCLDIR@%$DLINCLDIR%g
  3772. s%@LIBOBJS@%$LIBOBJS%g
  3773. s%@ALLOCA@%$ALLOCA%g
  3774. s%@LIBM@%$LIBM%g
  3775. s%@LIBC@%$LIBC%g
  3776.  
  3777. CEOF
  3778. EOF
  3779. cat >> $CONFIG_STATUS <<EOF
  3780.  
  3781. CONFIG_FILES=\${CONFIG_FILES-"Makefile \
  3782.  Objects/Makefile \
  3783.  Parser/Makefile \
  3784.  Python/Makefile \
  3785.  Modules/Makefile.pre \
  3786.  Contrib/NeXT/Python-bin.info \
  3787.  Contrib/NeXT/Python-bin.post_install \
  3788.  Contrib/NeXT/Python-bin.pre_install \
  3789.  Contrib/NeXT/Python.info \
  3790.  Contrib/NeXT/Python.post_install \
  3791.  Contrib/NeXT/Python.pre_install"}
  3792. EOF
  3793. cat >> $CONFIG_STATUS <<\EOF
  3794. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  3795.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  3796.   case "$ac_file" in
  3797.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  3798.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3799.   *) ac_file_in="${ac_file}.in" ;;
  3800.   esac
  3801.  
  3802.   # Adjust relative srcdir, etc. for subdirectories.
  3803.  
  3804.   # Remove last slash and all that follows it.  Not all systems have dirname.
  3805.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3806.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3807.     # The file is in a subdirectory.
  3808.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  3809.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  3810.     # A "../" for each directory in $ac_dir_suffix.
  3811.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  3812.   else
  3813.     ac_dir_suffix= ac_dots=
  3814.   fi
  3815.  
  3816.   case "$ac_given_srcdir" in
  3817.   .)  srcdir=.
  3818.       if test -z "$ac_dots"; then top_srcdir=.
  3819.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  3820.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  3821.   *) # Relative path.
  3822.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  3823.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  3824.   esac
  3825.  
  3826.   case "$ac_given_INSTALL" in
  3827.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  3828.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  3829.   esac
  3830.   echo creating "$ac_file"
  3831.   rm -f "$ac_file"
  3832.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  3833.   case "$ac_file" in
  3834.   *Makefile*) ac_comsub="1i\\
  3835. # $configure_input" ;;
  3836.   *) ac_comsub= ;;
  3837.   esac
  3838.   sed -e "$ac_comsub
  3839. s%@configure_input@%$configure_input%g
  3840. s%@srcdir@%$srcdir%g
  3841. s%@top_srcdir@%$top_srcdir%g
  3842. s%@INSTALL@%$INSTALL%g
  3843. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  3844. fi; done
  3845. rm -f conftest.subs
  3846.  
  3847. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  3848. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  3849. #
  3850. # ac_d sets the value in "#define NAME VALUE" lines.
  3851. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  3852. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  3853. ac_dC='\3'
  3854. ac_dD='%g'
  3855. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  3856. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3857. ac_uB='\([     ]\)%\1#\2define\3'
  3858. ac_uC=' '
  3859. ac_uD='\4%g'
  3860. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  3861. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  3862. ac_eB='$%\1#\2define\3'
  3863. ac_eC=' '
  3864. ac_eD='%g'
  3865.  
  3866. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  3867. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  3868.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  3869.   case "$ac_file" in
  3870.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  3871.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3872.   *) ac_file_in="${ac_file}.in" ;;
  3873.   esac
  3874.  
  3875.   echo creating $ac_file
  3876.  
  3877.   rm -f conftest.frag conftest.in conftest.out
  3878.   cp $ac_given_srcdir/$ac_file_in conftest.in
  3879.  
  3880. EOF
  3881.  
  3882. # Transform confdefs.h into a sed script conftest.vals that substitutes
  3883. # the proper values into config.h.in to produce config.h.  And first:
  3884. # Protect against being on the right side of a sed subst in config.status.
  3885. # Protect against being in an unquoted here document in config.status.
  3886. rm -f conftest.vals
  3887. cat > conftest.hdr <<\EOF
  3888. s/[\\&%]/\\&/g
  3889. s%[\\$`]%\\&%g
  3890. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  3891. s%ac_d%ac_u%gp
  3892. s%ac_u%ac_e%gp
  3893. EOF
  3894. sed -n -f conftest.hdr confdefs.h > conftest.vals
  3895. rm -f conftest.hdr
  3896.  
  3897. # This sed command replaces #undef with comments.  This is necessary, for
  3898. # example, in the case of _POSIX_SOURCE, which is predefined and required
  3899. # on some systems where configure will not decide to define it.
  3900. cat >> conftest.vals <<\EOF
  3901. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  3902. EOF
  3903.  
  3904. # Break up conftest.vals because some shells have a limit on
  3905. # the size of here documents, and old seds have small limits too.
  3906. # Maximum number of lines to put in a single here document.
  3907. ac_max_here_lines=12
  3908.  
  3909. rm -f conftest.tail
  3910. while :
  3911. do
  3912.   ac_lines=`grep -c . conftest.vals`
  3913.   # grep -c gives empty output for an empty file on some AIX systems.
  3914.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  3915.   # Write a limited-size here document to conftest.frag.
  3916.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  3917.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  3918.   echo 'CEOF
  3919.   sed -f conftest.frag conftest.in > conftest.out
  3920.   rm -f conftest.in
  3921.   mv conftest.out conftest.in
  3922. ' >> $CONFIG_STATUS
  3923.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  3924.   rm -f conftest.vals
  3925.   mv conftest.tail conftest.vals
  3926. done
  3927. rm -f conftest.vals
  3928.  
  3929. cat >> $CONFIG_STATUS <<\EOF
  3930.   rm -f conftest.frag conftest.h
  3931.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  3932.   cat conftest.in >> conftest.h
  3933.   rm -f conftest.in
  3934.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  3935.     echo "$ac_file is unchanged"
  3936.     rm -f conftest.h
  3937.   else
  3938.     # Remove last slash and all that follows it.  Not all systems have dirname.
  3939.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3940.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3941.       # The file is in a subdirectory.
  3942.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  3943.     fi
  3944.     rm -f $ac_file
  3945.     mv conftest.h $ac_file
  3946.   fi
  3947. fi; done
  3948.  
  3949.  
  3950.  
  3951. exit 0
  3952. EOF
  3953. chmod +x $CONFIG_STATUS
  3954. rm -fr confdefs* $ac_clean_files
  3955. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  3956.  
  3957.