home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / Programming / Python2 / Python20_source / configure < prev    next >
Encoding:
Text File  |  2000-10-25  |  167.9 KB  |  6,322 lines

  1. #! /bin/sh
  2.  
  3. # From configure.in Revision: 1.172 
  4.  
  5. # Guess values for system-dependent variables and create Makefiles.
  6. # Generated automatically using autoconf version 2.13 
  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.   --with-next-framework           Build (OpenStep|Rhapsody|MacOSX|Darwin) framework"
  20. ac_help="$ac_help
  21.   --with-dyld                     Use (OpenStep|Rhapsody|MacOSX|Darwin) dynamic linker"
  22. ac_help="$ac_help
  23.   --without-gcc                   never use gcc"
  24. ac_help="$ac_help
  25.   --with-cxx=<compiler>           enable C++ support"
  26. ac_help="$ac_help
  27.   --with-suffix=.exe              set executable suffix"
  28. ac_help="$ac_help
  29.   --with-pydebug                  build with Py_DEBUG defined"
  30. ac_help="$ac_help
  31.   --with-libs='lib1 ...'          link against additional libs"
  32. ac_help="$ac_help
  33.   --with-dec-threads              use DEC Alpha/OSF1 thread-safe libraries"
  34. ac_help="$ac_help
  35.   --with(out)-threads[=DIRECTORY] disable/enable thread support"
  36. ac_help="$ac_help
  37.   --with(out)-thread[=DIRECTORY]  deprecated; use --with(out)-threads"
  38. ac_help="$ac_help
  39.   --with-pth                      use GNU pth threading libraries"
  40. ac_help="$ac_help
  41.   --with(out)-cycle-gc            disable/enable garbage collection"
  42. ac_help="$ac_help
  43.   --with(out)-libdb               disable/enable bsddb module"
  44. ac_help="$ac_help
  45.   --with-wctype-functions         use wctype.h functions"
  46. ac_help="$ac_help
  47.   --with-sgi-dl=DIRECTORY         IRIX 4 dynamic linking"
  48. ac_help="$ac_help
  49.   --with-dl-dld=DL_DIR,DLD_DIR    GNU dynamic linking"
  50. ac_help="$ac_help
  51.   --with-fpectl                   enable SIGFPE catching"
  52. ac_help="$ac_help
  53.   --with-libm=STRING              math library"
  54. ac_help="$ac_help
  55.   --with-libc=STRING              C library"
  56.  
  57. # Initialize some variables set by options.
  58. # The variables have the same names as the options, with
  59. # dashes changed to underlines.
  60. build=NONE
  61. cache_file=./config.cache
  62. exec_prefix=NONE
  63. host=NONE
  64. no_create=
  65. nonopt=NONE
  66. no_recursion=
  67. prefix=NONE
  68. program_prefix=NONE
  69. program_suffix=NONE
  70. program_transform_name=s,x,x,
  71. silent=
  72. site=
  73. srcdir=
  74. target=NONE
  75. verbose=
  76. x_includes=NONE
  77. x_libraries=NONE
  78. bindir='${exec_prefix}/bin'
  79. sbindir='${exec_prefix}/sbin'
  80. libexecdir='${exec_prefix}/libexec'
  81. datadir='${prefix}/share'
  82. sysconfdir='${prefix}/etc'
  83. sharedstatedir='${prefix}/com'
  84. localstatedir='${prefix}/var'
  85. libdir='${exec_prefix}/lib'
  86. includedir='${prefix}/include'
  87. oldincludedir='/usr/include'
  88. infodir='${prefix}/info'
  89. mandir='${prefix}/man'
  90.  
  91. # Initialize some other variables.
  92. subdirs=
  93. MFLAGS= MAKEFLAGS=
  94. SHELL=${CONFIG_SHELL-/bin/sh}
  95. # Maximum number of lines to put in a shell here document.
  96. ac_max_here_lines=12
  97.  
  98. ac_prev=
  99. for ac_option
  100. do
  101.  
  102.   # If the previous option needs an argument, assign it.
  103.   if test -n "$ac_prev"; then
  104.     eval "$ac_prev=\$ac_option"
  105.     ac_prev=
  106.     continue
  107.   fi
  108.  
  109.   case "$ac_option" in
  110.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  111.   *) ac_optarg= ;;
  112.   esac
  113.  
  114.   # Accept the important Cygnus configure options, so we can diagnose typos.
  115.  
  116.   case "$ac_option" in
  117.  
  118.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  119.     ac_prev=bindir ;;
  120.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  121.     bindir="$ac_optarg" ;;
  122.  
  123.   -build | --build | --buil | --bui | --bu)
  124.     ac_prev=build ;;
  125.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  126.     build="$ac_optarg" ;;
  127.  
  128.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  129.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  130.     ac_prev=cache_file ;;
  131.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  132.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  133.     cache_file="$ac_optarg" ;;
  134.  
  135.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  136.     ac_prev=datadir ;;
  137.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  138.   | --da=*)
  139.     datadir="$ac_optarg" ;;
  140.  
  141.   -disable-* | --disable-*)
  142.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  143.     # Reject names that are not valid shell variable names.
  144.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  145.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  146.     fi
  147.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  148.     eval "enable_${ac_feature}=no" ;;
  149.  
  150.   -enable-* | --enable-*)
  151.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  152.     # Reject names that are not valid shell variable names.
  153.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  154.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  155.     fi
  156.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  157.     case "$ac_option" in
  158.       *=*) ;;
  159.       *) ac_optarg=yes ;;
  160.     esac
  161.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  162.  
  163.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  164.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  165.   | --exec | --exe | --ex)
  166.     ac_prev=exec_prefix ;;
  167.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  168.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  169.   | --exec=* | --exe=* | --ex=*)
  170.     exec_prefix="$ac_optarg" ;;
  171.  
  172.   -gas | --gas | --ga | --g)
  173.     # Obsolete; use --with-gas.
  174.     with_gas=yes ;;
  175.  
  176.   -help | --help | --hel | --he)
  177.     # Omit some internal or obsolete options to make the list less imposing.
  178.     # This message is too long to be a string in the A/UX 3.1 sh.
  179.     cat << EOF
  180. Usage: configure [options] [host]
  181. Options: [defaults in brackets after descriptions]
  182. Configuration:
  183.   --cache-file=FILE       cache test results in FILE
  184.   --help                  print this message
  185.   --no-create             do not create output files
  186.   --quiet, --silent       do not print \`checking...' messages
  187.   --version               print the version of autoconf that created configure
  188. Directory and file names:
  189.   --prefix=PREFIX         install architecture-independent files in PREFIX
  190.                           [$ac_default_prefix]
  191.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  192.                           [same as prefix]
  193.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  194.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  195.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  196.   --datadir=DIR           read-only architecture-independent data in DIR
  197.                           [PREFIX/share]
  198.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  199.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  200.                           [PREFIX/com]
  201.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  202.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  203.   --includedir=DIR        C header files in DIR [PREFIX/include]
  204.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  205.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  206.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  207.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  208.   --program-prefix=PREFIX prepend PREFIX to installed program names
  209.   --program-suffix=SUFFIX append SUFFIX to installed program names
  210.   --program-transform-name=PROGRAM
  211.                           run sed PROGRAM on installed program names
  212. EOF
  213.     cat << EOF
  214. Host type:
  215.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  216.   --host=HOST             configure for HOST [guessed]
  217.   --target=TARGET         configure for TARGET [TARGET=HOST]
  218. Features and packages:
  219.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  220.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  221.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  222.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  223.   --x-includes=DIR        X include files are in DIR
  224.   --x-libraries=DIR       X library files are in DIR
  225. EOF
  226.     if test -n "$ac_help"; then
  227.       echo "--enable and --with options recognized:$ac_help"
  228.     fi
  229.     exit 0 ;;
  230.  
  231.   -host | --host | --hos | --ho)
  232.     ac_prev=host ;;
  233.   -host=* | --host=* | --hos=* | --ho=*)
  234.     host="$ac_optarg" ;;
  235.  
  236.   -includedir | --includedir | --includedi | --included | --include \
  237.   | --includ | --inclu | --incl | --inc)
  238.     ac_prev=includedir ;;
  239.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  240.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  241.     includedir="$ac_optarg" ;;
  242.  
  243.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  244.     ac_prev=infodir ;;
  245.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  246.     infodir="$ac_optarg" ;;
  247.  
  248.   -libdir | --libdir | --libdi | --libd)
  249.     ac_prev=libdir ;;
  250.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  251.     libdir="$ac_optarg" ;;
  252.  
  253.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  254.   | --libexe | --libex | --libe)
  255.     ac_prev=libexecdir ;;
  256.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  257.   | --libexe=* | --libex=* | --libe=*)
  258.     libexecdir="$ac_optarg" ;;
  259.  
  260.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  261.   | --localstate | --localstat | --localsta | --localst \
  262.   | --locals | --local | --loca | --loc | --lo)
  263.     ac_prev=localstatedir ;;
  264.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  265.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  266.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  267.     localstatedir="$ac_optarg" ;;
  268.  
  269.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  270.     ac_prev=mandir ;;
  271.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  272.     mandir="$ac_optarg" ;;
  273.  
  274.   -nfp | --nfp | --nf)
  275.     # Obsolete; use --without-fp.
  276.     with_fp=no ;;
  277.  
  278.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  279.   | --no-cr | --no-c)
  280.     no_create=yes ;;
  281.  
  282.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  283.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  284.     no_recursion=yes ;;
  285.  
  286.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  287.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  288.   | --oldin | --oldi | --old | --ol | --o)
  289.     ac_prev=oldincludedir ;;
  290.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  291.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  292.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  293.     oldincludedir="$ac_optarg" ;;
  294.  
  295.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  296.     ac_prev=prefix ;;
  297.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  298.     prefix="$ac_optarg" ;;
  299.  
  300.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  301.   | --program-pre | --program-pr | --program-p)
  302.     ac_prev=program_prefix ;;
  303.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  304.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  305.     program_prefix="$ac_optarg" ;;
  306.  
  307.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  308.   | --program-suf | --program-su | --program-s)
  309.     ac_prev=program_suffix ;;
  310.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  311.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  312.     program_suffix="$ac_optarg" ;;
  313.  
  314.   -program-transform-name | --program-transform-name \
  315.   | --program-transform-nam | --program-transform-na \
  316.   | --program-transform-n | --program-transform- \
  317.   | --program-transform | --program-transfor \
  318.   | --program-transfo | --program-transf \
  319.   | --program-trans | --program-tran \
  320.   | --progr-tra | --program-tr | --program-t)
  321.     ac_prev=program_transform_name ;;
  322.   -program-transform-name=* | --program-transform-name=* \
  323.   | --program-transform-nam=* | --program-transform-na=* \
  324.   | --program-transform-n=* | --program-transform-=* \
  325.   | --program-transform=* | --program-transfor=* \
  326.   | --program-transfo=* | --program-transf=* \
  327.   | --program-trans=* | --program-tran=* \
  328.   | --progr-tra=* | --program-tr=* | --program-t=*)
  329.     program_transform_name="$ac_optarg" ;;
  330.  
  331.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  332.   | -silent | --silent | --silen | --sile | --sil)
  333.     silent=yes ;;
  334.  
  335.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  336.     ac_prev=sbindir ;;
  337.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  338.   | --sbi=* | --sb=*)
  339.     sbindir="$ac_optarg" ;;
  340.  
  341.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  342.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  343.   | --sharedst | --shareds | --shared | --share | --shar \
  344.   | --sha | --sh)
  345.     ac_prev=sharedstatedir ;;
  346.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  347.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  348.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  349.   | --sha=* | --sh=*)
  350.     sharedstatedir="$ac_optarg" ;;
  351.  
  352.   -site | --site | --sit)
  353.     ac_prev=site ;;
  354.   -site=* | --site=* | --sit=*)
  355.     site="$ac_optarg" ;;
  356.  
  357.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  358.     ac_prev=srcdir ;;
  359.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  360.     srcdir="$ac_optarg" ;;
  361.  
  362.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  363.   | --syscon | --sysco | --sysc | --sys | --sy)
  364.     ac_prev=sysconfdir ;;
  365.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  366.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  367.     sysconfdir="$ac_optarg" ;;
  368.  
  369.   -target | --target | --targe | --targ | --tar | --ta | --t)
  370.     ac_prev=target ;;
  371.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  372.     target="$ac_optarg" ;;
  373.  
  374.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  375.     verbose=yes ;;
  376.  
  377.   -version | --version | --versio | --versi | --vers)
  378.     echo "configure generated by autoconf version 2.13"
  379.     exit 0 ;;
  380.  
  381.   -with-* | --with-*)
  382.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  383.     # Reject names that are not valid shell variable names.
  384.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  385.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  386.     fi
  387.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  388.     case "$ac_option" in
  389.       *=*) ;;
  390.       *) ac_optarg=yes ;;
  391.     esac
  392.     eval "with_${ac_package}='$ac_optarg'" ;;
  393.  
  394.   -without-* | --without-*)
  395.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  396.     # Reject names that are not valid shell variable names.
  397.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  398.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  399.     fi
  400.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  401.     eval "with_${ac_package}=no" ;;
  402.  
  403.   --x)
  404.     # Obsolete; use --with-x.
  405.     with_x=yes ;;
  406.  
  407.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  408.   | --x-incl | --x-inc | --x-in | --x-i)
  409.     ac_prev=x_includes ;;
  410.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  411.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  412.     x_includes="$ac_optarg" ;;
  413.  
  414.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  415.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  416.     ac_prev=x_libraries ;;
  417.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  418.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  419.     x_libraries="$ac_optarg" ;;
  420.  
  421.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  422.     ;;
  423.  
  424.   *)
  425.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  426.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  427.     fi
  428.     if test "x$nonopt" != xNONE; then
  429.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  430.     fi
  431.     nonopt="$ac_option"
  432.     ;;
  433.  
  434.   esac
  435. done
  436.  
  437. if test -n "$ac_prev"; then
  438.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  439. fi
  440.  
  441. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  442.  
  443. # File descriptor usage:
  444. # 0 standard input
  445. # 1 file creation
  446. # 2 errors and warnings
  447. # 3 some systems may open it to /dev/tty
  448. # 4 used on the Kubota Titan
  449. # 6 checking for... messages and results
  450. # 5 compiler messages saved in config.log
  451. if test "$silent" = yes; then
  452.   exec 6>/dev/null
  453. else
  454.   exec 6>&1
  455. fi
  456. exec 5>./config.log
  457.  
  458. echo "\
  459. This file contains any messages produced by compilers while
  460. running configure, to aid debugging if configure makes a mistake.
  461. " 1>&5
  462.  
  463. # Strip out --no-create and --no-recursion so they do not pile up.
  464. # Also quote any args containing shell metacharacters.
  465. ac_configure_args=
  466. for ac_arg
  467. do
  468.   case "$ac_arg" in
  469.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  470.   | --no-cr | --no-c) ;;
  471.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  472.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  473.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  474.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  475.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  476.   esac
  477. done
  478.  
  479. # NLS nuisances.
  480. # Only set these to C if already set.  These must not be set unconditionally
  481. # because not all systems understand e.g. LANG=C (notably SCO).
  482. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  483. # Non-C LC_CTYPE values break the ctype check.
  484. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  485. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  486. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  487. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  488.  
  489. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  490. rm -rf conftest* confdefs.h
  491. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  492. echo > confdefs.h
  493.  
  494. # A filename unique to this package, relative to the directory that
  495. # configure is in, which we can look for to find out if srcdir is correct.
  496. ac_unique_file=Include/object.h
  497.  
  498. # Find the source files, if location was not specified.
  499. if test -z "$srcdir"; then
  500.   ac_srcdir_defaulted=yes
  501.   # Try the directory containing this script, then its parent.
  502.   ac_prog=$0
  503.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  504.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  505.   srcdir=$ac_confdir
  506.   if test ! -r $srcdir/$ac_unique_file; then
  507.     srcdir=..
  508.   fi
  509. else
  510.   ac_srcdir_defaulted=no
  511. fi
  512. if test ! -r $srcdir/$ac_unique_file; then
  513.   if test "$ac_srcdir_defaulted" = yes; then
  514.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  515.   else
  516.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  517.   fi
  518. fi
  519. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  520.  
  521. # Prefer explicitly selected file to automatically selected ones.
  522. if test -z "$CONFIG_SITE"; then
  523.   if test "x$prefix" != xNONE; then
  524.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  525.   else
  526.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  527.   fi
  528. fi
  529. for ac_site_file in $CONFIG_SITE; do
  530.   if test -r "$ac_site_file"; then
  531.     echo "loading site script $ac_site_file"
  532.     . "$ac_site_file"
  533.   fi
  534. done
  535.  
  536. if test -r "$cache_file"; then
  537.   echo "loading cache $cache_file"
  538.   . $cache_file
  539. else
  540.   echo "creating cache $cache_file"
  541.   > $cache_file
  542. fi
  543.  
  544. ac_ext=c
  545. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  546. ac_cpp='$CPP $CPPFLAGS'
  547. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  548. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  549. cross_compiling=$ac_cv_prog_cc_cross
  550.  
  551. ac_exeext=
  552. ac_objext=o
  553. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  554.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  555.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  556.     ac_n= ac_c='
  557. ' ac_t='    '
  558.   else
  559.     ac_n=-n ac_c= ac_t=
  560.   fi
  561. else
  562.   ac_n= ac_c='\c' ac_t=
  563. fi
  564.  
  565.  
  566.  
  567.  
  568. # Set VERSION so we only need to edit in one place (i.e., here)
  569.  
  570. VERSION=2.0
  571.  
  572. # NEXTSTEP|MacOSX|Darwin stuff
  573. if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
  574.  
  575.     echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
  576. echo "configure:577: checking for --with-next-archs" >&5
  577.     # Check whether --with-next-archs or --without-next-archs was given.
  578. if test "${with_next_archs+set}" = set; then
  579.   withval="$with_next_archs"
  580.   
  581.         if test -n "$withval"; then
  582.             ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
  583.             # GCC does not currently support multi archs on the NeXT
  584.             with_gcc=no
  585.         fi
  586.         echo "$ac_t""$with_next_archs" 1>&6
  587.     
  588. else
  589.   echo "$ac_t""none: using `arch`" 1>&6
  590. fi
  591.  
  592.     
  593.     if test -z "$MACHDEP"
  594.     then
  595.         ac_sys_system=`uname -s`
  596.         if test "$ac_sys_system" = "Darwin" ; then
  597.         ac_sys_release=`uname -r`
  598.         else
  599.         set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
  600.             sed -e 's/://' -e 's/\./_/'` && \
  601.         ac_sys_system=next && ac_sys_release=$4
  602.         fi
  603.  
  604.         MACHDEP="$ac_sys_system$ac_sys_release"
  605.     fi
  606. fi
  607.  
  608. # Check whether --with-next-framework or --without-next-framework was given.
  609. if test "${with_next_framework+set}" = set; then
  610.   withval="$with_next_framework"
  611.   :
  612. fi
  613.  
  614. # Check whether --with-dyld or --without-dyld was given.
  615. if test "${with_dyld+set}" = set; then
  616.   withval="$with_dyld"
  617.   :
  618. fi
  619.  
  620.  
  621. # Set name for machine-dependent library files
  622.  
  623. echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
  624. echo "configure:625: checking MACHDEP" >&5
  625. if test -z "$MACHDEP"
  626. then
  627.     ac_sys_system=`uname -s`
  628.     if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
  629.         ac_sys_release=`uname -v`
  630.     else
  631.         ac_sys_release=`uname -r`
  632.     fi
  633.     ac_md_system=`echo $ac_sys_system |
  634.                tr -d '/ ' | tr '[A-Z]' '[a-z]'`
  635.     ac_md_release=`echo $ac_sys_release |
  636.                tr -d '/ ' | sed 's/\..*//'`
  637.     MACHDEP="$ac_md_system$ac_md_release"
  638.  
  639.     case $MACHDEP in
  640.     '')    MACHDEP="unknown";;
  641.     esac
  642. fi
  643.  
  644. #
  645. # SGI compilers allow the specification of the both the ABI and the
  646. # ISA on the command line.  Depending on the values of these switches,
  647. # different and often incompatable code will be generated.
  648. #
  649. # The SGI_ABI variable can be used to modify the CC and LDFLAGS and
  650. # thus supply support for various ABI/ISA combinations.  The MACHDEP
  651. # variable is also adjusted.
  652. #
  653.  
  654. if test ! -z "$SGI_ABI"
  655. then
  656.         CC="cc $SGI_ABI"
  657.         LDFLAGS="$SGI_ABI $LDFLAGS"
  658.         MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
  659. fi
  660. echo "$ac_t""$MACHDEP" 1>&6
  661.  
  662. #
  663. # CCC is the command that compiles C++ programs
  664. #
  665. # Not all make programs have this predefined.
  666. #
  667. #AC_SUBST(SET_CCC)
  668. #AC_MSG_CHECKING(CCC)
  669. #if test -z "$CCC"
  670. #then
  671. #    case $ac_sys_system in
  672. #    IRIX*)    SET_CCC="CCC= CC ${SGI_ABI}";;
  673. #    Linux*) SET_CCC="CCC= g++";;
  674. #    *)    SET_CCC=""
  675. #    esac
  676. #else
  677. #        SET_CCC="CCC= ${CCC}"
  678. #fi
  679. #AC_MSG_RESULT($SET_CCC)
  680.  
  681.  
  682. # checks for alternative programs
  683. echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
  684. echo "configure:685: checking for --without-gcc" >&5
  685. # Check whether --with-gcc or --without-gcc was given.
  686. if test "${with_gcc+set}" = set; then
  687.   withval="$with_gcc"
  688.   
  689.     case $withval in
  690.     no)    CC=cc
  691.         without_gcc=yes;;
  692.     yes)    CC=gcc
  693.         without_gcc=no;;
  694.     *)    CC=$withval
  695.         without_gcc=$withval;;
  696.     esac
  697. else
  698.   
  699.     case $ac_sys_system in
  700.     OSF1)    CC=cc
  701.         without_gcc=;;
  702.     BeOS*)
  703.         case $BE_HOST_CPU in
  704.         ppc)
  705.             CC=mwcc
  706.             without_gcc=yes
  707.             OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
  708.             CCSHARED="UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
  709.             LDFLAGS="$LDFLAGS -nodup"
  710.  
  711.             AR="$PWD/BeOS/ar-fake"
  712.             RANLIB=:
  713.             ;;
  714.         x86)
  715.             CC=gcc
  716.             without_gcc=no
  717.             OPT=-O
  718.             # Really should use srcdir instead of PWD
  719.             AR="$PWD/BeOS/ar-fake"
  720.             RANLIB=:
  721.             ;;
  722.         *)
  723.             { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
  724.             ;;
  725.         esac
  726.         ;;
  727.     Monterey*)
  728.         RANLIB=:
  729.         without_gcc=;;
  730.     *)    without_gcc=no;;
  731.     esac
  732. fi
  733.  
  734. echo "$ac_t""$without_gcc" 1>&6
  735.  
  736.  
  737.  
  738. MAINOBJ=python.o
  739. echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
  740. echo "configure:741: checking for --with-cxx=<compiler>" >&5
  741. # Check whether --with-cxx or --without-cxx was given.
  742. if test "${with_cxx+set}" = set; then
  743.   withval="$with_cxx"
  744.   
  745.     case $withval in
  746.     no)    CXX=
  747.         with_cxx=no;;
  748.     *)    CXX=$withval
  749.         MAINOBJ=ccpython.o
  750.         with_cxx=$withval;;
  751.     esac
  752. else
  753.   
  754.     with_cxx=no
  755.  
  756. fi
  757.  
  758. echo "$ac_t""$with_cxx" 1>&6
  759. SET_CXX="CXX=$CXX"
  760.  
  761. #AC_MSG_CHECKING(CCC)
  762. #if test -z "$CCC"
  763. #then
  764. #    case $ac_sys_system in
  765. #    IRIX*)    SET_CCC="CCC= CC ${SGI_ABI}";;
  766. #    Linux*) SET_CCC="CCC= g++";;
  767. #    *)    SET_CCC=""
  768. #    esac
  769. #else
  770. #        SET_CCC="CCC= ${CCC}"
  771. #fi
  772. #AC_MSG_RESULT($SET_CCC)
  773.  
  774. # If the user switches compilers, we can't believe the cache
  775. if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
  776. then
  777.   { echo "configure: error: cached CC is different -- throw away $cache_file
  778. (it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
  779. fi
  780.  
  781. # Extract the first word of "gcc", so it can be a program name with args.
  782. set dummy gcc; ac_word=$2
  783. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  784. echo "configure:785: checking for $ac_word" >&5
  785. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  786.   echo $ac_n "(cached) $ac_c" 1>&6
  787. else
  788.   if test -n "$CC"; then
  789.   ac_cv_prog_CC="$CC" # Let the user override the test.
  790. else
  791.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  792.   ac_dummy="$PATH"
  793.   for ac_dir in $ac_dummy; do
  794.     test -z "$ac_dir" && ac_dir=.
  795.     if test -f $ac_dir/$ac_word; then
  796.       ac_cv_prog_CC="gcc"
  797.       break
  798.     fi
  799.   done
  800.   IFS="$ac_save_ifs"
  801. fi
  802. fi
  803. CC="$ac_cv_prog_CC"
  804. if test -n "$CC"; then
  805.   echo "$ac_t""$CC" 1>&6
  806. else
  807.   echo "$ac_t""no" 1>&6
  808. fi
  809.  
  810. if test -z "$CC"; then
  811.   # Extract the first word of "cc", so it can be a program name with args.
  812. set dummy cc; ac_word=$2
  813. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  814. echo "configure:815: checking for $ac_word" >&5
  815. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  816.   echo $ac_n "(cached) $ac_c" 1>&6
  817. else
  818.   if test -n "$CC"; then
  819.   ac_cv_prog_CC="$CC" # Let the user override the test.
  820. else
  821.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  822.   ac_prog_rejected=no
  823.   ac_dummy="$PATH"
  824.   for ac_dir in $ac_dummy; do
  825.     test -z "$ac_dir" && ac_dir=.
  826.     if test -f $ac_dir/$ac_word; then
  827.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  828.         ac_prog_rejected=yes
  829.     continue
  830.       fi
  831.       ac_cv_prog_CC="cc"
  832.       break
  833.     fi
  834.   done
  835.   IFS="$ac_save_ifs"
  836. if test $ac_prog_rejected = yes; then
  837.   # We found a bogon in the path, so make sure we never use it.
  838.   set dummy $ac_cv_prog_CC
  839.   shift
  840.   if test $# -gt 0; then
  841.     # We chose a different compiler from the bogus one.
  842.     # However, it has the same basename, so the bogon will be chosen
  843.     # first if we set CC to just the basename; use the full file name.
  844.     shift
  845.     set dummy "$ac_dir/$ac_word" "$@"
  846.     shift
  847.     ac_cv_prog_CC="$@"
  848.   fi
  849. fi
  850. fi
  851. fi
  852. CC="$ac_cv_prog_CC"
  853. if test -n "$CC"; then
  854.   echo "$ac_t""$CC" 1>&6
  855. else
  856.   echo "$ac_t""no" 1>&6
  857. fi
  858.  
  859.   if test -z "$CC"; then
  860.     case "`uname -s`" in
  861.     *win32* | *WIN32*)
  862.       # Extract the first word of "cl", so it can be a program name with args.
  863. set dummy cl; ac_word=$2
  864. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  865. echo "configure:866: checking for $ac_word" >&5
  866. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  867.   echo $ac_n "(cached) $ac_c" 1>&6
  868. else
  869.   if test -n "$CC"; then
  870.   ac_cv_prog_CC="$CC" # Let the user override the test.
  871. else
  872.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  873.   ac_dummy="$PATH"
  874.   for ac_dir in $ac_dummy; do
  875.     test -z "$ac_dir" && ac_dir=.
  876.     if test -f $ac_dir/$ac_word; then
  877.       ac_cv_prog_CC="cl"
  878.       break
  879.     fi
  880.   done
  881.   IFS="$ac_save_ifs"
  882. fi
  883. fi
  884. CC="$ac_cv_prog_CC"
  885. if test -n "$CC"; then
  886.   echo "$ac_t""$CC" 1>&6
  887. else
  888.   echo "$ac_t""no" 1>&6
  889. fi
  890.  ;;
  891.     esac
  892.   fi
  893.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  894. fi
  895.  
  896. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  897. echo "configure:898: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  898.  
  899. ac_ext=c
  900. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  901. ac_cpp='$CPP $CPPFLAGS'
  902. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  903. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  904. cross_compiling=$ac_cv_prog_cc_cross
  905.  
  906. cat > conftest.$ac_ext << EOF
  907.  
  908. #line 909 "configure"
  909. #include "confdefs.h"
  910.  
  911. main(){return(0);}
  912. EOF
  913. if { (eval echo configure:914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  914.   ac_cv_prog_cc_works=yes
  915.   # If we can't run a trivial program, we are probably using a cross compiler.
  916.   if (./conftest; exit) 2>/dev/null; then
  917.     ac_cv_prog_cc_cross=no
  918.   else
  919.     ac_cv_prog_cc_cross=yes
  920.   fi
  921. else
  922.   echo "configure: failed program was:" >&5
  923.   cat conftest.$ac_ext >&5
  924.   ac_cv_prog_cc_works=no
  925. fi
  926. rm -fr conftest*
  927. ac_ext=c
  928. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  929. ac_cpp='$CPP $CPPFLAGS'
  930. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  931. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  932. cross_compiling=$ac_cv_prog_cc_cross
  933.  
  934. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  935. if test $ac_cv_prog_cc_works = no; then
  936.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  937. fi
  938. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  939. echo "configure:940: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  940. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  941. cross_compiling=$ac_cv_prog_cc_cross
  942.  
  943. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  944. echo "configure:945: checking whether we are using GNU C" >&5
  945. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  946.   echo $ac_n "(cached) $ac_c" 1>&6
  947. else
  948.   cat > conftest.c <<EOF
  949. #ifdef __GNUC__
  950.   yes;
  951. #endif
  952. EOF
  953. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  954.   ac_cv_prog_gcc=yes
  955. else
  956.   ac_cv_prog_gcc=no
  957. fi
  958. fi
  959.  
  960. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  961.  
  962. if test $ac_cv_prog_gcc = yes; then
  963.   GCC=yes
  964. else
  965.   GCC=
  966. fi
  967.  
  968. ac_test_CFLAGS="${CFLAGS+set}"
  969. ac_save_CFLAGS="$CFLAGS"
  970. CFLAGS=
  971. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  972. echo "configure:973: checking whether ${CC-cc} accepts -g" >&5
  973. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  974.   echo $ac_n "(cached) $ac_c" 1>&6
  975. else
  976.   echo 'void f(){}' > conftest.c
  977. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  978.   ac_cv_prog_cc_g=yes
  979. else
  980.   ac_cv_prog_cc_g=no
  981. fi
  982. rm -f conftest*
  983.  
  984. fi
  985.  
  986. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  987. if test "$ac_test_CFLAGS" = set; then
  988.   CFLAGS="$ac_save_CFLAGS"
  989. elif test $ac_cv_prog_cc_g = yes; then
  990.   if test "$GCC" = yes; then
  991.     CFLAGS="-g -O2"
  992.   else
  993.     CFLAGS="-g"
  994.   fi
  995. else
  996.   if test "$GCC" = yes; then
  997.     CFLAGS="-O2"
  998.   else
  999.     CFLAGS=
  1000.   fi
  1001. fi
  1002.  
  1003.  
  1004. echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
  1005. echo "configure:1006: checking for --with-suffix" >&5
  1006. # Check whether --with-suffix or --without-suffix was given.
  1007. if test "${with_suffix+set}" = set; then
  1008.   withval="$with_suffix"
  1009.   
  1010.     case $withval in
  1011.     no)    EXE=;;
  1012.     yes)    EXE=.exe;;
  1013.     *)    EXE=$withval;;
  1014.     esac
  1015. fi
  1016.  
  1017. echo "$ac_t""$EXE" 1>&6
  1018.  
  1019. case $MACHDEP in
  1020. bsdos*)
  1021.     case $CC in
  1022.     gcc) CC="$CC -D_HAVE_BSDI";;
  1023.     esac;;
  1024. esac
  1025.  
  1026. case $ac_sys_system in
  1027. hp*|HP*)
  1028.     case $CC in
  1029.     cc|*/cc) CC="$CC -Ae";;
  1030.     esac;;
  1031. Monterey*)
  1032.     case $CC in
  1033.     cc) CC="$CC -Wl,-Bexport";;
  1034.     esac;;
  1035. esac
  1036.  
  1037. # LDLIBRARY is the name of the library to link against (as opposed to the
  1038. # name of the library into which to insert object files). On systems
  1039. # without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
  1040. # the Makefiles). 
  1041.  
  1042.  
  1043. LDLIBRARY=''
  1044.  
  1045. # LINKCC is the command that links the python executable -- default is $(CC).
  1046. # This is altered for AIX in order to build the export list before 
  1047. # linking.
  1048.  
  1049. echo $ac_n "checking LINKCC""... $ac_c" 1>&6
  1050. echo "configure:1051: checking LINKCC" >&5
  1051. if test -z "$LINKCC" -a ! -z "$CXX"
  1052. then
  1053.     LINKCC="$CXX"
  1054. fi
  1055. if test -z "$LINKCC"
  1056. then
  1057.     case $ac_sys_system in
  1058.     AIX*)
  1059.        LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
  1060.     dgux*)
  1061.        LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
  1062.     Monterey64*)
  1063.        LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
  1064.     *) LINKCC="\$(PURIFY) \$(CC)";;
  1065.     esac
  1066. fi
  1067. echo "$ac_t""$LINKCC" 1>&6
  1068.  
  1069. echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
  1070. echo "configure:1071: checking LDLIBRARY" >&5
  1071.  
  1072. # NeXT framework builds require that the 'ar' library be converted into
  1073. # a bundle using libtool.
  1074. if test "$with_next_framework"
  1075. then
  1076.   LDLIBRARY='libpython$(VERSION).dylib'
  1077. fi  
  1078.  
  1079. # DG/UX requires some fancy ld contortions to produce a .so from an .a
  1080. case $MACHDEP in
  1081. dguxR4)
  1082.       LDLIBRARY='libpython$(VERSION).so'
  1083.       OPT="$OPT -pic"
  1084.       ;;
  1085. beos*)
  1086.       LDLIBRARY='libpython$(VERSION).so'
  1087.       ;;
  1088. esac
  1089. echo "$ac_t""$LDLIBRARY" 1>&6
  1090.  
  1091. # If LDLIBRARY is different from LIBRARY, emit a rule to build it.
  1092. if test -z "$LDLIBRARY"
  1093. then
  1094.   LDLIBRARY='libpython$(VERSION).a'
  1095.   MAKE_LDLIBRARY="true"
  1096. else
  1097.   MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)'
  1098. fi
  1099.  
  1100. # Extract the first word of "ranlib", so it can be a program name with args.
  1101. set dummy ranlib; ac_word=$2
  1102. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1103. echo "configure:1104: checking for $ac_word" >&5
  1104. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  1105.   echo $ac_n "(cached) $ac_c" 1>&6
  1106. else
  1107.   if test -n "$RANLIB"; then
  1108.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  1109. else
  1110.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1111.   ac_dummy="$PATH"
  1112.   for ac_dir in $ac_dummy; do
  1113.     test -z "$ac_dir" && ac_dir=.
  1114.     if test -f $ac_dir/$ac_word; then
  1115.       ac_cv_prog_RANLIB="ranlib"
  1116.       break
  1117.     fi
  1118.   done
  1119.   IFS="$ac_save_ifs"
  1120.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  1121. fi
  1122. fi
  1123. RANLIB="$ac_cv_prog_RANLIB"
  1124. if test -n "$RANLIB"; then
  1125.   echo "$ac_t""$RANLIB" 1>&6
  1126. else
  1127.   echo "$ac_t""no" 1>&6
  1128. fi
  1129.  
  1130.  
  1131. for ac_prog in ar aal
  1132. do
  1133. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1134. set dummy $ac_prog; ac_word=$2
  1135. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1136. echo "configure:1137: checking for $ac_word" >&5
  1137. if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
  1138.   echo $ac_n "(cached) $ac_c" 1>&6
  1139. else
  1140.   if test -n "$AR"; then
  1141.   ac_cv_prog_AR="$AR" # Let the user override the test.
  1142. else
  1143.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  1144.   ac_dummy="$PATH"
  1145.   for ac_dir in $ac_dummy; do
  1146.     test -z "$ac_dir" && ac_dir=.
  1147.     if test -f $ac_dir/$ac_word; then
  1148.       ac_cv_prog_AR="$ac_prog"
  1149.       break
  1150.     fi
  1151.   done
  1152.   IFS="$ac_save_ifs"
  1153. fi
  1154. fi
  1155. AR="$ac_cv_prog_AR"
  1156. if test -n "$AR"; then
  1157.   echo "$ac_t""$AR" 1>&6
  1158. else
  1159.   echo "$ac_t""no" 1>&6
  1160. fi
  1161.  
  1162. test -n "$AR" && break
  1163. done
  1164. test -n "$AR" || AR="ar"
  1165.  
  1166.  
  1167.  
  1168.  
  1169. # Install just never works :-(
  1170. if test -z "$INSTALL"
  1171. then
  1172.     INSTALL=cp
  1173.     INSTALL_PROGRAM=cp
  1174.     INSTALL_DATA=cp
  1175. else
  1176.     INSTALL_PROGRAM="$INSTALL"
  1177.     INSTALL_DATA="$INSTALL -m 644"
  1178. fi
  1179.  
  1180. # Not every filesystem supports hard links
  1181.  
  1182. if test -z "$LN" ; then
  1183.     case $ac_sys_system in
  1184.         BeOS*) LN="ln -s";;
  1185.         *) LN=ln;;
  1186.     esac
  1187. fi
  1188.  
  1189. # Optimizer/debugger flags passed between Makefiles
  1190.  
  1191. if test -z "$OPT"
  1192. then
  1193.     case $GCC in
  1194.     yes)
  1195.         case $ac_cv_prog_cc_g in
  1196.         yes)    OPT="-g -O2 -Wall -Wstrict-prototypes";;
  1197.         *)    OPT="-O2 -Wall -Wstrict-prototypes";;
  1198.         esac
  1199.         ;;
  1200.     *)    OPT="-O";;
  1201.     esac
  1202. fi
  1203.  
  1204. # The current (beta) Monterey compiler dies with optimizations
  1205. case $ac_sys_system in
  1206. Monterey*) OPT="";;
  1207. esac
  1208.  
  1209. if test "$ac_arch_flags"
  1210. then
  1211.     OPT="$OPT $ac_arch_flags"
  1212. fi
  1213. # checks for UNIX variants that set C preprocessor variables
  1214. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1215. echo "configure:1216: checking how to run the C preprocessor" >&5
  1216. # On Suns, sometimes $CPP names a directory.
  1217. if test -n "$CPP" && test -d "$CPP"; then
  1218.   CPP=
  1219. fi
  1220. if test -z "$CPP"; then
  1221. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  1222.   echo $ac_n "(cached) $ac_c" 1>&6
  1223. else
  1224.     # This must be in double quotes, not single quotes, because CPP may get
  1225.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  1226.   CPP="${CC-cc} -E"
  1227.   # On the NeXT, cc -E runs the code through the compiler's parser,
  1228.   # not just through cpp.
  1229.   cat > conftest.$ac_ext <<EOF
  1230. #line 1231 "configure"
  1231. #include "confdefs.h"
  1232. #include <assert.h>
  1233. Syntax Error
  1234. EOF
  1235. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1236. { (eval echo configure:1237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1237. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1238. if test -z "$ac_err"; then
  1239.   :
  1240. else
  1241.   echo "$ac_err" >&5
  1242.   echo "configure: failed program was:" >&5
  1243.   cat conftest.$ac_ext >&5
  1244.   rm -rf conftest*
  1245.   CPP="${CC-cc} -E -traditional-cpp"
  1246.   cat > conftest.$ac_ext <<EOF
  1247. #line 1248 "configure"
  1248. #include "confdefs.h"
  1249. #include <assert.h>
  1250. Syntax Error
  1251. EOF
  1252. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1253. { (eval echo configure:1254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1254. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1255. if test -z "$ac_err"; then
  1256.   :
  1257. else
  1258.   echo "$ac_err" >&5
  1259.   echo "configure: failed program was:" >&5
  1260.   cat conftest.$ac_ext >&5
  1261.   rm -rf conftest*
  1262.   CPP="${CC-cc} -nologo -E"
  1263.   cat > conftest.$ac_ext <<EOF
  1264. #line 1265 "configure"
  1265. #include "confdefs.h"
  1266. #include <assert.h>
  1267. Syntax Error
  1268. EOF
  1269. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1270. { (eval echo configure:1271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1271. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1272. if test -z "$ac_err"; then
  1273.   :
  1274. else
  1275.   echo "$ac_err" >&5
  1276.   echo "configure: failed program was:" >&5
  1277.   cat conftest.$ac_ext >&5
  1278.   rm -rf conftest*
  1279.   CPP=/lib/cpp
  1280. fi
  1281. rm -f conftest*
  1282. fi
  1283. rm -f conftest*
  1284. fi
  1285. rm -f conftest*
  1286.   ac_cv_prog_CPP="$CPP"
  1287. fi
  1288.   CPP="$ac_cv_prog_CPP"
  1289. else
  1290.   ac_cv_prog_CPP="$CPP"
  1291. fi
  1292. echo "$ac_t""$CPP" 1>&6
  1293.  
  1294. echo $ac_n "checking for AIX""... $ac_c" 1>&6
  1295. echo "configure:1296: checking for AIX" >&5
  1296. cat > conftest.$ac_ext <<EOF
  1297. #line 1298 "configure"
  1298. #include "confdefs.h"
  1299. #ifdef _AIX
  1300.   yes
  1301. #endif
  1302.  
  1303. EOF
  1304. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1305.   egrep "yes" >/dev/null 2>&1; then
  1306.   rm -rf conftest*
  1307.   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
  1308. #define _ALL_SOURCE 1
  1309. EOF
  1310.  
  1311. else
  1312.   rm -rf conftest*
  1313.   echo "$ac_t""no" 1>&6
  1314. fi
  1315. rm -f conftest*
  1316.  
  1317.  
  1318. ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
  1319. echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
  1320. echo "configure:1321: checking for minix/config.h" >&5
  1321. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1322.   echo $ac_n "(cached) $ac_c" 1>&6
  1323. else
  1324.   cat > conftest.$ac_ext <<EOF
  1325. #line 1326 "configure"
  1326. #include "confdefs.h"
  1327. #include <minix/config.h>
  1328. EOF
  1329. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1330. { (eval echo configure:1331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1331. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1332. if test -z "$ac_err"; then
  1333.   rm -rf conftest*
  1334.   eval "ac_cv_header_$ac_safe=yes"
  1335. else
  1336.   echo "$ac_err" >&5
  1337.   echo "configure: failed program was:" >&5
  1338.   cat conftest.$ac_ext >&5
  1339.   rm -rf conftest*
  1340.   eval "ac_cv_header_$ac_safe=no"
  1341. fi
  1342. rm -f conftest*
  1343. fi
  1344. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1345.   echo "$ac_t""yes" 1>&6
  1346.   MINIX=yes
  1347. else
  1348.   echo "$ac_t""no" 1>&6
  1349. MINIX=
  1350. fi
  1351.  
  1352. if test "$MINIX" = yes; then
  1353.   cat >> confdefs.h <<\EOF
  1354. #define _POSIX_SOURCE 1
  1355. EOF
  1356.  
  1357.   cat >> confdefs.h <<\EOF
  1358. #define _POSIX_1_SOURCE 2
  1359. EOF
  1360.  
  1361.   cat >> confdefs.h <<\EOF
  1362. #define _MINIX 1
  1363. EOF
  1364.  
  1365. fi
  1366.  
  1367.  
  1368. echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
  1369. echo "configure:1370: checking whether $CC accepts -OPT:Olimit=0" >&5
  1370. if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
  1371.   echo $ac_n "(cached) $ac_c" 1>&6
  1372. else
  1373.   ac_save_cc="$CC"
  1374. CC="$CC -OPT:Olimit=0"
  1375. if test "$cross_compiling" = yes; then
  1376.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1377. else
  1378.   cat > conftest.$ac_ext <<EOF
  1379. #line 1380 "configure"
  1380. #include "confdefs.h"
  1381. int main() { return 0; }
  1382. EOF
  1383. if { (eval echo configure:1384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1384. then
  1385.   ac_cv_opt_olimit_ok=yes
  1386. else
  1387.   echo "configure: failed program was:" >&5
  1388.   cat conftest.$ac_ext >&5
  1389.   rm -fr conftest*
  1390.   ac_cv_opt_olimit_ok=no
  1391. fi
  1392. rm -fr conftest*
  1393. fi
  1394.  
  1395. CC="$ac_save_cc"
  1396. fi
  1397.  
  1398. echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
  1399. if test $ac_cv_opt_olimit_ok = yes; then
  1400.     case $ac_sys_system in
  1401.       Darwin*) OPT="$OPT" ;;
  1402.       *) OPT="$OPT -OPT:Olimit=0";;
  1403.     esac
  1404. else
  1405.   echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
  1406. echo "configure:1407: checking whether $CC accepts -Olimit 1500" >&5
  1407.   if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
  1408.   echo $ac_n "(cached) $ac_c" 1>&6
  1409. else
  1410.   ac_save_cc="$CC"
  1411.   CC="$CC -Olimit 1500"
  1412.   if test "$cross_compiling" = yes; then
  1413.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1414. else
  1415.   cat > conftest.$ac_ext <<EOF
  1416. #line 1417 "configure"
  1417. #include "confdefs.h"
  1418. int main() { return 0; }
  1419. EOF
  1420. if { (eval echo configure:1421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1421. then
  1422.   ac_cv_olimit_ok=yes
  1423. else
  1424.   echo "configure: failed program was:" >&5
  1425.   cat conftest.$ac_ext >&5
  1426.   rm -fr conftest*
  1427.   ac_cv_olimit_ok=no
  1428. fi
  1429. rm -fr conftest*
  1430. fi
  1431.  
  1432.   CC="$ac_save_cc"
  1433. fi
  1434.  
  1435.   echo "$ac_t""$ac_cv_olimit_ok" 1>&6
  1436.   if test $ac_cv_olimit_ok = yes; then
  1437.     OPT="$OPT -Olimit 1500"
  1438.   fi
  1439. fi
  1440.  
  1441.  
  1442. # checks for header files
  1443. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1444. echo "configure:1445: checking for ANSI C header files" >&5
  1445. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1446.   echo $ac_n "(cached) $ac_c" 1>&6
  1447. else
  1448.   cat > conftest.$ac_ext <<EOF
  1449. #line 1450 "configure"
  1450. #include "confdefs.h"
  1451. #include <stdlib.h>
  1452. #include <stdarg.h>
  1453. #include <string.h>
  1454. #include <float.h>
  1455. EOF
  1456. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1457. { (eval echo configure:1458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1458. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1459. if test -z "$ac_err"; then
  1460.   rm -rf conftest*
  1461.   ac_cv_header_stdc=yes
  1462. else
  1463.   echo "$ac_err" >&5
  1464.   echo "configure: failed program was:" >&5
  1465.   cat conftest.$ac_ext >&5
  1466.   rm -rf conftest*
  1467.   ac_cv_header_stdc=no
  1468. fi
  1469. rm -f conftest*
  1470.  
  1471. if test $ac_cv_header_stdc = yes; then
  1472.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1473. cat > conftest.$ac_ext <<EOF
  1474. #line 1475 "configure"
  1475. #include "confdefs.h"
  1476. #include <string.h>
  1477. EOF
  1478. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1479.   egrep "memchr" >/dev/null 2>&1; then
  1480.   :
  1481. else
  1482.   rm -rf conftest*
  1483.   ac_cv_header_stdc=no
  1484. fi
  1485. rm -f conftest*
  1486.  
  1487. fi
  1488.  
  1489. if test $ac_cv_header_stdc = yes; then
  1490.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1491. cat > conftest.$ac_ext <<EOF
  1492. #line 1493 "configure"
  1493. #include "confdefs.h"
  1494. #include <stdlib.h>
  1495. EOF
  1496. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1497.   egrep "free" >/dev/null 2>&1; then
  1498.   :
  1499. else
  1500.   rm -rf conftest*
  1501.   ac_cv_header_stdc=no
  1502. fi
  1503. rm -f conftest*
  1504.  
  1505. fi
  1506.  
  1507. if test $ac_cv_header_stdc = yes; then
  1508.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1509. if test "$cross_compiling" = yes; then
  1510.   :
  1511. else
  1512.   cat > conftest.$ac_ext <<EOF
  1513. #line 1514 "configure"
  1514. #include "confdefs.h"
  1515. #include <ctype.h>
  1516. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1517. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1518. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1519. int main () { int i; for (i = 0; i < 256; i++)
  1520. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1521. exit (0); }
  1522.  
  1523. EOF
  1524. if { (eval echo configure:1525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1525. then
  1526.   :
  1527. else
  1528.   echo "configure: failed program was:" >&5
  1529.   cat conftest.$ac_ext >&5
  1530.   rm -fr conftest*
  1531.   ac_cv_header_stdc=no
  1532. fi
  1533. rm -fr conftest*
  1534. fi
  1535.  
  1536. fi
  1537. fi
  1538.  
  1539. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1540. if test $ac_cv_header_stdc = yes; then
  1541.   cat >> confdefs.h <<\EOF
  1542. #define STDC_HEADERS 1
  1543. EOF
  1544.  
  1545. fi
  1546.  
  1547. for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h poll.h pthread.h \
  1548. signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
  1549. sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \
  1550. sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
  1551. sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
  1552. ndbm.h db1/ndbm.h gdbm/ndbm.h
  1553. do
  1554. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1555. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1556. echo "configure:1557: checking for $ac_hdr" >&5
  1557. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1558.   echo $ac_n "(cached) $ac_c" 1>&6
  1559. else
  1560.   cat > conftest.$ac_ext <<EOF
  1561. #line 1562 "configure"
  1562. #include "confdefs.h"
  1563. #include <$ac_hdr>
  1564. EOF
  1565. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1566. { (eval echo configure:1567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1567. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1568. if test -z "$ac_err"; then
  1569.   rm -rf conftest*
  1570.   eval "ac_cv_header_$ac_safe=yes"
  1571. else
  1572.   echo "$ac_err" >&5
  1573.   echo "configure: failed program was:" >&5
  1574.   cat conftest.$ac_ext >&5
  1575.   rm -rf conftest*
  1576.   eval "ac_cv_header_$ac_safe=no"
  1577. fi
  1578. rm -f conftest*
  1579. fi
  1580. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1581.   echo "$ac_t""yes" 1>&6
  1582.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1583.   cat >> confdefs.h <<EOF
  1584. #define $ac_tr_hdr 1
  1585. EOF
  1586.  
  1587. else
  1588.   echo "$ac_t""no" 1>&6
  1589. fi
  1590. done
  1591.  
  1592. ac_header_dirent=no
  1593. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  1594. do
  1595. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1596. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  1597. echo "configure:1598: checking for $ac_hdr that defines DIR" >&5
  1598. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  1599.   echo $ac_n "(cached) $ac_c" 1>&6
  1600. else
  1601.   cat > conftest.$ac_ext <<EOF
  1602. #line 1603 "configure"
  1603. #include "confdefs.h"
  1604. #include <sys/types.h>
  1605. #include <$ac_hdr>
  1606. int main() {
  1607. DIR *dirp = 0;
  1608. ; return 0; }
  1609. EOF
  1610. if { (eval echo configure:1611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1611.   rm -rf conftest*
  1612.   eval "ac_cv_header_dirent_$ac_safe=yes"
  1613. else
  1614.   echo "configure: failed program was:" >&5
  1615.   cat conftest.$ac_ext >&5
  1616.   rm -rf conftest*
  1617.   eval "ac_cv_header_dirent_$ac_safe=no"
  1618. fi
  1619. rm -f conftest*
  1620. fi
  1621. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  1622.   echo "$ac_t""yes" 1>&6
  1623.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1624.   cat >> confdefs.h <<EOF
  1625. #define $ac_tr_hdr 1
  1626. EOF
  1627.  ac_header_dirent=$ac_hdr; break
  1628. else
  1629.   echo "$ac_t""no" 1>&6
  1630. fi
  1631. done
  1632. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  1633. if test $ac_header_dirent = dirent.h; then
  1634. echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
  1635. echo "configure:1636: checking for opendir in -ldir" >&5
  1636. ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
  1637. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1638.   echo $ac_n "(cached) $ac_c" 1>&6
  1639. else
  1640.   ac_save_LIBS="$LIBS"
  1641. LIBS="-ldir  $LIBS"
  1642. cat > conftest.$ac_ext <<EOF
  1643. #line 1644 "configure"
  1644. #include "confdefs.h"
  1645. /* Override any gcc2 internal prototype to avoid an error.  */
  1646. /* We use char because int might match the return type of a gcc2
  1647.     builtin and then its argument prototype would still apply.  */
  1648. char opendir();
  1649.  
  1650. int main() {
  1651. opendir()
  1652. ; return 0; }
  1653. EOF
  1654. if { (eval echo configure:1655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1655.   rm -rf conftest*
  1656.   eval "ac_cv_lib_$ac_lib_var=yes"
  1657. else
  1658.   echo "configure: failed program was:" >&5
  1659.   cat conftest.$ac_ext >&5
  1660.   rm -rf conftest*
  1661.   eval "ac_cv_lib_$ac_lib_var=no"
  1662. fi
  1663. rm -f conftest*
  1664. LIBS="$ac_save_LIBS"
  1665.  
  1666. fi
  1667. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1668.   echo "$ac_t""yes" 1>&6
  1669.   LIBS="$LIBS -ldir"
  1670. else
  1671.   echo "$ac_t""no" 1>&6
  1672. fi
  1673.  
  1674. else
  1675. echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
  1676. echo "configure:1677: checking for opendir in -lx" >&5
  1677. ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
  1678. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1679.   echo $ac_n "(cached) $ac_c" 1>&6
  1680. else
  1681.   ac_save_LIBS="$LIBS"
  1682. LIBS="-lx  $LIBS"
  1683. cat > conftest.$ac_ext <<EOF
  1684. #line 1685 "configure"
  1685. #include "confdefs.h"
  1686. /* Override any gcc2 internal prototype to avoid an error.  */
  1687. /* We use char because int might match the return type of a gcc2
  1688.     builtin and then its argument prototype would still apply.  */
  1689. char opendir();
  1690.  
  1691. int main() {
  1692. opendir()
  1693. ; return 0; }
  1694. EOF
  1695. if { (eval echo configure:1696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1696.   rm -rf conftest*
  1697.   eval "ac_cv_lib_$ac_lib_var=yes"
  1698. else
  1699.   echo "configure: failed program was:" >&5
  1700.   cat conftest.$ac_ext >&5
  1701.   rm -rf conftest*
  1702.   eval "ac_cv_lib_$ac_lib_var=no"
  1703. fi
  1704. rm -f conftest*
  1705. LIBS="$ac_save_LIBS"
  1706.  
  1707. fi
  1708. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1709.   echo "$ac_t""yes" 1>&6
  1710.   LIBS="$LIBS -lx"
  1711. else
  1712.   echo "$ac_t""no" 1>&6
  1713. fi
  1714.  
  1715. fi
  1716.  
  1717.  
  1718. # checks for typedefs
  1719. was_it_defined=no
  1720. echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
  1721. echo "configure:1722: checking for clock_t in time.h" >&5
  1722. cat > conftest.$ac_ext <<EOF
  1723. #line 1724 "configure"
  1724. #include "confdefs.h"
  1725. #include <time.h>
  1726. EOF
  1727. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1728.   egrep "clock_t" >/dev/null 2>&1; then
  1729.   rm -rf conftest*
  1730.   was_it_defined=yes
  1731. else
  1732.   rm -rf conftest*
  1733.   cat >> confdefs.h <<\EOF
  1734. #define clock_t long
  1735. EOF
  1736.  
  1737. fi
  1738. rm -f conftest*
  1739.  
  1740. echo "$ac_t""$was_it_defined" 1>&6
  1741.  
  1742. # Add some code to confdefs.h so that the test for off_t works on SCO
  1743. cat >> confdefs.h <<\EOF
  1744. #if defined(SCO_DS)
  1745. #undef _OFF_T
  1746. #endif
  1747. EOF
  1748.  
  1749. # Type availability checks
  1750. echo $ac_n "checking for mode_t""... $ac_c" 1>&6
  1751. echo "configure:1752: checking for mode_t" >&5
  1752. if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  1753.   echo $ac_n "(cached) $ac_c" 1>&6
  1754. else
  1755.   cat > conftest.$ac_ext <<EOF
  1756. #line 1757 "configure"
  1757. #include "confdefs.h"
  1758. #include <sys/types.h>
  1759. #if STDC_HEADERS
  1760. #include <stdlib.h>
  1761. #include <stddef.h>
  1762. #endif
  1763. EOF
  1764. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1765.   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1766.   rm -rf conftest*
  1767.   ac_cv_type_mode_t=yes
  1768. else
  1769.   rm -rf conftest*
  1770.   ac_cv_type_mode_t=no
  1771. fi
  1772. rm -f conftest*
  1773.  
  1774. fi
  1775. echo "$ac_t""$ac_cv_type_mode_t" 1>&6
  1776. if test $ac_cv_type_mode_t = no; then
  1777.   cat >> confdefs.h <<\EOF
  1778. #define mode_t int
  1779. EOF
  1780.  
  1781. fi
  1782.  
  1783. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  1784. echo "configure:1785: checking for off_t" >&5
  1785. if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
  1786.   echo $ac_n "(cached) $ac_c" 1>&6
  1787. else
  1788.   cat > conftest.$ac_ext <<EOF
  1789. #line 1790 "configure"
  1790. #include "confdefs.h"
  1791. #include <sys/types.h>
  1792. #if STDC_HEADERS
  1793. #include <stdlib.h>
  1794. #include <stddef.h>
  1795. #endif
  1796. EOF
  1797. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1798.   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1799.   rm -rf conftest*
  1800.   ac_cv_type_off_t=yes
  1801. else
  1802.   rm -rf conftest*
  1803.   ac_cv_type_off_t=no
  1804. fi
  1805. rm -f conftest*
  1806.  
  1807. fi
  1808. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  1809. if test $ac_cv_type_off_t = no; then
  1810.   cat >> confdefs.h <<\EOF
  1811. #define off_t long
  1812. EOF
  1813.  
  1814. fi
  1815.  
  1816. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  1817. echo "configure:1818: checking for pid_t" >&5
  1818. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  1819.   echo $ac_n "(cached) $ac_c" 1>&6
  1820. else
  1821.   cat > conftest.$ac_ext <<EOF
  1822. #line 1823 "configure"
  1823. #include "confdefs.h"
  1824. #include <sys/types.h>
  1825. #if STDC_HEADERS
  1826. #include <stdlib.h>
  1827. #include <stddef.h>
  1828. #endif
  1829. EOF
  1830. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1831.   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1832.   rm -rf conftest*
  1833.   ac_cv_type_pid_t=yes
  1834. else
  1835.   rm -rf conftest*
  1836.   ac_cv_type_pid_t=no
  1837. fi
  1838. rm -f conftest*
  1839.  
  1840. fi
  1841. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  1842. if test $ac_cv_type_pid_t = no; then
  1843.   cat >> confdefs.h <<\EOF
  1844. #define pid_t int
  1845. EOF
  1846.  
  1847. fi
  1848.  
  1849. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  1850. echo "configure:1851: checking return type of signal handlers" >&5
  1851. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  1852.   echo $ac_n "(cached) $ac_c" 1>&6
  1853. else
  1854.   cat > conftest.$ac_ext <<EOF
  1855. #line 1856 "configure"
  1856. #include "confdefs.h"
  1857. #include <sys/types.h>
  1858. #include <signal.h>
  1859. #ifdef signal
  1860. #undef signal
  1861. #endif
  1862. #ifdef __cplusplus
  1863. extern "C" void (*signal (int, void (*)(int)))(int);
  1864. #else
  1865. void (*signal ()) ();
  1866. #endif
  1867.  
  1868. int main() {
  1869. int i;
  1870. ; return 0; }
  1871. EOF
  1872. if { (eval echo configure:1873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1873.   rm -rf conftest*
  1874.   ac_cv_type_signal=void
  1875. else
  1876.   echo "configure: failed program was:" >&5
  1877.   cat conftest.$ac_ext >&5
  1878.   rm -rf conftest*
  1879.   ac_cv_type_signal=int
  1880. fi
  1881. rm -f conftest*
  1882. fi
  1883.  
  1884. echo "$ac_t""$ac_cv_type_signal" 1>&6
  1885. cat >> confdefs.h <<EOF
  1886. #define RETSIGTYPE $ac_cv_type_signal
  1887. EOF
  1888.  
  1889.  
  1890. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  1891. echo "configure:1892: checking for size_t" >&5
  1892. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  1893.   echo $ac_n "(cached) $ac_c" 1>&6
  1894. else
  1895.   cat > conftest.$ac_ext <<EOF
  1896. #line 1897 "configure"
  1897. #include "confdefs.h"
  1898. #include <sys/types.h>
  1899. #if STDC_HEADERS
  1900. #include <stdlib.h>
  1901. #include <stddef.h>
  1902. #endif
  1903. EOF
  1904. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1905.   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1906.   rm -rf conftest*
  1907.   ac_cv_type_size_t=yes
  1908. else
  1909.   rm -rf conftest*
  1910.   ac_cv_type_size_t=no
  1911. fi
  1912. rm -f conftest*
  1913.  
  1914. fi
  1915. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  1916. if test $ac_cv_type_size_t = no; then
  1917.   cat >> confdefs.h <<\EOF
  1918. #define size_t unsigned
  1919. EOF
  1920.  
  1921. fi
  1922.  
  1923. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  1924. echo "configure:1925: checking for uid_t in sys/types.h" >&5
  1925. if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  1926.   echo $ac_n "(cached) $ac_c" 1>&6
  1927. else
  1928.   cat > conftest.$ac_ext <<EOF
  1929. #line 1930 "configure"
  1930. #include "confdefs.h"
  1931. #include <sys/types.h>
  1932. EOF
  1933. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1934.   egrep "uid_t" >/dev/null 2>&1; then
  1935.   rm -rf conftest*
  1936.   ac_cv_type_uid_t=yes
  1937. else
  1938.   rm -rf conftest*
  1939.   ac_cv_type_uid_t=no
  1940. fi
  1941. rm -f conftest*
  1942.  
  1943. fi
  1944.  
  1945. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  1946. if test $ac_cv_type_uid_t = no; then
  1947.   cat >> confdefs.h <<\EOF
  1948. #define uid_t int
  1949. EOF
  1950.  
  1951.   cat >> confdefs.h <<\EOF
  1952. #define gid_t int
  1953. EOF
  1954.  
  1955. fi
  1956.  
  1957.  
  1958. # Sizes of various common basic types
  1959. echo $ac_n "checking size of int""... $ac_c" 1>&6
  1960. echo "configure:1961: checking size of int" >&5
  1961. if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
  1962.   echo $ac_n "(cached) $ac_c" 1>&6
  1963. else
  1964.   if test "$cross_compiling" = yes; then
  1965.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1966. else
  1967.   cat > conftest.$ac_ext <<EOF
  1968. #line 1969 "configure"
  1969. #include "confdefs.h"
  1970. #include <stdio.h>
  1971. main()
  1972. {
  1973.   FILE *f=fopen("conftestval", "w");
  1974.   if (!f) exit(1);
  1975.   fprintf(f, "%d\n", sizeof(int));
  1976.   exit(0);
  1977. }
  1978. EOF
  1979. if { (eval echo configure:1980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1980. then
  1981.   ac_cv_sizeof_int=`cat conftestval`
  1982. else
  1983.   echo "configure: failed program was:" >&5
  1984.   cat conftest.$ac_ext >&5
  1985.   rm -fr conftest*
  1986.   ac_cv_sizeof_int=0
  1987. fi
  1988. rm -fr conftest*
  1989. fi
  1990.  
  1991. fi
  1992. echo "$ac_t""$ac_cv_sizeof_int" 1>&6
  1993. cat >> confdefs.h <<EOF
  1994. #define SIZEOF_INT $ac_cv_sizeof_int
  1995. EOF
  1996.  
  1997.  
  1998. echo $ac_n "checking size of long""... $ac_c" 1>&6
  1999. echo "configure:2000: checking size of long" >&5
  2000. if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
  2001.   echo $ac_n "(cached) $ac_c" 1>&6
  2002. else
  2003.   if test "$cross_compiling" = yes; then
  2004.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2005. else
  2006.   cat > conftest.$ac_ext <<EOF
  2007. #line 2008 "configure"
  2008. #include "confdefs.h"
  2009. #include <stdio.h>
  2010. main()
  2011. {
  2012.   FILE *f=fopen("conftestval", "w");
  2013.   if (!f) exit(1);
  2014.   fprintf(f, "%d\n", sizeof(long));
  2015.   exit(0);
  2016. }
  2017. EOF
  2018. if { (eval echo configure:2019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2019. then
  2020.   ac_cv_sizeof_long=`cat conftestval`
  2021. else
  2022.   echo "configure: failed program was:" >&5
  2023.   cat conftest.$ac_ext >&5
  2024.   rm -fr conftest*
  2025.   ac_cv_sizeof_long=0
  2026. fi
  2027. rm -fr conftest*
  2028. fi
  2029.  
  2030. fi
  2031. echo "$ac_t""$ac_cv_sizeof_long" 1>&6
  2032. cat >> confdefs.h <<EOF
  2033. #define SIZEOF_LONG $ac_cv_sizeof_long
  2034. EOF
  2035.  
  2036.  
  2037. echo $ac_n "checking size of void *""... $ac_c" 1>&6
  2038. echo "configure:2039: checking size of void *" >&5
  2039. if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
  2040.   echo $ac_n "(cached) $ac_c" 1>&6
  2041. else
  2042.   if test "$cross_compiling" = yes; then
  2043.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2044. else
  2045.   cat > conftest.$ac_ext <<EOF
  2046. #line 2047 "configure"
  2047. #include "confdefs.h"
  2048. #include <stdio.h>
  2049. main()
  2050. {
  2051.   FILE *f=fopen("conftestval", "w");
  2052.   if (!f) exit(1);
  2053.   fprintf(f, "%d\n", sizeof(void *));
  2054.   exit(0);
  2055. }
  2056. EOF
  2057. if { (eval echo configure:2058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2058. then
  2059.   ac_cv_sizeof_void_p=`cat conftestval`
  2060. else
  2061.   echo "configure: failed program was:" >&5
  2062.   cat conftest.$ac_ext >&5
  2063.   rm -fr conftest*
  2064.   ac_cv_sizeof_void_p=0
  2065. fi
  2066. rm -fr conftest*
  2067. fi
  2068.  
  2069. fi
  2070. echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
  2071. cat >> confdefs.h <<EOF
  2072. #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
  2073. EOF
  2074.  
  2075.  
  2076. echo $ac_n "checking size of char""... $ac_c" 1>&6
  2077. echo "configure:2078: checking size of char" >&5
  2078. if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
  2079.   echo $ac_n "(cached) $ac_c" 1>&6
  2080. else
  2081.   if test "$cross_compiling" = yes; then
  2082.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2083. else
  2084.   cat > conftest.$ac_ext <<EOF
  2085. #line 2086 "configure"
  2086. #include "confdefs.h"
  2087. #include <stdio.h>
  2088. main()
  2089. {
  2090.   FILE *f=fopen("conftestval", "w");
  2091.   if (!f) exit(1);
  2092.   fprintf(f, "%d\n", sizeof(char));
  2093.   exit(0);
  2094. }
  2095. EOF
  2096. if { (eval echo configure:2097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2097. then
  2098.   ac_cv_sizeof_char=`cat conftestval`
  2099. else
  2100.   echo "configure: failed program was:" >&5
  2101.   cat conftest.$ac_ext >&5
  2102.   rm -fr conftest*
  2103.   ac_cv_sizeof_char=0
  2104. fi
  2105. rm -fr conftest*
  2106. fi
  2107.  
  2108. fi
  2109. echo "$ac_t""$ac_cv_sizeof_char" 1>&6
  2110. cat >> confdefs.h <<EOF
  2111. #define SIZEOF_CHAR $ac_cv_sizeof_char
  2112. EOF
  2113.  
  2114.  
  2115. echo $ac_n "checking size of short""... $ac_c" 1>&6
  2116. echo "configure:2117: checking size of short" >&5
  2117. if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
  2118.   echo $ac_n "(cached) $ac_c" 1>&6
  2119. else
  2120.   if test "$cross_compiling" = yes; then
  2121.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2122. else
  2123.   cat > conftest.$ac_ext <<EOF
  2124. #line 2125 "configure"
  2125. #include "confdefs.h"
  2126. #include <stdio.h>
  2127. main()
  2128. {
  2129.   FILE *f=fopen("conftestval", "w");
  2130.   if (!f) exit(1);
  2131.   fprintf(f, "%d\n", sizeof(short));
  2132.   exit(0);
  2133. }
  2134. EOF
  2135. if { (eval echo configure:2136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2136. then
  2137.   ac_cv_sizeof_short=`cat conftestval`
  2138. else
  2139.   echo "configure: failed program was:" >&5
  2140.   cat conftest.$ac_ext >&5
  2141.   rm -fr conftest*
  2142.   ac_cv_sizeof_short=0
  2143. fi
  2144. rm -fr conftest*
  2145. fi
  2146.  
  2147. fi
  2148. echo "$ac_t""$ac_cv_sizeof_short" 1>&6
  2149. cat >> confdefs.h <<EOF
  2150. #define SIZEOF_SHORT $ac_cv_sizeof_short
  2151. EOF
  2152.  
  2153.  
  2154. echo $ac_n "checking size of float""... $ac_c" 1>&6
  2155. echo "configure:2156: checking size of float" >&5
  2156. if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
  2157.   echo $ac_n "(cached) $ac_c" 1>&6
  2158. else
  2159.   if test "$cross_compiling" = yes; then
  2160.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2161. else
  2162.   cat > conftest.$ac_ext <<EOF
  2163. #line 2164 "configure"
  2164. #include "confdefs.h"
  2165. #include <stdio.h>
  2166. main()
  2167. {
  2168.   FILE *f=fopen("conftestval", "w");
  2169.   if (!f) exit(1);
  2170.   fprintf(f, "%d\n", sizeof(float));
  2171.   exit(0);
  2172. }
  2173. EOF
  2174. if { (eval echo configure:2175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2175. then
  2176.   ac_cv_sizeof_float=`cat conftestval`
  2177. else
  2178.   echo "configure: failed program was:" >&5
  2179.   cat conftest.$ac_ext >&5
  2180.   rm -fr conftest*
  2181.   ac_cv_sizeof_float=0
  2182. fi
  2183. rm -fr conftest*
  2184. fi
  2185.  
  2186. fi
  2187. echo "$ac_t""$ac_cv_sizeof_float" 1>&6
  2188. cat >> confdefs.h <<EOF
  2189. #define SIZEOF_FLOAT $ac_cv_sizeof_float
  2190. EOF
  2191.  
  2192.  
  2193. echo $ac_n "checking size of double""... $ac_c" 1>&6
  2194. echo "configure:2195: checking size of double" >&5
  2195. if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
  2196.   echo $ac_n "(cached) $ac_c" 1>&6
  2197. else
  2198.   if test "$cross_compiling" = yes; then
  2199.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2200. else
  2201.   cat > conftest.$ac_ext <<EOF
  2202. #line 2203 "configure"
  2203. #include "confdefs.h"
  2204. #include <stdio.h>
  2205. main()
  2206. {
  2207.   FILE *f=fopen("conftestval", "w");
  2208.   if (!f) exit(1);
  2209.   fprintf(f, "%d\n", sizeof(double));
  2210.   exit(0);
  2211. }
  2212. EOF
  2213. if { (eval echo configure:2214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2214. then
  2215.   ac_cv_sizeof_double=`cat conftestval`
  2216. else
  2217.   echo "configure: failed program was:" >&5
  2218.   cat conftest.$ac_ext >&5
  2219.   rm -fr conftest*
  2220.   ac_cv_sizeof_double=0
  2221. fi
  2222. rm -fr conftest*
  2223. fi
  2224.  
  2225. fi
  2226. echo "$ac_t""$ac_cv_sizeof_double" 1>&6
  2227. cat >> confdefs.h <<EOF
  2228. #define SIZEOF_DOUBLE $ac_cv_sizeof_double
  2229. EOF
  2230.  
  2231.  
  2232. echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
  2233. echo "configure:2234: checking size of fpos_t" >&5
  2234. if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
  2235.   echo $ac_n "(cached) $ac_c" 1>&6
  2236. else
  2237.   if test "$cross_compiling" = yes; then
  2238.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2239. else
  2240.   cat > conftest.$ac_ext <<EOF
  2241. #line 2242 "configure"
  2242. #include "confdefs.h"
  2243. #include <stdio.h>
  2244. main()
  2245. {
  2246.   FILE *f=fopen("conftestval", "w");
  2247.   if (!f) exit(1);
  2248.   fprintf(f, "%d\n", sizeof(fpos_t));
  2249.   exit(0);
  2250. }
  2251. EOF
  2252. if { (eval echo configure:2253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2253. then
  2254.   ac_cv_sizeof_fpos_t=`cat conftestval`
  2255. else
  2256.   echo "configure: failed program was:" >&5
  2257.   cat conftest.$ac_ext >&5
  2258.   rm -fr conftest*
  2259.   ac_cv_sizeof_fpos_t=0
  2260. fi
  2261. rm -fr conftest*
  2262. fi
  2263.  
  2264. fi
  2265. echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
  2266. cat >> confdefs.h <<EOF
  2267. #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
  2268. EOF
  2269.  
  2270.  
  2271.  
  2272. echo $ac_n "checking for long long support""... $ac_c" 1>&6
  2273. echo "configure:2274: checking for long long support" >&5
  2274. have_long_long=no
  2275. cat > conftest.$ac_ext <<EOF
  2276. #line 2277 "configure"
  2277. #include "confdefs.h"
  2278.  
  2279. int main() {
  2280. long long x; x = (long long)0;
  2281. ; return 0; }
  2282. EOF
  2283. if { (eval echo configure:2284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2284.   rm -rf conftest*
  2285.   cat >> confdefs.h <<\EOF
  2286. #define HAVE_LONG_LONG 1
  2287. EOF
  2288.  have_long_long=yes
  2289. else
  2290.   echo "configure: failed program was:" >&5
  2291.   cat conftest.$ac_ext >&5
  2292. fi
  2293. rm -f conftest*
  2294. echo "$ac_t""$have_long_long" 1>&6
  2295. if test "$have_long_long" = yes ; then
  2296. echo $ac_n "checking size of long long""... $ac_c" 1>&6
  2297. echo "configure:2298: checking size of long long" >&5
  2298. if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
  2299.   echo $ac_n "(cached) $ac_c" 1>&6
  2300. else
  2301.   if test "$cross_compiling" = yes; then
  2302.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2303. else
  2304.   cat > conftest.$ac_ext <<EOF
  2305. #line 2306 "configure"
  2306. #include "confdefs.h"
  2307. #include <stdio.h>
  2308. main()
  2309. {
  2310.   FILE *f=fopen("conftestval", "w");
  2311.   if (!f) exit(1);
  2312.   fprintf(f, "%d\n", sizeof(long long));
  2313.   exit(0);
  2314. }
  2315. EOF
  2316. if { (eval echo configure:2317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2317. then
  2318.   ac_cv_sizeof_long_long=`cat conftestval`
  2319. else
  2320.   echo "configure: failed program was:" >&5
  2321.   cat conftest.$ac_ext >&5
  2322.   rm -fr conftest*
  2323.   ac_cv_sizeof_long_long=0
  2324. fi
  2325. rm -fr conftest*
  2326. fi
  2327.  
  2328. fi
  2329. echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
  2330. cat >> confdefs.h <<EOF
  2331. #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
  2332. EOF
  2333.  
  2334.  
  2335. fi
  2336.  
  2337. echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
  2338. echo "configure:2339: checking for uintptr_t support" >&5
  2339. have_uintptr_t=no
  2340. cat > conftest.$ac_ext <<EOF
  2341. #line 2342 "configure"
  2342. #include "confdefs.h"
  2343.  
  2344. int main() {
  2345. uintptr_t x; x = (uintptr_t)0;
  2346. ; return 0; }
  2347. EOF
  2348. if { (eval echo configure:2349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2349.   rm -rf conftest*
  2350.   cat >> confdefs.h <<\EOF
  2351. #define HAVE_UINTPTR_T 1
  2352. EOF
  2353.  have_uintptr_t=yes
  2354. else
  2355.   echo "configure: failed program was:" >&5
  2356.   cat conftest.$ac_ext >&5
  2357. fi
  2358. rm -f conftest*
  2359. echo "$ac_t""$have_uintptr_t" 1>&6
  2360. if test "$have_uintptr_t" = yes ; then
  2361. echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
  2362. echo "configure:2363: checking size of uintptr_t" >&5
  2363. if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
  2364.   echo $ac_n "(cached) $ac_c" 1>&6
  2365. else
  2366.   if test "$cross_compiling" = yes; then
  2367.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2368. else
  2369.   cat > conftest.$ac_ext <<EOF
  2370. #line 2371 "configure"
  2371. #include "confdefs.h"
  2372. #include <stdio.h>
  2373. main()
  2374. {
  2375.   FILE *f=fopen("conftestval", "w");
  2376.   if (!f) exit(1);
  2377.   fprintf(f, "%d\n", sizeof(uintptr_t));
  2378.   exit(0);
  2379. }
  2380. EOF
  2381. if { (eval echo configure:2382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2382. then
  2383.   ac_cv_sizeof_uintptr_t=`cat conftestval`
  2384. else
  2385.   echo "configure: failed program was:" >&5
  2386.   cat conftest.$ac_ext >&5
  2387.   rm -fr conftest*
  2388.   ac_cv_sizeof_uintptr_t=0
  2389. fi
  2390. rm -fr conftest*
  2391. fi
  2392.  
  2393. fi
  2394. echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
  2395. cat >> confdefs.h <<EOF
  2396. #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
  2397. EOF
  2398.  
  2399.  
  2400. fi
  2401.  
  2402. # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
  2403. echo $ac_n "checking size of off_t""... $ac_c" 1>&6
  2404. echo "configure:2405: checking size of off_t" >&5
  2405. if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
  2406.   echo $ac_n "(cached) $ac_c" 1>&6
  2407. else
  2408.   if test "$cross_compiling" = yes; then
  2409.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2410. else
  2411.   cat > conftest.$ac_ext <<EOF
  2412. #line 2413 "configure"
  2413. #include "confdefs.h"
  2414. #include <stdio.h>
  2415. #include <sys/types.h>
  2416. main()
  2417. {
  2418.   FILE *f=fopen("conftestval", "w");
  2419.   if (!f) exit(1);
  2420.   fprintf(f, "%d\n", sizeof(off_t));
  2421.   exit(0);
  2422. }
  2423. EOF
  2424. if { (eval echo configure:2425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2425. then
  2426.   ac_cv_sizeof_off_t=`cat conftestval`
  2427. else
  2428.   echo "configure: failed program was:" >&5
  2429.   cat conftest.$ac_ext >&5
  2430.   rm -fr conftest*
  2431.   ac_cv_sizeof_off_t=0
  2432. fi
  2433. rm -fr conftest*
  2434. fi
  2435.  
  2436.  
  2437. fi
  2438.  
  2439. echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
  2440. cat >> confdefs.h <<EOF
  2441. #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
  2442. EOF
  2443.  
  2444.  
  2445. echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
  2446. echo "configure:2447: checking whether to enable large file support" >&5
  2447. if test "$have_long_long" = yes -a \
  2448.     "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
  2449.     "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
  2450.   cat >> confdefs.h <<\EOF
  2451. #define HAVE_LARGEFILE_SUPPORT 1
  2452. EOF
  2453.  
  2454.   echo "$ac_t""yes" 1>&6
  2455. else
  2456.   echo "$ac_t""no" 1>&6
  2457. fi
  2458.  
  2459. # AC_CHECK_SIZEOF() doesn't include <time.h>.
  2460. echo $ac_n "checking size of time_t""... $ac_c" 1>&6
  2461. echo "configure:2462: checking size of time_t" >&5
  2462. if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
  2463.   echo $ac_n "(cached) $ac_c" 1>&6
  2464. else
  2465.   if test "$cross_compiling" = yes; then
  2466.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2467. else
  2468.   cat > conftest.$ac_ext <<EOF
  2469. #line 2470 "configure"
  2470. #include "confdefs.h"
  2471. #include <stdio.h>
  2472. #include <time.h>
  2473. main()
  2474. {
  2475.   FILE *f=fopen("conftestval", "w");
  2476.   if (!f) exit(1);
  2477.   fprintf(f, "%d\n", sizeof(time_t));
  2478.   exit(0);
  2479. }
  2480. EOF
  2481. if { (eval echo configure:2482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2482. then
  2483.   ac_cv_sizeof_time_t=`cat conftestval`
  2484. else
  2485.   echo "configure: failed program was:" >&5
  2486.   cat conftest.$ac_ext >&5
  2487.   rm -fr conftest*
  2488.   ac_cv_sizeof_time_t=0
  2489. fi
  2490. rm -fr conftest*
  2491. fi
  2492.  
  2493.  
  2494. fi
  2495.  
  2496. echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
  2497. cat >> confdefs.h <<EOF
  2498. #define SIZEOF_TIME_T $ac_cv_sizeof_time_t
  2499. EOF
  2500.  
  2501.  
  2502.  
  2503. # if have pthread_t then define SIZEOF_PTHREAD_T
  2504. echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
  2505. echo "configure:2506: checking for pthread_t" >&5
  2506. have_pthread_t=no
  2507. cat > conftest.$ac_ext <<EOF
  2508. #line 2509 "configure"
  2509. #include "confdefs.h"
  2510. #include <pthread.h>
  2511. int main() {
  2512. pthread_t x; x = *(pthread_t*)0;
  2513. ; return 0; }
  2514. EOF
  2515. if { (eval echo configure:2516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2516.   rm -rf conftest*
  2517.   have_pthread_t=yes
  2518. else
  2519.   echo "configure: failed program was:" >&5
  2520.   cat conftest.$ac_ext >&5
  2521. fi
  2522. rm -f conftest*
  2523. echo "$ac_t""$have_pthread_t" 1>&6
  2524. if test "$have_pthread_t" = yes ; then
  2525.   # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
  2526.   echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
  2527. echo "configure:2528: checking size of pthread_t" >&5
  2528.   if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
  2529.   echo $ac_n "(cached) $ac_c" 1>&6
  2530. else
  2531.   if test "$cross_compiling" = yes; then
  2532.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2533. else
  2534.   cat > conftest.$ac_ext <<EOF
  2535. #line 2536 "configure"
  2536. #include "confdefs.h"
  2537. #include <stdio.h>
  2538.   #include <pthread.h>
  2539.   main()
  2540.   {
  2541.     FILE *f=fopen("conftestval", "w");
  2542.     if (!f) exit(1);
  2543.     fprintf(f, "%d\n", sizeof(pthread_t));
  2544.     exit(0);
  2545.   }
  2546. EOF
  2547. if { (eval echo configure:2548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2548. then
  2549.   ac_cv_sizeof_pthread_t=`cat conftestval`
  2550. else
  2551.   echo "configure: failed program was:" >&5
  2552.   cat conftest.$ac_ext >&5
  2553.   rm -fr conftest*
  2554.   ac_cv_sizeof_pthread_t=0
  2555. fi
  2556. rm -fr conftest*
  2557. fi
  2558.  
  2559.   
  2560. fi
  2561.  
  2562.   echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
  2563.   cat >> confdefs.h <<EOF
  2564. #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
  2565. EOF
  2566.  
  2567. fi
  2568.  
  2569.  
  2570. # Minor variations in building a framework between NextStep versions 4 and 5
  2571.  
  2572. case $ac_sys_system/$ac_sys_release in
  2573.   Darwin/*)
  2574.     ns_undef_sym='_environ'
  2575.     LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;;
  2576.   next/4*)
  2577.     ns_undef_sym='__environ'
  2578.     LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
  2579.   next/5*)
  2580.     ns_undef_sym='_environ'
  2581.     LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
  2582. esac
  2583.  
  2584. echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
  2585. echo "configure:2586: checking for --with-next-framework" >&5
  2586. if test "$with_next_framework"
  2587. then
  2588.     OPT="$OPT -fno-common"
  2589.     # -U __environ is needed since bundles don't have access
  2590.     # to crt0 when built but will always be linked against it
  2591.     LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
  2592.     cat >> confdefs.h <<\EOF
  2593. #define WITH_NEXT_FRAMEWORK 1
  2594. EOF
  2595.  
  2596.     echo "$ac_t""yes" 1>&6
  2597. else
  2598.     echo "$ac_t""no" 1>&6
  2599. fi
  2600.  
  2601. echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
  2602. echo "configure:2603: checking for --with-dyld" >&5
  2603. if test "$with_next_framework" -o "$with_dyld"
  2604. then
  2605.     if test "$with_dyld"
  2606.     then
  2607.         echo "$ac_t""yes" 1>&6
  2608.     else
  2609.         echo "$ac_t""required for framework build" 1>&6
  2610.     fi
  2611.     cat >> confdefs.h <<\EOF
  2612. #define WITH_DYLD 1
  2613. EOF
  2614.  
  2615.     ns_dyld='set'
  2616. else
  2617.     echo "$ac_t""no" 1>&6
  2618. fi
  2619.  
  2620. # Set info about shared libraries.
  2621.  
  2622.  
  2623.  
  2624.  
  2625. # SO is the extension of shared libraries `(including the dot!)
  2626. # -- usually .so, .sl on HP-UX
  2627. echo $ac_n "checking SO""... $ac_c" 1>&6
  2628. echo "configure:2629: checking SO" >&5
  2629. if test -z "$SO"
  2630. then
  2631.     case $ac_sys_system in
  2632.     hp*|HP*)   SO=.sl;;
  2633.     *)       SO=.so;;
  2634.     esac
  2635. fi
  2636. echo "$ac_t""$SO" 1>&6
  2637. # LDSHARED is the ld *command* used to create shared library
  2638. # -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
  2639. # (Shared libraries in this instance are shared modules to be loaded into
  2640. # Python, as opposed to building Python itself as a shared library.)
  2641. echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
  2642. echo "configure:2643: checking LDSHARED" >&5
  2643. if test -z "$LDSHARED"
  2644. then
  2645.     case $ac_sys_system/$ac_sys_release in
  2646.     AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
  2647.     BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
  2648.     IRIX/5*) LDSHARED="ld -shared";;
  2649.     IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
  2650.     SunOS/4*) LDSHARED="ld";;
  2651.     SunOS/5*) 
  2652.         if test "$GCC" = "yes"
  2653.         then LDSHARED='$(CC) -G'
  2654.         else LDSHARED="ld -G";
  2655.         fi ;;
  2656.     hp*|HP*) LDSHARED="ld -b";;
  2657.     OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
  2658.     DYNIX/ptx*) LDSHARED="ld -G";;
  2659.         Darwin/*|next/*) 
  2660.         if test "$ns_dyld"
  2661.         then 
  2662.           if test "$ac_sys_system" = Darwin
  2663.           then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
  2664.           else LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
  2665.           fi
  2666.         else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
  2667.         fi
  2668.     if test "$with_next_framework" ; then
  2669.             LDSHARED="$LDSHARED \$(LDLIBRARY)"
  2670.         fi ;;
  2671.     Linux*) LDSHARED="gcc -shared";;
  2672.     dgux*) LDSHARED="ld -G";;
  2673.     BSD/OS*/4*) LDSHARED="gcc -shared";;
  2674.     OpenBSD*) LDSHARED="ld -Bshareable";;
  2675.     NetBSD*)
  2676.         if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
  2677.         then
  2678.             LDSHARED="cc -shared"
  2679.         else
  2680.             LDSHARED="ld -Bshareable"
  2681.         fi;;
  2682.     FreeBSD*)
  2683.         if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
  2684.         then
  2685.             LDSHARED="cc -shared ${LDFLAGS}"
  2686.         else
  2687.             LDSHARED="ld -Bshareable ${LDFLAGS}"
  2688.         fi;;
  2689.     SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
  2690.     Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
  2691.     *)    LDSHARED="ld";;
  2692.     esac
  2693. fi
  2694. echo "$ac_t""$LDSHARED" 1>&6
  2695. # CCSHARED are the C *flags* used to create objects to go into a shared
  2696. # library (module) -- this is only needed for a few systems
  2697. echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
  2698. echo "configure:2699: checking CCSHARED" >&5
  2699. if test -z "$CCSHARED"
  2700. then
  2701.     case $ac_sys_system/$ac_sys_release in
  2702.     hp*|HP*) if test "$GCC" = yes;
  2703.          then CCSHARED="-fpic";
  2704.          else CCSHARED="+z";
  2705.          fi;;
  2706.     Linux*) CCSHARED="-fpic";;
  2707.     BSD/OS*/4*) CCSHARED="-fpic";;
  2708.     OpenBSD*) CCSHARED="-fpic";;
  2709.     FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
  2710.     SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
  2711.     Monterey*) CCSHARED="-G";;
  2712.     IRIX*/6*)  case $CC in
  2713.            *gcc*) CCSHARED="-shared";;
  2714.            *) CCSHARED="";;
  2715.            esac;;
  2716.     esac
  2717. fi
  2718. echo "$ac_t""$CCSHARED" 1>&6
  2719. # LINKFORSHARED are the flags passed to the $(CC) command that links
  2720. # the python executable -- this is only needed for a few systems
  2721. echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
  2722. echo "configure:2723: checking LINKFORSHARED" >&5
  2723. if test -z "$LINKFORSHARED"
  2724. then
  2725.     case $ac_sys_system/$ac_sys_release in
  2726.     AIX*)    LINKFORSHARED='-Wl,-bE:python.exp -lld';;
  2727.     hp*|HP*)
  2728.         LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
  2729.     BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
  2730.     Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
  2731.     # -u libsys_s pulls in all symbols in libsys
  2732.     next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
  2733.     # -u __dummy makes the linker aware of the objc runtime
  2734.     # in System.framework; otherwise, __objcInit (referenced in
  2735.     # crt1.o) gets erroneously defined as common, which breaks dynamic
  2736.     # loading of any modules which reference it in System.framework
  2737.     next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
  2738.     Darwin/*) LINKFORSHARED="-framework System" ;;
  2739.     SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
  2740.     ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
  2741.     FreeBSD*|NetBSD*) 
  2742.         if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
  2743.         then
  2744.             LINKFORSHARED="-Wl,--export-dynamic"
  2745.         fi;;
  2746.     SunOS/5*) case $CC in
  2747.           *gcc*)
  2748.             if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
  2749.             then
  2750.             LINKFORSHARED="-Xlinker --export-dynamic"
  2751.             fi;;
  2752.           esac;;
  2753.     esac
  2754. fi
  2755. echo "$ac_t""$LINKFORSHARED" 1>&6
  2756.  
  2757. # checks for libraries
  2758. echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
  2759. echo "configure:2760: checking for dlopen in -ldl" >&5
  2760. ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  2761. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2762.   echo $ac_n "(cached) $ac_c" 1>&6
  2763. else
  2764.   ac_save_LIBS="$LIBS"
  2765. LIBS="-ldl  $LIBS"
  2766. cat > conftest.$ac_ext <<EOF
  2767. #line 2768 "configure"
  2768. #include "confdefs.h"
  2769. /* Override any gcc2 internal prototype to avoid an error.  */
  2770. /* We use char because int might match the return type of a gcc2
  2771.     builtin and then its argument prototype would still apply.  */
  2772. char dlopen();
  2773.  
  2774. int main() {
  2775. dlopen()
  2776. ; return 0; }
  2777. EOF
  2778. if { (eval echo configure:2779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2779.   rm -rf conftest*
  2780.   eval "ac_cv_lib_$ac_lib_var=yes"
  2781. else
  2782.   echo "configure: failed program was:" >&5
  2783.   cat conftest.$ac_ext >&5
  2784.   rm -rf conftest*
  2785.   eval "ac_cv_lib_$ac_lib_var=no"
  2786. fi
  2787. rm -f conftest*
  2788. LIBS="$ac_save_LIBS"
  2789.  
  2790. fi
  2791. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2792.   echo "$ac_t""yes" 1>&6
  2793.     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  2794.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  2795.   cat >> confdefs.h <<EOF
  2796. #define $ac_tr_lib 1
  2797. EOF
  2798.  
  2799.   LIBS="-ldl $LIBS"
  2800.  
  2801. else
  2802.   echo "$ac_t""no" 1>&6
  2803. fi
  2804.     # Dynamic linking for SunOS/Solaris and SYSV
  2805. echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
  2806. echo "configure:2807: checking for shl_load in -ldld" >&5
  2807. ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  2808. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2809.   echo $ac_n "(cached) $ac_c" 1>&6
  2810. else
  2811.   ac_save_LIBS="$LIBS"
  2812. LIBS="-ldld  $LIBS"
  2813. cat > conftest.$ac_ext <<EOF
  2814. #line 2815 "configure"
  2815. #include "confdefs.h"
  2816. /* Override any gcc2 internal prototype to avoid an error.  */
  2817. /* We use char because int might match the return type of a gcc2
  2818.     builtin and then its argument prototype would still apply.  */
  2819. char shl_load();
  2820.  
  2821. int main() {
  2822. shl_load()
  2823. ; return 0; }
  2824. EOF
  2825. if { (eval echo configure:2826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2826.   rm -rf conftest*
  2827.   eval "ac_cv_lib_$ac_lib_var=yes"
  2828. else
  2829.   echo "configure: failed program was:" >&5
  2830.   cat conftest.$ac_ext >&5
  2831.   rm -rf conftest*
  2832.   eval "ac_cv_lib_$ac_lib_var=no"
  2833. fi
  2834. rm -f conftest*
  2835. LIBS="$ac_save_LIBS"
  2836.  
  2837. fi
  2838. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2839.   echo "$ac_t""yes" 1>&6
  2840.     ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  2841.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  2842.   cat >> confdefs.h <<EOF
  2843. #define $ac_tr_lib 1
  2844. EOF
  2845.  
  2846.   LIBS="-ldld $LIBS"
  2847.  
  2848. else
  2849.   echo "$ac_t""no" 1>&6
  2850. fi
  2851.     # Dynamic linking for HP-UX
  2852.  
  2853. # Check for --with-pydebug
  2854. echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
  2855. echo "configure:2856: checking for --with-pydebug" >&5
  2856. # Check whether --with-pydebug or --without-pydebug was given.
  2857. if test "${with_pydebug+set}" = set; then
  2858.   withval="$with_pydebug"
  2859.   
  2860. if test "$withval" != no
  2861. then cat >> confdefs.h <<\EOF
  2862. #define Py_DEBUG 1
  2863. EOF
  2864.  echo "$ac_t""yes" 1>&6
  2865. else echo "$ac_t""no" 1>&6
  2866. fi
  2867. else
  2868.   echo "$ac_t""no" 1>&6
  2869. fi
  2870.  
  2871.  
  2872. # checks for system dependent C++ extensions support
  2873. case "$ac_sys_system" in
  2874.     AIX*)    echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
  2875. echo "configure:2876: checking for genuine AIX C++ extensions support" >&5
  2876.         cat > conftest.$ac_ext <<EOF
  2877. #line 2878 "configure"
  2878. #include "confdefs.h"
  2879. #include "/usr/lpp/xlC/include/load.h"
  2880. int main() {
  2881. loadAndInit("", 0, "")
  2882. ; return 0; }
  2883. EOF
  2884. if { (eval echo configure:2885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2885.   rm -rf conftest*
  2886.   cat >> confdefs.h <<\EOF
  2887. #define AIX_GENUINE_CPLUSPLUS 1
  2888. EOF
  2889.  
  2890.                  echo "$ac_t""yes" 1>&6
  2891. else
  2892.   echo "configure: failed program was:" >&5
  2893.   cat conftest.$ac_ext >&5
  2894.   rm -rf conftest*
  2895.   echo "$ac_t""no" 1>&6
  2896. fi
  2897. rm -f conftest*;;
  2898.     *) ;;
  2899. esac
  2900.  
  2901. # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
  2902. # However on SGI IRIX, these exist but are broken.
  2903. # BeOS' sockets are stashed in libnet.
  2904. case "$ac_sys_system" in
  2905. IRIX*) ;;
  2906. *)
  2907. echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
  2908. echo "configure:2909: checking for t_open in -lnsl" >&5
  2909. ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
  2910. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2911.   echo $ac_n "(cached) $ac_c" 1>&6
  2912. else
  2913.   ac_save_LIBS="$LIBS"
  2914. LIBS="-lnsl  $LIBS"
  2915. cat > conftest.$ac_ext <<EOF
  2916. #line 2917 "configure"
  2917. #include "confdefs.h"
  2918. /* Override any gcc2 internal prototype to avoid an error.  */
  2919. /* We use char because int might match the return type of a gcc2
  2920.     builtin and then its argument prototype would still apply.  */
  2921. char t_open();
  2922.  
  2923. int main() {
  2924. t_open()
  2925. ; return 0; }
  2926. EOF
  2927. if { (eval echo configure:2928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2928.   rm -rf conftest*
  2929.   eval "ac_cv_lib_$ac_lib_var=yes"
  2930. else
  2931.   echo "configure: failed program was:" >&5
  2932.   cat conftest.$ac_ext >&5
  2933.   rm -rf conftest*
  2934.   eval "ac_cv_lib_$ac_lib_var=no"
  2935. fi
  2936. rm -f conftest*
  2937. LIBS="$ac_save_LIBS"
  2938.  
  2939. fi
  2940. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2941.   echo "$ac_t""yes" 1>&6
  2942.   LIBS="-lnsl $LIBS"
  2943. else
  2944.   echo "$ac_t""no" 1>&6
  2945. fi
  2946.  # SVR4
  2947. echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
  2948. echo "configure:2949: checking for socket in -lsocket" >&5
  2949. ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
  2950. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2951.   echo $ac_n "(cached) $ac_c" 1>&6
  2952. else
  2953.   ac_save_LIBS="$LIBS"
  2954. LIBS="-lsocket $LIBS $LIBS"
  2955. cat > conftest.$ac_ext <<EOF
  2956. #line 2957 "configure"
  2957. #include "confdefs.h"
  2958. /* Override any gcc2 internal prototype to avoid an error.  */
  2959. /* We use char because int might match the return type of a gcc2
  2960.     builtin and then its argument prototype would still apply.  */
  2961. char socket();
  2962.  
  2963. int main() {
  2964. socket()
  2965. ; return 0; }
  2966. EOF
  2967. if { (eval echo configure:2968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2968.   rm -rf conftest*
  2969.   eval "ac_cv_lib_$ac_lib_var=yes"
  2970. else
  2971.   echo "configure: failed program was:" >&5
  2972.   cat conftest.$ac_ext >&5
  2973.   rm -rf conftest*
  2974.   eval "ac_cv_lib_$ac_lib_var=no"
  2975. fi
  2976. rm -f conftest*
  2977. LIBS="$ac_save_LIBS"
  2978.  
  2979. fi
  2980. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2981.   echo "$ac_t""yes" 1>&6
  2982.   LIBS="-lsocket $LIBS"
  2983. else
  2984.   echo "$ac_t""no" 1>&6
  2985. fi
  2986.  # SVR4 sockets
  2987. ;;
  2988. esac
  2989. case "$ac_sys_system" in
  2990. BeOS*)
  2991. echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
  2992. echo "configure:2993: checking for socket in -lnet" >&5
  2993. ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
  2994. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2995.   echo $ac_n "(cached) $ac_c" 1>&6
  2996. else
  2997.   ac_save_LIBS="$LIBS"
  2998. LIBS="-lnet $LIBS $LIBS"
  2999. cat > conftest.$ac_ext <<EOF
  3000. #line 3001 "configure"
  3001. #include "confdefs.h"
  3002. /* Override any gcc2 internal prototype to avoid an error.  */
  3003. /* We use char because int might match the return type of a gcc2
  3004.     builtin and then its argument prototype would still apply.  */
  3005. char socket();
  3006.  
  3007. int main() {
  3008. socket()
  3009. ; return 0; }
  3010. EOF
  3011. if { (eval echo configure:3012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3012.   rm -rf conftest*
  3013.   eval "ac_cv_lib_$ac_lib_var=yes"
  3014. else
  3015.   echo "configure: failed program was:" >&5
  3016.   cat conftest.$ac_ext >&5
  3017.   rm -rf conftest*
  3018.   eval "ac_cv_lib_$ac_lib_var=no"
  3019. fi
  3020. rm -f conftest*
  3021. LIBS="$ac_save_LIBS"
  3022.  
  3023. fi
  3024. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3025.   echo "$ac_t""yes" 1>&6
  3026.   LIBS="-lnet $LIBS"
  3027. else
  3028.   echo "$ac_t""no" 1>&6
  3029. fi
  3030.  # BeOS
  3031. ;;
  3032. esac
  3033.  
  3034. echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
  3035. echo "configure:3036: checking for --with-libs" >&5
  3036. # Check whether --with-libs or --without-libs was given.
  3037. if test "${with_libs+set}" = set; then
  3038.   withval="$with_libs"
  3039.   
  3040. echo "$ac_t""$withval" 1>&6
  3041. LIBS="$withval $LIBS"
  3042.  
  3043. else
  3044.   echo "$ac_t""no" 1>&6
  3045. fi
  3046.  
  3047.  
  3048.  
  3049. USE_THREAD_MODULE=""
  3050.  
  3051. echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
  3052. echo "configure:3053: checking for --with-dec-threads" >&5
  3053.  
  3054. # Check whether --with-dec-threads or --without-dec-threads was given.
  3055. if test "${with_dec_threads+set}" = set; then
  3056.   withval="$with_dec_threads"
  3057.   
  3058. echo "$ac_t""$withval" 1>&6
  3059. LDLAST=-threads
  3060. if test "${with_thread+set}" != set; then
  3061.    with_thread="$withval";
  3062. fi
  3063. else
  3064.   echo "$ac_t""no" 1>&6
  3065. fi
  3066.  
  3067.  
  3068. echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
  3069. echo "configure:3070: checking for --with-threads" >&5
  3070. # Check whether --with-threads or --without-threads was given.
  3071. if test "${with_threads+set}" = set; then
  3072.   withval="$with_threads"
  3073.   :
  3074. fi
  3075.  
  3076.  
  3077. # --with-thread is deprecated, but check for it anyway
  3078. # Check whether --with-thread or --without-thread was given.
  3079. if test "${with_thread+set}" = set; then
  3080.   withval="$with_thread"
  3081.   
  3082. with_threads=$with_thread
  3083. fi
  3084.  
  3085.  
  3086. if test -z "$with_threads"
  3087. then with_threads="yes"
  3088. fi
  3089. echo "$ac_t""$with_threads" 1>&6
  3090.  
  3091. if test "$with_threads" = "no"
  3092. then
  3093.     USE_THREAD_MODULE="#"
  3094. else
  3095.     if test ! -z "$with_threads" -a -d "$with_threads"
  3096.     then LDFLAGS="$LDFLAGS -L$with_threads"
  3097.     fi
  3098.     if test ! -z "$withval" -a -d "$withval"
  3099.     then LDFLAGS="$LDFLAGS -L$withval"
  3100.     fi
  3101.     cat >> confdefs.h <<\EOF
  3102. #define _REENTRANT 1
  3103. EOF
  3104.  
  3105.     ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
  3106. echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
  3107. echo "configure:3108: checking for mach/cthreads.h" >&5
  3108. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3109.   echo $ac_n "(cached) $ac_c" 1>&6
  3110. else
  3111.   cat > conftest.$ac_ext <<EOF
  3112. #line 3113 "configure"
  3113. #include "confdefs.h"
  3114. #include <mach/cthreads.h>
  3115. EOF
  3116. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3117. { (eval echo configure:3118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3118. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3119. if test -z "$ac_err"; then
  3120.   rm -rf conftest*
  3121.   eval "ac_cv_header_$ac_safe=yes"
  3122. else
  3123.   echo "$ac_err" >&5
  3124.   echo "configure: failed program was:" >&5
  3125.   cat conftest.$ac_ext >&5
  3126.   rm -rf conftest*
  3127.   eval "ac_cv_header_$ac_safe=no"
  3128. fi
  3129. rm -f conftest*
  3130. fi
  3131. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3132.   echo "$ac_t""yes" 1>&6
  3133.   cat >> confdefs.h <<\EOF
  3134. #define WITH_THREAD 1
  3135. EOF
  3136.  
  3137.     cat >> confdefs.h <<\EOF
  3138. #define C_THREADS 1
  3139. EOF
  3140.  
  3141.     LIBOBJS="$LIBOBJS thread.o"
  3142. else
  3143.   echo "$ac_t""no" 1>&6
  3144.  
  3145.     echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
  3146. echo "configure:3147: checking for --with-pth" >&5
  3147.     # Check whether --with-pth or --without-pth was given.
  3148. if test "${with_pth+set}" = set; then
  3149.   withval="$with_pth"
  3150.   
  3151.     echo "$ac_t""$withval" 1>&6
  3152.     cat >> confdefs.h <<\EOF
  3153. #define WITH_THREAD 1
  3154. EOF
  3155.  
  3156.     cat >> confdefs.h <<\EOF
  3157. #define HAVE_PTH 1
  3158. EOF
  3159.  
  3160.     LIBS="-lpth $LIBS"
  3161.     LIBOBJS="$LIBOBJS thread.o"
  3162. else
  3163.   
  3164.     echo "$ac_t""no" 1>&6
  3165.     echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
  3166. echo "configure:3167: checking for pthread_create in -lpthread" >&5
  3167. ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
  3168. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3169.   echo $ac_n "(cached) $ac_c" 1>&6
  3170. else
  3171.   ac_save_LIBS="$LIBS"
  3172. LIBS="-lpthread  $LIBS"
  3173. cat > conftest.$ac_ext <<EOF
  3174. #line 3175 "configure"
  3175. #include "confdefs.h"
  3176. /* Override any gcc2 internal prototype to avoid an error.  */
  3177. /* We use char because int might match the return type of a gcc2
  3178.     builtin and then its argument prototype would still apply.  */
  3179. char pthread_create();
  3180.  
  3181. int main() {
  3182. pthread_create()
  3183. ; return 0; }
  3184. EOF
  3185. if { (eval echo configure:3186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3186.   rm -rf conftest*
  3187.   eval "ac_cv_lib_$ac_lib_var=yes"
  3188. else
  3189.   echo "configure: failed program was:" >&5
  3190.   cat conftest.$ac_ext >&5
  3191.   rm -rf conftest*
  3192.   eval "ac_cv_lib_$ac_lib_var=no"
  3193. fi
  3194. rm -f conftest*
  3195. LIBS="$ac_save_LIBS"
  3196.  
  3197. fi
  3198. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3199.   echo "$ac_t""yes" 1>&6
  3200.   cat >> confdefs.h <<\EOF
  3201. #define WITH_THREAD 1
  3202. EOF
  3203.  
  3204.     cat >> confdefs.h <<\EOF
  3205. #define _POSIX_THREADS 1
  3206. EOF
  3207.  
  3208.     LIBS="-lpthread $LIBS"
  3209.     LIBOBJS="$LIBOBJS thread.o"
  3210. else
  3211.   echo "$ac_t""no" 1>&6
  3212.  
  3213.     echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
  3214. echo "configure:3215: checking for pthread_detach" >&5
  3215. if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
  3216.   echo $ac_n "(cached) $ac_c" 1>&6
  3217. else
  3218.   cat > conftest.$ac_ext <<EOF
  3219. #line 3220 "configure"
  3220. #include "confdefs.h"
  3221. /* System header to define __stub macros and hopefully few prototypes,
  3222.     which can conflict with char pthread_detach(); below.  */
  3223. #include <assert.h>
  3224. /* Override any gcc2 internal prototype to avoid an error.  */
  3225. /* We use char because int might match the return type of a gcc2
  3226.     builtin and then its argument prototype would still apply.  */
  3227. char pthread_detach();
  3228.  
  3229. int main() {
  3230.  
  3231. /* The GNU C library defines this for functions which it implements
  3232.     to always fail with ENOSYS.  Some functions are actually named
  3233.     something starting with __ and the normal name is an alias.  */
  3234. #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
  3235. choke me
  3236. #else
  3237. pthread_detach();
  3238. #endif
  3239.  
  3240. ; return 0; }
  3241. EOF
  3242. if { (eval echo configure:3243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3243.   rm -rf conftest*
  3244.   eval "ac_cv_func_pthread_detach=yes"
  3245. else
  3246.   echo "configure: failed program was:" >&5
  3247.   cat conftest.$ac_ext >&5
  3248.   rm -rf conftest*
  3249.   eval "ac_cv_func_pthread_detach=no"
  3250. fi
  3251. rm -f conftest*
  3252. fi
  3253.  
  3254. if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
  3255.   echo "$ac_t""yes" 1>&6
  3256.   cat >> confdefs.h <<\EOF
  3257. #define WITH_THREAD 1
  3258. EOF
  3259.  
  3260.     case $ac_sys_system in
  3261.       Darwin*) ;;
  3262.       *) cat >> confdefs.h <<\EOF
  3263. #define _POSIX_THREADS 1
  3264. EOF
  3265. ;;
  3266.     esac
  3267.     LIBOBJS="$LIBOBJS thread.o"
  3268. else
  3269.   echo "$ac_t""no" 1>&6
  3270.  
  3271.     ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
  3272. echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
  3273. echo "configure:3274: checking for kernel/OS.h" >&5
  3274. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  3275.   echo $ac_n "(cached) $ac_c" 1>&6
  3276. else
  3277.   cat > conftest.$ac_ext <<EOF
  3278. #line 3279 "configure"
  3279. #include "confdefs.h"
  3280. #include <kernel/OS.h>
  3281. EOF
  3282. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  3283. { (eval echo configure:3284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  3284. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  3285. if test -z "$ac_err"; then
  3286.   rm -rf conftest*
  3287.   eval "ac_cv_header_$ac_safe=yes"
  3288. else
  3289.   echo "$ac_err" >&5
  3290.   echo "configure: failed program was:" >&5
  3291.   cat conftest.$ac_ext >&5
  3292.   rm -rf conftest*
  3293.   eval "ac_cv_header_$ac_safe=no"
  3294. fi
  3295. rm -f conftest*
  3296. fi
  3297. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  3298.   echo "$ac_t""yes" 1>&6
  3299.   cat >> confdefs.h <<\EOF
  3300. #define WITH_THREAD 1
  3301. EOF
  3302.  
  3303.     cat >> confdefs.h <<\EOF
  3304. #define BEOS_THREADS 1
  3305. EOF
  3306.  
  3307.     LIBOBJS="$LIBOBJS thread.o"
  3308. else
  3309.   echo "$ac_t""no" 1>&6
  3310.  
  3311.     echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
  3312. echo "configure:3313: checking for pthread_create in -lpthreads" >&5
  3313. ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
  3314. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3315.   echo $ac_n "(cached) $ac_c" 1>&6
  3316. else
  3317.   ac_save_LIBS="$LIBS"
  3318. LIBS="-lpthreads  $LIBS"
  3319. cat > conftest.$ac_ext <<EOF
  3320. #line 3321 "configure"
  3321. #include "confdefs.h"
  3322. /* Override any gcc2 internal prototype to avoid an error.  */
  3323. /* We use char because int might match the return type of a gcc2
  3324.     builtin and then its argument prototype would still apply.  */
  3325. char pthread_create();
  3326.  
  3327. int main() {
  3328. pthread_create()
  3329. ; return 0; }
  3330. EOF
  3331. if { (eval echo configure:3332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3332.   rm -rf conftest*
  3333.   eval "ac_cv_lib_$ac_lib_var=yes"
  3334. else
  3335.   echo "configure: failed program was:" >&5
  3336.   cat conftest.$ac_ext >&5
  3337.   rm -rf conftest*
  3338.   eval "ac_cv_lib_$ac_lib_var=no"
  3339. fi
  3340. rm -f conftest*
  3341. LIBS="$ac_save_LIBS"
  3342.  
  3343. fi
  3344. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3345.   echo "$ac_t""yes" 1>&6
  3346.   cat >> confdefs.h <<\EOF
  3347. #define WITH_THREAD 1
  3348. EOF
  3349.  
  3350.     cat >> confdefs.h <<\EOF
  3351. #define _POSIX_THREADS 1
  3352. EOF
  3353.  
  3354.     LIBS="$LIBS -lpthreads"
  3355.     LIBOBJS="$LIBOBJS thread.o"
  3356. else
  3357.   echo "$ac_t""no" 1>&6
  3358.  
  3359.     echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
  3360. echo "configure:3361: checking for pthread_create in -lc_r" >&5
  3361. ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
  3362. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3363.   echo $ac_n "(cached) $ac_c" 1>&6
  3364. else
  3365.   ac_save_LIBS="$LIBS"
  3366. LIBS="-lc_r  $LIBS"
  3367. cat > conftest.$ac_ext <<EOF
  3368. #line 3369 "configure"
  3369. #include "confdefs.h"
  3370. /* Override any gcc2 internal prototype to avoid an error.  */
  3371. /* We use char because int might match the return type of a gcc2
  3372.     builtin and then its argument prototype would still apply.  */
  3373. char pthread_create();
  3374.  
  3375. int main() {
  3376. pthread_create()
  3377. ; return 0; }
  3378. EOF
  3379. if { (eval echo configure:3380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3380.   rm -rf conftest*
  3381.   eval "ac_cv_lib_$ac_lib_var=yes"
  3382. else
  3383.   echo "configure: failed program was:" >&5
  3384.   cat conftest.$ac_ext >&5
  3385.   rm -rf conftest*
  3386.   eval "ac_cv_lib_$ac_lib_var=no"
  3387. fi
  3388. rm -f conftest*
  3389. LIBS="$ac_save_LIBS"
  3390.  
  3391. fi
  3392. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3393.   echo "$ac_t""yes" 1>&6
  3394.   cat >> confdefs.h <<\EOF
  3395. #define WITH_THREAD 1
  3396. EOF
  3397.  
  3398.     cat >> confdefs.h <<\EOF
  3399. #define _POSIX_THREADS 1
  3400. EOF
  3401.  
  3402.     LIBS="$LIBS -lc_r"
  3403.     LIBOBJS="$LIBOBJS thread.o"
  3404. else
  3405.   echo "$ac_t""no" 1>&6
  3406.  
  3407.     echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
  3408. echo "configure:3409: checking for __d6_pthread_create in -lthread" >&5
  3409. ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
  3410. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3411.   echo $ac_n "(cached) $ac_c" 1>&6
  3412. else
  3413.   ac_save_LIBS="$LIBS"
  3414. LIBS="-lthread  $LIBS"
  3415. cat > conftest.$ac_ext <<EOF
  3416. #line 3417 "configure"
  3417. #include "confdefs.h"
  3418. /* Override any gcc2 internal prototype to avoid an error.  */
  3419. /* We use char because int might match the return type of a gcc2
  3420.     builtin and then its argument prototype would still apply.  */
  3421. char __d6_pthread_create();
  3422.  
  3423. int main() {
  3424. __d6_pthread_create()
  3425. ; return 0; }
  3426. EOF
  3427. if { (eval echo configure:3428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3428.   rm -rf conftest*
  3429.   eval "ac_cv_lib_$ac_lib_var=yes"
  3430. else
  3431.   echo "configure: failed program was:" >&5
  3432.   cat conftest.$ac_ext >&5
  3433.   rm -rf conftest*
  3434.   eval "ac_cv_lib_$ac_lib_var=no"
  3435. fi
  3436. rm -f conftest*
  3437. LIBS="$ac_save_LIBS"
  3438.  
  3439. fi
  3440. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3441.   echo "$ac_t""yes" 1>&6
  3442.   cat >> confdefs.h <<\EOF
  3443. #define WITH_THREAD 1
  3444. EOF
  3445.  
  3446.     cat >> confdefs.h <<\EOF
  3447. #define _POSIX_THREADS 1
  3448. EOF
  3449.  
  3450.     LIBS="$LIBS -lthread"
  3451.     LIBOBJS="$LIBOBJS thread.o"
  3452. else
  3453.   echo "$ac_t""no" 1>&6
  3454.  
  3455.     echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
  3456. echo "configure:3457: checking for pthread_create in -lcma" >&5
  3457. ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
  3458. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3459.   echo $ac_n "(cached) $ac_c" 1>&6
  3460. else
  3461.   ac_save_LIBS="$LIBS"
  3462. LIBS="-lcma  $LIBS"
  3463. cat > conftest.$ac_ext <<EOF
  3464. #line 3465 "configure"
  3465. #include "confdefs.h"
  3466. /* Override any gcc2 internal prototype to avoid an error.  */
  3467. /* We use char because int might match the return type of a gcc2
  3468.     builtin and then its argument prototype would still apply.  */
  3469. char pthread_create();
  3470.  
  3471. int main() {
  3472. pthread_create()
  3473. ; return 0; }
  3474. EOF
  3475. if { (eval echo configure:3476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3476.   rm -rf conftest*
  3477.   eval "ac_cv_lib_$ac_lib_var=yes"
  3478. else
  3479.   echo "configure: failed program was:" >&5
  3480.   cat conftest.$ac_ext >&5
  3481.   rm -rf conftest*
  3482.   eval "ac_cv_lib_$ac_lib_var=no"
  3483. fi
  3484. rm -f conftest*
  3485. LIBS="$ac_save_LIBS"
  3486.  
  3487. fi
  3488. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3489.   echo "$ac_t""yes" 1>&6
  3490.   cat >> confdefs.h <<\EOF
  3491. #define WITH_THREAD 1
  3492. EOF
  3493.  
  3494.     cat >> confdefs.h <<\EOF
  3495. #define _POSIX_THREADS 1
  3496. EOF
  3497.  
  3498.     LIBS="$LIBS -lcma"
  3499.     LIBOBJS="$LIBOBJS thread.o"
  3500. else
  3501.   echo "$ac_t""no" 1>&6
  3502.  
  3503.     USE_THREAD_MODULE="#"
  3504. fi
  3505.  
  3506.     
  3507. fi
  3508.  
  3509. fi
  3510.  
  3511. fi
  3512.  
  3513. fi
  3514.  
  3515. fi
  3516.  
  3517. fi
  3518.  
  3519. fi
  3520.  
  3521. fi
  3522.  
  3523.  
  3524.     echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
  3525. echo "configure:3526: checking for usconfig in -lmpc" >&5
  3526. ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
  3527. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3528.   echo $ac_n "(cached) $ac_c" 1>&6
  3529. else
  3530.   ac_save_LIBS="$LIBS"
  3531. LIBS="-lmpc  $LIBS"
  3532. cat > conftest.$ac_ext <<EOF
  3533. #line 3534 "configure"
  3534. #include "confdefs.h"
  3535. /* Override any gcc2 internal prototype to avoid an error.  */
  3536. /* We use char because int might match the return type of a gcc2
  3537.     builtin and then its argument prototype would still apply.  */
  3538. char usconfig();
  3539.  
  3540. int main() {
  3541. usconfig()
  3542. ; return 0; }
  3543. EOF
  3544. if { (eval echo configure:3545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3545.   rm -rf conftest*
  3546.   eval "ac_cv_lib_$ac_lib_var=yes"
  3547. else
  3548.   echo "configure: failed program was:" >&5
  3549.   cat conftest.$ac_ext >&5
  3550.   rm -rf conftest*
  3551.   eval "ac_cv_lib_$ac_lib_var=no"
  3552. fi
  3553. rm -f conftest*
  3554. LIBS="$ac_save_LIBS"
  3555.  
  3556. fi
  3557. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3558.   echo "$ac_t""yes" 1>&6
  3559.   cat >> confdefs.h <<\EOF
  3560. #define WITH_THREAD 1
  3561. EOF
  3562.  
  3563.     LIBS="$LIBS -lmpc"
  3564.     LIBOBJS="$LIBOBJS thread.o"
  3565.     USE_THREAD_MODULE=""
  3566. else
  3567.   echo "$ac_t""no" 1>&6
  3568. fi
  3569.  
  3570.     echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
  3571. echo "configure:3572: checking for thr_create in -lthread" >&5
  3572. ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
  3573. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3574.   echo $ac_n "(cached) $ac_c" 1>&6
  3575. else
  3576.   ac_save_LIBS="$LIBS"
  3577. LIBS="-lthread  $LIBS"
  3578. cat > conftest.$ac_ext <<EOF
  3579. #line 3580 "configure"
  3580. #include "confdefs.h"
  3581. /* Override any gcc2 internal prototype to avoid an error.  */
  3582. /* We use char because int might match the return type of a gcc2
  3583.     builtin and then its argument prototype would still apply.  */
  3584. char thr_create();
  3585.  
  3586. int main() {
  3587. thr_create()
  3588. ; return 0; }
  3589. EOF
  3590. if { (eval echo configure:3591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3591.   rm -rf conftest*
  3592.   eval "ac_cv_lib_$ac_lib_var=yes"
  3593. else
  3594.   echo "configure: failed program was:" >&5
  3595.   cat conftest.$ac_ext >&5
  3596.   rm -rf conftest*
  3597.   eval "ac_cv_lib_$ac_lib_var=no"
  3598. fi
  3599. rm -f conftest*
  3600. LIBS="$ac_save_LIBS"
  3601.  
  3602. fi
  3603. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3604.   echo "$ac_t""yes" 1>&6
  3605.   cat >> confdefs.h <<\EOF
  3606. #define WITH_THREAD 1
  3607. EOF
  3608.  
  3609.     LIBS="$LIBS -lthread"
  3610.     LIBOBJS="$LIBOBJS thread.o"
  3611.     USE_THREAD_MODULE=""
  3612. else
  3613.   echo "$ac_t""no" 1>&6
  3614. fi
  3615.  
  3616.  
  3617.     if test "$USE_THREAD_MODULE" != "#"
  3618.     then
  3619.         # If the above checks didn't disable threads, (at least) OSF1
  3620.         # needs this '-threads' argument during linking.
  3621.         case $ac_sys_system in
  3622.         OSF1) LDLAST=-threads;;
  3623.         esac
  3624.     fi
  3625. fi
  3626.  
  3627. # Check for GC support
  3628.  
  3629. USE_GC_MODULE=""
  3630. echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
  3631. echo "configure:3632: checking for --with-cycle-gc" >&5
  3632. # Check whether --with-cycle-gc or --without-cycle-gc was given.
  3633. if test "${with_cycle_gc+set}" = set; then
  3634.   withval="$with_cycle_gc"
  3635.   :
  3636. fi
  3637.  
  3638.  
  3639. if test -z "$with_cycle_gc"
  3640. then with_cycle_gc="yes"
  3641. fi
  3642. if test "$with_cycle_gc" = "no"
  3643. then
  3644.     USE_GC_MODULE="#"
  3645. else
  3646.     cat >> confdefs.h <<\EOF
  3647. #define WITH_CYCLE_GC 1
  3648. EOF
  3649.  
  3650. fi
  3651. echo "$ac_t""$with_cycle_gc" 1>&6
  3652.  
  3653. # Check for LIBDB support
  3654. # either --with-libdb or, in its absence, the presence of db.h
  3655.  
  3656. USE_BSDDB_MODULE=""
  3657. echo $ac_n "checking for --with-libdb""... $ac_c" 1>&6
  3658. echo "configure:3659: checking for --with-libdb" >&5
  3659. # Check whether --with-libdb or --without-libdb was given.
  3660. if test "${with_libdb+set}" = set; then
  3661.   withval="$with_libdb"
  3662.   :
  3663. fi
  3664.  
  3665.  
  3666. # enabled by default, but db.h must be found
  3667. if test "$ac_cv_header_db_h" = "yes"
  3668. then
  3669.     if test "$with_libdb" != "no"
  3670.     then with_libdb="yes"
  3671.     fi
  3672. else
  3673.     # make sure user knows why bsddb support wasn't enabled even
  3674.     # though s/he requested it
  3675.     if test "$with_libdb" = "yes"
  3676.     then echo $ac_n "(requested, but db.h was not found) $ac_c"
  3677.     fi
  3678.     with_libdb="no"
  3679. fi
  3680.  
  3681. if test "$with_libdb" = "no"
  3682. then
  3683.     USE_BSDDB_MODULE="#"
  3684. else
  3685.     cat >> confdefs.h <<\EOF
  3686. #define WITH_LIBDB 1
  3687. EOF
  3688.  
  3689. fi
  3690. echo "$ac_t""$with_libdb" 1>&6
  3691.  
  3692. if test "$with_libdb" = "yes"
  3693. then
  3694.     # check for libdb; BSD systems have the DB routines in libc  --tg
  3695.     
  3696.     # If dbopen is not in libc, then checking whether it is in libdb
  3697.     # is difficult: db_185.h may #define it as __db185_open
  3698.     # Instead, we just trust it is in libdb; linking will fail if it
  3699.     # is not.
  3700.     echo $ac_n "checking for dbopen""... $ac_c" 1>&6
  3701. echo "configure:3702: checking for dbopen" >&5
  3702. if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
  3703.   echo $ac_n "(cached) $ac_c" 1>&6
  3704. else
  3705.   cat > conftest.$ac_ext <<EOF
  3706. #line 3707 "configure"
  3707. #include "confdefs.h"
  3708. /* System header to define __stub macros and hopefully few prototypes,
  3709.     which can conflict with char dbopen(); below.  */
  3710. #include <assert.h>
  3711. /* Override any gcc2 internal prototype to avoid an error.  */
  3712. /* We use char because int might match the return type of a gcc2
  3713.     builtin and then its argument prototype would still apply.  */
  3714. char dbopen();
  3715.  
  3716. int main() {
  3717.  
  3718. /* The GNU C library defines this for functions which it implements
  3719.     to always fail with ENOSYS.  Some functions are actually named
  3720.     something starting with __ and the normal name is an alias.  */
  3721. #if defined (__stub_dbopen) || defined (__stub___dbopen)
  3722. choke me
  3723. #else
  3724. dbopen();
  3725. #endif
  3726.  
  3727. ; return 0; }
  3728. EOF
  3729. if { (eval echo configure:3730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3730.   rm -rf conftest*
  3731.   eval "ac_cv_func_dbopen=yes"
  3732. else
  3733.   echo "configure: failed program was:" >&5
  3734.   cat conftest.$ac_ext >&5
  3735.   rm -rf conftest*
  3736.   eval "ac_cv_func_dbopen=no"
  3737. fi
  3738. rm -f conftest*
  3739. fi
  3740.  
  3741. if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
  3742.   echo "$ac_t""yes" 1>&6
  3743.   HAVE_LIBDB=
  3744. else
  3745.   echo "$ac_t""no" 1>&6
  3746. HAVE_LIBDB=-ldb
  3747. fi
  3748.  
  3749. fi
  3750.  
  3751. # Check for --with-wctype-functions
  3752. echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
  3753. echo "configure:3754: checking for --with-wctype-functions" >&5
  3754. # Check whether --with-wctype-functions or --without-wctype-functions was given.
  3755. if test "${with_wctype_functions+set}" = set; then
  3756.   withval="$with_wctype_functions"
  3757.   
  3758. if test "$withval" != no
  3759. then cat >> confdefs.h <<\EOF
  3760. #define WANT_WCTYPE_FUNCTIONS 1
  3761. EOF
  3762.  echo "$ac_t""yes" 1>&6
  3763. else echo "$ac_t""no" 1>&6
  3764. fi
  3765. else
  3766.   echo "$ac_t""no" 1>&6
  3767. fi
  3768.  
  3769.  
  3770. # -I${DLINCLDIR} is added to the compile rule for importdl.o
  3771.  
  3772. DLINCLDIR=/
  3773.  
  3774. echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
  3775. echo "configure:3776: checking for --with-sgi-dl" >&5
  3776. # Check whether --with-sgi-dl or --without-sgi-dl was given.
  3777. if test "${with_sgi_dl+set}" = set; then
  3778.   withval="$with_sgi_dl"
  3779.   
  3780. echo "$ac_t""$withval" 1>&6
  3781. cat >> confdefs.h <<\EOF
  3782. #define WITH_SGI_DL 1
  3783. EOF
  3784.  
  3785. DYNLOADFILE="dynload_dl.o"
  3786. dldir=$withval
  3787. if test ! -z "$dldir" -a -d "$dldir"
  3788. then LDFLAGS="$LDFLAGS -L$dldir"
  3789. else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
  3790. fi
  3791. DLINCLDIR=${dldir}
  3792. LIBS="$LIBS -ldl -lmld"
  3793. else
  3794.   echo "$ac_t""no" 1>&6
  3795. fi
  3796.  
  3797.  
  3798. echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
  3799. echo "configure:3800: checking for --with-dl-dld" >&5
  3800. # Check whether --with-dl-dld or --without-dl-dld was given.
  3801. if test "${with_dl_dld+set}" = set; then
  3802.   withval="$with_dl_dld"
  3803.   
  3804. echo "$ac_t""$withval" 1>&6
  3805. cat >> confdefs.h <<\EOF
  3806. #define WITH_DL_DLD 1
  3807. EOF
  3808.  
  3809. DYNLOADFILE="dynload_dl.o"
  3810. dldir=`echo "$withval" | sed 's/,.*//'`
  3811. dlddir=`echo "$withval" | sed 's/.*,//'`
  3812. if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
  3813. then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
  3814. else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
  3815. fi
  3816. DLINCLDIR=${dldir}
  3817. LIBS="$LIBS -ldl -ldld"
  3818. else
  3819.   echo "$ac_t""no" 1>&6
  3820. fi
  3821.  
  3822.  
  3823. # the dlopen() function means we might want to use dynload_shlib.o. some
  3824. # platforms, such as AIX, have dlopen(), but don't want to use it.
  3825. for ac_func in dlopen
  3826. do
  3827. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3828. echo "configure:3829: checking for $ac_func" >&5
  3829. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3830.   echo $ac_n "(cached) $ac_c" 1>&6
  3831. else
  3832.   cat > conftest.$ac_ext <<EOF
  3833. #line 3834 "configure"
  3834. #include "confdefs.h"
  3835. /* System header to define __stub macros and hopefully few prototypes,
  3836.     which can conflict with char $ac_func(); below.  */
  3837. #include <assert.h>
  3838. /* Override any gcc2 internal prototype to avoid an error.  */
  3839. /* We use char because int might match the return type of a gcc2
  3840.     builtin and then its argument prototype would still apply.  */
  3841. char $ac_func();
  3842.  
  3843. int main() {
  3844.  
  3845. /* The GNU C library defines this for functions which it implements
  3846.     to always fail with ENOSYS.  Some functions are actually named
  3847.     something starting with __ and the normal name is an alias.  */
  3848. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3849. choke me
  3850. #else
  3851. $ac_func();
  3852. #endif
  3853.  
  3854. ; return 0; }
  3855. EOF
  3856. if { (eval echo configure:3857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3857.   rm -rf conftest*
  3858.   eval "ac_cv_func_$ac_func=yes"
  3859. else
  3860.   echo "configure: failed program was:" >&5
  3861.   cat conftest.$ac_ext >&5
  3862.   rm -rf conftest*
  3863.   eval "ac_cv_func_$ac_func=no"
  3864. fi
  3865. rm -f conftest*
  3866. fi
  3867.  
  3868. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3869.   echo "$ac_t""yes" 1>&6
  3870.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3871.   cat >> confdefs.h <<EOF
  3872. #define $ac_tr_func 1
  3873. EOF
  3874.  
  3875. else
  3876.   echo "$ac_t""no" 1>&6
  3877. fi
  3878. done
  3879.  
  3880.  
  3881. # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
  3882. # loading of modules.
  3883.  
  3884. echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
  3885. echo "configure:3886: checking DYNLOADFILE" >&5
  3886. if test -z "$DYNLOADFILE"
  3887. then
  3888.     case $ac_sys_system/$ac_sys_release in
  3889.     AIX*) DYNLOADFILE="dynload_aix.o";;
  3890.     BeOS*) DYNLOADFILE="dynload_beos.o";;
  3891.     hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
  3892.     Darwin/*|next/*) DYNLOADFILE="dynload_next.o";;
  3893.     *)
  3894.     # use dynload_shlib.c and dlopen() if we have it; otherwise stub
  3895.     # out any dynamic loading
  3896.     if test "$ac_cv_func_dlopen" = yes
  3897.     then DYNLOADFILE="dynload_shlib.o"
  3898.     else DYNLOADFILE="dynload_stub.o"
  3899.     fi
  3900.     ;;
  3901.     esac
  3902. fi
  3903. echo "$ac_t""$DYNLOADFILE" 1>&6
  3904. if test "$DYNLOADFILE" != "dynload_stub.o"
  3905. then
  3906.     cat >> confdefs.h <<\EOF
  3907. #define HAVE_DYNAMIC_LOADING 1
  3908. EOF
  3909.  
  3910. fi
  3911.  
  3912. # checks for library functions
  3913. for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
  3914.  flock fork fsync fdatasync fpathconf ftime ftruncate \
  3915.  getgroups getlogin getpeername getpid getpwent getwd \
  3916.  kill link lstat mkfifo mktime mremap \
  3917.  nice pathconf pause plock poll pthread_init \
  3918.  putenv readlink \
  3919.  select setegid seteuid setgid \
  3920.  setlocale setregid setreuid setsid setpgid setuid setvbuf \
  3921.  sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
  3922.  tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
  3923.  truncate uname waitpid _getpty
  3924. do
  3925. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3926. echo "configure:3927: checking for $ac_func" >&5
  3927. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3928.   echo $ac_n "(cached) $ac_c" 1>&6
  3929. else
  3930.   cat > conftest.$ac_ext <<EOF
  3931. #line 3932 "configure"
  3932. #include "confdefs.h"
  3933. /* System header to define __stub macros and hopefully few prototypes,
  3934.     which can conflict with char $ac_func(); below.  */
  3935. #include <assert.h>
  3936. /* Override any gcc2 internal prototype to avoid an error.  */
  3937. /* We use char because int might match the return type of a gcc2
  3938.     builtin and then its argument prototype would still apply.  */
  3939. char $ac_func();
  3940.  
  3941. int main() {
  3942.  
  3943. /* The GNU C library defines this for functions which it implements
  3944.     to always fail with ENOSYS.  Some functions are actually named
  3945.     something starting with __ and the normal name is an alias.  */
  3946. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  3947. choke me
  3948. #else
  3949. $ac_func();
  3950. #endif
  3951.  
  3952. ; return 0; }
  3953. EOF
  3954. if { (eval echo configure:3955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3955.   rm -rf conftest*
  3956.   eval "ac_cv_func_$ac_func=yes"
  3957. else
  3958.   echo "configure: failed program was:" >&5
  3959.   cat conftest.$ac_ext >&5
  3960.   rm -rf conftest*
  3961.   eval "ac_cv_func_$ac_func=no"
  3962. fi
  3963. rm -f conftest*
  3964. fi
  3965.  
  3966. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  3967.   echo "$ac_t""yes" 1>&6
  3968.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  3969.   cat >> confdefs.h <<EOF
  3970. #define $ac_tr_func 1
  3971. EOF
  3972.  
  3973. else
  3974.   echo "$ac_t""no" 1>&6
  3975. fi
  3976. done
  3977.  
  3978.  
  3979. # check for openpty and forkpty
  3980.  
  3981. for ac_func in openpty
  3982. do
  3983. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  3984. echo "configure:3985: checking for $ac_func" >&5
  3985. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  3986.   echo $ac_n "(cached) $ac_c" 1>&6
  3987. else
  3988.   cat > conftest.$ac_ext <<EOF
  3989. #line 3990 "configure"
  3990. #include "confdefs.h"
  3991. /* System header to define __stub macros and hopefully few prototypes,
  3992.     which can conflict with char $ac_func(); below.  */
  3993. #include <assert.h>
  3994. /* Override any gcc2 internal prototype to avoid an error.  */
  3995. /* We use char because int might match the return type of a gcc2
  3996.     builtin and then its argument prototype would still apply.  */
  3997. char $ac_func();
  3998.  
  3999. int main() {
  4000.  
  4001. /* The GNU C library defines this for functions which it implements
  4002.     to always fail with ENOSYS.  Some functions are actually named
  4003.     something starting with __ and the normal name is an alias.  */
  4004. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4005. choke me
  4006. #else
  4007. $ac_func();
  4008. #endif
  4009.  
  4010. ; return 0; }
  4011. EOF
  4012. if { (eval echo configure:4013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4013.   rm -rf conftest*
  4014.   eval "ac_cv_func_$ac_func=yes"
  4015. else
  4016.   echo "configure: failed program was:" >&5
  4017.   cat conftest.$ac_ext >&5
  4018.   rm -rf conftest*
  4019.   eval "ac_cv_func_$ac_func=no"
  4020. fi
  4021. rm -f conftest*
  4022. fi
  4023.  
  4024. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4025.   echo "$ac_t""yes" 1>&6
  4026.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4027.   cat >> confdefs.h <<EOF
  4028. #define $ac_tr_func 1
  4029. EOF
  4030.  
  4031. else
  4032.   echo "$ac_t""no" 1>&6
  4033. echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
  4034. echo "configure:4035: checking for openpty in -lutil" >&5
  4035. ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
  4036. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4037.   echo $ac_n "(cached) $ac_c" 1>&6
  4038. else
  4039.   ac_save_LIBS="$LIBS"
  4040. LIBS="-lutil  $LIBS"
  4041. cat > conftest.$ac_ext <<EOF
  4042. #line 4043 "configure"
  4043. #include "confdefs.h"
  4044. /* Override any gcc2 internal prototype to avoid an error.  */
  4045. /* We use char because int might match the return type of a gcc2
  4046.     builtin and then its argument prototype would still apply.  */
  4047. char openpty();
  4048.  
  4049. int main() {
  4050. openpty()
  4051. ; return 0; }
  4052. EOF
  4053. if { (eval echo configure:4054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4054.   rm -rf conftest*
  4055.   eval "ac_cv_lib_$ac_lib_var=yes"
  4056. else
  4057.   echo "configure: failed program was:" >&5
  4058.   cat conftest.$ac_ext >&5
  4059.   rm -rf conftest*
  4060.   eval "ac_cv_lib_$ac_lib_var=no"
  4061. fi
  4062. rm -f conftest*
  4063. LIBS="$ac_save_LIBS"
  4064.  
  4065. fi
  4066. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4067.   echo "$ac_t""yes" 1>&6
  4068.   cat >> confdefs.h <<\EOF
  4069. #define HAVE_OPENPTY 1
  4070. EOF
  4071.  LIBS="$LIBS -lutil"
  4072. else
  4073.   echo "$ac_t""no" 1>&6
  4074. fi
  4075.  
  4076. fi
  4077. done
  4078.  
  4079. for ac_func in forkpty
  4080. do
  4081. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4082. echo "configure:4083: checking for $ac_func" >&5
  4083. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  4084.   echo $ac_n "(cached) $ac_c" 1>&6
  4085. else
  4086.   cat > conftest.$ac_ext <<EOF
  4087. #line 4088 "configure"
  4088. #include "confdefs.h"
  4089. /* System header to define __stub macros and hopefully few prototypes,
  4090.     which can conflict with char $ac_func(); below.  */
  4091. #include <assert.h>
  4092. /* Override any gcc2 internal prototype to avoid an error.  */
  4093. /* We use char because int might match the return type of a gcc2
  4094.     builtin and then its argument prototype would still apply.  */
  4095. char $ac_func();
  4096.  
  4097. int main() {
  4098.  
  4099. /* The GNU C library defines this for functions which it implements
  4100.     to always fail with ENOSYS.  Some functions are actually named
  4101.     something starting with __ and the normal name is an alias.  */
  4102. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4103. choke me
  4104. #else
  4105. $ac_func();
  4106. #endif
  4107.  
  4108. ; return 0; }
  4109. EOF
  4110. if { (eval echo configure:4111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4111.   rm -rf conftest*
  4112.   eval "ac_cv_func_$ac_func=yes"
  4113. else
  4114.   echo "configure: failed program was:" >&5
  4115.   cat conftest.$ac_ext >&5
  4116.   rm -rf conftest*
  4117.   eval "ac_cv_func_$ac_func=no"
  4118. fi
  4119. rm -f conftest*
  4120. fi
  4121.  
  4122. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4123.   echo "$ac_t""yes" 1>&6
  4124.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4125.   cat >> confdefs.h <<EOF
  4126. #define $ac_tr_func 1
  4127. EOF
  4128.  
  4129. else
  4130.   echo "$ac_t""no" 1>&6
  4131. echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
  4132. echo "configure:4133: checking for forkpty in -lutil" >&5
  4133. ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
  4134. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  4135.   echo $ac_n "(cached) $ac_c" 1>&6
  4136. else
  4137.   ac_save_LIBS="$LIBS"
  4138. LIBS="-lutil  $LIBS"
  4139. cat > conftest.$ac_ext <<EOF
  4140. #line 4141 "configure"
  4141. #include "confdefs.h"
  4142. /* Override any gcc2 internal prototype to avoid an error.  */
  4143. /* We use char because int might match the return type of a gcc2
  4144.     builtin and then its argument prototype would still apply.  */
  4145. char forkpty();
  4146.  
  4147. int main() {
  4148. forkpty()
  4149. ; return 0; }
  4150. EOF
  4151. if { (eval echo configure:4152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4152.   rm -rf conftest*
  4153.   eval "ac_cv_lib_$ac_lib_var=yes"
  4154. else
  4155.   echo "configure: failed program was:" >&5
  4156.   cat conftest.$ac_ext >&5
  4157.   rm -rf conftest*
  4158.   eval "ac_cv_lib_$ac_lib_var=no"
  4159. fi
  4160. rm -f conftest*
  4161. LIBS="$ac_save_LIBS"
  4162.  
  4163. fi
  4164. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  4165.   echo "$ac_t""yes" 1>&6
  4166.   cat >> confdefs.h <<\EOF
  4167. #define HAVE_FORKPTY 1
  4168. EOF
  4169.  LIBS="$LIBS -lutil"
  4170. else
  4171.   echo "$ac_t""no" 1>&6
  4172. fi
  4173.  
  4174. fi
  4175. done
  4176.  
  4177.  
  4178. # check for long file support functions
  4179. for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
  4180. do
  4181. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4182. echo "configure:4183: checking for $ac_func" >&5
  4183. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  4184.   echo $ac_n "(cached) $ac_c" 1>&6
  4185. else
  4186.   cat > conftest.$ac_ext <<EOF
  4187. #line 4188 "configure"
  4188. #include "confdefs.h"
  4189. /* System header to define __stub macros and hopefully few prototypes,
  4190.     which can conflict with char $ac_func(); below.  */
  4191. #include <assert.h>
  4192. /* Override any gcc2 internal prototype to avoid an error.  */
  4193. /* We use char because int might match the return type of a gcc2
  4194.     builtin and then its argument prototype would still apply.  */
  4195. char $ac_func();
  4196.  
  4197. int main() {
  4198.  
  4199. /* The GNU C library defines this for functions which it implements
  4200.     to always fail with ENOSYS.  Some functions are actually named
  4201.     something starting with __ and the normal name is an alias.  */
  4202. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4203. choke me
  4204. #else
  4205. $ac_func();
  4206. #endif
  4207.  
  4208. ; return 0; }
  4209. EOF
  4210. if { (eval echo configure:4211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4211.   rm -rf conftest*
  4212.   eval "ac_cv_func_$ac_func=yes"
  4213. else
  4214.   echo "configure: failed program was:" >&5
  4215.   cat conftest.$ac_ext >&5
  4216.   rm -rf conftest*
  4217.   eval "ac_cv_func_$ac_func=no"
  4218. fi
  4219. rm -f conftest*
  4220. fi
  4221.  
  4222. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4223.   echo "$ac_t""yes" 1>&6
  4224.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4225.   cat >> confdefs.h <<EOF
  4226. #define $ac_tr_func 1
  4227. EOF
  4228.  
  4229. else
  4230.   echo "$ac_t""no" 1>&6
  4231. fi
  4232. done
  4233.  
  4234.  
  4235. for ac_func in dup2 getcwd strdup strerror memmove
  4236. do
  4237. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4238. echo "configure:4239: checking for $ac_func" >&5
  4239. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  4240.   echo $ac_n "(cached) $ac_c" 1>&6
  4241. else
  4242.   cat > conftest.$ac_ext <<EOF
  4243. #line 4244 "configure"
  4244. #include "confdefs.h"
  4245. /* System header to define __stub macros and hopefully few prototypes,
  4246.     which can conflict with char $ac_func(); below.  */
  4247. #include <assert.h>
  4248. /* Override any gcc2 internal prototype to avoid an error.  */
  4249. /* We use char because int might match the return type of a gcc2
  4250.     builtin and then its argument prototype would still apply.  */
  4251. char $ac_func();
  4252.  
  4253. int main() {
  4254.  
  4255. /* The GNU C library defines this for functions which it implements
  4256.     to always fail with ENOSYS.  Some functions are actually named
  4257.     something starting with __ and the normal name is an alias.  */
  4258. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4259. choke me
  4260. #else
  4261. $ac_func();
  4262. #endif
  4263.  
  4264. ; return 0; }
  4265. EOF
  4266. if { (eval echo configure:4267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4267.   rm -rf conftest*
  4268.   eval "ac_cv_func_$ac_func=yes"
  4269. else
  4270.   echo "configure: failed program was:" >&5
  4271.   cat conftest.$ac_ext >&5
  4272.   rm -rf conftest*
  4273.   eval "ac_cv_func_$ac_func=no"
  4274. fi
  4275. rm -f conftest*
  4276. fi
  4277.  
  4278. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4279.   echo "$ac_t""yes" 1>&6
  4280.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4281.   cat >> confdefs.h <<EOF
  4282. #define $ac_tr_func 1
  4283. EOF
  4284.  
  4285. else
  4286.   echo "$ac_t""no" 1>&6
  4287. LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
  4288. fi
  4289. done
  4290.  
  4291.  
  4292. for ac_func in getpgrp
  4293. do
  4294. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4295. echo "configure:4296: checking for $ac_func" >&5
  4296. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  4297.   echo $ac_n "(cached) $ac_c" 1>&6
  4298. else
  4299.   cat > conftest.$ac_ext <<EOF
  4300. #line 4301 "configure"
  4301. #include "confdefs.h"
  4302. /* System header to define __stub macros and hopefully few prototypes,
  4303.     which can conflict with char $ac_func(); below.  */
  4304. #include <assert.h>
  4305. /* Override any gcc2 internal prototype to avoid an error.  */
  4306. /* We use char because int might match the return type of a gcc2
  4307.     builtin and then its argument prototype would still apply.  */
  4308. char $ac_func();
  4309.  
  4310. int main() {
  4311.  
  4312. /* The GNU C library defines this for functions which it implements
  4313.     to always fail with ENOSYS.  Some functions are actually named
  4314.     something starting with __ and the normal name is an alias.  */
  4315. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4316. choke me
  4317. #else
  4318. $ac_func();
  4319. #endif
  4320.  
  4321. ; return 0; }
  4322. EOF
  4323. if { (eval echo configure:4324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4324.   rm -rf conftest*
  4325.   eval "ac_cv_func_$ac_func=yes"
  4326. else
  4327.   echo "configure: failed program was:" >&5
  4328.   cat conftest.$ac_ext >&5
  4329.   rm -rf conftest*
  4330.   eval "ac_cv_func_$ac_func=no"
  4331. fi
  4332. rm -f conftest*
  4333. fi
  4334.  
  4335. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4336.   echo "$ac_t""yes" 1>&6
  4337.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4338.   cat >> confdefs.h <<EOF
  4339. #define $ac_tr_func 1
  4340. EOF
  4341.  cat > conftest.$ac_ext <<EOF
  4342. #line 4343 "configure"
  4343. #include "confdefs.h"
  4344. #include <unistd.h>
  4345. int main() {
  4346. getpgrp(0);
  4347. ; return 0; }
  4348. EOF
  4349. if { (eval echo configure:4350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4350.   rm -rf conftest*
  4351.   cat >> confdefs.h <<\EOF
  4352. #define GETPGRP_HAVE_ARG 1
  4353. EOF
  4354.  
  4355. else
  4356.   echo "configure: failed program was:" >&5
  4357.   cat conftest.$ac_ext >&5
  4358. fi
  4359. rm -f conftest*
  4360. else
  4361.   echo "$ac_t""no" 1>&6
  4362. fi
  4363. done
  4364.  
  4365. for ac_func in setpgrp
  4366. do
  4367. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4368. echo "configure:4369: checking for $ac_func" >&5
  4369. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  4370.   echo $ac_n "(cached) $ac_c" 1>&6
  4371. else
  4372.   cat > conftest.$ac_ext <<EOF
  4373. #line 4374 "configure"
  4374. #include "confdefs.h"
  4375. /* System header to define __stub macros and hopefully few prototypes,
  4376.     which can conflict with char $ac_func(); below.  */
  4377. #include <assert.h>
  4378. /* Override any gcc2 internal prototype to avoid an error.  */
  4379. /* We use char because int might match the return type of a gcc2
  4380.     builtin and then its argument prototype would still apply.  */
  4381. char $ac_func();
  4382.  
  4383. int main() {
  4384.  
  4385. /* The GNU C library defines this for functions which it implements
  4386.     to always fail with ENOSYS.  Some functions are actually named
  4387.     something starting with __ and the normal name is an alias.  */
  4388. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4389. choke me
  4390. #else
  4391. $ac_func();
  4392. #endif
  4393.  
  4394. ; return 0; }
  4395. EOF
  4396. if { (eval echo configure:4397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4397.   rm -rf conftest*
  4398.   eval "ac_cv_func_$ac_func=yes"
  4399. else
  4400.   echo "configure: failed program was:" >&5
  4401.   cat conftest.$ac_ext >&5
  4402.   rm -rf conftest*
  4403.   eval "ac_cv_func_$ac_func=no"
  4404. fi
  4405. rm -f conftest*
  4406. fi
  4407.  
  4408. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4409.   echo "$ac_t""yes" 1>&6
  4410.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4411.   cat >> confdefs.h <<EOF
  4412. #define $ac_tr_func 1
  4413. EOF
  4414.  cat > conftest.$ac_ext <<EOF
  4415. #line 4416 "configure"
  4416. #include "confdefs.h"
  4417. #include <unistd.h>
  4418. int main() {
  4419. setpgrp(0,0);
  4420. ; return 0; }
  4421. EOF
  4422. if { (eval echo configure:4423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4423.   rm -rf conftest*
  4424.   cat >> confdefs.h <<\EOF
  4425. #define SETPGRP_HAVE_ARG 1
  4426. EOF
  4427.  
  4428. else
  4429.   echo "configure: failed program was:" >&5
  4430.   cat conftest.$ac_ext >&5
  4431. fi
  4432. rm -f conftest*
  4433. else
  4434.   echo "$ac_t""no" 1>&6
  4435. fi
  4436. done
  4437.  
  4438. for ac_func in gettimeofday
  4439. do
  4440. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  4441. echo "configure:4442: checking for $ac_func" >&5
  4442. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  4443.   echo $ac_n "(cached) $ac_c" 1>&6
  4444. else
  4445.   cat > conftest.$ac_ext <<EOF
  4446. #line 4447 "configure"
  4447. #include "confdefs.h"
  4448. /* System header to define __stub macros and hopefully few prototypes,
  4449.     which can conflict with char $ac_func(); below.  */
  4450. #include <assert.h>
  4451. /* Override any gcc2 internal prototype to avoid an error.  */
  4452. /* We use char because int might match the return type of a gcc2
  4453.     builtin and then its argument prototype would still apply.  */
  4454. char $ac_func();
  4455.  
  4456. int main() {
  4457.  
  4458. /* The GNU C library defines this for functions which it implements
  4459.     to always fail with ENOSYS.  Some functions are actually named
  4460.     something starting with __ and the normal name is an alias.  */
  4461. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  4462. choke me
  4463. #else
  4464. $ac_func();
  4465. #endif
  4466.  
  4467. ; return 0; }
  4468. EOF
  4469. if { (eval echo configure:4470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4470.   rm -rf conftest*
  4471.   eval "ac_cv_func_$ac_func=yes"
  4472. else
  4473.   echo "configure: failed program was:" >&5
  4474.   cat conftest.$ac_ext >&5
  4475.   rm -rf conftest*
  4476.   eval "ac_cv_func_$ac_func=no"
  4477. fi
  4478. rm -f conftest*
  4479. fi
  4480.  
  4481. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  4482.   echo "$ac_t""yes" 1>&6
  4483.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  4484.   cat >> confdefs.h <<EOF
  4485. #define $ac_tr_func 1
  4486. EOF
  4487.  cat > conftest.$ac_ext <<EOF
  4488. #line 4489 "configure"
  4489. #include "confdefs.h"
  4490. #include <sys/time.h>
  4491. int main() {
  4492. gettimeofday((struct timeval*)0,(struct timezone*)0);
  4493. ; return 0; }
  4494. EOF
  4495. if { (eval echo configure:4496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4496.   :
  4497. else
  4498.   echo "configure: failed program was:" >&5
  4499.   cat conftest.$ac_ext >&5
  4500.   rm -rf conftest*
  4501.   cat >> confdefs.h <<\EOF
  4502. #define GETTIMEOFDAY_NO_TZ 1
  4503. EOF
  4504.  
  4505. fi
  4506. rm -f conftest*
  4507. else
  4508.   echo "$ac_t""no" 1>&6
  4509. fi
  4510. done
  4511.  
  4512.  
  4513. # checks for structures
  4514. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  4515. echo "configure:4516: checking whether time.h and sys/time.h may both be included" >&5
  4516. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  4517.   echo $ac_n "(cached) $ac_c" 1>&6
  4518. else
  4519.   cat > conftest.$ac_ext <<EOF
  4520. #line 4521 "configure"
  4521. #include "confdefs.h"
  4522. #include <sys/types.h>
  4523. #include <sys/time.h>
  4524. #include <time.h>
  4525. int main() {
  4526. struct tm *tp;
  4527. ; return 0; }
  4528. EOF
  4529. if { (eval echo configure:4530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4530.   rm -rf conftest*
  4531.   ac_cv_header_time=yes
  4532. else
  4533.   echo "configure: failed program was:" >&5
  4534.   cat conftest.$ac_ext >&5
  4535.   rm -rf conftest*
  4536.   ac_cv_header_time=no
  4537. fi
  4538. rm -f conftest*
  4539. fi
  4540.  
  4541. echo "$ac_t""$ac_cv_header_time" 1>&6
  4542. if test $ac_cv_header_time = yes; then
  4543.   cat >> confdefs.h <<\EOF
  4544. #define TIME_WITH_SYS_TIME 1
  4545. EOF
  4546.  
  4547. fi
  4548.  
  4549. echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
  4550. echo "configure:4551: checking whether struct tm is in sys/time.h or time.h" >&5
  4551. if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
  4552.   echo $ac_n "(cached) $ac_c" 1>&6
  4553. else
  4554.   cat > conftest.$ac_ext <<EOF
  4555. #line 4556 "configure"
  4556. #include "confdefs.h"
  4557. #include <sys/types.h>
  4558. #include <time.h>
  4559. int main() {
  4560. struct tm *tp; tp->tm_sec;
  4561. ; return 0; }
  4562. EOF
  4563. if { (eval echo configure:4564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4564.   rm -rf conftest*
  4565.   ac_cv_struct_tm=time.h
  4566. else
  4567.   echo "configure: failed program was:" >&5
  4568.   cat conftest.$ac_ext >&5
  4569.   rm -rf conftest*
  4570.   ac_cv_struct_tm=sys/time.h
  4571. fi
  4572. rm -f conftest*
  4573. fi
  4574.  
  4575. echo "$ac_t""$ac_cv_struct_tm" 1>&6
  4576. if test $ac_cv_struct_tm = sys/time.h; then
  4577.   cat >> confdefs.h <<\EOF
  4578. #define TM_IN_SYS_TIME 1
  4579. EOF
  4580.  
  4581. fi
  4582.  
  4583. echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
  4584. echo "configure:4585: checking for tm_zone in struct tm" >&5
  4585. if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
  4586.   echo $ac_n "(cached) $ac_c" 1>&6
  4587. else
  4588.   cat > conftest.$ac_ext <<EOF
  4589. #line 4590 "configure"
  4590. #include "confdefs.h"
  4591. #include <sys/types.h>
  4592. #include <$ac_cv_struct_tm>
  4593. int main() {
  4594. struct tm tm; tm.tm_zone;
  4595. ; return 0; }
  4596. EOF
  4597. if { (eval echo configure:4598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4598.   rm -rf conftest*
  4599.   ac_cv_struct_tm_zone=yes
  4600. else
  4601.   echo "configure: failed program was:" >&5
  4602.   cat conftest.$ac_ext >&5
  4603.   rm -rf conftest*
  4604.   ac_cv_struct_tm_zone=no
  4605. fi
  4606. rm -f conftest*
  4607. fi
  4608.  
  4609. echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
  4610. if test "$ac_cv_struct_tm_zone" = yes; then
  4611.   cat >> confdefs.h <<\EOF
  4612. #define HAVE_TM_ZONE 1
  4613. EOF
  4614.  
  4615. else
  4616.   echo $ac_n "checking for tzname""... $ac_c" 1>&6
  4617. echo "configure:4618: checking for tzname" >&5
  4618. if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
  4619.   echo $ac_n "(cached) $ac_c" 1>&6
  4620. else
  4621.   cat > conftest.$ac_ext <<EOF
  4622. #line 4623 "configure"
  4623. #include "confdefs.h"
  4624. #include <time.h>
  4625. #ifndef tzname /* For SGI.  */
  4626. extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
  4627. #endif
  4628. int main() {
  4629. atoi(*tzname);
  4630. ; return 0; }
  4631. EOF
  4632. if { (eval echo configure:4633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  4633.   rm -rf conftest*
  4634.   ac_cv_var_tzname=yes
  4635. else
  4636.   echo "configure: failed program was:" >&5
  4637.   cat conftest.$ac_ext >&5
  4638.   rm -rf conftest*
  4639.   ac_cv_var_tzname=no
  4640. fi
  4641. rm -f conftest*
  4642. fi
  4643.  
  4644. echo "$ac_t""$ac_cv_var_tzname" 1>&6
  4645.   if test $ac_cv_var_tzname = yes; then
  4646.     cat >> confdefs.h <<\EOF
  4647. #define HAVE_TZNAME 1
  4648. EOF
  4649.  
  4650.   fi
  4651. fi
  4652.  
  4653.  
  4654. echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
  4655. echo "configure:4656: checking for time.h that defines altzone" >&5
  4656. if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
  4657.   echo $ac_n "(cached) $ac_c" 1>&6
  4658. else
  4659.   cat > conftest.$ac_ext <<EOF
  4660. #line 4661 "configure"
  4661. #include "confdefs.h"
  4662. #include <time.h>
  4663. int main() {
  4664. return altzone;
  4665. ; return 0; }
  4666. EOF
  4667. if { (eval echo configure:4668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4668.   rm -rf conftest*
  4669.   ac_cv_header_time_altzone=yes
  4670. else
  4671.   echo "configure: failed program was:" >&5
  4672.   cat conftest.$ac_ext >&5
  4673.   rm -rf conftest*
  4674.   ac_cv_header_time_altzone=no
  4675. fi
  4676. rm -f conftest*
  4677. fi
  4678.  
  4679. echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
  4680. if test $ac_cv_header_time_altzone = yes; then
  4681.   cat >> confdefs.h <<\EOF
  4682. #define HAVE_ALTZONE 1
  4683. EOF
  4684.  
  4685. fi
  4686.  
  4687. was_it_defined=no
  4688. echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
  4689. echo "configure:4690: checking whether sys/select.h and sys/time.h may both be included" >&5
  4690. cat > conftest.$ac_ext <<EOF
  4691. #line 4692 "configure"
  4692. #include "confdefs.h"
  4693.  
  4694. #include <sys/types.h>
  4695. #include <sys/select.h>
  4696. #include <sys/time.h>
  4697.  
  4698. int main() {
  4699. ;
  4700. ; return 0; }
  4701. EOF
  4702. if { (eval echo configure:4703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4703.   rm -rf conftest*
  4704.   cat >> confdefs.h <<\EOF
  4705. #define SYS_SELECT_WITH_SYS_TIME 1
  4706. EOF
  4707.  was_it_defined=yes
  4708. else
  4709.   echo "configure: failed program was:" >&5
  4710.   cat conftest.$ac_ext >&5
  4711. fi
  4712. rm -f conftest*
  4713. echo "$ac_t""$was_it_defined" 1>&6
  4714.  
  4715. # checks for compiler characteristics
  4716.  
  4717. echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
  4718. echo "configure:4719: checking whether char is unsigned" >&5
  4719. if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
  4720.   echo $ac_n "(cached) $ac_c" 1>&6
  4721. else
  4722.   if test "$GCC" = yes; then
  4723.   # GCC predefines this symbol on systems where it applies.
  4724. cat > conftest.$ac_ext <<EOF
  4725. #line 4726 "configure"
  4726. #include "confdefs.h"
  4727. #ifdef __CHAR_UNSIGNED__
  4728.   yes
  4729. #endif
  4730.  
  4731. EOF
  4732. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  4733.   egrep "yes" >/dev/null 2>&1; then
  4734.   rm -rf conftest*
  4735.   ac_cv_c_char_unsigned=yes
  4736. else
  4737.   rm -rf conftest*
  4738.   ac_cv_c_char_unsigned=no
  4739. fi
  4740. rm -f conftest*
  4741.  
  4742. else
  4743. if test "$cross_compiling" = yes; then
  4744.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  4745. else
  4746.   cat > conftest.$ac_ext <<EOF
  4747. #line 4748 "configure"
  4748. #include "confdefs.h"
  4749. /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
  4750. #if !defined(__STDC__) || __STDC__ != 1
  4751. #define volatile
  4752. #endif
  4753. main() {
  4754.   volatile char c = 255; exit(c < 0);
  4755. }
  4756. EOF
  4757. if { (eval echo configure:4758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  4758. then
  4759.   ac_cv_c_char_unsigned=yes
  4760. else
  4761.   echo "configure: failed program was:" >&5
  4762.   cat conftest.$ac_ext >&5
  4763.   rm -fr conftest*
  4764.   ac_cv_c_char_unsigned=no
  4765. fi
  4766. rm -fr conftest*
  4767. fi
  4768.  
  4769. fi
  4770. fi
  4771.  
  4772. echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
  4773. if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
  4774.   cat >> confdefs.h <<\EOF
  4775. #define __CHAR_UNSIGNED__ 1
  4776. EOF
  4777.  
  4778. fi
  4779.  
  4780. echo $ac_n "checking for working const""... $ac_c" 1>&6
  4781. echo "configure:4782: checking for working const" >&5
  4782. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  4783.   echo $ac_n "(cached) $ac_c" 1>&6
  4784. else
  4785.   cat > conftest.$ac_ext <<EOF
  4786. #line 4787 "configure"
  4787. #include "confdefs.h"
  4788.  
  4789. int main() {
  4790.  
  4791. /* Ultrix mips cc rejects this.  */
  4792. typedef int charset[2]; const charset x;
  4793. /* SunOS 4.1.1 cc rejects this.  */
  4794. char const *const *ccp;
  4795. char **p;
  4796. /* NEC SVR4.0.2 mips cc rejects this.  */
  4797. struct point {int x, y;};
  4798. static struct point const zero = {0,0};
  4799. /* AIX XL C 1.02.0.0 rejects this.
  4800.    It does not let you subtract one const X* pointer from another in an arm
  4801.    of an if-expression whose if-part is not a constant expression */
  4802. const char *g = "string";
  4803. ccp = &g + (g ? g-g : 0);
  4804. /* HPUX 7.0 cc rejects these. */
  4805. ++ccp;
  4806. p = (char**) ccp;
  4807. ccp = (char const *const *) p;
  4808. { /* SCO 3.2v4 cc rejects this.  */
  4809.   char *t;
  4810.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  4811.  
  4812.   *t++ = 0;
  4813. }
  4814. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  4815.   int x[] = {25, 17};
  4816.   const int *foo = &x[0];
  4817.   ++foo;
  4818. }
  4819. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  4820.   typedef const int *iptr;
  4821.   iptr p = 0;
  4822.   ++p;
  4823. }
  4824. { /* AIX XL C 1.02.0.0 rejects this saying
  4825.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  4826.   struct s { int j; const int *ap[3]; };
  4827.   struct s *b; b->j = 5;
  4828. }
  4829. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  4830.   const int foo = 10;
  4831. }
  4832.  
  4833. ; return 0; }
  4834. EOF
  4835. if { (eval echo configure:4836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4836.   rm -rf conftest*
  4837.   ac_cv_c_const=yes
  4838. else
  4839.   echo "configure: failed program was:" >&5
  4840.   cat conftest.$ac_ext >&5
  4841.   rm -rf conftest*
  4842.   ac_cv_c_const=no
  4843. fi
  4844. rm -f conftest*
  4845. fi
  4846.  
  4847. echo "$ac_t""$ac_cv_c_const" 1>&6
  4848. if test $ac_cv_c_const = no; then
  4849.   cat >> confdefs.h <<\EOF
  4850. #define const 
  4851. EOF
  4852.  
  4853. fi
  4854.  
  4855. echo $ac_n "checking for inline""... $ac_c" 1>&6
  4856. echo "configure:4857: checking for inline" >&5
  4857. if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  4858.   echo $ac_n "(cached) $ac_c" 1>&6
  4859. else
  4860.   ac_cv_c_inline=no
  4861. for ac_kw in inline __inline__ __inline; do
  4862.   cat > conftest.$ac_ext <<EOF
  4863. #line 4864 "configure"
  4864. #include "confdefs.h"
  4865.  
  4866. int main() {
  4867. } $ac_kw foo() {
  4868. ; return 0; }
  4869. EOF
  4870. if { (eval echo configure:4871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4871.   rm -rf conftest*
  4872.   ac_cv_c_inline=$ac_kw; break
  4873. else
  4874.   echo "configure: failed program was:" >&5
  4875.   cat conftest.$ac_ext >&5
  4876. fi
  4877. rm -f conftest*
  4878. done
  4879.  
  4880. fi
  4881.  
  4882. echo "$ac_t""$ac_cv_c_inline" 1>&6
  4883. case "$ac_cv_c_inline" in
  4884.   inline | yes) ;;
  4885.   no) cat >> confdefs.h <<\EOF
  4886. #define inline 
  4887. EOF
  4888.  ;;
  4889.   *)  cat >> confdefs.h <<EOF
  4890. #define inline $ac_cv_c_inline
  4891. EOF
  4892.  ;;
  4893. esac
  4894.  
  4895.  
  4896. works=no
  4897. echo $ac_n "checking for working volatile""... $ac_c" 1>&6
  4898. echo "configure:4899: checking for working volatile" >&5
  4899. cat > conftest.$ac_ext <<EOF
  4900. #line 4901 "configure"
  4901. #include "confdefs.h"
  4902.  
  4903. int main() {
  4904. volatile int x; x = 0;
  4905. ; return 0; }
  4906. EOF
  4907. if { (eval echo configure:4908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4908.   rm -rf conftest*
  4909.   works=yes
  4910. else
  4911.   echo "configure: failed program was:" >&5
  4912.   cat conftest.$ac_ext >&5
  4913.   rm -rf conftest*
  4914.   cat >> confdefs.h <<\EOF
  4915. #define volatile 
  4916. EOF
  4917.  
  4918. fi
  4919. rm -f conftest*
  4920. echo "$ac_t""$works" 1>&6
  4921.  
  4922. works=no
  4923. echo $ac_n "checking for working signed char""... $ac_c" 1>&6
  4924. echo "configure:4925: checking for working signed char" >&5
  4925. cat > conftest.$ac_ext <<EOF
  4926. #line 4927 "configure"
  4927. #include "confdefs.h"
  4928.  
  4929. int main() {
  4930. signed char c;
  4931. ; return 0; }
  4932. EOF
  4933. if { (eval echo configure:4934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4934.   rm -rf conftest*
  4935.   works=yes
  4936. else
  4937.   echo "configure: failed program was:" >&5
  4938.   cat conftest.$ac_ext >&5
  4939.   rm -rf conftest*
  4940.   cat >> confdefs.h <<\EOF
  4941. #define signed 
  4942. EOF
  4943.  
  4944. fi
  4945. rm -f conftest*
  4946. echo "$ac_t""$works" 1>&6
  4947.  
  4948. have_prototypes=no
  4949. echo $ac_n "checking for prototypes""... $ac_c" 1>&6
  4950. echo "configure:4951: checking for prototypes" >&5
  4951. cat > conftest.$ac_ext <<EOF
  4952. #line 4953 "configure"
  4953. #include "confdefs.h"
  4954. int foo(int x) { return 0; }
  4955. int main() {
  4956. return foo(10);
  4957. ; return 0; }
  4958. EOF
  4959. if { (eval echo configure:4960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4960.   rm -rf conftest*
  4961.   cat >> confdefs.h <<\EOF
  4962. #define HAVE_PROTOTYPES 1
  4963. EOF
  4964.  have_prototypes=yes
  4965. else
  4966.   echo "configure: failed program was:" >&5
  4967.   cat conftest.$ac_ext >&5
  4968. fi
  4969. rm -f conftest*
  4970. echo "$ac_t""$have_prototypes" 1>&6
  4971.  
  4972. works=no
  4973. echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
  4974. echo "configure:4975: checking for variable length prototypes and stdarg.h" >&5
  4975. cat > conftest.$ac_ext <<EOF
  4976. #line 4977 "configure"
  4977. #include "confdefs.h"
  4978.  
  4979. #include <stdarg.h>
  4980. int foo(int x, ...) {
  4981.     va_list va;
  4982.     va_start(va, x);
  4983.     va_arg(va, int);
  4984.     va_arg(va, char *);
  4985.     va_arg(va, double);
  4986.     return 0;
  4987. }
  4988.  
  4989. int main() {
  4990. return foo(10, "", 3.14);
  4991. ; return 0; }
  4992. EOF
  4993. if { (eval echo configure:4994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  4994.   rm -rf conftest*
  4995.   cat >> confdefs.h <<\EOF
  4996. #define HAVE_STDARG_PROTOTYPES 1
  4997. EOF
  4998.  works=yes
  4999. else
  5000.   echo "configure: failed program was:" >&5
  5001.   cat conftest.$ac_ext >&5
  5002. fi
  5003. rm -f conftest*
  5004. echo "$ac_t""$works" 1>&6
  5005.  
  5006. if test "$have_prototypes" = yes; then
  5007. bad_prototypes=no
  5008. echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
  5009. echo "configure:5010: checking for bad exec* prototypes" >&5
  5010. cat > conftest.$ac_ext <<EOF
  5011. #line 5012 "configure"
  5012. #include "confdefs.h"
  5013. #include <unistd.h>
  5014. int main() {
  5015. char **t;execve("@",t,t);
  5016. ; return 0; }
  5017. EOF
  5018. if { (eval echo configure:5019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5019.   :
  5020. else
  5021.   echo "configure: failed program was:" >&5
  5022.   cat conftest.$ac_ext >&5
  5023.   rm -rf conftest*
  5024.   cat >> confdefs.h <<\EOF
  5025. #define BAD_EXEC_PROTOTYPES 1
  5026. EOF
  5027.  bad_prototypes=yes
  5028. fi
  5029. rm -f conftest*
  5030. echo "$ac_t""$bad_prototypes" 1>&6
  5031. fi
  5032.  
  5033. bad_forward=no
  5034. echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
  5035. echo "configure:5036: checking for bad static forward" >&5
  5036. if test "$cross_compiling" = yes; then
  5037.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  5038. else
  5039.   cat > conftest.$ac_ext <<EOF
  5040. #line 5041 "configure"
  5041. #include "confdefs.h"
  5042.  
  5043. struct s { int a; int b; };
  5044. static struct s foo;
  5045. int foobar() {
  5046.  static int random;
  5047.  random = (int) &foo;
  5048.  return random;
  5049. }
  5050. static struct s foo = { 1, 2 };
  5051. main() {
  5052.  exit(!((int)&foo == foobar()));
  5053. }
  5054.  
  5055. EOF
  5056. if { (eval echo configure:5057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  5057. then
  5058.   :
  5059. else
  5060.   echo "configure: failed program was:" >&5
  5061.   cat conftest.$ac_ext >&5
  5062.   rm -fr conftest*
  5063.   cat >> confdefs.h <<\EOF
  5064. #define BAD_STATIC_FORWARD 1
  5065. EOF
  5066.  bad_forward=yes
  5067. fi
  5068. rm -fr conftest*
  5069. fi
  5070.  
  5071. echo "$ac_t""$bad_forward" 1>&6
  5072.  
  5073. va_list_is_array=no
  5074. echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
  5075. echo "configure:5076: checking whether va_list is an array" >&5
  5076. cat > conftest.$ac_ext <<EOF
  5077. #line 5078 "configure"
  5078. #include "confdefs.h"
  5079.  
  5080. #ifdef HAVE_STDARG_PROTOTYPES
  5081. #include <stdarg.h>
  5082. #else
  5083. #include <varargs.h>
  5084. #endif
  5085.  
  5086. int main() {
  5087. va_list list1, list2; list1 = list2;
  5088. ; return 0; }
  5089. EOF
  5090. if { (eval echo configure:5091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5091.   :
  5092. else
  5093.   echo "configure: failed program was:" >&5
  5094.   cat conftest.$ac_ext >&5
  5095.   rm -rf conftest*
  5096.   cat >> confdefs.h <<\EOF
  5097. #define VA_LIST_IS_ARRAY 1
  5098. EOF
  5099.  va_list_is_array=yes
  5100. fi
  5101. rm -f conftest*
  5102. echo "$ac_t""$va_list_is_array" 1>&6
  5103.  
  5104. # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
  5105. echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
  5106. echo "configure:5107: checking for gethostbyname_r" >&5
  5107. if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
  5108.   echo $ac_n "(cached) $ac_c" 1>&6
  5109. else
  5110.   cat > conftest.$ac_ext <<EOF
  5111. #line 5112 "configure"
  5112. #include "confdefs.h"
  5113. /* System header to define __stub macros and hopefully few prototypes,
  5114.     which can conflict with char gethostbyname_r(); below.  */
  5115. #include <assert.h>
  5116. /* Override any gcc2 internal prototype to avoid an error.  */
  5117. /* We use char because int might match the return type of a gcc2
  5118.     builtin and then its argument prototype would still apply.  */
  5119. char gethostbyname_r();
  5120.  
  5121. int main() {
  5122.  
  5123. /* The GNU C library defines this for functions which it implements
  5124.     to always fail with ENOSYS.  Some functions are actually named
  5125.     something starting with __ and the normal name is an alias.  */
  5126. #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
  5127. choke me
  5128. #else
  5129. gethostbyname_r();
  5130. #endif
  5131.  
  5132. ; return 0; }
  5133. EOF
  5134. if { (eval echo configure:5135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5135.   rm -rf conftest*
  5136.   eval "ac_cv_func_gethostbyname_r=yes"
  5137. else
  5138.   echo "configure: failed program was:" >&5
  5139.   cat conftest.$ac_ext >&5
  5140.   rm -rf conftest*
  5141.   eval "ac_cv_func_gethostbyname_r=no"
  5142. fi
  5143. rm -f conftest*
  5144. fi
  5145.  
  5146. if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
  5147.   echo "$ac_t""yes" 1>&6
  5148.   
  5149.   cat >> confdefs.h <<\EOF
  5150. #define HAVE_GETHOSTBYNAME_R 1
  5151. EOF
  5152.  
  5153.   echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
  5154. echo "configure:5155: checking gethostbyname_r with 6 args" >&5
  5155.   OLD_CFLAGS=$CFLAGS
  5156.   CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
  5157.   cat > conftest.$ac_ext <<EOF
  5158. #line 5159 "configure"
  5159. #include "confdefs.h"
  5160.  
  5161. #   include <netdb.h>
  5162.   
  5163. int main() {
  5164.  
  5165.     char *name;
  5166.     struct hostent *he, *res;
  5167.     char buffer[2048];
  5168.     int buflen = 2048;
  5169.     int h_errnop;
  5170.  
  5171.     (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
  5172.   
  5173. ; return 0; }
  5174. EOF
  5175. if { (eval echo configure:5176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5176.   rm -rf conftest*
  5177.   
  5178.     cat >> confdefs.h <<\EOF
  5179. #define HAVE_GETHOSTBYNAME_R 1
  5180. EOF
  5181.  
  5182.     cat >> confdefs.h <<\EOF
  5183. #define HAVE_GETHOSTBYNAME_R_6_ARG 1
  5184. EOF
  5185.  
  5186.     echo "$ac_t""yes" 1>&6
  5187.   
  5188. else
  5189.   echo "configure: failed program was:" >&5
  5190.   cat conftest.$ac_ext >&5
  5191.   rm -rf conftest*
  5192.   
  5193.     echo "$ac_t""no" 1>&6
  5194.     echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
  5195. echo "configure:5196: checking gethostbyname_r with 5 args" >&5
  5196.     cat > conftest.$ac_ext <<EOF
  5197. #line 5198 "configure"
  5198. #include "confdefs.h"
  5199.  
  5200. #     include <netdb.h>
  5201.     
  5202. int main() {
  5203.  
  5204.       char *name;
  5205.       struct hostent *he;
  5206.       char buffer[2048];
  5207.       int buflen = 2048;
  5208.       int h_errnop;
  5209.  
  5210.       (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
  5211.     
  5212. ; return 0; }
  5213. EOF
  5214. if { (eval echo configure:5215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5215.   rm -rf conftest*
  5216.   
  5217.       cat >> confdefs.h <<\EOF
  5218. #define HAVE_GETHOSTBYNAME_R 1
  5219. EOF
  5220.  
  5221.       cat >> confdefs.h <<\EOF
  5222. #define HAVE_GETHOSTBYNAME_R_5_ARG 1
  5223. EOF
  5224.  
  5225.       echo "$ac_t""yes" 1>&6
  5226.     
  5227. else
  5228.   echo "configure: failed program was:" >&5
  5229.   cat conftest.$ac_ext >&5
  5230.   rm -rf conftest*
  5231.   
  5232.       echo "$ac_t""no" 1>&6
  5233.       echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
  5234. echo "configure:5235: checking gethostbyname_r with 3 args" >&5
  5235.       cat > conftest.$ac_ext <<EOF
  5236. #line 5237 "configure"
  5237. #include "confdefs.h"
  5238.  
  5239. #       include <netdb.h>
  5240.       
  5241. int main() {
  5242.  
  5243.         char *name;
  5244.         struct hostent *he;
  5245.         struct hostent_data data;
  5246.  
  5247.         (void) gethostbyname_r(name, he, &data);
  5248.       
  5249. ; return 0; }
  5250. EOF
  5251. if { (eval echo configure:5252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5252.   rm -rf conftest*
  5253.   
  5254.         cat >> confdefs.h <<\EOF
  5255. #define HAVE_GETHOSTBYNAME_R 1
  5256. EOF
  5257.  
  5258.         cat >> confdefs.h <<\EOF
  5259. #define HAVE_GETHOSTBYNAME_R_3_ARG 1
  5260. EOF
  5261.  
  5262.         echo "$ac_t""yes" 1>&6
  5263.       
  5264. else
  5265.   echo "configure: failed program was:" >&5
  5266.   cat conftest.$ac_ext >&5
  5267.   rm -rf conftest*
  5268.   
  5269.         echo "$ac_t""no" 1>&6
  5270.       
  5271. fi
  5272. rm -f conftest*
  5273.     
  5274. fi
  5275. rm -f conftest*
  5276.   
  5277. fi
  5278. rm -f conftest*
  5279.   CFLAGS=$OLD_CFLAGS
  5280.  
  5281. else
  5282.   echo "$ac_t""no" 1>&6
  5283.  
  5284.   for ac_func in gethostbyname
  5285. do
  5286. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  5287. echo "configure:5288: checking for $ac_func" >&5
  5288. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  5289.   echo $ac_n "(cached) $ac_c" 1>&6
  5290. else
  5291.   cat > conftest.$ac_ext <<EOF
  5292. #line 5293 "configure"
  5293. #include "confdefs.h"
  5294. /* System header to define __stub macros and hopefully few prototypes,
  5295.     which can conflict with char $ac_func(); below.  */
  5296. #include <assert.h>
  5297. /* Override any gcc2 internal prototype to avoid an error.  */
  5298. /* We use char because int might match the return type of a gcc2
  5299.     builtin and then its argument prototype would still apply.  */
  5300. char $ac_func();
  5301.  
  5302. int main() {
  5303.  
  5304. /* The GNU C library defines this for functions which it implements
  5305.     to always fail with ENOSYS.  Some functions are actually named
  5306.     something starting with __ and the normal name is an alias.  */
  5307. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  5308. choke me
  5309. #else
  5310. $ac_func();
  5311. #endif
  5312.  
  5313. ; return 0; }
  5314. EOF
  5315. if { (eval echo configure:5316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5316.   rm -rf conftest*
  5317.   eval "ac_cv_func_$ac_func=yes"
  5318. else
  5319.   echo "configure: failed program was:" >&5
  5320.   cat conftest.$ac_ext >&5
  5321.   rm -rf conftest*
  5322.   eval "ac_cv_func_$ac_func=no"
  5323. fi
  5324. rm -f conftest*
  5325. fi
  5326.  
  5327. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  5328.   echo "$ac_t""yes" 1>&6
  5329.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  5330.   cat >> confdefs.h <<EOF
  5331. #define $ac_tr_func 1
  5332. EOF
  5333.  
  5334. else
  5335.   echo "$ac_t""no" 1>&6
  5336. fi
  5337. done
  5338.  
  5339.  
  5340. fi
  5341.  
  5342.  
  5343.  
  5344.  
  5345.  
  5346.  
  5347.  
  5348. # checks for system services
  5349. # (none yet)
  5350.  
  5351. # Linux requires this for correct f.p. operations
  5352. echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
  5353. echo "configure:5354: checking for __fpu_control" >&5
  5354. if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
  5355.   echo $ac_n "(cached) $ac_c" 1>&6
  5356. else
  5357.   cat > conftest.$ac_ext <<EOF
  5358. #line 5359 "configure"
  5359. #include "confdefs.h"
  5360. /* System header to define __stub macros and hopefully few prototypes,
  5361.     which can conflict with char __fpu_control(); below.  */
  5362. #include <assert.h>
  5363. /* Override any gcc2 internal prototype to avoid an error.  */
  5364. /* We use char because int might match the return type of a gcc2
  5365.     builtin and then its argument prototype would still apply.  */
  5366. char __fpu_control();
  5367.  
  5368. int main() {
  5369.  
  5370. /* The GNU C library defines this for functions which it implements
  5371.     to always fail with ENOSYS.  Some functions are actually named
  5372.     something starting with __ and the normal name is an alias.  */
  5373. #if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
  5374. choke me
  5375. #else
  5376. __fpu_control();
  5377. #endif
  5378.  
  5379. ; return 0; }
  5380. EOF
  5381. if { (eval echo configure:5382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5382.   rm -rf conftest*
  5383.   eval "ac_cv_func___fpu_control=yes"
  5384. else
  5385.   echo "configure: failed program was:" >&5
  5386.   cat conftest.$ac_ext >&5
  5387.   rm -rf conftest*
  5388.   eval "ac_cv_func___fpu_control=no"
  5389. fi
  5390. rm -f conftest*
  5391. fi
  5392.  
  5393. if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
  5394.   echo "$ac_t""yes" 1>&6
  5395.   :
  5396. else
  5397.   echo "$ac_t""no" 1>&6
  5398. echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
  5399. echo "configure:5400: checking for __fpu_control in -lieee" >&5
  5400. ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
  5401. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  5402.   echo $ac_n "(cached) $ac_c" 1>&6
  5403. else
  5404.   ac_save_LIBS="$LIBS"
  5405. LIBS="-lieee  $LIBS"
  5406. cat > conftest.$ac_ext <<EOF
  5407. #line 5408 "configure"
  5408. #include "confdefs.h"
  5409. /* Override any gcc2 internal prototype to avoid an error.  */
  5410. /* We use char because int might match the return type of a gcc2
  5411.     builtin and then its argument prototype would still apply.  */
  5412. char __fpu_control();
  5413.  
  5414. int main() {
  5415. __fpu_control()
  5416. ; return 0; }
  5417. EOF
  5418. if { (eval echo configure:5419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5419.   rm -rf conftest*
  5420.   eval "ac_cv_lib_$ac_lib_var=yes"
  5421. else
  5422.   echo "configure: failed program was:" >&5
  5423.   cat conftest.$ac_ext >&5
  5424.   rm -rf conftest*
  5425.   eval "ac_cv_lib_$ac_lib_var=no"
  5426. fi
  5427. rm -f conftest*
  5428. LIBS="$ac_save_LIBS"
  5429.  
  5430. fi
  5431. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  5432.   echo "$ac_t""yes" 1>&6
  5433.     ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  5434.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  5435.   cat >> confdefs.h <<EOF
  5436. #define $ac_tr_lib 1
  5437. EOF
  5438.  
  5439.   LIBS="-lieee $LIBS"
  5440.  
  5441. else
  5442.   echo "$ac_t""no" 1>&6
  5443. fi
  5444.  
  5445.  
  5446. fi
  5447.  
  5448.  
  5449. # Check for --with-fpectl
  5450. echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
  5451. echo "configure:5452: checking for --with-fpectl" >&5
  5452. # Check whether --with-fpectl or --without-fpectl was given.
  5453. if test "${with_fpectl+set}" = set; then
  5454.   withval="$with_fpectl"
  5455.   
  5456. if test "$withval" != no
  5457. then cat >> confdefs.h <<\EOF
  5458. #define WANT_SIGFPE_HANDLER 1
  5459. EOF
  5460.  echo "$ac_t""yes" 1>&6
  5461. else echo "$ac_t""no" 1>&6
  5462. fi
  5463. else
  5464.   echo "$ac_t""no" 1>&6
  5465. fi
  5466.  
  5467.  
  5468. # check for --with-libm=...
  5469.  
  5470. case $ac_sys_system in
  5471. Darwin) ;;
  5472. next) ;;
  5473. BeOS) ;;
  5474. *) LIBM=-lm
  5475. esac
  5476. echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
  5477. echo "configure:5478: checking for --with-libm=STRING" >&5
  5478. # Check whether --with-libm or --without-libm was given.
  5479. if test "${with_libm+set}" = set; then
  5480.   withval="$with_libm"
  5481.   
  5482. if test "$withval" = no
  5483. then LIBM=
  5484.      echo "$ac_t""force LIBM empty" 1>&6
  5485. elif test "$withval" != yes
  5486. then LIBM=$withval
  5487.      echo "$ac_t""set LIBM=\"$withval\"" 1>&6
  5488. else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
  5489. fi
  5490. else
  5491.   echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
  5492. fi
  5493.  
  5494.  
  5495. # check for --with-libc=...
  5496.  
  5497. echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
  5498. echo "configure:5499: checking for --with-libc=STRING" >&5
  5499. # Check whether --with-libc or --without-libc was given.
  5500. if test "${with_libc+set}" = set; then
  5501.   withval="$with_libc"
  5502.   
  5503. if test "$withval" = no
  5504. then LIBC=
  5505.      echo "$ac_t""force LIBC empty" 1>&6
  5506. elif test "$withval" != yes
  5507. then LIBC=$withval
  5508.      echo "$ac_t""set LIBC=\"$withval\"" 1>&6
  5509. else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
  5510. fi
  5511. else
  5512.   echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
  5513. fi
  5514.  
  5515.  
  5516. # check for hypot() in math library
  5517. LIBS_SAVE=$LIBS
  5518. LIBS="$LIBS $LIBM"
  5519. for ac_func in hypot
  5520. do
  5521. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  5522. echo "configure:5523: checking for $ac_func" >&5
  5523. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  5524.   echo $ac_n "(cached) $ac_c" 1>&6
  5525. else
  5526.   cat > conftest.$ac_ext <<EOF
  5527. #line 5528 "configure"
  5528. #include "confdefs.h"
  5529. /* System header to define __stub macros and hopefully few prototypes,
  5530.     which can conflict with char $ac_func(); below.  */
  5531. #include <assert.h>
  5532. /* Override any gcc2 internal prototype to avoid an error.  */
  5533. /* We use char because int might match the return type of a gcc2
  5534.     builtin and then its argument prototype would still apply.  */
  5535. char $ac_func();
  5536.  
  5537. int main() {
  5538.  
  5539. /* The GNU C library defines this for functions which it implements
  5540.     to always fail with ENOSYS.  Some functions are actually named
  5541.     something starting with __ and the normal name is an alias.  */
  5542. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  5543. choke me
  5544. #else
  5545. $ac_func();
  5546. #endif
  5547.  
  5548. ; return 0; }
  5549. EOF
  5550. if { (eval echo configure:5551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  5551.   rm -rf conftest*
  5552.   eval "ac_cv_func_$ac_func=yes"
  5553. else
  5554.   echo "configure: failed program was:" >&5
  5555.   cat conftest.$ac_ext >&5
  5556.   rm -rf conftest*
  5557.   eval "ac_cv_func_$ac_func=no"
  5558. fi
  5559. rm -f conftest*
  5560. fi
  5561.  
  5562. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  5563.   echo "$ac_t""yes" 1>&6
  5564.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  5565.   cat >> confdefs.h <<EOF
  5566. #define $ac_tr_func 1
  5567. EOF
  5568.  
  5569. else
  5570.   echo "$ac_t""no" 1>&6
  5571. LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
  5572. fi
  5573. done
  5574.  
  5575.  
  5576. LIBS=$LIBS_SAVE
  5577.  
  5578. # check for getopt
  5579. echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
  5580. echo "configure:5581: checking for genuine getopt" >&5
  5581. if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
  5582.   echo $ac_n "(cached) $ac_c" 1>&6
  5583. else
  5584.   if test "$cross_compiling" = yes; then
  5585.   ac_cv_func_getopt=no
  5586. else
  5587.   cat > conftest.$ac_ext <<EOF
  5588. #line 5589 "configure"
  5589. #include "confdefs.h"
  5590. #include <stdio.h>
  5591. extern int optind, opterr, getopt();
  5592. extern char* optarg;
  5593. int main() {
  5594.     char* av[] = { "testprog", "parameter", "-fFlag", NULL };
  5595.     opterr = 0;
  5596.     if (getopt(3, av, "f:") == 'f') { exit(1); }
  5597.     exit(0);
  5598. }
  5599. EOF
  5600. if { (eval echo configure:5601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  5601. then
  5602.   ac_cv_func_getopt=yes
  5603. else
  5604.   echo "configure: failed program was:" >&5
  5605.   cat conftest.$ac_ext >&5
  5606.   rm -fr conftest*
  5607.   ac_cv_func_getopt=no
  5608. fi
  5609. rm -fr conftest*
  5610. fi
  5611.  
  5612. fi
  5613. echo "$ac_t""$ac_cv_func_getopt" 1>&6
  5614. test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
  5615.  
  5616. # check whether malloc(0) returns NULL or not
  5617. echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
  5618. echo "configure:5619: checking what malloc(0) returns" >&5
  5619. if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
  5620.   echo $ac_n "(cached) $ac_c" 1>&6
  5621. else
  5622.   if test "$cross_compiling" = yes; then
  5623.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  5624. else
  5625.   cat > conftest.$ac_ext <<EOF
  5626. #line 5627 "configure"
  5627. #include "confdefs.h"
  5628. #include <stdio.h>
  5629. #ifdef HAVE_STDLIB
  5630. #include <stdlib.h>
  5631. #else
  5632. char *malloc(), *realloc();
  5633. int *free();
  5634. #endif
  5635. main() {
  5636.     char *p;
  5637.     p = malloc(0);
  5638.     if (p == NULL) exit(1);
  5639.     p = realloc(p, 0);
  5640.     if (p == NULL) exit(1);
  5641.     free(p);
  5642.     exit(0);
  5643. }
  5644. EOF
  5645. if { (eval echo configure:5646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  5646. then
  5647.   ac_cv_malloc_zero=nonnull
  5648. else
  5649.   echo "configure: failed program was:" >&5
  5650.   cat conftest.$ac_ext >&5
  5651.   rm -fr conftest*
  5652.   ac_cv_malloc_zero=null
  5653. fi
  5654. rm -fr conftest*
  5655. fi
  5656.  
  5657. fi
  5658.  
  5659. echo "$ac_t""$ac_cv_malloc_zero" 1>&6
  5660. if test "$ac_cv_malloc_zero" = null
  5661. then
  5662.   cat >> confdefs.h <<\EOF
  5663. #define MALLOC_ZERO_RETURNS_NULL 1
  5664. EOF
  5665.  
  5666. fi
  5667.  
  5668. # check for wchar.h
  5669. ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
  5670. echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
  5671. echo "configure:5672: checking for wchar.h" >&5
  5672. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  5673.   echo $ac_n "(cached) $ac_c" 1>&6
  5674. else
  5675.   cat > conftest.$ac_ext <<EOF
  5676. #line 5677 "configure"
  5677. #include "confdefs.h"
  5678. #include <wchar.h>
  5679. EOF
  5680. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  5681. { (eval echo configure:5682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  5682. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  5683. if test -z "$ac_err"; then
  5684.   rm -rf conftest*
  5685.   eval "ac_cv_header_$ac_safe=yes"
  5686. else
  5687.   echo "$ac_err" >&5
  5688.   echo "configure: failed program was:" >&5
  5689.   cat conftest.$ac_ext >&5
  5690.   rm -rf conftest*
  5691.   eval "ac_cv_header_$ac_safe=no"
  5692. fi
  5693. rm -f conftest*
  5694. fi
  5695. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  5696.   echo "$ac_t""yes" 1>&6
  5697.   cat >> confdefs.h <<\EOF
  5698. #define HAVE_WCHAR_H 1
  5699. EOF
  5700.  wchar_h="yes"
  5701. else
  5702.   echo "$ac_t""no" 1>&6
  5703. wchar_h="no"
  5704.  
  5705. fi
  5706.  
  5707.  
  5708. # check for usable wchar_t
  5709. usable_wchar_t="unkown"
  5710. echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
  5711. echo "configure:5712: checking for usable wchar_t" >&5
  5712. if test "$cross_compiling" = yes; then
  5713.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  5714. else
  5715.   cat > conftest.$ac_ext <<EOF
  5716. #line 5717 "configure"
  5717. #include "confdefs.h"
  5718.  
  5719. #include "wchar.h"
  5720. #include "wctype.h"
  5721. main() {
  5722.  wchar_t s;
  5723.  if (sizeof(s) == 2)
  5724.   exit(0);
  5725.  else
  5726.   exit(1);
  5727. }
  5728.  
  5729. EOF
  5730. if { (eval echo configure:5731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  5731. then
  5732.   cat >> confdefs.h <<\EOF
  5733. #define HAVE_USABLE_WCHAR_T 1
  5734. EOF
  5735.  usable_wchar_t="yes"
  5736. else
  5737.   echo "configure: failed program was:" >&5
  5738.   cat conftest.$ac_ext >&5
  5739.   rm -fr conftest*
  5740.   usable_wchar_t="no"
  5741. fi
  5742. rm -fr conftest*
  5743. fi
  5744.  
  5745. echo "$ac_t""$usable_wchar_t" 1>&6
  5746.  
  5747. # check for endianness
  5748. echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
  5749. echo "configure:5750: checking whether byte ordering is bigendian" >&5
  5750. if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  5751.   echo $ac_n "(cached) $ac_c" 1>&6
  5752. else
  5753.   ac_cv_c_bigendian=unknown
  5754. # See if sys/param.h defines the BYTE_ORDER macro.
  5755. cat > conftest.$ac_ext <<EOF
  5756. #line 5757 "configure"
  5757. #include "confdefs.h"
  5758. #include <sys/types.h>
  5759. #include <sys/param.h>
  5760. int main() {
  5761.  
  5762. #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
  5763.  bogus endian macros
  5764. #endif
  5765. ; return 0; }
  5766. EOF
  5767. if { (eval echo configure:5768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5768.   rm -rf conftest*
  5769.   # It does; now see whether it defined to BIG_ENDIAN or not.
  5770. cat > conftest.$ac_ext <<EOF
  5771. #line 5772 "configure"
  5772. #include "confdefs.h"
  5773. #include <sys/types.h>
  5774. #include <sys/param.h>
  5775. int main() {
  5776.  
  5777. #if BYTE_ORDER != BIG_ENDIAN
  5778.  not big endian
  5779. #endif
  5780. ; return 0; }
  5781. EOF
  5782. if { (eval echo configure:5783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  5783.   rm -rf conftest*
  5784.   ac_cv_c_bigendian=yes
  5785. else
  5786.   echo "configure: failed program was:" >&5
  5787.   cat conftest.$ac_ext >&5
  5788.   rm -rf conftest*
  5789.   ac_cv_c_bigendian=no
  5790. fi
  5791. rm -f conftest*
  5792. else
  5793.   echo "configure: failed program was:" >&5
  5794.   cat conftest.$ac_ext >&5
  5795. fi
  5796. rm -f conftest*
  5797. if test $ac_cv_c_bigendian = unknown; then
  5798. if test "$cross_compiling" = yes; then
  5799.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  5800. else
  5801.   cat > conftest.$ac_ext <<EOF
  5802. #line 5803 "configure"
  5803. #include "confdefs.h"
  5804. main () {
  5805.   /* Are we little or big endian?  From Harbison&Steele.  */
  5806.   union
  5807.   {
  5808.     long l;
  5809.     char c[sizeof (long)];
  5810.   } u;
  5811.   u.l = 1;
  5812.   exit (u.c[sizeof (long) - 1] == 1);
  5813. }
  5814. EOF
  5815. if { (eval echo configure:5816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  5816. then
  5817.   ac_cv_c_bigendian=no
  5818. else
  5819.   echo "configure: failed program was:" >&5
  5820.   cat conftest.$ac_ext >&5
  5821.   rm -fr conftest*
  5822.   ac_cv_c_bigendian=yes
  5823. fi
  5824. rm -fr conftest*
  5825. fi
  5826.  
  5827. fi
  5828. fi
  5829.  
  5830. echo "$ac_t""$ac_cv_c_bigendian" 1>&6
  5831. if test $ac_cv_c_bigendian = yes; then
  5832.   cat >> confdefs.h <<\EOF
  5833. #define WORDS_BIGENDIAN 1
  5834. EOF
  5835.  
  5836. fi
  5837.  
  5838.  
  5839. # Check whether right shifting a negative integer extends the sign bit
  5840. # or fills with zeros (like the Cray J90, according to Tim Peters).
  5841. echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
  5842. echo "configure:5843: checking whether right shift extends the sign bit" >&5
  5843. if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
  5844.   echo $ac_n "(cached) $ac_c" 1>&6
  5845. else
  5846.   
  5847. if test "$cross_compiling" = yes; then
  5848.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  5849. else
  5850.   cat > conftest.$ac_ext <<EOF
  5851. #line 5852 "configure"
  5852. #include "confdefs.h"
  5853.  
  5854. int main()
  5855. {
  5856.     exit(((-1)>>3 == -1) ? 0 : 1);
  5857. }
  5858.  
  5859. EOF
  5860. if { (eval echo configure:5861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  5861. then
  5862.   ac_cv_rshift_extends_sign=yes
  5863. else
  5864.   echo "configure: failed program was:" >&5
  5865.   cat conftest.$ac_ext >&5
  5866.   rm -fr conftest*
  5867.   ac_cv_rshift_extends_sign=no
  5868. fi
  5869. rm -fr conftest*
  5870. fi
  5871.  
  5872. fi
  5873.  
  5874. echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
  5875. if test "$ac_cv_rshift_extends_sign" = no
  5876. then
  5877.   cat >> confdefs.h <<\EOF
  5878. #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
  5879. EOF
  5880.  
  5881. fi
  5882.  
  5883.  
  5884. # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
  5885. # Add sys/socket.h to confdefs.h
  5886. cat >> confdefs.h <<\EOF
  5887. #ifdef HAVE_SYS_SOCKET_H
  5888. #include <sys/socket.h>
  5889. #endif
  5890. EOF
  5891. echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
  5892. echo "configure:5893: checking for socklen_t" >&5
  5893. if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
  5894.   echo $ac_n "(cached) $ac_c" 1>&6
  5895. else
  5896.   cat > conftest.$ac_ext <<EOF
  5897. #line 5898 "configure"
  5898. #include "confdefs.h"
  5899. #include <sys/types.h>
  5900. #if STDC_HEADERS
  5901. #include <stdlib.h>
  5902. #include <stddef.h>
  5903. #endif
  5904. EOF
  5905. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  5906.   egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  5907.   rm -rf conftest*
  5908.   ac_cv_type_socklen_t=yes
  5909. else
  5910.   rm -rf conftest*
  5911.   ac_cv_type_socklen_t=no
  5912. fi
  5913. rm -f conftest*
  5914.  
  5915. fi
  5916. echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
  5917. if test $ac_cv_type_socklen_t = no; then
  5918.   cat >> confdefs.h <<\EOF
  5919. #define socklen_t int
  5920. EOF
  5921.  
  5922. fi
  5923.  
  5924.  
  5925. # generate output files
  5926. trap '' 1 2 15
  5927. cat > confcache <<\EOF
  5928. # This file is a shell script that caches the results of configure
  5929. # tests run on this system so they can be shared between configure
  5930. # scripts and configure runs.  It is not useful on other systems.
  5931. # If it contains results you don't want to keep, you may remove or edit it.
  5932. #
  5933. # By default, configure uses ./config.cache as the cache file,
  5934. # creating it if it does not exist already.  You can give configure
  5935. # the --cache-file=FILE option to use a different cache file; that is
  5936. # what configure does when it calls configure scripts in
  5937. # subdirectories, so they share the cache.
  5938. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  5939. # config.status only pays attention to the cache file if you give it the
  5940. # --recheck option to rerun configure.
  5941. #
  5942. EOF
  5943. # The following way of writing the cache mishandles newlines in values,
  5944. # but we know of no workaround that is simple, portable, and efficient.
  5945. # So, don't put newlines in cache variables' values.
  5946. # Ultrix sh set writes to stderr and can't be redirected directly,
  5947. # and sets the high bit in the cache file unless we assign to the vars.
  5948. (set) 2>&1 |
  5949.   case `(ac_space=' '; set | grep ac_space) 2>&1` in
  5950.   *ac_space=\ *)
  5951.     # `set' does not quote correctly, so add quotes (double-quote substitution
  5952.     # turns \\\\ into \\, and sed turns \\ into \).
  5953.     sed -n \
  5954.       -e "s/'/'\\\\''/g" \
  5955.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  5956.     ;;
  5957.   *)
  5958.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  5959.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  5960.     ;;
  5961.   esac >> confcache
  5962. if cmp -s $cache_file confcache; then
  5963.   :
  5964. else
  5965.   if test -w $cache_file; then
  5966.     echo "updating cache $cache_file"
  5967.     cat confcache > $cache_file
  5968.   else
  5969.     echo "not updating unwritable cache $cache_file"
  5970.   fi
  5971. fi
  5972. rm -f confcache
  5973.  
  5974. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  5975.  
  5976. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  5977. # Let make expand exec_prefix.
  5978. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  5979.  
  5980. # Any assignment to VPATH causes Sun make to only execute
  5981. # the first set of double-colon rules, so remove it if not needed.
  5982. # If there is a colon in the path, we need to keep it.
  5983. if test "x$srcdir" = x.; then
  5984.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  5985. fi
  5986.  
  5987. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  5988.  
  5989. DEFS=-DHAVE_CONFIG_H
  5990.  
  5991. # Without the "./", some shells look in PATH for config.status.
  5992. : ${CONFIG_STATUS=./config.status}
  5993.  
  5994. echo creating $CONFIG_STATUS
  5995. rm -f $CONFIG_STATUS
  5996. cat > $CONFIG_STATUS <<EOF
  5997. #! /bin/sh
  5998. # Generated automatically by configure.
  5999. # Run this file to recreate the current configuration.
  6000. # This directory was configured as follows,
  6001. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  6002. #
  6003. # $0 $ac_configure_args
  6004. #
  6005. # Compiler output produced by configure, useful for debugging
  6006. # configure, is in ./config.log if it exists.
  6007.  
  6008. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  6009. for ac_option
  6010. do
  6011.   case "\$ac_option" in
  6012.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  6013.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  6014.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  6015.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  6016.     echo "$CONFIG_STATUS generated by autoconf version 2.13"
  6017.     exit 0 ;;
  6018.   -help | --help | --hel | --he | --h)
  6019.     echo "\$ac_cs_usage"; exit 0 ;;
  6020.   *) echo "\$ac_cs_usage"; exit 1 ;;
  6021.   esac
  6022. done
  6023.  
  6024. ac_given_srcdir=$srcdir
  6025.  
  6026. trap 'rm -fr `echo "Makefile \
  6027.  Objects/Makefile \
  6028.  Parser/Makefile \
  6029.  Grammar/Makefile \
  6030.  Python/Makefile \
  6031.  Modules/Makefile.pre \
  6032.  Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  6033. EOF
  6034. cat >> $CONFIG_STATUS <<EOF
  6035.  
  6036. # Protect against being on the right side of a sed subst in config.status.
  6037. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  6038.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  6039. $ac_vpsub
  6040. $extrasub
  6041. s%@SHELL@%$SHELL%g
  6042. s%@CFLAGS@%$CFLAGS%g
  6043. s%@CPPFLAGS@%$CPPFLAGS%g
  6044. s%@CXXFLAGS@%$CXXFLAGS%g
  6045. s%@FFLAGS@%$FFLAGS%g
  6046. s%@DEFS@%$DEFS%g
  6047. s%@LDFLAGS@%$LDFLAGS%g
  6048. s%@LIBS@%$LIBS%g
  6049. s%@exec_prefix@%$exec_prefix%g
  6050. s%@prefix@%$prefix%g
  6051. s%@program_transform_name@%$program_transform_name%g
  6052. s%@bindir@%$bindir%g
  6053. s%@sbindir@%$sbindir%g
  6054. s%@libexecdir@%$libexecdir%g
  6055. s%@datadir@%$datadir%g
  6056. s%@sysconfdir@%$sysconfdir%g
  6057. s%@sharedstatedir@%$sharedstatedir%g
  6058. s%@localstatedir@%$localstatedir%g
  6059. s%@libdir@%$libdir%g
  6060. s%@includedir@%$includedir%g
  6061. s%@oldincludedir@%$oldincludedir%g
  6062. s%@infodir@%$infodir%g
  6063. s%@mandir@%$mandir%g
  6064. s%@VERSION@%$VERSION%g
  6065. s%@MACHDEP@%$MACHDEP%g
  6066. s%@SGI_ABI@%$SGI_ABI%g
  6067. s%@SET_CXX@%$SET_CXX%g
  6068. s%@MAINOBJ@%$MAINOBJ%g
  6069. s%@CC@%$CC%g
  6070. s%@EXE@%$EXE%g
  6071. s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
  6072. s%@LDLIBRARY@%$LDLIBRARY%g
  6073. s%@LINKCC@%$LINKCC%g
  6074. s%@RANLIB@%$RANLIB%g
  6075. s%@AR@%$AR%g
  6076. s%@INSTALL@%$INSTALL%g
  6077. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  6078. s%@INSTALL_DATA@%$INSTALL_DATA%g
  6079. s%@LN@%$LN%g
  6080. s%@OPT@%$OPT%g
  6081. s%@CPP@%$CPP%g
  6082. s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
  6083. s%@SO@%$SO%g
  6084. s%@LDSHARED@%$LDSHARED%g
  6085. s%@CCSHARED@%$CCSHARED%g
  6086. s%@LINKFORSHARED@%$LINKFORSHARED%g
  6087. s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
  6088. s%@LDLAST@%$LDLAST%g
  6089. s%@USE_GC_MODULE@%$USE_GC_MODULE%g
  6090. s%@USE_BSDDB_MODULE@%$USE_BSDDB_MODULE%g
  6091. s%@HAVE_LIBDB@%$HAVE_LIBDB%g
  6092. s%@DLINCLDIR@%$DLINCLDIR%g
  6093. s%@DYNLOADFILE@%$DYNLOADFILE%g
  6094. s%@LIBOBJS@%$LIBOBJS%g
  6095. s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
  6096. s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
  6097. s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
  6098. s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
  6099. s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
  6100. s%@LIBM@%$LIBM%g
  6101. s%@LIBC@%$LIBC%g
  6102.  
  6103. CEOF
  6104. EOF
  6105.  
  6106. cat >> $CONFIG_STATUS <<\EOF
  6107.  
  6108. # Split the substitutions into bite-sized pieces for seds with
  6109. # small command number limits, like on Digital OSF/1 and HP-UX.
  6110. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  6111. ac_file=1 # Number of current file.
  6112. ac_beg=1 # First line for current file.
  6113. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  6114. ac_more_lines=:
  6115. ac_sed_cmds=""
  6116. while $ac_more_lines; do
  6117.   if test $ac_beg -gt 1; then
  6118.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  6119.   else
  6120.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  6121.   fi
  6122.   if test ! -s conftest.s$ac_file; then
  6123.     ac_more_lines=false
  6124.     rm -f conftest.s$ac_file
  6125.   else
  6126.     if test -z "$ac_sed_cmds"; then
  6127.       ac_sed_cmds="sed -f conftest.s$ac_file"
  6128.     else
  6129.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  6130.     fi
  6131.     ac_file=`expr $ac_file + 1`
  6132.     ac_beg=$ac_end
  6133.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  6134.   fi
  6135. done
  6136. if test -z "$ac_sed_cmds"; then
  6137.   ac_sed_cmds=cat
  6138. fi
  6139. EOF
  6140.  
  6141. cat >> $CONFIG_STATUS <<EOF
  6142.  
  6143. CONFIG_FILES=\${CONFIG_FILES-"Makefile \
  6144.  Objects/Makefile \
  6145.  Parser/Makefile \
  6146.  Grammar/Makefile \
  6147.  Python/Makefile \
  6148.  Modules/Makefile.pre \
  6149.  Modules/Setup.config"}
  6150. EOF
  6151. cat >> $CONFIG_STATUS <<\EOF
  6152. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  6153.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  6154.   case "$ac_file" in
  6155.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  6156.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  6157.   *) ac_file_in="${ac_file}.in" ;;
  6158.   esac
  6159.  
  6160.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  6161.  
  6162.   # Remove last slash and all that follows it.  Not all systems have dirname.
  6163.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  6164.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  6165.     # The file is in a subdirectory.
  6166.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  6167.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  6168.     # A "../" for each directory in $ac_dir_suffix.
  6169.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  6170.   else
  6171.     ac_dir_suffix= ac_dots=
  6172.   fi
  6173.  
  6174.   case "$ac_given_srcdir" in
  6175.   .)  srcdir=.
  6176.       if test -z "$ac_dots"; then top_srcdir=.
  6177.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  6178.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  6179.   *) # Relative path.
  6180.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  6181.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  6182.   esac
  6183.  
  6184.  
  6185.   echo creating "$ac_file"
  6186.   rm -f "$ac_file"
  6187.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  6188.   case "$ac_file" in
  6189.   *Makefile*) ac_comsub="1i\\
  6190. # $configure_input" ;;
  6191.   *) ac_comsub= ;;
  6192.   esac
  6193.  
  6194.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  6195.   sed -e "$ac_comsub
  6196. s%@configure_input@%$configure_input%g
  6197. s%@srcdir@%$srcdir%g
  6198. s%@top_srcdir@%$top_srcdir%g
  6199. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  6200. fi; done
  6201. rm -f conftest.s*
  6202.  
  6203. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  6204. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  6205. #
  6206. # ac_d sets the value in "#define NAME VALUE" lines.
  6207. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  6208. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  6209. ac_dC='\3'
  6210. ac_dD='%g'
  6211. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  6212. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  6213. ac_uB='\([     ]\)%\1#\2define\3'
  6214. ac_uC=' '
  6215. ac_uD='\4%g'
  6216. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  6217. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  6218. ac_eB='$%\1#\2define\3'
  6219. ac_eC=' '
  6220. ac_eD='%g'
  6221.  
  6222. if test "${CONFIG_HEADERS+set}" != set; then
  6223. EOF
  6224. cat >> $CONFIG_STATUS <<EOF
  6225.   CONFIG_HEADERS="config.h"
  6226. EOF
  6227. cat >> $CONFIG_STATUS <<\EOF
  6228. fi
  6229. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  6230.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  6231.   case "$ac_file" in
  6232.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  6233.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  6234.   *) ac_file_in="${ac_file}.in" ;;
  6235.   esac
  6236.  
  6237.   echo creating $ac_file
  6238.  
  6239.   rm -f conftest.frag conftest.in conftest.out
  6240.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  6241.   cat $ac_file_inputs > conftest.in
  6242.  
  6243. EOF
  6244.  
  6245. # Transform confdefs.h into a sed script conftest.vals that substitutes
  6246. # the proper values into config.h.in to produce config.h.  And first:
  6247. # Protect against being on the right side of a sed subst in config.status.
  6248. # Protect against being in an unquoted here document in config.status.
  6249. rm -f conftest.vals
  6250. cat > conftest.hdr <<\EOF
  6251. s/[\\&%]/\\&/g
  6252. s%[\\$`]%\\&%g
  6253. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  6254. s%ac_d%ac_u%gp
  6255. s%ac_u%ac_e%gp
  6256. EOF
  6257. sed -n -f conftest.hdr confdefs.h > conftest.vals
  6258. rm -f conftest.hdr
  6259.  
  6260. # This sed command replaces #undef with comments.  This is necessary, for
  6261. # example, in the case of _POSIX_SOURCE, which is predefined and required
  6262. # on some systems where configure will not decide to define it.
  6263. cat >> conftest.vals <<\EOF
  6264. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  6265. EOF
  6266.  
  6267. # Break up conftest.vals because some shells have a limit on
  6268. # the size of here documents, and old seds have small limits too.
  6269.  
  6270. rm -f conftest.tail
  6271. while :
  6272. do
  6273.   ac_lines=`grep -c . conftest.vals`
  6274.   # grep -c gives empty output for an empty file on some AIX systems.
  6275.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  6276.   # Write a limited-size here document to conftest.frag.
  6277.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  6278.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  6279.   echo 'CEOF
  6280.   sed -f conftest.frag conftest.in > conftest.out
  6281.   rm -f conftest.in
  6282.   mv conftest.out conftest.in
  6283. ' >> $CONFIG_STATUS
  6284.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  6285.   rm -f conftest.vals
  6286.   mv conftest.tail conftest.vals
  6287. done
  6288. rm -f conftest.vals
  6289.  
  6290. cat >> $CONFIG_STATUS <<\EOF
  6291.   rm -f conftest.frag conftest.h
  6292.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  6293.   cat conftest.in >> conftest.h
  6294.   rm -f conftest.in
  6295.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  6296.     echo "$ac_file is unchanged"
  6297.     rm -f conftest.h
  6298.   else
  6299.     # Remove last slash and all that follows it.  Not all systems have dirname.
  6300.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  6301.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  6302.       # The file is in a subdirectory.
  6303.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  6304.     fi
  6305.     rm -f $ac_file
  6306.     mv conftest.h $ac_file
  6307.   fi
  6308. fi; done
  6309.  
  6310. EOF
  6311. cat >> $CONFIG_STATUS <<EOF
  6312.  
  6313. EOF
  6314. cat >> $CONFIG_STATUS <<\EOF
  6315.  
  6316. exit 0
  6317. EOF
  6318. chmod +x $CONFIG_STATUS
  6319. rm -fr confdefs* $ac_clean_files
  6320. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  6321.  
  6322.