Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1 | #! /bin/sh |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2 | |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3 | # From configure.in Revision: 1.164 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5 | # Guess values for system-dependent variables and create Makefiles. |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 6 | # Generated automatically using autoconf version 2.14.1 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8 | # |
| 9 | # This configure script is free software; the Free Software Foundation |
| 10 | # gives unlimited permission to copy, distribute and modify it. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 11 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12 | # Defaults: |
| 13 | ac_help= |
| 14 | ac_default_prefix=/usr/local |
| 15 | # Any additions from configure.in: |
| 16 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 17 | --with-next-archs='arch1 arch2 ..' build MAB binary" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 18 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 19 | --with-next-framework Build (OpenStep|Rhapsody|MacOSX) framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 20 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 21 | --with-dyld Use (OpenStep|Rhapsody|MacOSX) dynamic linker" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 22 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 23 | --without-gcc never use gcc" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 24 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 25 | --with-cxx=<compiler> enable C++ support" |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 26 | ac_help="$ac_help |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 27 | --with-suffix=.exe set executable suffix" |
| 28 | ac_help="$ac_help |
Skip Montanaro | cb85326 | 2000-08-30 22:29:48 +0000 | [diff] [blame] | 29 | --with-pydebug build with Py_DEBUG defined" |
| 30 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 31 | --with-libs='lib1 ...' link against additional libs" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 32 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 33 | --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries" |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 34 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 35 | --with(out)-threads[=DIRECTORY] disable/enable thread support" |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 36 | ac_help="$ac_help |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 37 | --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 38 | ac_help="$ac_help |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 39 | --with-pth use GNU pth threading libraries" |
| 40 | ac_help="$ac_help |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 41 | --with(out)-cycle-gc disable/enable garbage collection" |
| 42 | ac_help="$ac_help |
Fred Drake | a50d6ec | 2000-08-31 16:13:20 +0000 | [diff] [blame] | 43 | --with(out)-libdb disable/enable bsddb module" |
| 44 | ac_help="$ac_help |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 45 | --with-wctype-functions use wctype.h functions" |
| 46 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 47 | --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 48 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 49 | --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 50 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 51 | --with-fpectl enable SIGFPE catching" |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 52 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 53 | --with-libm=STRING math library" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 54 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 55 | --with-libc=STRING C library" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 56 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 61 | cache_file=./config.cache |
| 62 | exec_prefix=NONE |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 63 | host=NONE |
| 64 | no_create= |
| 65 | nonopt=NONE |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 66 | no_recursion= |
| 67 | prefix=NONE |
| 68 | program_prefix=NONE |
| 69 | program_suffix=NONE |
| 70 | program_transform_name=s,x,x, |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 71 | silent= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 72 | site= |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 73 | srcdir= |
| 74 | target=NONE |
| 75 | verbose= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 76 | x_includes=NONE |
| 77 | x_libraries=NONE |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 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' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 90 | |
| 91 | # Initialize some other variables. |
| 92 | subdirs= |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 93 | MFLAGS= MAKEFLAGS= |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 94 | SHELL=${CONFIG_SHELL-/bin/sh} |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 95 | # Maximum number of lines to put in a shell here document. |
| 96 | ac_max_here_lines=12 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 97 | |
| 98 | ac_prev= |
| 99 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 100 | do |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 101 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 107 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 108 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 109 | case "$ac_option" in |
| 110 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
| 111 | *) ac_optarg= ;; |
| 112 | esac |
| 113 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 114 | # Accept the important Cygnus configure options, so we can diagnose typos. |
| 115 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 116 | case "$ac_option" in |
| 117 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 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) |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 124 | ac_prev=build ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 125 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 126 | build="$ac_optarg" ;; |
| 127 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 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 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 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 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 141 | -disable-* | --disable-*) |
| 142 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 143 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 144 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 145 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 152 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 153 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 154 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 173 | # Obsolete; use --with-gas. |
| 174 | with_gas=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 175 | |
| 176 | -help | --help | --hel | --he) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 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. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 179 | cat << EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 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] |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 191 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 192 | [same as prefix] |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 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] |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 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 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 210 | --program-transform-name=PROGRAM |
| 211 | run sed PROGRAM on installed program names |
| 212 | EOF |
| 213 | cat << EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 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 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 225 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 226 | if test -n "$ac_help"; then |
| 227 | echo "--enable and --with options recognized:$ac_help" |
| 228 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 229 | exit 0 ;; |
| 230 | |
| 231 | -host | --host | --hos | --ho) |
| 232 | ac_prev=host ;; |
| 233 | -host=* | --host=* | --hos=* | --ho=*) |
| 234 | host="$ac_optarg" ;; |
| 235 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 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 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 274 | -nfp | --nfp | --nf) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 275 | # Obsolete; use --without-fp. |
| 276 | with_fp=no ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 277 | |
| 278 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 279 | | --no-cr | --no-c) |
| 280 | no_create=yes ;; |
| 281 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 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 ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 285 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 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 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 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 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 352 | -site | --site | --sit) |
| 353 | ac_prev=site ;; |
| 354 | -site=* | --site=* | --sit=*) |
| 355 | site="$ac_optarg" ;; |
| 356 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 357 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
| 358 | ac_prev=srcdir ;; |
| 359 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
| 360 | srcdir="$ac_optarg" ;; |
| 361 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 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 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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) |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 378 | echo "configure generated by autoconf version 2.14.1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 379 | exit 0 ;; |
| 380 | |
| 381 | -with-* | --with-*) |
| 382 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 383 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 384 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 385 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 396 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 397 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 398 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 399 | fi |
| 400 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 401 | eval "with_${ac_package}=no" ;; |
| 402 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 403 | --x) |
| 404 | # Obsolete; use --with-x. |
| 405 | with_x=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 421 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 422 | ;; |
| 423 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 424 | *) |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 425 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 426 | echo "configure: warning: $ac_option: invalid host type" 1>&2 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 427 | fi |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 428 | if test "x$nonopt" != xNONE; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 429 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 430 | fi |
| 431 | nonopt="$ac_option" |
| 432 | ;; |
| 433 | |
| 434 | esac |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 435 | done |
| 436 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 437 | if test -n "$ac_prev"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 438 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 439 | fi |
| 440 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 441 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 442 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 443 | # File descriptor usage: |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 444 | # 0 standard input |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 445 | # 1 file creation |
| 446 | # 2 errors and warnings |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 447 | # 3 some systems may open it to /dev/tty |
| 448 | # 4 used on the Kubota Titan |
| 449 | # 6 checking for... messages and results |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 450 | # 5 compiler messages saved in config.log |
| 451 | if test "$silent" = yes; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 452 | exec 6>/dev/null |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 453 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 454 | exec 6>&1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 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 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 468 | case "$ac_arg" in |
| 469 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 470 | | --no-cr | --no-c) ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 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" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 476 | esac |
| 477 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 478 | |
| 479 | # NLS nuisances. |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 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. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 484 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 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 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 488 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 489 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
| 490 | rm -rf conftest* confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 491 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. |
| 492 | echo > confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 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. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 496 | ac_unique_file=Include/object.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 497 | |
| 498 | # Find the source files, if location was not specified. |
| 499 | if test -z "$srcdir"; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 500 | ac_srcdir_defaulted=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 501 | # Try the directory containing this script, then its parent. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 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 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 507 | srcdir=.. |
| 508 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 509 | else |
| 510 | ac_srcdir_defaulted=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 511 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 512 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 513 | if test "$ac_srcdir_defaulted" = yes; then |
| 514 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 515 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 516 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 517 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 518 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 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" |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 538 | test -f "$cache_file" && . $cache_file |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 539 | else |
| 540 | echo "creating cache $cache_file" |
| 541 | > $cache_file |
| 542 | fi |
| 543 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 544 | ac_ext=c |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 545 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 546 | ac_cpp='$CPP $CPPFLAGS' |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 547 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 548 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 549 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 550 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 551 | ac_exeext= |
| 552 | ac_objext=o |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 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 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 564 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 565 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 566 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 567 | |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 568 | # Set VERSION so we only need to edit in one place (i.e., here) |
| 569 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 570 | VERSION=2.0 |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 571 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 572 | # NEXTSTEP stuff |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 573 | if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 574 | |
| 575 | echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 576 | echo "configure:577: checking for --with-next-archs" >&5 |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 577 | # Check whether --with-next-archs or --without-next-archs was given. |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 578 | if test "${with_next_archs+set}" = set; then |
| 579 | withval="$with_next_archs" |
| 580 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 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 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 590 | fi |
| 591 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 592 | |
| 593 | if test -z "$MACHDEP" |
| 594 | then |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 595 | set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \ |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 596 | sed -e 's/://' -e 's/\./_/'` && \ |
| 597 | ac_sys_system=next && ac_sys_release=$4 |
| 598 | |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 599 | MACHDEP="$ac_sys_system$ac_sys_release" |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 600 | fi |
| 601 | fi |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 602 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 603 | # Check whether --with-next-framework or --without-next-framework was given. |
| 604 | if test "${with_next_framework+set}" = set; then |
| 605 | withval="$with_next_framework" |
| 606 | : |
| 607 | fi |
| 608 | |
| 609 | # Check whether --with-dyld or --without-dyld was given. |
| 610 | if test "${with_dyld+set}" = set; then |
| 611 | withval="$with_dyld" |
| 612 | : |
| 613 | fi |
| 614 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 615 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 616 | # Set name for machine-dependent library files |
| 617 | |
| 618 | echo $ac_n "checking MACHDEP""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 619 | echo "configure:620: checking MACHDEP" >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 620 | if test -z "$MACHDEP" |
| 621 | then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 622 | ac_sys_system=`uname -s` |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 623 | if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 624 | ac_sys_release=`uname -v` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 625 | else |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 626 | ac_sys_release=`uname -r` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 627 | fi |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 628 | ac_md_system=`echo $ac_sys_system | |
| 629 | tr -d '/ ' | tr '[A-Z]' '[a-z]'` |
| 630 | ac_md_release=`echo $ac_sys_release | |
| 631 | tr -d '/ ' | sed 's/\..*//'` |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 632 | MACHDEP="$ac_md_system$ac_md_release" |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 633 | |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 634 | case $MACHDEP in |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 635 | '') MACHDEP="unknown";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 636 | esac |
| 637 | fi |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 638 | |
| 639 | # |
| 640 | # SGI compilers allow the specification of the both the ABI and the |
| 641 | # ISA on the command line. Depending on the values of these switches, |
| 642 | # different and often incompatable code will be generated. |
| 643 | # |
| 644 | # The SGI_ABI variable can be used to modify the CC and LDFLAGS and |
| 645 | # thus supply support for various ABI/ISA combinations. The MACHDEP |
| 646 | # variable is also adjusted. |
| 647 | # |
| 648 | |
| 649 | if test ! -z "$SGI_ABI" |
| 650 | then |
| 651 | CC="cc $SGI_ABI" |
| 652 | LDFLAGS="$SGI_ABI $LDFLAGS" |
| 653 | MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'` |
| 654 | fi |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 655 | echo "$ac_t""$MACHDEP" 1>&6 |
| 656 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 657 | # |
| 658 | # CCC is the command that compiles C++ programs |
| 659 | # |
| 660 | # Not all make programs have this predefined. |
| 661 | # |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 662 | #AC_SUBST(SET_CCC) |
| 663 | #AC_MSG_CHECKING(CCC) |
| 664 | #if test -z "$CCC" |
| 665 | #then |
| 666 | # case $ac_sys_system in |
| 667 | # IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";; |
| 668 | # Linux*) SET_CCC="CCC= g++";; |
| 669 | # *) SET_CCC="" |
| 670 | # esac |
| 671 | #else |
| 672 | # SET_CCC="CCC= ${CCC}" |
| 673 | #fi |
| 674 | #AC_MSG_RESULT($SET_CCC) |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 675 | |
| 676 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 677 | # checks for alternative programs |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 678 | echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 679 | echo "configure:680: checking for --without-gcc" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 680 | # Check whether --with-gcc or --without-gcc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 681 | if test "${with_gcc+set}" = set; then |
| 682 | withval="$with_gcc" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 683 | |
| 684 | case $withval in |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 685 | no) CC=cc |
| 686 | without_gcc=yes;; |
| 687 | yes) CC=gcc |
| 688 | without_gcc=no;; |
| 689 | *) CC=$withval |
| 690 | without_gcc=$withval;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 691 | esac |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 692 | else |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 693 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 694 | case $ac_sys_system in |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 695 | OSF1) CC=cc |
| 696 | without_gcc=;; |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 697 | BeOS*) |
| 698 | # Dunno if it's a good idea to get this over with all at once, or |
| 699 | # to handle it in with the other goodies. |
| 700 | MACHDEP=beos |
| 701 | |
| 702 | case $BE_HOST_CPU in |
| 703 | ppc) |
Guido van Rossum | 8137680 | 1999-04-06 15:50:51 +0000 | [diff] [blame] | 704 | CC="mwcc -I$PWD/BeOS -nodup" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 705 | without_gcc=yes |
Guido van Rossum | 6b9da45 | 1999-03-24 17:48:12 +0000 | [diff] [blame] | 706 | case `uname -r` in |
| 707 | 4.0*) OPT="-DUSE_DL_EXPORT -O7 -opt schedule604 -export pragma" ;; |
| 708 | *) OPT="-DUSE_DL_EXPORT -O2 -proc 604e -export pragma" ;; |
| 709 | esac |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 710 | CCSHARED=-UUSE_DL_EXPORT |
| 711 | LDFLAGS="$LDFLAGS -nodup" |
| 712 | |
| 713 | AR="$PWD/BeOS/ar-fake" |
| 714 | RANLIB=: |
| 715 | |
| 716 | cat >> confdefs.h <<\EOF |
| 717 | #define DL_EXPORT_HEADER "dl_export.h" |
| 718 | EOF |
| 719 | |
| 720 | ;; |
| 721 | x86) |
| 722 | CC="gcc -I$PWD/BeOS" |
| 723 | without_gcc=no |
Guido van Rossum | 32000e8 | 2000-05-22 21:31:50 +0000 | [diff] [blame] | 724 | OPT="-DUSE_DL_EXPORT -O" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 725 | CCSHARED=-UUSE_DL_EXPORT |
| 726 | |
| 727 | AR="$PWD/BeOS/ar-fake" |
| 728 | RANLIB=: |
| 729 | |
| 730 | cat >> confdefs.h <<\EOF |
| 731 | #define DL_EXPORT_HEADER "dl_export.h" |
| 732 | EOF |
| 733 | |
| 734 | ;; |
| 735 | *) |
| 736 | { echo "configure: error: Your BeOS system isn't PowerPC or x86... neat" 1>&2; exit 1; } |
| 737 | ;; |
| 738 | esac |
| 739 | ;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 740 | Monterey*) |
| 741 | RANLIB=: |
| 742 | without_gcc=;; |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 743 | *) without_gcc=no;; |
| 744 | esac |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 745 | fi |
| 746 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 747 | echo "$ac_t""$without_gcc" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 748 | |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 749 | |
| 750 | |
| 751 | MAINOBJ=python.o |
| 752 | echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 753 | echo "configure:754: checking for --with-cxx=<compiler>" >&5 |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 754 | # Check whether --with-cxx or --without-cxx was given. |
| 755 | if test "${with_cxx+set}" = set; then |
| 756 | withval="$with_cxx" |
| 757 | |
| 758 | case $withval in |
| 759 | no) CXX= |
| 760 | with_cxx=no;; |
| 761 | *) CXX=$withval |
| 762 | MAINOBJ=ccpython.o |
| 763 | with_cxx=$withval;; |
| 764 | esac |
| 765 | else |
| 766 | |
| 767 | with_cxx=no |
| 768 | |
| 769 | fi |
| 770 | |
| 771 | echo "$ac_t""$with_cxx" 1>&6 |
Guido van Rossum | e126233 | 2000-09-22 19:41:56 +0000 | [diff] [blame] | 772 | SET_CXX="CXX=$CXX" |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 773 | |
| 774 | #AC_MSG_CHECKING(CCC) |
| 775 | #if test -z "$CCC" |
| 776 | #then |
| 777 | # case $ac_sys_system in |
| 778 | # IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";; |
| 779 | # Linux*) SET_CCC="CCC= g++";; |
| 780 | # *) SET_CCC="" |
| 781 | # esac |
| 782 | #else |
| 783 | # SET_CCC="CCC= ${CCC}" |
| 784 | #fi |
| 785 | #AC_MSG_RESULT($SET_CCC) |
| 786 | |
Guido van Rossum | 8b131c5 | 1995-03-09 14:10:13 +0000 | [diff] [blame] | 787 | # If the user switches compilers, we can't believe the cache |
| 788 | if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" |
| 789 | then |
| 790 | { echo "configure: error: cached CC is different -- throw away $cache_file |
| 791 | (it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; } |
| 792 | fi |
| 793 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 794 | # Extract the first word of "gcc", so it can be a program name with args. |
| 795 | set dummy gcc; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 796 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 797 | echo "configure:798: checking for $ac_word" >&5 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 798 | if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 799 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 800 | else |
| 801 | if test -n "$CC"; then |
| 802 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 803 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 804 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 805 | ac_dummy="$PATH" |
| 806 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 807 | test -z "$ac_dir" && ac_dir=. |
| 808 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 809 | ac_cv_prog_CC="gcc" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 810 | break |
| 811 | fi |
| 812 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 813 | IFS="$ac_save_ifs" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 814 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 815 | fi |
| 816 | CC="$ac_cv_prog_CC" |
| 817 | if test -n "$CC"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 818 | echo "$ac_t""$CC" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 819 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 820 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 821 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 822 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 823 | if test -z "$CC"; then |
| 824 | # Extract the first word of "cc", so it can be a program name with args. |
| 825 | set dummy cc; ac_word=$2 |
| 826 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 827 | echo "configure:828: checking for $ac_word" >&5 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 828 | if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 829 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 830 | else |
| 831 | if test -n "$CC"; then |
| 832 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 833 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 834 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 835 | ac_prog_rejected=no |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 836 | ac_dummy="$PATH" |
| 837 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 838 | test -z "$ac_dir" && ac_dir=. |
| 839 | if test -f $ac_dir/$ac_word; then |
| 840 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then |
| 841 | ac_prog_rejected=yes |
| 842 | continue |
| 843 | fi |
| 844 | ac_cv_prog_CC="cc" |
| 845 | break |
| 846 | fi |
| 847 | done |
| 848 | IFS="$ac_save_ifs" |
| 849 | if test $ac_prog_rejected = yes; then |
| 850 | # We found a bogon in the path, so make sure we never use it. |
| 851 | set dummy $ac_cv_prog_CC |
| 852 | shift |
| 853 | if test $# -gt 0; then |
| 854 | # We chose a different compiler from the bogus one. |
| 855 | # However, it has the same basename, so the bogon will be chosen |
| 856 | # first if we set CC to just the basename; use the full file name. |
| 857 | shift |
| 858 | set dummy "$ac_dir/$ac_word" "$@" |
| 859 | shift |
| 860 | ac_cv_prog_CC="$@" |
| 861 | fi |
| 862 | fi |
| 863 | fi |
| 864 | fi |
| 865 | CC="$ac_cv_prog_CC" |
| 866 | if test -n "$CC"; then |
| 867 | echo "$ac_t""$CC" 1>&6 |
| 868 | else |
| 869 | echo "$ac_t""no" 1>&6 |
| 870 | fi |
| 871 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 872 | if test -z "$CC"; then |
| 873 | case "`uname -s`" in |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 874 | *win32* | *WIN32* | *CYGWIN*) |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 875 | # Extract the first word of "cl", so it can be a program name with args. |
| 876 | set dummy cl; ac_word=$2 |
| 877 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 878 | echo "configure:879: checking for $ac_word" >&5 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 879 | if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 880 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 881 | else |
| 882 | if test -n "$CC"; then |
| 883 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 884 | else |
| 885 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 886 | ac_dummy="$PATH" |
| 887 | for ac_dir in $ac_dummy; do |
| 888 | test -z "$ac_dir" && ac_dir=. |
| 889 | if test -f $ac_dir/$ac_word; then |
| 890 | ac_cv_prog_CC="cl" |
| 891 | break |
| 892 | fi |
| 893 | done |
| 894 | IFS="$ac_save_ifs" |
| 895 | fi |
| 896 | fi |
| 897 | CC="$ac_cv_prog_CC" |
| 898 | if test -n "$CC"; then |
| 899 | echo "$ac_t""$CC" 1>&6 |
| 900 | else |
| 901 | echo "$ac_t""no" 1>&6 |
| 902 | fi |
| 903 | ;; |
| 904 | esac |
| 905 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 906 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
| 907 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 908 | |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 909 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
| 910 | echo "configure:911: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 911 | |
| 912 | ac_ext=c |
| 913 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 914 | ac_cpp='$CPP $CPPFLAGS' |
| 915 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 916 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 917 | cross_compiling=$ac_cv_prog_cc_cross |
| 918 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 919 | cat > conftest.$ac_ext << EOF |
| 920 | |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 921 | #line 922 "configure" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 922 | #include "confdefs.h" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 923 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 924 | main(){return(0);} |
| 925 | EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 926 | if { (eval echo configure:927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 927 | ac_cv_prog_cc_works=yes |
| 928 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 929 | if (./conftest; exit) 2>/dev/null; then |
| 930 | ac_cv_prog_cc_cross=no |
| 931 | else |
| 932 | ac_cv_prog_cc_cross=yes |
| 933 | fi |
| 934 | else |
| 935 | echo "configure: failed program was:" >&5 |
| 936 | cat conftest.$ac_ext >&5 |
| 937 | ac_cv_prog_cc_works=no |
| 938 | fi |
| 939 | rm -fr conftest* |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 940 | ac_ext=c |
| 941 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 942 | ac_cpp='$CPP $CPPFLAGS' |
| 943 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 944 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 945 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 946 | |
| 947 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
| 948 | if test $ac_cv_prog_cc_works = no; then |
| 949 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } |
| 950 | fi |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 951 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
| 952 | echo "configure:953: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 953 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
| 954 | cross_compiling=$ac_cv_prog_cc_cross |
| 955 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 956 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 957 | echo "configure:958: checking whether we are using GNU C" >&5 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 958 | if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 959 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 960 | else |
| 961 | cat > conftest.c <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 962 | #ifdef __GNUC__ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 963 | yes; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 964 | #endif |
| 965 | EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 966 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 967 | ac_cv_prog_gcc=yes |
| 968 | else |
| 969 | ac_cv_prog_gcc=no |
| 970 | fi |
| 971 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 972 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 973 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 974 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 975 | if test $ac_cv_prog_gcc = yes; then |
| 976 | GCC=yes |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 977 | else |
| 978 | GCC= |
| 979 | fi |
| 980 | |
| 981 | ac_test_CFLAGS="${CFLAGS+set}" |
| 982 | ac_save_CFLAGS="$CFLAGS" |
| 983 | CFLAGS= |
| 984 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 985 | echo "configure:986: checking whether ${CC-cc} accepts -g" >&5 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 986 | if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 987 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 988 | else |
| 989 | echo 'void f(){}' > conftest.c |
| 990 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 991 | ac_cv_prog_cc_g=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 992 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 993 | ac_cv_prog_cc_g=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 994 | fi |
| 995 | rm -f conftest* |
| 996 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 997 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 998 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 999 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1000 | if test "$ac_test_CFLAGS" = set; then |
| 1001 | CFLAGS="$ac_save_CFLAGS" |
| 1002 | elif test $ac_cv_prog_cc_g = yes; then |
| 1003 | if test "$GCC" = yes; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1004 | CFLAGS="-g -O2" |
| 1005 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1006 | CFLAGS="-g" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1007 | fi |
| 1008 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1009 | if test "$GCC" = yes; then |
| 1010 | CFLAGS="-O2" |
| 1011 | else |
| 1012 | CFLAGS= |
| 1013 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1014 | fi |
| 1015 | |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1016 | |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1017 | echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6 |
| 1018 | echo "configure:1019: checking for --with-suffix" >&5 |
| 1019 | # Check whether --with-suffix or --without-suffix was given. |
| 1020 | if test "${with_suffix+set}" = set; then |
| 1021 | withval="$with_suffix" |
| 1022 | |
| 1023 | case $withval in |
| 1024 | no) EXE=;; |
| 1025 | yes) EXE=.exe;; |
| 1026 | *) EXE=$withval;; |
| 1027 | esac |
| 1028 | fi |
| 1029 | |
| 1030 | echo "$ac_t""$EXE" 1>&6 |
| 1031 | |
Guido van Rossum | dd997f7 | 1998-10-07 19:58:26 +0000 | [diff] [blame] | 1032 | case $MACHDEP in |
| 1033 | bsdos*) |
| 1034 | case $CC in |
| 1035 | gcc) CC="$CC -D_HAVE_BSDI";; |
| 1036 | esac;; |
| 1037 | esac |
| 1038 | |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1039 | case $ac_sys_system in |
| 1040 | hp*|HP*) |
| 1041 | case $CC in |
Guido van Rossum | cd5ff9f | 2000-09-22 16:15:54 +0000 | [diff] [blame] | 1042 | cc|*/cc) CC="$CC -Ae";; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1043 | esac;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1044 | BeOS*) |
Guido van Rossum | cd5ff9f | 2000-09-22 16:15:54 +0000 | [diff] [blame] | 1045 | case $CC in |
| 1046 | cc) CC=cc;; |
| 1047 | esac;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1048 | Monterey*) |
| 1049 | case $CC in |
| 1050 | cc) CC="$CC -Wl,-Bexport";; |
| 1051 | esac;; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1052 | esac |
| 1053 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1054 | # LDLIBRARY is the name of the library to link against (as opposed to the |
| 1055 | # name of the library into which to insert object files). On systems |
| 1056 | # without shared libraries, LDLIBRARY is the same as LIBRARY (defined in |
| 1057 | # the Makefiles). |
| 1058 | |
| 1059 | |
| 1060 | LDLIBRARY='' |
| 1061 | |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1062 | # LINKCC is the command that links the python executable -- default is $(CC). |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1063 | # This is altered for AIX and BeOS in order to build the export list before |
| 1064 | # linking. |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1065 | |
| 1066 | echo $ac_n "checking LINKCC""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1067 | echo "configure:1068: checking LINKCC" >&5 |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 1068 | if test -z "$LINKCC" -a ! -z "$CXX" |
| 1069 | then |
| 1070 | LINKCC="$CXX" |
| 1071 | fi |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1072 | if test -z "$LINKCC" |
| 1073 | then |
| 1074 | case $ac_sys_system in |
| 1075 | AIX*) |
Guido van Rossum | 45140f9 | 1997-08-29 18:44:06 +0000 | [diff] [blame] | 1076 | LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1077 | BeOS*) |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 1078 | LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1079 | LDLIBRARY='libpython$(VERSION).so';; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 1080 | dgux*) |
| 1081 | LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1082 | Monterey64*) |
| 1083 | LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";; |
Guido van Rossum | 25f9303 | 1997-08-18 16:00:04 +0000 | [diff] [blame] | 1084 | *) LINKCC="\$(PURIFY) \$(CC)";; |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1085 | esac |
| 1086 | fi |
| 1087 | echo "$ac_t""$LINKCC" 1>&6 |
| 1088 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1089 | echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1090 | echo "configure:1091: checking LDLIBRARY" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1091 | |
| 1092 | # NeXT framework builds require that the 'ar' library be converted into |
| 1093 | # a bundle using libtool. |
| 1094 | if test "$with_next_framework" |
| 1095 | then |
| 1096 | LDLIBRARY='libpython$(VERSION).dylib' |
| 1097 | fi |
| 1098 | |
| 1099 | # DG/UX requires some fancy ld contortions to produce a .so from an .a |
| 1100 | if test "$MACHDEP" = "dguxR4" |
| 1101 | then |
| 1102 | LDLIBRARY='libpython$(VERSION).so' |
| 1103 | OPT="$OPT -pic" |
| 1104 | fi |
| 1105 | echo "$ac_t""$LDLIBRARY" 1>&6 |
| 1106 | |
| 1107 | # If LDLIBRARY is different from LIBRARY, emit a rule to build it. |
| 1108 | if test -z "$LDLIBRARY" |
| 1109 | then |
| 1110 | LDLIBRARY='libpython$(VERSION).a' |
| 1111 | MAKE_LDLIBRARY="true" |
| 1112 | else |
| 1113 | MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)' |
| 1114 | fi |
| 1115 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1116 | # Extract the first word of "ranlib", so it can be a program name with args. |
| 1117 | set dummy ranlib; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1118 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1119 | echo "configure:1120: checking for $ac_word" >&5 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1120 | if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1121 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1122 | else |
| 1123 | if test -n "$RANLIB"; then |
| 1124 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 1125 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1126 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1127 | ac_dummy="$PATH" |
| 1128 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1129 | test -z "$ac_dir" && ac_dir=. |
| 1130 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1131 | ac_cv_prog_RANLIB="ranlib" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1132 | break |
| 1133 | fi |
| 1134 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1135 | IFS="$ac_save_ifs" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1136 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1137 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1138 | fi |
| 1139 | RANLIB="$ac_cv_prog_RANLIB" |
| 1140 | if test -n "$RANLIB"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1141 | echo "$ac_t""$RANLIB" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1142 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1143 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1144 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1145 | |
| 1146 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1147 | for ac_prog in ar aal |
| 1148 | do |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1149 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 1150 | set dummy $ac_prog; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1151 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1152 | echo "configure:1153: checking for $ac_word" >&5 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1153 | if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1154 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1155 | else |
| 1156 | if test -n "$AR"; then |
| 1157 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 1158 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1159 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1160 | ac_dummy="$PATH" |
| 1161 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1162 | test -z "$ac_dir" && ac_dir=. |
| 1163 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1164 | ac_cv_prog_AR="$ac_prog" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1165 | break |
| 1166 | fi |
| 1167 | done |
| 1168 | IFS="$ac_save_ifs" |
| 1169 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1170 | fi |
| 1171 | AR="$ac_cv_prog_AR" |
| 1172 | if test -n "$AR"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1173 | echo "$ac_t""$AR" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1174 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1175 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1176 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1177 | |
| 1178 | test -n "$AR" && break |
| 1179 | done |
| 1180 | test -n "$AR" || AR="ar" |
| 1181 | |
| 1182 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1183 | |
| 1184 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1185 | # Install just never works :-( |
| 1186 | if test -z "$INSTALL" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1187 | then |
| 1188 | INSTALL=cp |
| 1189 | INSTALL_PROGRAM=cp |
| 1190 | INSTALL_DATA=cp |
| 1191 | else |
| 1192 | INSTALL_PROGRAM="$INSTALL" |
| 1193 | INSTALL_DATA="$INSTALL -m 644" |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1194 | fi |
| 1195 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1196 | # Not every filesystem supports hard links |
| 1197 | |
| 1198 | if test -z "$LN" ; then |
| 1199 | case $ac_sys_system in |
| 1200 | BeOS*) LN="ln -s";; |
| 1201 | *) LN=ln;; |
| 1202 | esac |
| 1203 | fi |
| 1204 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1205 | # Optimizer/debugger flags passed between Makefiles |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1206 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1207 | if test -z "$OPT" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1208 | then |
Guido van Rossum | edca74a | 1997-07-18 23:29:40 +0000 | [diff] [blame] | 1209 | case $GCC in |
| 1210 | yes) |
| 1211 | case $ac_cv_prog_cc_g in |
| 1212 | yes) OPT="-g -O2";; |
| 1213 | *) OPT="-O2";; |
| 1214 | esac |
| 1215 | ;; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1216 | *) OPT="-O";; |
| 1217 | esac |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1218 | fi |
| 1219 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1220 | # The current (beta) Monterey compiler dies with optimizations |
| 1221 | case $ac_sys_system in |
| 1222 | Monterey*) OPT="";; |
| 1223 | esac |
| 1224 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 1225 | if test "$ac_arch_flags" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 1226 | then |
| 1227 | OPT="$OPT $ac_arch_flags" |
| 1228 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1229 | # checks for UNIX variants that set C preprocessor variables |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1230 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1231 | echo "configure:1232: checking how to run the C preprocessor" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1232 | # On Suns, sometimes $CPP names a directory. |
| 1233 | if test -n "$CPP" && test -d "$CPP"; then |
| 1234 | CPP= |
| 1235 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1236 | if test -z "$CPP"; then |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1237 | if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1238 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1239 | else |
| 1240 | # This must be in double quotes, not single quotes, because CPP may get |
| 1241 | # substituted into the Makefile and "${CC-cc}" will confuse make. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1242 | CPP="${CC-cc} -E" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1243 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 1244 | # not just through cpp. |
| 1245 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 1246 | #line 1247 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1247 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1248 | #include <assert.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1249 | Syntax Error |
| 1250 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1251 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 1252 | { (eval echo configure:1253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1253 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1254 | if test -z "$ac_err"; then |
| 1255 | : |
| 1256 | else |
| 1257 | echo "$ac_err" >&5 |
| 1258 | echo "configure: failed program was:" >&5 |
| 1259 | cat conftest.$ac_ext >&5 |
| 1260 | rm -rf conftest* |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1261 | CPP="${CC-cc} -E -traditional-cpp" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1262 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 1263 | #line 1264 "configure" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1264 | #include "confdefs.h" |
| 1265 | #include <assert.h> |
| 1266 | Syntax Error |
| 1267 | EOF |
| 1268 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 1269 | { (eval echo configure:1270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1270 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1271 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1272 | : |
| 1273 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1274 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1275 | echo "configure: failed program was:" >&5 |
| 1276 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1277 | rm -rf conftest* |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1278 | CPP="${CC-cc} -nologo -E" |
| 1279 | cat > conftest.$ac_ext <<EOF |
| 1280 | #line 1281 "configure" |
| 1281 | #include "confdefs.h" |
| 1282 | #include <assert.h> |
| 1283 | Syntax Error |
| 1284 | EOF |
| 1285 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| 1286 | { (eval echo configure:1287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| 1287 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1288 | if test -z "$ac_err"; then |
| 1289 | : |
| 1290 | else |
| 1291 | echo "$ac_err" >&5 |
| 1292 | echo "configure: failed program was:" >&5 |
| 1293 | cat conftest.$ac_ext >&5 |
| 1294 | rm -rf conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1295 | CPP=/lib/cpp |
| 1296 | fi |
| 1297 | rm -f conftest* |
| 1298 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1299 | rm -f conftest* |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1300 | fi |
| 1301 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1302 | ac_cv_prog_CPP="$CPP" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1303 | fi |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 1304 | CPP="$ac_cv_prog_CPP" |
| 1305 | else |
| 1306 | ac_cv_prog_CPP="$CPP" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1307 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1308 | echo "$ac_t""$CPP" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1309 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1310 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1311 | echo "configure:1312: checking for AIX" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1312 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1313 | #line 1314 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1314 | #include "confdefs.h" |
| 1315 | #ifdef _AIX |
| 1316 | yes |
| 1317 | #endif |
| 1318 | |
| 1319 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1320 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1321 | egrep "yes" >/dev/null 2>&1; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1322 | rm -rf conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1323 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1324 | #define _ALL_SOURCE 1 |
| 1325 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1326 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1327 | else |
| 1328 | rm -rf conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1329 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1330 | fi |
| 1331 | rm -f conftest* |
| 1332 | |
| 1333 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1334 | ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1335 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1336 | echo "configure:1337: checking for minix/config.h" >&5 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1337 | if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1338 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1339 | else |
| 1340 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1341 | #line 1342 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1342 | #include "confdefs.h" |
| 1343 | #include <minix/config.h> |
| 1344 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1345 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1346 | { (eval echo configure:1347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1347 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1348 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1349 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1350 | eval "ac_cv_header_$ac_safe=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1351 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1352 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1353 | echo "configure: failed program was:" >&5 |
| 1354 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1355 | rm -rf conftest* |
| 1356 | eval "ac_cv_header_$ac_safe=no" |
| 1357 | fi |
| 1358 | rm -f conftest* |
| 1359 | fi |
| 1360 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1361 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1362 | MINIX=yes |
| 1363 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1364 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1365 | MINIX= |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1366 | fi |
| 1367 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1368 | if test "$MINIX" = yes; then |
| 1369 | cat >> confdefs.h <<\EOF |
| 1370 | #define _POSIX_SOURCE 1 |
| 1371 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1372 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1373 | cat >> confdefs.h <<\EOF |
| 1374 | #define _POSIX_1_SOURCE 2 |
| 1375 | EOF |
| 1376 | |
| 1377 | cat >> confdefs.h <<\EOF |
| 1378 | #define _MINIX 1 |
| 1379 | EOF |
| 1380 | |
| 1381 | fi |
| 1382 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1383 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1384 | echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1385 | echo "configure:1386: checking whether $CC accepts -OPT:Olimit=0" >&5 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1386 | if eval "test \"\${ac_cv_opt_olimit_ok+set}\" = set"; then |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1387 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1388 | else |
| 1389 | ac_save_cc="$CC" |
| 1390 | CC="$CC -OPT:Olimit=0" |
| 1391 | if test "$cross_compiling" = yes; then |
| 1392 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1393 | else |
| 1394 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1395 | #line 1396 "configure" |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1396 | #include "confdefs.h" |
| 1397 | int main() { return 0; } |
| 1398 | EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1399 | if { (eval echo configure:1400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1400 | then |
| 1401 | ac_cv_opt_olimit_ok=yes |
| 1402 | else |
| 1403 | echo "configure: failed program was:" >&5 |
| 1404 | cat conftest.$ac_ext >&5 |
| 1405 | rm -fr conftest* |
| 1406 | ac_cv_opt_olimit_ok=no |
| 1407 | fi |
| 1408 | rm -fr conftest* |
| 1409 | fi |
| 1410 | |
| 1411 | CC="$ac_save_cc" |
| 1412 | fi |
| 1413 | |
| 1414 | echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6 |
Guido van Rossum | 2efa34b | 1997-10-23 17:43:11 +0000 | [diff] [blame] | 1415 | if test $ac_cv_opt_olimit_ok = yes; then |
Guido van Rossum | 304dd2d | 1997-10-20 23:10:56 +0000 | [diff] [blame] | 1416 | OPT="$OPT -OPT:Olimit=0" |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1417 | else |
| 1418 | echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1419 | echo "configure:1420: checking whether $CC accepts -Olimit 1500" >&5 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1420 | if eval "test \"\${ac_cv_olimit_ok+set}\" = set"; then |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1421 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1422 | else |
| 1423 | ac_save_cc="$CC" |
| 1424 | CC="$CC -Olimit 1500" |
| 1425 | if test "$cross_compiling" = yes; then |
| 1426 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1427 | else |
| 1428 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1429 | #line 1430 "configure" |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1430 | #include "confdefs.h" |
| 1431 | int main() { return 0; } |
| 1432 | EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1433 | if { (eval echo configure:1434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1434 | then |
| 1435 | ac_cv_olimit_ok=yes |
| 1436 | else |
| 1437 | echo "configure: failed program was:" >&5 |
| 1438 | cat conftest.$ac_ext >&5 |
| 1439 | rm -fr conftest* |
| 1440 | ac_cv_olimit_ok=no |
Guido van Rossum | 201afe5 | 1997-05-14 21:14:44 +0000 | [diff] [blame] | 1441 | fi |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1442 | rm -fr conftest* |
| 1443 | fi |
| 1444 | |
| 1445 | CC="$ac_save_cc" |
| 1446 | fi |
| 1447 | |
| 1448 | echo "$ac_t""$ac_cv_olimit_ok" 1>&6 |
| 1449 | if test $ac_cv_olimit_ok = yes; then |
| 1450 | OPT="$OPT -Olimit 1500" |
| 1451 | fi |
| 1452 | fi |
| 1453 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1454 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1455 | # checks for header files |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1456 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1457 | echo "configure:1458: checking for ANSI C header files" >&5 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1458 | if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1459 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1460 | else |
| 1461 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1462 | #line 1463 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1463 | #include "confdefs.h" |
| 1464 | #include <stdlib.h> |
| 1465 | #include <stdarg.h> |
| 1466 | #include <string.h> |
| 1467 | #include <float.h> |
| 1468 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1469 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1470 | { (eval echo configure:1471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1471 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1472 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1473 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1474 | ac_cv_header_stdc=yes |
| 1475 | else |
| 1476 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1477 | echo "configure: failed program was:" >&5 |
| 1478 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1479 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1480 | ac_cv_header_stdc=no |
| 1481 | fi |
| 1482 | rm -f conftest* |
| 1483 | |
| 1484 | if test $ac_cv_header_stdc = yes; then |
| 1485 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 1486 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1487 | #line 1488 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1488 | #include "confdefs.h" |
| 1489 | #include <string.h> |
| 1490 | EOF |
| 1491 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1492 | egrep "memchr" >/dev/null 2>&1; then |
| 1493 | : |
| 1494 | else |
| 1495 | rm -rf conftest* |
| 1496 | ac_cv_header_stdc=no |
| 1497 | fi |
| 1498 | rm -f conftest* |
| 1499 | |
| 1500 | fi |
| 1501 | |
| 1502 | if test $ac_cv_header_stdc = yes; then |
| 1503 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 1504 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1505 | #line 1506 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1506 | #include "confdefs.h" |
| 1507 | #include <stdlib.h> |
| 1508 | EOF |
| 1509 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1510 | egrep "free" >/dev/null 2>&1; then |
| 1511 | : |
| 1512 | else |
| 1513 | rm -rf conftest* |
| 1514 | ac_cv_header_stdc=no |
| 1515 | fi |
| 1516 | rm -f conftest* |
| 1517 | |
| 1518 | fi |
| 1519 | |
| 1520 | if test $ac_cv_header_stdc = yes; then |
| 1521 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| 1522 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1523 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1524 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1525 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1526 | #line 1527 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1527 | #include "confdefs.h" |
| 1528 | #include <ctype.h> |
| 1529 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 1530 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1531 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1532 | int main () { int i; for (i = 0; i < 256; i++) |
| 1533 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 1534 | exit (0); } |
| 1535 | |
| 1536 | EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1537 | if { (eval echo configure:1538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1538 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1539 | : |
| 1540 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1541 | echo "configure: failed program was:" >&5 |
| 1542 | cat conftest.$ac_ext >&5 |
| 1543 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1544 | ac_cv_header_stdc=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1545 | fi |
| 1546 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1547 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1548 | |
| 1549 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1550 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1551 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1552 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1553 | if test $ac_cv_header_stdc = yes; then |
| 1554 | cat >> confdefs.h <<\EOF |
| 1555 | #define STDC_HEADERS 1 |
| 1556 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1557 | |
| 1558 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1559 | |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 1560 | for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h poll.h pthread.h \ |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 1561 | signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \ |
Fred Drake | a50d6ec | 2000-08-31 16:13:20 +0000 | [diff] [blame] | 1562 | sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \ |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 1563 | sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \ |
Fred Drake | ae90f8d | 2000-09-15 03:38:12 +0000 | [diff] [blame] | 1564 | sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ |
| 1565 | ndbm.h db1/ndbm.h gdbm/ndbm.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1566 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1567 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1568 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1569 | echo "configure:1570: checking for $ac_hdr" >&5 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1570 | if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1571 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1572 | else |
| 1573 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1574 | #line 1575 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1575 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1576 | #include <$ac_hdr> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1577 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1578 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1579 | { (eval echo configure:1580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1580 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1581 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1582 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1583 | eval "ac_cv_header_$ac_safe=yes" |
| 1584 | else |
| 1585 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1586 | echo "configure: failed program was:" >&5 |
| 1587 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1588 | rm -rf conftest* |
| 1589 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1590 | fi |
| 1591 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1592 | fi |
| 1593 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1594 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1595 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1596 | cat >> confdefs.h <<EOF |
| 1597 | #define $ac_tr_hdr 1 |
| 1598 | EOF |
| 1599 | |
| 1600 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1601 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1602 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1603 | done |
| 1604 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1605 | ac_header_dirent=no |
| 1606 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h |
| 1607 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1608 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1609 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1610 | echo "configure:1611: checking for $ac_hdr that defines DIR" >&5 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1611 | if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1612 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1613 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1614 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1615 | #line 1616 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1616 | #include "confdefs.h" |
| 1617 | #include <sys/types.h> |
| 1618 | #include <$ac_hdr> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1619 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1620 | DIR *dirp = 0; |
| 1621 | ; return 0; } |
| 1622 | EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1623 | if { (eval echo configure:1624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1624 | rm -rf conftest* |
| 1625 | eval "ac_cv_header_dirent_$ac_safe=yes" |
| 1626 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1627 | echo "configure: failed program was:" >&5 |
| 1628 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1629 | rm -rf conftest* |
| 1630 | eval "ac_cv_header_dirent_$ac_safe=no" |
| 1631 | fi |
| 1632 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1633 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1634 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1635 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1636 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1637 | cat >> confdefs.h <<EOF |
| 1638 | #define $ac_tr_hdr 1 |
| 1639 | EOF |
| 1640 | ac_header_dirent=$ac_hdr; break |
| 1641 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1642 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1643 | fi |
| 1644 | done |
| 1645 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| 1646 | if test $ac_header_dirent = dirent.h; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1647 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1648 | echo "configure:1649: checking for opendir in -ldir" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1649 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1650 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1651 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1652 | else |
| 1653 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1654 | LIBS="-ldir $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1655 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1656 | #line 1657 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1657 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1658 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 1659 | /* We use char because int might match the return type of a gcc2 |
| 1660 | builtin and then its argument prototype would still apply. */ |
| 1661 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1662 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1663 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1664 | opendir() |
| 1665 | ; return 0; } |
| 1666 | EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1667 | if { (eval echo configure:1668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1668 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1669 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1670 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1671 | echo "configure: failed program was:" >&5 |
| 1672 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1673 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1674 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1675 | fi |
| 1676 | rm -f conftest* |
| 1677 | LIBS="$ac_save_LIBS" |
| 1678 | |
| 1679 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1680 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1681 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1682 | LIBS="$LIBS -ldir" |
| 1683 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1684 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1685 | fi |
| 1686 | |
| 1687 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1688 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1689 | echo "configure:1690: checking for opendir in -lx" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1690 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1691 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1692 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1693 | else |
| 1694 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1695 | LIBS="-lx $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1696 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1697 | #line 1698 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1698 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1699 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 1700 | /* We use char because int might match the return type of a gcc2 |
| 1701 | builtin and then its argument prototype would still apply. */ |
| 1702 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1703 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1704 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1705 | opendir() |
| 1706 | ; return 0; } |
| 1707 | EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1708 | if { (eval echo configure:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1709 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1710 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1711 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1712 | echo "configure: failed program was:" >&5 |
| 1713 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1714 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1715 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1716 | fi |
| 1717 | rm -f conftest* |
| 1718 | LIBS="$ac_save_LIBS" |
| 1719 | |
| 1720 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1721 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1722 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1723 | LIBS="$LIBS -lx" |
| 1724 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1725 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1726 | fi |
| 1727 | |
| 1728 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1729 | |
| 1730 | |
| 1731 | # checks for typedefs |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1732 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1733 | echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1734 | echo "configure:1735: checking for clock_t in time.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1735 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1736 | #line 1737 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1737 | #include "confdefs.h" |
| 1738 | #include <time.h> |
| 1739 | EOF |
| 1740 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1741 | egrep "clock_t" >/dev/null 2>&1; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1742 | rm -rf conftest* |
| 1743 | was_it_defined=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1744 | else |
| 1745 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1746 | cat >> confdefs.h <<\EOF |
| 1747 | #define clock_t long |
| 1748 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1749 | |
| 1750 | fi |
| 1751 | rm -f conftest* |
| 1752 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1753 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1754 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1755 | # Add some code to confdefs.h so that the test for off_t works on SCO |
| 1756 | cat >> confdefs.h <<\EOF |
| 1757 | #if defined(SCO_DS) |
| 1758 | #undef _OFF_T |
| 1759 | #endif |
| 1760 | EOF |
| 1761 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1762 | # Type availability checks |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1763 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1764 | echo "configure:1765: checking for mode_t" >&5 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1765 | if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1766 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1767 | else |
| 1768 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1769 | #line 1770 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1770 | #include "confdefs.h" |
| 1771 | #include <sys/types.h> |
| 1772 | #if STDC_HEADERS |
| 1773 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1774 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1775 | #endif |
| 1776 | EOF |
| 1777 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1778 | egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1779 | rm -rf conftest* |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1780 | eval "ac_cv_type_mode_t=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1781 | else |
| 1782 | rm -rf conftest* |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1783 | eval "ac_cv_type_mode_t=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1784 | fi |
| 1785 | rm -f conftest* |
| 1786 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1787 | fi |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1788 | if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then |
| 1789 | echo "$ac_t""yes" 1>&6 |
| 1790 | else |
| 1791 | echo "$ac_t""no" 1>&6 |
| 1792 | cat >> confdefs.h <<EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1793 | #define mode_t int |
| 1794 | EOF |
| 1795 | |
| 1796 | fi |
| 1797 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1798 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1799 | echo "configure:1800: checking for off_t" >&5 |
| 1800 | if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1801 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1802 | else |
| 1803 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1804 | #line 1805 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1805 | #include "confdefs.h" |
| 1806 | #include <sys/types.h> |
| 1807 | #if STDC_HEADERS |
| 1808 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1809 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1810 | #endif |
| 1811 | EOF |
| 1812 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1813 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1814 | rm -rf conftest* |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1815 | eval "ac_cv_type_off_t=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1816 | else |
| 1817 | rm -rf conftest* |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1818 | eval "ac_cv_type_off_t=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1819 | fi |
| 1820 | rm -f conftest* |
| 1821 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1822 | fi |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1823 | if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then |
| 1824 | echo "$ac_t""yes" 1>&6 |
| 1825 | else |
| 1826 | echo "$ac_t""no" 1>&6 |
| 1827 | cat >> confdefs.h <<EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1828 | #define off_t long |
| 1829 | EOF |
| 1830 | |
| 1831 | fi |
| 1832 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1833 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1834 | echo "configure:1835: checking for pid_t" >&5 |
| 1835 | if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1836 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1837 | else |
| 1838 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1839 | #line 1840 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1840 | #include "confdefs.h" |
| 1841 | #include <sys/types.h> |
| 1842 | #if STDC_HEADERS |
| 1843 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1844 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1845 | #endif |
| 1846 | EOF |
| 1847 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1848 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1849 | rm -rf conftest* |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1850 | eval "ac_cv_type_pid_t=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1851 | else |
| 1852 | rm -rf conftest* |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1853 | eval "ac_cv_type_pid_t=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1854 | fi |
| 1855 | rm -f conftest* |
| 1856 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1857 | fi |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1858 | if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then |
| 1859 | echo "$ac_t""yes" 1>&6 |
| 1860 | else |
| 1861 | echo "$ac_t""no" 1>&6 |
| 1862 | cat >> confdefs.h <<EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1863 | #define pid_t int |
| 1864 | EOF |
| 1865 | |
| 1866 | fi |
| 1867 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1868 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1869 | echo "configure:1870: checking return type of signal handlers" >&5 |
| 1870 | if eval "test \"\${ac_cv_type_signal+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1871 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1872 | else |
| 1873 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1874 | #line 1875 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1875 | #include "confdefs.h" |
| 1876 | #include <sys/types.h> |
| 1877 | #include <signal.h> |
| 1878 | #ifdef signal |
| 1879 | #undef signal |
| 1880 | #endif |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1881 | #ifdef __cplusplus |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1882 | extern "C" void (*signal (int, void (*)(int)))(int); |
| 1883 | #else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1884 | void (*signal ()) (); |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1885 | #endif |
| 1886 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1887 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1888 | int i; |
| 1889 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1890 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1891 | if { (eval echo configure:1892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1892 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1893 | ac_cv_type_signal=void |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1894 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1895 | echo "configure: failed program was:" >&5 |
| 1896 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1897 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1898 | ac_cv_type_signal=int |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1899 | fi |
| 1900 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1901 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1902 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1903 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1904 | cat >> confdefs.h <<EOF |
| 1905 | #define RETSIGTYPE $ac_cv_type_signal |
| 1906 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1907 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1908 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1909 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1910 | echo "configure:1911: checking for size_t" >&5 |
| 1911 | if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1912 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1913 | else |
| 1914 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1915 | #line 1916 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1916 | #include "confdefs.h" |
| 1917 | #include <sys/types.h> |
| 1918 | #if STDC_HEADERS |
| 1919 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1920 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1921 | #endif |
| 1922 | EOF |
| 1923 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1924 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1925 | rm -rf conftest* |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1926 | eval "ac_cv_type_size_t=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1927 | else |
| 1928 | rm -rf conftest* |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1929 | eval "ac_cv_type_size_t=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1930 | fi |
| 1931 | rm -f conftest* |
| 1932 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1933 | fi |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1934 | if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then |
| 1935 | echo "$ac_t""yes" 1>&6 |
| 1936 | else |
| 1937 | echo "$ac_t""no" 1>&6 |
| 1938 | cat >> confdefs.h <<EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1939 | #define size_t unsigned |
| 1940 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1941 | |
| 1942 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1943 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1944 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1945 | echo "configure:1946: checking for uid_t in sys/types.h" >&5 |
| 1946 | if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1947 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1948 | else |
| 1949 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1950 | #line 1951 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1951 | #include "confdefs.h" |
| 1952 | #include <sys/types.h> |
| 1953 | EOF |
| 1954 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1955 | egrep "uid_t" >/dev/null 2>&1; then |
| 1956 | rm -rf conftest* |
| 1957 | ac_cv_type_uid_t=yes |
| 1958 | else |
| 1959 | rm -rf conftest* |
| 1960 | ac_cv_type_uid_t=no |
| 1961 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1962 | rm -f conftest* |
| 1963 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1964 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1965 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1966 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1967 | if test $ac_cv_type_uid_t = no; then |
| 1968 | cat >> confdefs.h <<\EOF |
| 1969 | #define uid_t int |
| 1970 | EOF |
| 1971 | |
| 1972 | cat >> confdefs.h <<\EOF |
| 1973 | #define gid_t int |
| 1974 | EOF |
| 1975 | |
| 1976 | fi |
| 1977 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1978 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1979 | # Sizes of various common basic types |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 1980 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1981 | echo "configure:1982: checking size of int" >&5 |
| 1982 | if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 1983 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1984 | else |
| 1985 | if test "$cross_compiling" = yes; then |
| 1986 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1987 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1988 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 1989 | #line 1990 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 1990 | #include "confdefs.h" |
| 1991 | #include <stdio.h> |
| 1992 | main() |
| 1993 | { |
| 1994 | FILE *f=fopen("conftestval", "w"); |
| 1995 | if (!f) exit(1); |
| 1996 | fprintf(f, "%d\n", sizeof(int)); |
| 1997 | exit(0); |
| 1998 | } |
| 1999 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2000 | if { (eval echo configure:2001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2001 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2002 | ac_cv_sizeof_int=`cat conftestval` |
| 2003 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2004 | echo "configure: failed program was:" >&5 |
| 2005 | cat conftest.$ac_ext >&5 |
| 2006 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2007 | ac_cv_sizeof_int=0 |
| 2008 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2009 | rm -fr conftest* |
| 2010 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2011 | |
| 2012 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2013 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
| 2014 | cat >> confdefs.h <<EOF |
| 2015 | #define SIZEOF_INT $ac_cv_sizeof_int |
| 2016 | EOF |
| 2017 | |
| 2018 | |
| 2019 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2020 | echo "configure:2021: checking size of long" >&5 |
| 2021 | if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2022 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2023 | else |
| 2024 | if test "$cross_compiling" = yes; then |
| 2025 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2026 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2027 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2028 | #line 2029 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2029 | #include "confdefs.h" |
| 2030 | #include <stdio.h> |
| 2031 | main() |
| 2032 | { |
| 2033 | FILE *f=fopen("conftestval", "w"); |
| 2034 | if (!f) exit(1); |
| 2035 | fprintf(f, "%d\n", sizeof(long)); |
| 2036 | exit(0); |
| 2037 | } |
| 2038 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2039 | if { (eval echo configure:2040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2040 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2041 | ac_cv_sizeof_long=`cat conftestval` |
| 2042 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2043 | echo "configure: failed program was:" >&5 |
| 2044 | cat conftest.$ac_ext >&5 |
| 2045 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2046 | ac_cv_sizeof_long=0 |
| 2047 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2048 | rm -fr conftest* |
| 2049 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2050 | |
| 2051 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2052 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
| 2053 | cat >> confdefs.h <<EOF |
| 2054 | #define SIZEOF_LONG $ac_cv_sizeof_long |
| 2055 | EOF |
| 2056 | |
| 2057 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2058 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2059 | echo "configure:2060: checking size of void *" >&5 |
| 2060 | if eval "test \"\${ac_cv_sizeof_void_p+set}\" = set"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2061 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2062 | else |
| 2063 | if test "$cross_compiling" = yes; then |
| 2064 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2065 | else |
| 2066 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2067 | #line 2068 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2068 | #include "confdefs.h" |
| 2069 | #include <stdio.h> |
| 2070 | main() |
| 2071 | { |
| 2072 | FILE *f=fopen("conftestval", "w"); |
| 2073 | if (!f) exit(1); |
| 2074 | fprintf(f, "%d\n", sizeof(void *)); |
| 2075 | exit(0); |
| 2076 | } |
| 2077 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2078 | if { (eval echo configure:2079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2079 | then |
| 2080 | ac_cv_sizeof_void_p=`cat conftestval` |
| 2081 | else |
| 2082 | echo "configure: failed program was:" >&5 |
| 2083 | cat conftest.$ac_ext >&5 |
| 2084 | rm -fr conftest* |
| 2085 | ac_cv_sizeof_void_p=0 |
| 2086 | fi |
| 2087 | rm -fr conftest* |
| 2088 | fi |
| 2089 | |
| 2090 | fi |
| 2091 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 |
| 2092 | cat >> confdefs.h <<EOF |
| 2093 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
| 2094 | EOF |
| 2095 | |
| 2096 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2097 | echo $ac_n "checking size of char""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2098 | echo "configure:2099: checking size of char" >&5 |
| 2099 | if eval "test \"\${ac_cv_sizeof_char+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2100 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2101 | else |
| 2102 | if test "$cross_compiling" = yes; then |
| 2103 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2104 | else |
| 2105 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2106 | #line 2107 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2107 | #include "confdefs.h" |
| 2108 | #include <stdio.h> |
| 2109 | main() |
| 2110 | { |
| 2111 | FILE *f=fopen("conftestval", "w"); |
| 2112 | if (!f) exit(1); |
| 2113 | fprintf(f, "%d\n", sizeof(char)); |
| 2114 | exit(0); |
| 2115 | } |
| 2116 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2117 | if { (eval echo configure:2118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2118 | then |
| 2119 | ac_cv_sizeof_char=`cat conftestval` |
| 2120 | else |
| 2121 | echo "configure: failed program was:" >&5 |
| 2122 | cat conftest.$ac_ext >&5 |
| 2123 | rm -fr conftest* |
| 2124 | ac_cv_sizeof_char=0 |
| 2125 | fi |
| 2126 | rm -fr conftest* |
| 2127 | fi |
| 2128 | |
| 2129 | fi |
| 2130 | echo "$ac_t""$ac_cv_sizeof_char" 1>&6 |
| 2131 | cat >> confdefs.h <<EOF |
| 2132 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
| 2133 | EOF |
| 2134 | |
| 2135 | |
| 2136 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2137 | echo "configure:2138: checking size of short" >&5 |
| 2138 | if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2139 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2140 | else |
| 2141 | if test "$cross_compiling" = yes; then |
| 2142 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2143 | else |
| 2144 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2145 | #line 2146 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2146 | #include "confdefs.h" |
| 2147 | #include <stdio.h> |
| 2148 | main() |
| 2149 | { |
| 2150 | FILE *f=fopen("conftestval", "w"); |
| 2151 | if (!f) exit(1); |
| 2152 | fprintf(f, "%d\n", sizeof(short)); |
| 2153 | exit(0); |
| 2154 | } |
| 2155 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2156 | if { (eval echo configure:2157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2157 | then |
| 2158 | ac_cv_sizeof_short=`cat conftestval` |
| 2159 | else |
| 2160 | echo "configure: failed program was:" >&5 |
| 2161 | cat conftest.$ac_ext >&5 |
| 2162 | rm -fr conftest* |
| 2163 | ac_cv_sizeof_short=0 |
| 2164 | fi |
| 2165 | rm -fr conftest* |
| 2166 | fi |
| 2167 | |
| 2168 | fi |
| 2169 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
| 2170 | cat >> confdefs.h <<EOF |
| 2171 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
| 2172 | EOF |
| 2173 | |
| 2174 | |
| 2175 | echo $ac_n "checking size of float""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2176 | echo "configure:2177: checking size of float" >&5 |
| 2177 | if eval "test \"\${ac_cv_sizeof_float+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2178 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2179 | else |
| 2180 | if test "$cross_compiling" = yes; then |
| 2181 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2182 | else |
| 2183 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2184 | #line 2185 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2185 | #include "confdefs.h" |
| 2186 | #include <stdio.h> |
| 2187 | main() |
| 2188 | { |
| 2189 | FILE *f=fopen("conftestval", "w"); |
| 2190 | if (!f) exit(1); |
| 2191 | fprintf(f, "%d\n", sizeof(float)); |
| 2192 | exit(0); |
| 2193 | } |
| 2194 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2195 | if { (eval echo configure:2196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2196 | then |
| 2197 | ac_cv_sizeof_float=`cat conftestval` |
| 2198 | else |
| 2199 | echo "configure: failed program was:" >&5 |
| 2200 | cat conftest.$ac_ext >&5 |
| 2201 | rm -fr conftest* |
| 2202 | ac_cv_sizeof_float=0 |
| 2203 | fi |
| 2204 | rm -fr conftest* |
| 2205 | fi |
| 2206 | |
| 2207 | fi |
| 2208 | echo "$ac_t""$ac_cv_sizeof_float" 1>&6 |
| 2209 | cat >> confdefs.h <<EOF |
| 2210 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
| 2211 | EOF |
| 2212 | |
| 2213 | |
| 2214 | echo $ac_n "checking size of double""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2215 | echo "configure:2216: checking size of double" >&5 |
| 2216 | if eval "test \"\${ac_cv_sizeof_double+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2217 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2218 | else |
| 2219 | if test "$cross_compiling" = yes; then |
| 2220 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2221 | else |
| 2222 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2223 | #line 2224 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2224 | #include "confdefs.h" |
| 2225 | #include <stdio.h> |
| 2226 | main() |
| 2227 | { |
| 2228 | FILE *f=fopen("conftestval", "w"); |
| 2229 | if (!f) exit(1); |
| 2230 | fprintf(f, "%d\n", sizeof(double)); |
| 2231 | exit(0); |
| 2232 | } |
| 2233 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2234 | if { (eval echo configure:2235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2235 | then |
| 2236 | ac_cv_sizeof_double=`cat conftestval` |
| 2237 | else |
| 2238 | echo "configure: failed program was:" >&5 |
| 2239 | cat conftest.$ac_ext >&5 |
| 2240 | rm -fr conftest* |
| 2241 | ac_cv_sizeof_double=0 |
| 2242 | fi |
| 2243 | rm -fr conftest* |
| 2244 | fi |
| 2245 | |
| 2246 | fi |
| 2247 | echo "$ac_t""$ac_cv_sizeof_double" 1>&6 |
| 2248 | cat >> confdefs.h <<EOF |
| 2249 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
| 2250 | EOF |
| 2251 | |
| 2252 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2253 | echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2254 | echo "configure:2255: checking size of fpos_t" >&5 |
| 2255 | if eval "test \"\${ac_cv_sizeof_fpos_t+set}\" = set"; then |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2256 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2257 | else |
| 2258 | if test "$cross_compiling" = yes; then |
| 2259 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2260 | else |
| 2261 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2262 | #line 2263 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2263 | #include "confdefs.h" |
| 2264 | #include <stdio.h> |
| 2265 | main() |
| 2266 | { |
| 2267 | FILE *f=fopen("conftestval", "w"); |
| 2268 | if (!f) exit(1); |
| 2269 | fprintf(f, "%d\n", sizeof(fpos_t)); |
| 2270 | exit(0); |
| 2271 | } |
| 2272 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2273 | if { (eval echo configure:2274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2274 | then |
| 2275 | ac_cv_sizeof_fpos_t=`cat conftestval` |
| 2276 | else |
| 2277 | echo "configure: failed program was:" >&5 |
| 2278 | cat conftest.$ac_ext >&5 |
| 2279 | rm -fr conftest* |
| 2280 | ac_cv_sizeof_fpos_t=0 |
| 2281 | fi |
| 2282 | rm -fr conftest* |
| 2283 | fi |
| 2284 | |
| 2285 | fi |
| 2286 | echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6 |
| 2287 | cat >> confdefs.h <<EOF |
| 2288 | #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t |
| 2289 | EOF |
| 2290 | |
| 2291 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2292 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2293 | echo $ac_n "checking for long long support""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2294 | echo "configure:2295: checking for long long support" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2295 | have_long_long=no |
| 2296 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2297 | #line 2298 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2298 | #include "confdefs.h" |
| 2299 | |
| 2300 | int main() { |
| 2301 | long long x; x = (long long)0; |
| 2302 | ; return 0; } |
| 2303 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2304 | if { (eval echo configure:2305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2305 | rm -rf conftest* |
| 2306 | cat >> confdefs.h <<\EOF |
| 2307 | #define HAVE_LONG_LONG 1 |
| 2308 | EOF |
| 2309 | have_long_long=yes |
| 2310 | else |
| 2311 | echo "configure: failed program was:" >&5 |
| 2312 | cat conftest.$ac_ext >&5 |
| 2313 | fi |
| 2314 | rm -f conftest* |
| 2315 | echo "$ac_t""$have_long_long" 1>&6 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2316 | if test "$have_long_long" = yes ; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2317 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2318 | echo "configure:2319: checking size of long long" >&5 |
| 2319 | if eval "test \"\${ac_cv_sizeof_long_long+set}\" = set"; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2320 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2321 | else |
| 2322 | if test "$cross_compiling" = yes; then |
| 2323 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2324 | else |
| 2325 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2326 | #line 2327 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2327 | #include "confdefs.h" |
| 2328 | #include <stdio.h> |
| 2329 | main() |
| 2330 | { |
| 2331 | FILE *f=fopen("conftestval", "w"); |
| 2332 | if (!f) exit(1); |
| 2333 | fprintf(f, "%d\n", sizeof(long long)); |
| 2334 | exit(0); |
| 2335 | } |
| 2336 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2337 | if { (eval echo configure:2338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2338 | then |
| 2339 | ac_cv_sizeof_long_long=`cat conftestval` |
| 2340 | else |
| 2341 | echo "configure: failed program was:" >&5 |
| 2342 | cat conftest.$ac_ext >&5 |
| 2343 | rm -fr conftest* |
| 2344 | ac_cv_sizeof_long_long=0 |
| 2345 | fi |
| 2346 | rm -fr conftest* |
| 2347 | fi |
| 2348 | |
| 2349 | fi |
| 2350 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
| 2351 | cat >> confdefs.h <<EOF |
| 2352 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 2353 | EOF |
| 2354 | |
| 2355 | |
| 2356 | fi |
| 2357 | |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2358 | echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2359 | echo "configure:2360: checking for uintptr_t support" >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2360 | have_uintptr_t=no |
| 2361 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2362 | #line 2363 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2363 | #include "confdefs.h" |
| 2364 | |
| 2365 | int main() { |
| 2366 | uintptr_t x; x = (uintptr_t)0; |
| 2367 | ; return 0; } |
| 2368 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2369 | if { (eval echo configure:2370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2370 | rm -rf conftest* |
| 2371 | cat >> confdefs.h <<\EOF |
| 2372 | #define HAVE_UINTPTR_T 1 |
| 2373 | EOF |
| 2374 | have_uintptr_t=yes |
| 2375 | else |
| 2376 | echo "configure: failed program was:" >&5 |
| 2377 | cat conftest.$ac_ext >&5 |
| 2378 | fi |
| 2379 | rm -f conftest* |
| 2380 | echo "$ac_t""$have_uintptr_t" 1>&6 |
| 2381 | if test "$have_uintptr_t" = yes ; then |
| 2382 | echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2383 | echo "configure:2384: checking size of uintptr_t" >&5 |
| 2384 | if eval "test \"\${ac_cv_sizeof_uintptr_t+set}\" = set"; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2385 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2386 | else |
| 2387 | if test "$cross_compiling" = yes; then |
| 2388 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2389 | else |
| 2390 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2391 | #line 2392 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2392 | #include "confdefs.h" |
| 2393 | #include <stdio.h> |
| 2394 | main() |
| 2395 | { |
| 2396 | FILE *f=fopen("conftestval", "w"); |
| 2397 | if (!f) exit(1); |
| 2398 | fprintf(f, "%d\n", sizeof(uintptr_t)); |
| 2399 | exit(0); |
| 2400 | } |
| 2401 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2402 | if { (eval echo configure:2403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2403 | then |
| 2404 | ac_cv_sizeof_uintptr_t=`cat conftestval` |
| 2405 | else |
| 2406 | echo "configure: failed program was:" >&5 |
| 2407 | cat conftest.$ac_ext >&5 |
| 2408 | rm -fr conftest* |
| 2409 | ac_cv_sizeof_uintptr_t=0 |
| 2410 | fi |
| 2411 | rm -fr conftest* |
| 2412 | fi |
| 2413 | |
| 2414 | fi |
| 2415 | echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6 |
| 2416 | cat >> confdefs.h <<EOF |
| 2417 | #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t |
| 2418 | EOF |
| 2419 | |
| 2420 | |
| 2421 | fi |
| 2422 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2423 | # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>. |
| 2424 | echo $ac_n "checking size of off_t""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2425 | echo "configure:2426: checking size of off_t" >&5 |
| 2426 | if eval "test \"\${ac_cv_sizeof_off_t+set}\" = set"; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2427 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2428 | else |
| 2429 | if test "$cross_compiling" = yes; then |
| 2430 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2431 | else |
| 2432 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2433 | #line 2434 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2434 | #include "confdefs.h" |
| 2435 | #include <stdio.h> |
| 2436 | #include <sys/types.h> |
| 2437 | main() |
| 2438 | { |
| 2439 | FILE *f=fopen("conftestval", "w"); |
| 2440 | if (!f) exit(1); |
| 2441 | fprintf(f, "%d\n", sizeof(off_t)); |
| 2442 | exit(0); |
| 2443 | } |
| 2444 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2445 | if { (eval echo configure:2446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2446 | then |
| 2447 | ac_cv_sizeof_off_t=`cat conftestval` |
| 2448 | else |
| 2449 | echo "configure: failed program was:" >&5 |
| 2450 | cat conftest.$ac_ext >&5 |
| 2451 | rm -fr conftest* |
| 2452 | ac_cv_sizeof_off_t=0 |
| 2453 | fi |
| 2454 | rm -fr conftest* |
| 2455 | fi |
| 2456 | |
| 2457 | |
| 2458 | fi |
| 2459 | |
| 2460 | echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6 |
| 2461 | cat >> confdefs.h <<EOF |
| 2462 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
| 2463 | EOF |
| 2464 | |
| 2465 | |
| 2466 | echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2467 | echo "configure:2468: checking whether to enable large file support" >&5 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2468 | if test "$have_long_long" = yes -a \ |
| 2469 | "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ |
| 2470 | "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2471 | cat >> confdefs.h <<\EOF |
| 2472 | #define HAVE_LARGEFILE_SUPPORT 1 |
| 2473 | EOF |
| 2474 | |
| 2475 | echo "$ac_t""yes" 1>&6 |
| 2476 | else |
| 2477 | echo "$ac_t""no" 1>&6 |
| 2478 | fi |
| 2479 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2480 | # AC_CHECK_SIZEOF() doesn't include <time.h>. |
| 2481 | echo $ac_n "checking size of time_t""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2482 | echo "configure:2483: checking size of time_t" >&5 |
| 2483 | if eval "test \"\${ac_cv_sizeof_time_t+set}\" = set"; then |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2484 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2485 | else |
| 2486 | if test "$cross_compiling" = yes; then |
| 2487 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2488 | else |
| 2489 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2490 | #line 2491 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2491 | #include "confdefs.h" |
| 2492 | #include <stdio.h> |
| 2493 | #include <time.h> |
| 2494 | main() |
| 2495 | { |
| 2496 | FILE *f=fopen("conftestval", "w"); |
| 2497 | if (!f) exit(1); |
| 2498 | fprintf(f, "%d\n", sizeof(time_t)); |
| 2499 | exit(0); |
| 2500 | } |
| 2501 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2502 | if { (eval echo configure:2503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2503 | then |
| 2504 | ac_cv_sizeof_time_t=`cat conftestval` |
| 2505 | else |
| 2506 | echo "configure: failed program was:" >&5 |
| 2507 | cat conftest.$ac_ext >&5 |
| 2508 | rm -fr conftest* |
| 2509 | ac_cv_sizeof_time_t=0 |
| 2510 | fi |
| 2511 | rm -fr conftest* |
| 2512 | fi |
| 2513 | |
| 2514 | |
| 2515 | fi |
| 2516 | |
| 2517 | echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 |
| 2518 | cat >> confdefs.h <<EOF |
| 2519 | #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
| 2520 | EOF |
| 2521 | |
| 2522 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2523 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2524 | # if have pthread_t then define SIZEOF_PTHREAD_T |
| 2525 | echo $ac_n "checking for pthread_t""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2526 | echo "configure:2527: checking for pthread_t" >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2527 | have_pthread_t=no |
| 2528 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2529 | #line 2530 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2530 | #include "confdefs.h" |
| 2531 | #include <pthread.h> |
| 2532 | int main() { |
Guido van Rossum | 1258049 | 2000-09-24 16:47:19 +0000 | [diff] [blame] | 2533 | pthread_t x; x = *(pthread_t*)0; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2534 | ; return 0; } |
| 2535 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2536 | if { (eval echo configure:2537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2537 | rm -rf conftest* |
| 2538 | have_pthread_t=yes |
| 2539 | else |
| 2540 | echo "configure: failed program was:" >&5 |
| 2541 | cat conftest.$ac_ext >&5 |
| 2542 | fi |
| 2543 | rm -f conftest* |
| 2544 | echo "$ac_t""$have_pthread_t" 1>&6 |
| 2545 | if test "$have_pthread_t" = yes ; then |
| 2546 | # AC_CHECK_SIZEOF() doesn't include <pthread.h>. |
| 2547 | echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2548 | echo "configure:2549: checking size of pthread_t" >&5 |
| 2549 | if eval "test \"\${ac_cv_sizeof_pthread_t+set}\" = set"; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2550 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2551 | else |
| 2552 | if test "$cross_compiling" = yes; then |
| 2553 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2554 | else |
| 2555 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2556 | #line 2557 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2557 | #include "confdefs.h" |
| 2558 | #include <stdio.h> |
| 2559 | #include <pthread.h> |
| 2560 | main() |
| 2561 | { |
| 2562 | FILE *f=fopen("conftestval", "w"); |
| 2563 | if (!f) exit(1); |
| 2564 | fprintf(f, "%d\n", sizeof(pthread_t)); |
| 2565 | exit(0); |
| 2566 | } |
| 2567 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2568 | if { (eval echo configure:2569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2569 | then |
| 2570 | ac_cv_sizeof_pthread_t=`cat conftestval` |
| 2571 | else |
| 2572 | echo "configure: failed program was:" >&5 |
| 2573 | cat conftest.$ac_ext >&5 |
| 2574 | rm -fr conftest* |
| 2575 | ac_cv_sizeof_pthread_t=0 |
| 2576 | fi |
| 2577 | rm -fr conftest* |
| 2578 | fi |
| 2579 | |
| 2580 | |
| 2581 | fi |
| 2582 | |
| 2583 | echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6 |
| 2584 | cat >> confdefs.h <<EOF |
| 2585 | #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t |
| 2586 | EOF |
| 2587 | |
| 2588 | fi |
| 2589 | |
| 2590 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2591 | # Minor variations in building a framework between NextStep versions 4 and 5 |
| 2592 | |
| 2593 | case $ac_sys_system/$ac_sys_release in |
| 2594 | next/4*) |
| 2595 | ns_undef_sym='__environ' |
| 2596 | LIBTOOL_CRUFT="-U $ns_undef_sym" ;; |
| 2597 | next/5*) |
| 2598 | ns_undef_sym='_environ' |
| 2599 | LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;; |
| 2600 | esac |
| 2601 | |
| 2602 | echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2603 | echo "configure:2604: checking for --with-next-framework" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2604 | if test "$with_next_framework" |
| 2605 | then |
| 2606 | OPT="$OPT -fno-common" |
| 2607 | # -U __environ is needed since bundles don't have access |
| 2608 | # to crt0 when built but will always be linked against it |
| 2609 | LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym" |
| 2610 | cat >> confdefs.h <<\EOF |
| 2611 | #define WITH_NEXT_FRAMEWORK 1 |
| 2612 | EOF |
| 2613 | |
| 2614 | echo "$ac_t""yes" 1>&6 |
| 2615 | else |
| 2616 | echo "$ac_t""no" 1>&6 |
| 2617 | fi |
| 2618 | |
| 2619 | echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2620 | echo "configure:2621: checking for --with-dyld" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2621 | if test "$with_next_framework" -o "$with_dyld" |
| 2622 | then |
| 2623 | if test "$with_dyld" |
| 2624 | then |
| 2625 | echo "$ac_t""yes" 1>&6 |
| 2626 | else |
| 2627 | echo "$ac_t""required for framework build" 1>&6 |
| 2628 | fi |
| 2629 | cat >> confdefs.h <<\EOF |
| 2630 | #define WITH_DYLD 1 |
| 2631 | EOF |
| 2632 | |
| 2633 | ns_dyld='set' |
| 2634 | else |
| 2635 | echo "$ac_t""no" 1>&6 |
| 2636 | fi |
| 2637 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2638 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2639 | |
| 2640 | |
| 2641 | |
| 2642 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2643 | # SO is the extension of shared libraries `(including the dot!) |
| 2644 | # -- usually .so, .sl on HP-UX |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2645 | echo $ac_n "checking SO""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2646 | echo "configure:2647: checking SO" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2647 | if test -z "$SO" |
| 2648 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2649 | case $ac_sys_system in |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 2650 | hp*|HP*) SO=.sl;; |
| 2651 | *) SO=.so;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2652 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2653 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2654 | echo "$ac_t""$SO" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2655 | # LDSHARED is the ld *command* used to create shared library |
| 2656 | # -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2657 | # (Shared libraries in this instance are shared modules to be loaded into |
| 2658 | # Python, as opposed to building Python itself as a shared library.) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2659 | echo $ac_n "checking LDSHARED""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2660 | echo "configure:2661: checking LDSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2661 | if test -z "$LDSHARED" |
| 2662 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2663 | case $ac_sys_system/$ac_sys_release in |
Guido van Rossum | 45140f9 | 1997-08-29 18:44:06 +0000 | [diff] [blame] | 2664 | AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2665 | BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";; |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 2666 | IRIX/5*) LDSHARED="ld -shared";; |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 2667 | IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2668 | SunOS/4*) LDSHARED="ld";; |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 2669 | SunOS/5*) |
| 2670 | if test "$GCC" = "yes" |
| 2671 | then LDSHARED='$(CC) -G' |
| 2672 | else LDSHARED="ld -G"; |
| 2673 | fi ;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2674 | hp*|HP*) LDSHARED="ld -b";; |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2675 | OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; |
| 2676 | DYNIX/ptx*) LDSHARED="ld -G";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2677 | next/*) |
| 2678 | if test "$ns_dyld" |
| 2679 | then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind' |
| 2680 | else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r'; |
| 2681 | fi |
| 2682 | if test "$with_next_framework" ; then |
| 2683 | LDSHARED="$LDSHARED \$(LDLIBRARY)" |
| 2684 | fi ;; |
Guido van Rossum | 81652ab | 1996-07-21 02:53:27 +0000 | [diff] [blame] | 2685 | Linux*) LDSHARED="gcc -shared";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 2686 | dgux*) LDSHARED="ld -G";; |
Guido van Rossum | 458e7fa | 1999-09-17 15:40:40 +0000 | [diff] [blame] | 2687 | BSD/OS*/4*) LDSHARED="gcc -shared";; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 2688 | OpenBSD*) LDSHARED="ld -Bshareable";; |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 2689 | NetBSD*) |
| 2690 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 2691 | then |
| 2692 | LDSHARED="cc -shared" |
| 2693 | else |
| 2694 | LDSHARED="ld -Bshareable" |
| 2695 | fi;; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 2696 | FreeBSD*) |
Jeremy Hylton | 4bcc7c5 | 2000-08-31 17:45:35 +0000 | [diff] [blame] | 2697 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 2698 | then |
| 2699 | LDSHARED="cc -shared ${LDFLAGS}" |
| 2700 | else |
| 2701 | LDSHARED="ld -Bshareable ${LDFLAGS}" |
| 2702 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2703 | SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2704 | Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2705 | *) LDSHARED="ld";; |
| 2706 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2707 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2708 | echo "$ac_t""$LDSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2709 | # CCSHARED are the C *flags* used to create objects to go into a shared |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2710 | # library (module) -- this is only needed for a few systems |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2711 | echo $ac_n "checking CCSHARED""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2712 | echo "configure:2713: checking CCSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2713 | if test -z "$CCSHARED" |
| 2714 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 2715 | case $ac_sys_system/$ac_sys_release in |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 2716 | hp*|HP*) if test "$GCC" = yes; |
| 2717 | then CCSHARED="-fpic"; |
| 2718 | else CCSHARED="+z"; |
| 2719 | fi;; |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2720 | Linux*) CCSHARED="-fpic";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 2721 | BSD/OS*/4*) CCSHARED="-fpic";; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 2722 | OpenBSD*) CCSHARED="-fpic";; |
| 2723 | FreeBSD*|NetBSD*) CCSHARED="-fPIC";; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2724 | SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2725 | Monterey*) CCSHARED="-G";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 2726 | IRIX*/6*) case $CC in |
| 2727 | *gcc*) CCSHARED="-shared";; |
Guido van Rossum | ee21f41 | 1998-04-20 18:51:54 +0000 | [diff] [blame] | 2728 | *) CCSHARED="";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 2729 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2730 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2731 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2732 | echo "$ac_t""$CCSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2733 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2734 | # the python executable -- this is only needed for a few systems |
| 2735 | echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2736 | echo "configure:2737: checking LINKFORSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2737 | if test -z "$LINKFORSHARED" |
| 2738 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 2739 | case $ac_sys_system/$ac_sys_release in |
Guido van Rossum | 69f6580 | 1998-03-03 21:47:00 +0000 | [diff] [blame] | 2740 | AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2741 | hp*|HP*) |
Guido van Rossum | 304dd2d | 1997-10-20 23:10:56 +0000 | [diff] [blame] | 2742 | LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 2743 | BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 2d9feed | 1997-11-24 17:36:21 +0000 | [diff] [blame] | 2744 | Linux*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2745 | # -u libsys_s pulls in all symbols in libsys |
| 2746 | next/2*|next/3*) LINKFORSHARED="-u libsys_s";; |
| 2747 | # -u __dummy makes the linker aware of the objc runtime |
| 2748 | # in System.framework; otherwise, __objcInit (referenced in |
| 2749 | # crt1.o) gets erroneously defined as common, which breaks dynamic |
| 2750 | # loading of any modules which reference it in System.framework |
| 2751 | next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2752 | SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2753 | ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 2754 | FreeBSD*|NetBSD*) |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 2755 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 2756 | then |
| 2757 | LINKFORSHARED="-Wl,--export-dynamic" |
| 2758 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 2759 | SunOS/5*) case $CC in |
| 2760 | *gcc*) |
Guido van Rossum | ff48418 | 2000-02-03 13:50:24 +0000 | [diff] [blame] | 2761 | if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 2762 | then |
| 2763 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 2764 | fi;; |
| 2765 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2766 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2767 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2768 | echo "$ac_t""$LINKFORSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2769 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2770 | # checks for libraries |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2771 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2772 | echo "configure:2773: checking for dlopen in -ldl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2773 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2774 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2775 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2776 | else |
| 2777 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2778 | LIBS="-ldl $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2779 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2780 | #line 2781 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2781 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2782 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2783 | /* We use char because int might match the return type of a gcc2 |
| 2784 | builtin and then its argument prototype would still apply. */ |
| 2785 | char dlopen(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2786 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2787 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2788 | dlopen() |
| 2789 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2790 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2791 | if { (eval echo configure:2792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2792 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2793 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2794 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2795 | echo "configure: failed program was:" >&5 |
| 2796 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2797 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2798 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2799 | fi |
| 2800 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2801 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2802 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2803 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2804 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2805 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2806 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 2807 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2808 | cat >> confdefs.h <<EOF |
| 2809 | #define $ac_tr_lib 1 |
| 2810 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2811 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2812 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2813 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2814 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2815 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2816 | fi |
| 2817 | # Dynamic linking for SunOS/Solaris and SYSV |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2818 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2819 | echo "configure:2820: checking for shl_load in -ldld" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2820 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2821 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2822 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2823 | else |
| 2824 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2825 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2826 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2827 | #line 2828 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2828 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2829 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2830 | /* We use char because int might match the return type of a gcc2 |
| 2831 | builtin and then its argument prototype would still apply. */ |
| 2832 | char shl_load(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2833 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2834 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2835 | shl_load() |
| 2836 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2837 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2838 | if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2839 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2840 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2841 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2842 | echo "configure: failed program was:" >&5 |
| 2843 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2844 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2845 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2846 | fi |
| 2847 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2848 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2849 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2850 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2851 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2852 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2853 | ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 2854 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2855 | cat >> confdefs.h <<EOF |
| 2856 | #define $ac_tr_lib 1 |
| 2857 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2858 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2859 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2860 | |
| 2861 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2862 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2863 | fi |
| 2864 | # Dynamic linking for HP-UX |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 2865 | |
Skip Montanaro | cb85326 | 2000-08-30 22:29:48 +0000 | [diff] [blame] | 2866 | # Check for --with-pydebug |
| 2867 | echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2868 | echo "configure:2869: checking for --with-pydebug" >&5 |
Skip Montanaro | cb85326 | 2000-08-30 22:29:48 +0000 | [diff] [blame] | 2869 | # Check whether --with-pydebug or --without-pydebug was given. |
| 2870 | if test "${with_pydebug+set}" = set; then |
| 2871 | withval="$with_pydebug" |
| 2872 | |
| 2873 | if test "$withval" != no |
| 2874 | then cat >> confdefs.h <<\EOF |
| 2875 | #define Py_DEBUG 1 |
| 2876 | EOF |
| 2877 | echo "$ac_t""yes" 1>&6 |
| 2878 | else echo "$ac_t""no" 1>&6 |
| 2879 | fi |
| 2880 | else |
| 2881 | echo "$ac_t""no" 1>&6 |
| 2882 | fi |
| 2883 | |
| 2884 | |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 2885 | # checks for system dependent C++ extensions support |
| 2886 | case "$ac_sys_system" in |
| 2887 | AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2888 | echo "configure:2889: checking for genuine AIX C++ extensions support" >&5 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 2889 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2890 | #line 2891 "configure" |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 2891 | #include "confdefs.h" |
| 2892 | #include "/usr/lpp/xlC/include/load.h" |
| 2893 | int main() { |
| 2894 | loadAndInit("", 0, "") |
| 2895 | ; return 0; } |
| 2896 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2897 | if { (eval echo configure:2898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 2898 | rm -rf conftest* |
| 2899 | cat >> confdefs.h <<\EOF |
| 2900 | #define AIX_GENUINE_CPLUSPLUS 1 |
| 2901 | EOF |
| 2902 | |
| 2903 | echo "$ac_t""yes" 1>&6 |
| 2904 | else |
| 2905 | echo "configure: failed program was:" >&5 |
| 2906 | cat conftest.$ac_ext >&5 |
| 2907 | rm -rf conftest* |
| 2908 | echo "$ac_t""no" 1>&6 |
| 2909 | fi |
| 2910 | rm -f conftest*;; |
| 2911 | *) ;; |
| 2912 | esac |
| 2913 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 2914 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
| 2915 | # However on SGI IRIX, these exist but are broken. |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2916 | # BeOS' sockets are stashed in libnet. |
| 2917 | case "$ac_sys_system" in |
| 2918 | IRIX*) ;; |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 2919 | *) |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2920 | echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2921 | echo "configure:2922: checking for t_open in -lnsl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2922 | ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'` |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2923 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2924 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2925 | else |
| 2926 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2927 | LIBS="-lnsl $LIBS" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2928 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2929 | #line 2930 "configure" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2930 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2931 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2932 | /* We use char because int might match the return type of a gcc2 |
| 2933 | builtin and then its argument prototype would still apply. */ |
| 2934 | char t_open(); |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2935 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2936 | int main() { |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 2937 | t_open() |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2938 | ; return 0; } |
| 2939 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2940 | if { (eval echo configure:2941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2941 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2942 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2943 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2944 | echo "configure: failed program was:" >&5 |
| 2945 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2946 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2947 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2948 | fi |
| 2949 | rm -f conftest* |
| 2950 | LIBS="$ac_save_LIBS" |
| 2951 | |
| 2952 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2953 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2954 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2955 | LIBS="-lnsl $LIBS" |
| 2956 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2957 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2958 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 2959 | # SVR4 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2960 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2961 | echo "configure:2962: checking for socket in -lsocket" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2962 | ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2963 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2964 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2965 | else |
| 2966 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2967 | LIBS="-lsocket $LIBS $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2968 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2969 | #line 2970 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2970 | #include "confdefs.h" |
| 2971 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2972 | /* We use char because int might match the return type of a gcc2 |
| 2973 | builtin and then its argument prototype would still apply. */ |
| 2974 | char socket(); |
| 2975 | |
| 2976 | int main() { |
| 2977 | socket() |
| 2978 | ; return 0; } |
| 2979 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2980 | if { (eval echo configure:2981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2981 | rm -rf conftest* |
| 2982 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 2983 | else |
| 2984 | echo "configure: failed program was:" >&5 |
| 2985 | cat conftest.$ac_ext >&5 |
| 2986 | rm -rf conftest* |
| 2987 | eval "ac_cv_lib_$ac_lib_var=no" |
| 2988 | fi |
| 2989 | rm -f conftest* |
| 2990 | LIBS="$ac_save_LIBS" |
| 2991 | |
| 2992 | fi |
| 2993 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 2994 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2995 | LIBS="-lsocket $LIBS" |
| 2996 | else |
| 2997 | echo "$ac_t""no" 1>&6 |
| 2998 | fi |
| 2999 | # SVR4 sockets |
Jeremy Hylton | cb25d5e | 2000-07-27 21:23:28 +0000 | [diff] [blame] | 3000 | ;; |
| 3001 | esac |
| 3002 | case "$ac_sys_system" in |
| 3003 | BeOS*) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3004 | echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3005 | echo "configure:3006: checking for socket in -lnet" >&5 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3006 | ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'` |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3007 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3008 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3009 | else |
| 3010 | ac_save_LIBS="$LIBS" |
| 3011 | LIBS="-lnet $LIBS $LIBS" |
| 3012 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3013 | #line 3014 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3014 | #include "confdefs.h" |
| 3015 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3016 | /* We use char because int might match the return type of a gcc2 |
| 3017 | builtin and then its argument prototype would still apply. */ |
| 3018 | char socket(); |
| 3019 | |
| 3020 | int main() { |
| 3021 | socket() |
| 3022 | ; return 0; } |
| 3023 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3024 | if { (eval echo configure:3025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3025 | rm -rf conftest* |
| 3026 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3027 | else |
| 3028 | echo "configure: failed program was:" >&5 |
| 3029 | cat conftest.$ac_ext >&5 |
| 3030 | rm -rf conftest* |
| 3031 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3032 | fi |
| 3033 | rm -f conftest* |
| 3034 | LIBS="$ac_save_LIBS" |
| 3035 | |
| 3036 | fi |
| 3037 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3038 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3039 | LIBS="-lnet $LIBS" |
| 3040 | else |
| 3041 | echo "$ac_t""no" 1>&6 |
| 3042 | fi |
| 3043 | # BeOS |
| 3044 | ;; |
| 3045 | esac |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3046 | |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3047 | echo $ac_n "checking for --with-libs""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3048 | echo "configure:3049: checking for --with-libs" >&5 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3049 | # Check whether --with-libs or --without-libs was given. |
| 3050 | if test "${with_libs+set}" = set; then |
| 3051 | withval="$with_libs" |
| 3052 | |
| 3053 | echo "$ac_t""$withval" 1>&6 |
| 3054 | LIBS="$withval $LIBS" |
| 3055 | |
| 3056 | else |
| 3057 | echo "$ac_t""no" 1>&6 |
| 3058 | fi |
| 3059 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3060 | |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3061 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3062 | USE_THREAD_MODULE="" |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3063 | |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3064 | echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3065 | echo "configure:3066: checking for --with-dec-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3066 | |
| 3067 | # Check whether --with-dec-threads or --without-dec-threads was given. |
| 3068 | if test "${with_dec_threads+set}" = set; then |
| 3069 | withval="$with_dec_threads" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3070 | |
| 3071 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3072 | LDLAST=-threads |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3073 | if test "${with_thread+set}" != set; then |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3074 | with_thread="$withval"; |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3075 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3076 | else |
| 3077 | echo "$ac_t""no" 1>&6 |
| 3078 | fi |
| 3079 | |
| 3080 | |
| 3081 | echo $ac_n "checking for --with-threads""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3082 | echo "configure:3083: checking for --with-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3083 | # Check whether --with-threads or --without-threads was given. |
| 3084 | if test "${with_threads+set}" = set; then |
| 3085 | withval="$with_threads" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3086 | : |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3087 | fi |
| 3088 | |
| 3089 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3090 | # --with-thread is deprecated, but check for it anyway |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3091 | # Check whether --with-thread or --without-thread was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3092 | if test "${with_thread+set}" = set; then |
| 3093 | withval="$with_thread" |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 3094 | |
| 3095 | with_threads=$with_thread |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3096 | fi |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3097 | |
| 3098 | |
| 3099 | if test -z "$with_threads" |
| 3100 | then with_threads="yes" |
| 3101 | fi |
| 3102 | echo "$ac_t""$with_threads" 1>&6 |
| 3103 | |
| 3104 | if test "$with_threads" = "no" |
| 3105 | then |
| 3106 | USE_THREAD_MODULE="#" |
| 3107 | else |
| 3108 | if test -d "$with_threads" |
| 3109 | then LDFLAGS="$LDFLAGS -L$with_threads" |
| 3110 | fi |
| 3111 | if test -d "$withval" |
| 3112 | then LDFLAGS="$LDFLAGS -L$withval" |
| 3113 | fi |
| 3114 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 3115 | #define _REENTRANT 1 |
| 3116 | EOF |
| 3117 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3118 | ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3119 | echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3120 | echo "configure:3121: checking for mach/cthreads.h" >&5 |
| 3121 | if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3122 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3123 | else |
| 3124 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3125 | #line 3126 "configure" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3126 | #include "confdefs.h" |
| 3127 | #include <mach/cthreads.h> |
| 3128 | EOF |
| 3129 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3130 | { (eval echo configure:3131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3131 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3132 | if test -z "$ac_err"; then |
| 3133 | rm -rf conftest* |
| 3134 | eval "ac_cv_header_$ac_safe=yes" |
| 3135 | else |
| 3136 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3137 | echo "configure: failed program was:" >&5 |
| 3138 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3139 | rm -rf conftest* |
| 3140 | eval "ac_cv_header_$ac_safe=no" |
| 3141 | fi |
| 3142 | rm -f conftest* |
| 3143 | fi |
| 3144 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3145 | echo "$ac_t""yes" 1>&6 |
| 3146 | cat >> confdefs.h <<\EOF |
| 3147 | #define WITH_THREAD 1 |
| 3148 | EOF |
| 3149 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3150 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3151 | #define C_THREADS 1 |
| 3152 | EOF |
| 3153 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3154 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3155 | else |
| 3156 | echo "$ac_t""no" 1>&6 |
| 3157 | |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3158 | echo $ac_n "checking for --with-pth""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3159 | echo "configure:3160: checking for --with-pth" >&5 |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3160 | # Check whether --with-pth or --without-pth was given. |
| 3161 | if test "${with_pth+set}" = set; then |
| 3162 | withval="$with_pth" |
| 3163 | |
| 3164 | echo "$ac_t""$withval" 1>&6 |
| 3165 | cat >> confdefs.h <<\EOF |
| 3166 | #define WITH_THREAD 1 |
| 3167 | EOF |
| 3168 | |
| 3169 | cat >> confdefs.h <<\EOF |
| 3170 | #define HAVE_PTH 1 |
| 3171 | EOF |
| 3172 | |
| 3173 | LIBS="-lpth $LIBS" |
| 3174 | LIBOBJS="$LIBOBJS thread.o" |
| 3175 | else |
| 3176 | |
| 3177 | echo "$ac_t""no" 1>&6 |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3178 | echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3179 | echo "configure:3180: checking for pthread_create in -lpthread" >&5 |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3180 | ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3181 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3182 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3183 | else |
| 3184 | ac_save_LIBS="$LIBS" |
| 3185 | LIBS="-lpthread $LIBS" |
| 3186 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3187 | #line 3188 "configure" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3188 | #include "confdefs.h" |
| 3189 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3190 | /* We use char because int might match the return type of a gcc2 |
| 3191 | builtin and then its argument prototype would still apply. */ |
| 3192 | char pthread_create(); |
| 3193 | |
| 3194 | int main() { |
| 3195 | pthread_create() |
| 3196 | ; return 0; } |
| 3197 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3198 | if { (eval echo configure:3199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3199 | rm -rf conftest* |
| 3200 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3201 | else |
| 3202 | echo "configure: failed program was:" >&5 |
| 3203 | cat conftest.$ac_ext >&5 |
| 3204 | rm -rf conftest* |
| 3205 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3206 | fi |
| 3207 | rm -f conftest* |
| 3208 | LIBS="$ac_save_LIBS" |
| 3209 | |
| 3210 | fi |
| 3211 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3212 | echo "$ac_t""yes" 1>&6 |
| 3213 | cat >> confdefs.h <<\EOF |
| 3214 | #define WITH_THREAD 1 |
| 3215 | EOF |
| 3216 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3217 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3218 | #define _POSIX_THREADS 1 |
| 3219 | EOF |
| 3220 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3221 | LIBS="-lpthread $LIBS" |
| 3222 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3223 | else |
| 3224 | echo "$ac_t""no" 1>&6 |
| 3225 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3226 | echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3227 | echo "configure:3228: checking for pthread_detach" >&5 |
| 3228 | if eval "test \"\${ac_cv_func_pthread_detach+set}\" = set"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3229 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3230 | else |
| 3231 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3232 | #line 3233 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3233 | #include "confdefs.h" |
| 3234 | /* System header to define __stub macros and hopefully few prototypes, |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3235 | which can conflict with char pthread_detach(); below. */ |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3236 | #include <assert.h> |
| 3237 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3238 | /* We use char because int might match the return type of a gcc2 |
| 3239 | builtin and then its argument prototype would still apply. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3240 | char pthread_detach(); |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3241 | char (*f)(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3242 | |
| 3243 | int main() { |
| 3244 | |
| 3245 | /* The GNU C library defines this for functions which it implements |
| 3246 | to always fail with ENOSYS. Some functions are actually named |
| 3247 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3248 | #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3249 | choke me |
| 3250 | #else |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3251 | f = pthread_detach; |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3252 | #endif |
| 3253 | |
| 3254 | ; return 0; } |
| 3255 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3256 | if { (eval echo configure:3257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3257 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3258 | eval "ac_cv_func_pthread_detach=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3259 | else |
| 3260 | echo "configure: failed program was:" >&5 |
| 3261 | cat conftest.$ac_ext >&5 |
| 3262 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3263 | eval "ac_cv_func_pthread_detach=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3264 | fi |
| 3265 | rm -f conftest* |
| 3266 | fi |
| 3267 | |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3268 | if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3269 | echo "$ac_t""yes" 1>&6 |
| 3270 | cat >> confdefs.h <<\EOF |
| 3271 | #define WITH_THREAD 1 |
| 3272 | EOF |
| 3273 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3274 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3275 | #define _POSIX_THREADS 1 |
| 3276 | EOF |
| 3277 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3278 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3279 | else |
| 3280 | echo "$ac_t""no" 1>&6 |
| 3281 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3282 | ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3283 | echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3284 | echo "configure:3285: checking for kernel/OS.h" >&5 |
| 3285 | if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3286 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3287 | else |
| 3288 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3289 | #line 3290 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3290 | #include "confdefs.h" |
| 3291 | #include <kernel/OS.h> |
| 3292 | EOF |
| 3293 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3294 | { (eval echo configure:3295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3295 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3296 | if test -z "$ac_err"; then |
| 3297 | rm -rf conftest* |
| 3298 | eval "ac_cv_header_$ac_safe=yes" |
| 3299 | else |
| 3300 | echo "$ac_err" >&5 |
| 3301 | echo "configure: failed program was:" >&5 |
| 3302 | cat conftest.$ac_ext >&5 |
| 3303 | rm -rf conftest* |
| 3304 | eval "ac_cv_header_$ac_safe=no" |
| 3305 | fi |
| 3306 | rm -f conftest* |
| 3307 | fi |
| 3308 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3309 | echo "$ac_t""yes" 1>&6 |
| 3310 | cat >> confdefs.h <<\EOF |
| 3311 | #define WITH_THREAD 1 |
| 3312 | EOF |
| 3313 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3314 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3315 | #define BEOS_THREADS 1 |
| 3316 | EOF |
| 3317 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3318 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3319 | else |
| 3320 | echo "$ac_t""no" 1>&6 |
| 3321 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3322 | echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3323 | echo "configure:3324: checking for pthread_create in -lpthreads" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3324 | ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3325 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3326 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3327 | else |
| 3328 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3329 | LIBS="-lpthreads $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3330 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3331 | #line 3332 "configure" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3332 | #include "confdefs.h" |
| 3333 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3334 | /* We use char because int might match the return type of a gcc2 |
| 3335 | builtin and then its argument prototype would still apply. */ |
| 3336 | char pthread_create(); |
| 3337 | |
| 3338 | int main() { |
| 3339 | pthread_create() |
| 3340 | ; return 0; } |
| 3341 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3342 | if { (eval echo configure:3343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3343 | rm -rf conftest* |
| 3344 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3345 | else |
| 3346 | echo "configure: failed program was:" >&5 |
| 3347 | cat conftest.$ac_ext >&5 |
| 3348 | rm -rf conftest* |
| 3349 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3350 | fi |
| 3351 | rm -f conftest* |
| 3352 | LIBS="$ac_save_LIBS" |
| 3353 | |
| 3354 | fi |
| 3355 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3356 | echo "$ac_t""yes" 1>&6 |
| 3357 | cat >> confdefs.h <<\EOF |
| 3358 | #define WITH_THREAD 1 |
| 3359 | EOF |
| 3360 | |
| 3361 | cat >> confdefs.h <<\EOF |
| 3362 | #define _POSIX_THREADS 1 |
| 3363 | EOF |
| 3364 | |
| 3365 | LIBS="$LIBS -lpthreads" |
| 3366 | LIBOBJS="$LIBOBJS thread.o" |
| 3367 | else |
| 3368 | echo "$ac_t""no" 1>&6 |
| 3369 | |
| 3370 | echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3371 | echo "configure:3372: checking for pthread_create in -lc_r" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3372 | ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3373 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3374 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3375 | else |
| 3376 | ac_save_LIBS="$LIBS" |
| 3377 | LIBS="-lc_r $LIBS" |
| 3378 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3379 | #line 3380 "configure" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3380 | #include "confdefs.h" |
| 3381 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3382 | /* We use char because int might match the return type of a gcc2 |
| 3383 | builtin and then its argument prototype would still apply. */ |
| 3384 | char pthread_create(); |
| 3385 | |
| 3386 | int main() { |
| 3387 | pthread_create() |
| 3388 | ; return 0; } |
| 3389 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3390 | if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3391 | rm -rf conftest* |
| 3392 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3393 | else |
| 3394 | echo "configure: failed program was:" >&5 |
| 3395 | cat conftest.$ac_ext >&5 |
| 3396 | rm -rf conftest* |
| 3397 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3398 | fi |
| 3399 | rm -f conftest* |
| 3400 | LIBS="$ac_save_LIBS" |
| 3401 | |
| 3402 | fi |
| 3403 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3404 | echo "$ac_t""yes" 1>&6 |
| 3405 | cat >> confdefs.h <<\EOF |
| 3406 | #define WITH_THREAD 1 |
| 3407 | EOF |
| 3408 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3409 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3410 | #define _POSIX_THREADS 1 |
| 3411 | EOF |
| 3412 | |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3413 | LIBS="$LIBS -lc_r" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3414 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3415 | else |
| 3416 | echo "$ac_t""no" 1>&6 |
| 3417 | |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3418 | echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3419 | echo "configure:3420: checking for __d6_pthread_create in -lthread" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3420 | ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3421 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3422 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3423 | else |
| 3424 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3425 | LIBS="-lthread $LIBS" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3426 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3427 | #line 3428 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3428 | #include "confdefs.h" |
| 3429 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3430 | /* We use char because int might match the return type of a gcc2 |
| 3431 | builtin and then its argument prototype would still apply. */ |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3432 | char __d6_pthread_create(); |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3433 | |
| 3434 | int main() { |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3435 | __d6_pthread_create() |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3436 | ; return 0; } |
| 3437 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3438 | if { (eval echo configure:3439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3439 | rm -rf conftest* |
| 3440 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3441 | else |
| 3442 | echo "configure: failed program was:" >&5 |
| 3443 | cat conftest.$ac_ext >&5 |
| 3444 | rm -rf conftest* |
| 3445 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3446 | fi |
| 3447 | rm -f conftest* |
| 3448 | LIBS="$ac_save_LIBS" |
| 3449 | |
| 3450 | fi |
| 3451 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3452 | echo "$ac_t""yes" 1>&6 |
| 3453 | cat >> confdefs.h <<\EOF |
| 3454 | #define WITH_THREAD 1 |
| 3455 | EOF |
| 3456 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3457 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3458 | #define _POSIX_THREADS 1 |
| 3459 | EOF |
| 3460 | |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3461 | LIBS="$LIBS -lthread" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3462 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3463 | else |
| 3464 | echo "$ac_t""no" 1>&6 |
| 3465 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3466 | echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3467 | echo "configure:3468: checking for pthread_create in -lcma" >&5 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3468 | ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3469 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3470 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3471 | else |
| 3472 | ac_save_LIBS="$LIBS" |
| 3473 | LIBS="-lcma $LIBS" |
| 3474 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3475 | #line 3476 "configure" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3476 | #include "confdefs.h" |
| 3477 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3478 | /* We use char because int might match the return type of a gcc2 |
| 3479 | builtin and then its argument prototype would still apply. */ |
| 3480 | char pthread_create(); |
| 3481 | |
| 3482 | int main() { |
| 3483 | pthread_create() |
| 3484 | ; return 0; } |
| 3485 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3486 | if { (eval echo configure:3487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3487 | rm -rf conftest* |
| 3488 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3489 | else |
| 3490 | echo "configure: failed program was:" >&5 |
| 3491 | cat conftest.$ac_ext >&5 |
| 3492 | rm -rf conftest* |
| 3493 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3494 | fi |
| 3495 | rm -f conftest* |
| 3496 | LIBS="$ac_save_LIBS" |
| 3497 | |
| 3498 | fi |
| 3499 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3500 | echo "$ac_t""yes" 1>&6 |
| 3501 | cat >> confdefs.h <<\EOF |
| 3502 | #define WITH_THREAD 1 |
| 3503 | EOF |
| 3504 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3505 | cat >> confdefs.h <<\EOF |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3506 | #define _POSIX_THREADS 1 |
| 3507 | EOF |
| 3508 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3509 | LIBS="$LIBS -lcma" |
| 3510 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3511 | else |
| 3512 | echo "$ac_t""no" 1>&6 |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 3513 | |
| 3514 | USE_THREAD_MODULE="#" |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 3515 | fi |
| 3516 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3517 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3518 | fi |
| 3519 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3520 | fi |
| 3521 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 3522 | fi |
| 3523 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3524 | fi |
| 3525 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3526 | fi |
| 3527 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3528 | fi |
| 3529 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3530 | fi |
| 3531 | |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3532 | fi |
| 3533 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 3534 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3535 | echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3536 | echo "configure:3537: checking for usconfig in -lmpc" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3537 | ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3538 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3539 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3540 | else |
| 3541 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3542 | LIBS="-lmpc $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3543 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3544 | #line 3545 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3545 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3546 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3547 | /* We use char because int might match the return type of a gcc2 |
| 3548 | builtin and then its argument prototype would still apply. */ |
| 3549 | char usconfig(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3550 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3551 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3552 | usconfig() |
| 3553 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3554 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3555 | if { (eval echo configure:3556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3556 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3557 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3558 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3559 | echo "configure: failed program was:" >&5 |
| 3560 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3561 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3562 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3563 | fi |
| 3564 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3565 | LIBS="$ac_save_LIBS" |
| 3566 | |
| 3567 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3568 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3569 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3570 | cat >> confdefs.h <<\EOF |
| 3571 | #define WITH_THREAD 1 |
| 3572 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3573 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3574 | LIBS="$LIBS -lmpc" |
| 3575 | LIBOBJS="$LIBOBJS thread.o" |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 3576 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3577 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3578 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3579 | fi |
| 3580 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3581 | echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3582 | echo "configure:3583: checking for thr_create in -lthread" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3583 | ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3584 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3585 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3586 | else |
| 3587 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3588 | LIBS="-lthread $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3589 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3590 | #line 3591 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3591 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3592 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3593 | /* We use char because int might match the return type of a gcc2 |
| 3594 | builtin and then its argument prototype would still apply. */ |
| 3595 | char thr_create(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3596 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3597 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3598 | thr_create() |
| 3599 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3600 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3601 | if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3602 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3603 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3604 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3605 | echo "configure: failed program was:" >&5 |
| 3606 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3607 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3608 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3609 | fi |
| 3610 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3611 | LIBS="$ac_save_LIBS" |
| 3612 | |
| 3613 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3614 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3615 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3616 | cat >> confdefs.h <<\EOF |
| 3617 | #define WITH_THREAD 1 |
| 3618 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3619 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3620 | LIBS="$LIBS -lthread" |
| 3621 | LIBOBJS="$LIBOBJS thread.o" |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 3622 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3623 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3624 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3625 | fi |
| 3626 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3627 | fi |
| 3628 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 3629 | # Check for GC support |
| 3630 | |
| 3631 | USE_GC_MODULE="" |
| 3632 | echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3633 | echo "configure:3634: checking for --with-cycle-gc" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 3634 | # Check whether --with-cycle-gc or --without-cycle-gc was given. |
| 3635 | if test "${with_cycle_gc+set}" = set; then |
| 3636 | withval="$with_cycle_gc" |
| 3637 | : |
| 3638 | fi |
| 3639 | |
| 3640 | |
| 3641 | if test -z "$with_cycle_gc" |
| 3642 | then with_cycle_gc="yes" |
| 3643 | fi |
| 3644 | if test "$with_cycle_gc" = "no" |
| 3645 | then |
| 3646 | USE_GC_MODULE="#" |
| 3647 | else |
| 3648 | cat >> confdefs.h <<\EOF |
| 3649 | #define WITH_CYCLE_GC 1 |
| 3650 | EOF |
| 3651 | |
| 3652 | fi |
| 3653 | echo "$ac_t""$with_cycle_gc" 1>&6 |
| 3654 | |
Fred Drake | a50d6ec | 2000-08-31 16:13:20 +0000 | [diff] [blame] | 3655 | # Check for LIBDB support |
| 3656 | # either --with-libdb or, in its absence, the presence of db.h |
| 3657 | |
| 3658 | USE_BSDDB_MODULE="" |
| 3659 | echo $ac_n "checking for --with-libdb""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3660 | echo "configure:3661: checking for --with-libdb" >&5 |
Fred Drake | a50d6ec | 2000-08-31 16:13:20 +0000 | [diff] [blame] | 3661 | # Check whether --with-libdb or --without-libdb was given. |
| 3662 | if test "${with_libdb+set}" = set; then |
| 3663 | withval="$with_libdb" |
| 3664 | : |
| 3665 | fi |
| 3666 | |
| 3667 | |
Skip Montanaro | b89f41e | 2000-09-04 04:06:05 +0000 | [diff] [blame] | 3668 | # enabled by default, but db.h must be found |
| 3669 | if test "$ac_cv_header_db_h" = "yes" |
| 3670 | then |
| 3671 | if test "$with_libdb" != "no" |
| 3672 | then with_libdb="yes" |
| 3673 | fi |
| 3674 | else |
| 3675 | # make sure user knows why bsddb support wasn't enabled event |
| 3676 | # though s/he requested it |
| 3677 | if test "$with_libdb" = "yes" |
| 3678 | then echo $ac_n "(requested, but db.h was not found) $ac_c" |
| 3679 | fi |
| 3680 | with_libdb="no" |
Fred Drake | a50d6ec | 2000-08-31 16:13:20 +0000 | [diff] [blame] | 3681 | fi |
Skip Montanaro | b89f41e | 2000-09-04 04:06:05 +0000 | [diff] [blame] | 3682 | |
Fred Drake | a50d6ec | 2000-08-31 16:13:20 +0000 | [diff] [blame] | 3683 | if test "$with_libdb" = "no" |
| 3684 | then |
| 3685 | USE_BSDDB_MODULE="#" |
| 3686 | else |
| 3687 | cat >> confdefs.h <<\EOF |
| 3688 | #define WITH_LIBDB 1 |
| 3689 | EOF |
| 3690 | |
| 3691 | fi |
| 3692 | echo "$ac_t""$with_libdb" 1>&6 |
| 3693 | |
Skip Montanaro | ed33c9a | 2000-09-08 02:17:15 +0000 | [diff] [blame] | 3694 | if test "$with_libdb" = "yes" |
| 3695 | then |
| 3696 | # check for libdb; BSD systems have the DB routines in libc --tg |
| 3697 | |
Martin v. Löwis | 05a65d6 | 2000-09-24 19:40:25 +0000 | [diff] [blame] | 3698 | # If dbopen is not in libc, then checking whether it is in libdb |
| 3699 | # is difficult: db_185.h may #define it as __db185_open |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3700 | # Instead, we just trust it is in libdb; linking will fail if it |
| 3701 | # is not. |
Skip Montanaro | ed33c9a | 2000-09-08 02:17:15 +0000 | [diff] [blame] | 3702 | echo $ac_n "checking for dbopen""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3703 | echo "configure:3704: checking for dbopen" >&5 |
| 3704 | if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then |
Skip Montanaro | ed33c9a | 2000-09-08 02:17:15 +0000 | [diff] [blame] | 3705 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3706 | else |
| 3707 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3708 | #line 3709 "configure" |
Skip Montanaro | ed33c9a | 2000-09-08 02:17:15 +0000 | [diff] [blame] | 3709 | #include "confdefs.h" |
| 3710 | /* System header to define __stub macros and hopefully few prototypes, |
| 3711 | which can conflict with char dbopen(); below. */ |
| 3712 | #include <assert.h> |
| 3713 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3714 | /* We use char because int might match the return type of a gcc2 |
| 3715 | builtin and then its argument prototype would still apply. */ |
| 3716 | char dbopen(); |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3717 | char (*f)(); |
Skip Montanaro | ed33c9a | 2000-09-08 02:17:15 +0000 | [diff] [blame] | 3718 | |
| 3719 | int main() { |
| 3720 | |
| 3721 | /* The GNU C library defines this for functions which it implements |
| 3722 | to always fail with ENOSYS. Some functions are actually named |
| 3723 | something starting with __ and the normal name is an alias. */ |
| 3724 | #if defined (__stub_dbopen) || defined (__stub___dbopen) |
| 3725 | choke me |
| 3726 | #else |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3727 | f = dbopen; |
Skip Montanaro | ed33c9a | 2000-09-08 02:17:15 +0000 | [diff] [blame] | 3728 | #endif |
| 3729 | |
| 3730 | ; return 0; } |
| 3731 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3732 | if { (eval echo configure:3733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Skip Montanaro | ed33c9a | 2000-09-08 02:17:15 +0000 | [diff] [blame] | 3733 | rm -rf conftest* |
| 3734 | eval "ac_cv_func_dbopen=yes" |
| 3735 | else |
| 3736 | echo "configure: failed program was:" >&5 |
| 3737 | cat conftest.$ac_ext >&5 |
| 3738 | rm -rf conftest* |
| 3739 | eval "ac_cv_func_dbopen=no" |
| 3740 | fi |
| 3741 | rm -f conftest* |
| 3742 | fi |
| 3743 | |
| 3744 | if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then |
| 3745 | echo "$ac_t""yes" 1>&6 |
| 3746 | HAVE_LIBDB= |
| 3747 | else |
| 3748 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 05a65d6 | 2000-09-24 19:40:25 +0000 | [diff] [blame] | 3749 | HAVE_LIBDB=-ldb |
Skip Montanaro | ed33c9a | 2000-09-08 02:17:15 +0000 | [diff] [blame] | 3750 | fi |
| 3751 | |
| 3752 | fi |
| 3753 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 3754 | # Check for --with-wctype-functions |
| 3755 | echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3756 | echo "configure:3757: checking for --with-wctype-functions" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 3757 | # Check whether --with-wctype-functions or --without-wctype-functions was given. |
| 3758 | if test "${with_wctype_functions+set}" = set; then |
| 3759 | withval="$with_wctype_functions" |
| 3760 | |
| 3761 | if test "$withval" != no |
| 3762 | then cat >> confdefs.h <<\EOF |
| 3763 | #define WANT_WCTYPE_FUNCTIONS 1 |
| 3764 | EOF |
| 3765 | echo "$ac_t""yes" 1>&6 |
| 3766 | else echo "$ac_t""no" 1>&6 |
| 3767 | fi |
| 3768 | else |
| 3769 | echo "$ac_t""no" 1>&6 |
| 3770 | fi |
| 3771 | |
| 3772 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3773 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3774 | |
| 3775 | DLINCLDIR=/ |
| 3776 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3777 | echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3778 | echo "configure:3779: checking for --with-sgi-dl" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3779 | # Check whether --with-sgi-dl or --without-sgi-dl was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3780 | if test "${with_sgi_dl+set}" = set; then |
| 3781 | withval="$with_sgi_dl" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3782 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3783 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3784 | cat >> confdefs.h <<\EOF |
| 3785 | #define WITH_SGI_DL 1 |
| 3786 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3787 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3788 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3789 | dldir=$withval |
| 3790 | if test -d "$dldir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3791 | then LDFLAGS="$LDFLAGS -L$dldir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3792 | else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3793 | fi |
| 3794 | DLINCLDIR=${dldir} |
| 3795 | LIBS="$LIBS -ldl -lmld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3796 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3797 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3798 | fi |
| 3799 | |
| 3800 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3801 | echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3802 | echo "configure:3803: checking for --with-dl-dld" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3803 | # Check whether --with-dl-dld or --without-dl-dld was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3804 | if test "${with_dl_dld+set}" = set; then |
| 3805 | withval="$with_dl_dld" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3806 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3807 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3808 | cat >> confdefs.h <<\EOF |
| 3809 | #define WITH_DL_DLD 1 |
| 3810 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3811 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3812 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3813 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 3814 | dlddir=`echo "$withval" | sed 's/.*,//'` |
| 3815 | if test -d "$dldir" -a -d "$dlddir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3816 | then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3817 | else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3818 | fi |
| 3819 | DLINCLDIR=${dldir} |
| 3820 | LIBS="$LIBS -ldl -ldld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3821 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3822 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3823 | fi |
| 3824 | |
| 3825 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3826 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 3827 | # platforms, such as AIX, have dlopen(), but don't want to use it. |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3828 | for ac_func in dlopen |
| 3829 | do |
| 3830 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3831 | echo "configure:3832: checking for $ac_func" >&5 |
| 3832 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3833 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3834 | else |
| 3835 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3836 | #line 3837 "configure" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3837 | #include "confdefs.h" |
| 3838 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3839 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3840 | #include <assert.h> |
| 3841 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3842 | /* We use char because int might match the return type of a gcc2 |
| 3843 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3844 | char $ac_func(); |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3845 | char (*f)(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3846 | |
| 3847 | int main() { |
| 3848 | |
| 3849 | /* The GNU C library defines this for functions which it implements |
| 3850 | to always fail with ENOSYS. Some functions are actually named |
| 3851 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3852 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3853 | choke me |
| 3854 | #else |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3855 | f = $ac_func; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3856 | #endif |
| 3857 | |
| 3858 | ; return 0; } |
| 3859 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3860 | if { (eval echo configure:3861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3861 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3862 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3863 | else |
| 3864 | echo "configure: failed program was:" >&5 |
| 3865 | cat conftest.$ac_ext >&5 |
| 3866 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3867 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3868 | fi |
| 3869 | rm -f conftest* |
| 3870 | fi |
| 3871 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3872 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3873 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3874 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 3875 | cat >> confdefs.h <<EOF |
| 3876 | #define $ac_tr_func 1 |
| 3877 | EOF |
| 3878 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3879 | else |
| 3880 | echo "$ac_t""no" 1>&6 |
| 3881 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3882 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3883 | |
| 3884 | |
| 3885 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 3886 | # loading of modules. |
| 3887 | |
| 3888 | echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3889 | echo "configure:3890: checking DYNLOADFILE" >&5 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3890 | if test -z "$DYNLOADFILE" |
| 3891 | then |
| 3892 | case $ac_sys_system/$ac_sys_release in |
| 3893 | AIX*) DYNLOADFILE="dynload_aix.o";; |
| 3894 | BeOS*) DYNLOADFILE="dynload_beos.o";; |
| 3895 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
| 3896 | next/*) DYNLOADFILE="dynload_next.o";; |
| 3897 | *) |
| 3898 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 3899 | # out any dynamic loading |
| 3900 | if test "$ac_cv_func_dlopen" = yes |
| 3901 | then DYNLOADFILE="dynload_shlib.o" |
| 3902 | else DYNLOADFILE="dynload_stub.o" |
| 3903 | fi |
| 3904 | ;; |
| 3905 | esac |
| 3906 | fi |
| 3907 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
| 3908 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 3909 | then |
| 3910 | cat >> confdefs.h <<\EOF |
| 3911 | #define HAVE_DYNAMIC_LOADING 1 |
| 3912 | EOF |
| 3913 | |
| 3914 | fi |
| 3915 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3916 | # checks for library functions |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3917 | for ac_func in alarm chown clock confstr ctermid ctermid_r execv \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 3918 | flock fork fsync fdatasync fpathconf ftime ftruncate \ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3919 | getgroups getlogin getpeername getpid getpwent getwd \ |
Andrew M. Kuchling | 22c6934 | 2000-06-18 15:07:40 +0000 | [diff] [blame] | 3920 | kill link lstat mkfifo mktime mremap \ |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 3921 | nice pathconf pause plock poll pthread_init \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 3922 | putenv readlink \ |
Andrew M. Kuchling | 8d2f2b2 | 2000-07-13 01:26:58 +0000 | [diff] [blame] | 3923 | select setegid seteuid setgid \ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3924 | setlocale setregid setreuid setsid setpgid setuid setvbuf \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 3925 | sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ |
Fred Drake | 89143df | 1999-12-09 22:03:25 +0000 | [diff] [blame] | 3926 | tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Thomas Wouters | 70c21a1 | 2000-07-14 14:28:33 +0000 | [diff] [blame] | 3927 | truncate uname waitpid _getpty |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3928 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3929 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3930 | echo "configure:3931: checking for $ac_func" >&5 |
| 3931 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3932 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3933 | else |
| 3934 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3935 | #line 3936 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3936 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3937 | /* System header to define __stub macros and hopefully few prototypes, |
| 3938 | which can conflict with char $ac_func(); below. */ |
| 3939 | #include <assert.h> |
| 3940 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3941 | /* We use char because int might match the return type of a gcc2 |
| 3942 | builtin and then its argument prototype would still apply. */ |
| 3943 | char $ac_func(); |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3944 | char (*f)(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3945 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3946 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3947 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3948 | /* The GNU C library defines this for functions which it implements |
| 3949 | to always fail with ENOSYS. Some functions are actually named |
| 3950 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3951 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3952 | choke me |
| 3953 | #else |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3954 | f = $ac_func; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3955 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3956 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3957 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3958 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3959 | if { (eval echo configure:3960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3960 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3961 | eval "ac_cv_func_$ac_func=yes" |
| 3962 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3963 | echo "configure: failed program was:" >&5 |
| 3964 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3965 | rm -rf conftest* |
| 3966 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3967 | fi |
| 3968 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3969 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3970 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3971 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3972 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3973 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3974 | cat >> confdefs.h <<EOF |
| 3975 | #define $ac_tr_func 1 |
| 3976 | EOF |
| 3977 | |
| 3978 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3979 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3980 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3981 | done |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3982 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 3983 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3984 | # check for openpty and forkpty |
| 3985 | |
| 3986 | for ac_func in openpty |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3987 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3988 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3989 | echo "configure:3990: checking for $ac_func" >&5 |
| 3990 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3991 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3992 | else |
| 3993 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3994 | #line 3995 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3995 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3996 | /* System header to define __stub macros and hopefully few prototypes, |
| 3997 | which can conflict with char $ac_func(); below. */ |
| 3998 | #include <assert.h> |
| 3999 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4000 | /* We use char because int might match the return type of a gcc2 |
| 4001 | builtin and then its argument prototype would still apply. */ |
| 4002 | char $ac_func(); |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4003 | char (*f)(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4004 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4005 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4006 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4007 | /* The GNU C library defines this for functions which it implements |
| 4008 | to always fail with ENOSYS. Some functions are actually named |
| 4009 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4010 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4011 | choke me |
| 4012 | #else |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4013 | f = $ac_func; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4014 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4015 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4016 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4017 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4018 | if { (eval echo configure:4019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4019 | rm -rf conftest* |
| 4020 | eval "ac_cv_func_$ac_func=yes" |
| 4021 | else |
| 4022 | echo "configure: failed program was:" >&5 |
| 4023 | cat conftest.$ac_ext >&5 |
| 4024 | rm -rf conftest* |
| 4025 | eval "ac_cv_func_$ac_func=no" |
| 4026 | fi |
| 4027 | rm -f conftest* |
| 4028 | fi |
| 4029 | |
| 4030 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4031 | echo "$ac_t""yes" 1>&6 |
| 4032 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4033 | cat >> confdefs.h <<EOF |
| 4034 | #define $ac_tr_func 1 |
| 4035 | EOF |
| 4036 | |
| 4037 | else |
| 4038 | echo "$ac_t""no" 1>&6 |
| 4039 | echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4040 | echo "configure:4041: checking for openpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4041 | ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4042 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4043 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4044 | else |
| 4045 | ac_save_LIBS="$LIBS" |
| 4046 | LIBS="-lutil $LIBS" |
| 4047 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4048 | #line 4049 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4049 | #include "confdefs.h" |
| 4050 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4051 | /* We use char because int might match the return type of a gcc2 |
| 4052 | builtin and then its argument prototype would still apply. */ |
| 4053 | char openpty(); |
| 4054 | |
| 4055 | int main() { |
| 4056 | openpty() |
| 4057 | ; return 0; } |
| 4058 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4059 | if { (eval echo configure:4060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4060 | rm -rf conftest* |
| 4061 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4062 | else |
| 4063 | echo "configure: failed program was:" >&5 |
| 4064 | cat conftest.$ac_ext >&5 |
| 4065 | rm -rf conftest* |
| 4066 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4067 | fi |
| 4068 | rm -f conftest* |
| 4069 | LIBS="$ac_save_LIBS" |
| 4070 | |
| 4071 | fi |
| 4072 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4073 | echo "$ac_t""yes" 1>&6 |
| 4074 | cat >> confdefs.h <<\EOF |
| 4075 | #define HAVE_OPENPTY 1 |
| 4076 | EOF |
| 4077 | LIBS="$LIBS -lutil" |
| 4078 | else |
| 4079 | echo "$ac_t""no" 1>&6 |
| 4080 | fi |
| 4081 | |
| 4082 | fi |
| 4083 | done |
| 4084 | |
| 4085 | for ac_func in forkpty |
| 4086 | do |
| 4087 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4088 | echo "configure:4089: checking for $ac_func" >&5 |
| 4089 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4090 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4091 | else |
| 4092 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4093 | #line 4094 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4094 | #include "confdefs.h" |
| 4095 | /* System header to define __stub macros and hopefully few prototypes, |
| 4096 | which can conflict with char $ac_func(); below. */ |
| 4097 | #include <assert.h> |
| 4098 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4099 | /* We use char because int might match the return type of a gcc2 |
| 4100 | builtin and then its argument prototype would still apply. */ |
| 4101 | char $ac_func(); |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4102 | char (*f)(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4103 | |
| 4104 | int main() { |
| 4105 | |
| 4106 | /* The GNU C library defines this for functions which it implements |
| 4107 | to always fail with ENOSYS. Some functions are actually named |
| 4108 | something starting with __ and the normal name is an alias. */ |
| 4109 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4110 | choke me |
| 4111 | #else |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4112 | f = $ac_func; |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4113 | #endif |
| 4114 | |
| 4115 | ; return 0; } |
| 4116 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4117 | if { (eval echo configure:4118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4118 | rm -rf conftest* |
| 4119 | eval "ac_cv_func_$ac_func=yes" |
| 4120 | else |
| 4121 | echo "configure: failed program was:" >&5 |
| 4122 | cat conftest.$ac_ext >&5 |
| 4123 | rm -rf conftest* |
| 4124 | eval "ac_cv_func_$ac_func=no" |
| 4125 | fi |
| 4126 | rm -f conftest* |
| 4127 | fi |
| 4128 | |
| 4129 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4130 | echo "$ac_t""yes" 1>&6 |
| 4131 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4132 | cat >> confdefs.h <<EOF |
| 4133 | #define $ac_tr_func 1 |
| 4134 | EOF |
| 4135 | |
| 4136 | else |
| 4137 | echo "$ac_t""no" 1>&6 |
| 4138 | echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4139 | echo "configure:4140: checking for forkpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4140 | ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4141 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4142 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4143 | else |
| 4144 | ac_save_LIBS="$LIBS" |
| 4145 | LIBS="-lutil $LIBS" |
| 4146 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4147 | #line 4148 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4148 | #include "confdefs.h" |
| 4149 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4150 | /* We use char because int might match the return type of a gcc2 |
| 4151 | builtin and then its argument prototype would still apply. */ |
| 4152 | char forkpty(); |
| 4153 | |
| 4154 | int main() { |
| 4155 | forkpty() |
| 4156 | ; return 0; } |
| 4157 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4158 | if { (eval echo configure:4159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4159 | rm -rf conftest* |
| 4160 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4161 | else |
| 4162 | echo "configure: failed program was:" >&5 |
| 4163 | cat conftest.$ac_ext >&5 |
| 4164 | rm -rf conftest* |
| 4165 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4166 | fi |
| 4167 | rm -f conftest* |
| 4168 | LIBS="$ac_save_LIBS" |
| 4169 | |
| 4170 | fi |
| 4171 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4172 | echo "$ac_t""yes" 1>&6 |
| 4173 | cat >> confdefs.h <<\EOF |
| 4174 | #define HAVE_FORKPTY 1 |
| 4175 | EOF |
| 4176 | LIBS="$LIBS -lutil" |
| 4177 | else |
| 4178 | echo "$ac_t""no" 1>&6 |
| 4179 | fi |
| 4180 | |
| 4181 | fi |
| 4182 | done |
| 4183 | |
| 4184 | |
| 4185 | # check for long file support functions |
| 4186 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
| 4187 | do |
| 4188 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4189 | echo "configure:4190: checking for $ac_func" >&5 |
| 4190 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4191 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4192 | else |
| 4193 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4194 | #line 4195 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4195 | #include "confdefs.h" |
| 4196 | /* System header to define __stub macros and hopefully few prototypes, |
| 4197 | which can conflict with char $ac_func(); below. */ |
| 4198 | #include <assert.h> |
| 4199 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4200 | /* We use char because int might match the return type of a gcc2 |
| 4201 | builtin and then its argument prototype would still apply. */ |
| 4202 | char $ac_func(); |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4203 | char (*f)(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4204 | |
| 4205 | int main() { |
| 4206 | |
| 4207 | /* The GNU C library defines this for functions which it implements |
| 4208 | to always fail with ENOSYS. Some functions are actually named |
| 4209 | something starting with __ and the normal name is an alias. */ |
| 4210 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4211 | choke me |
| 4212 | #else |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4213 | f = $ac_func; |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4214 | #endif |
| 4215 | |
| 4216 | ; return 0; } |
| 4217 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4218 | if { (eval echo configure:4219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4219 | rm -rf conftest* |
| 4220 | eval "ac_cv_func_$ac_func=yes" |
| 4221 | else |
| 4222 | echo "configure: failed program was:" >&5 |
| 4223 | cat conftest.$ac_ext >&5 |
| 4224 | rm -rf conftest* |
| 4225 | eval "ac_cv_func_$ac_func=no" |
| 4226 | fi |
| 4227 | rm -f conftest* |
| 4228 | fi |
| 4229 | |
| 4230 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4231 | echo "$ac_t""yes" 1>&6 |
| 4232 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4233 | cat >> confdefs.h <<EOF |
| 4234 | #define $ac_tr_func 1 |
| 4235 | EOF |
| 4236 | |
| 4237 | else |
| 4238 | echo "$ac_t""no" 1>&6 |
| 4239 | fi |
| 4240 | done |
| 4241 | |
| 4242 | |
| 4243 | for ac_func in dup2 getcwd strdup strerror memmove |
| 4244 | do |
| 4245 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4246 | echo "configure:4247: checking for $ac_func" >&5 |
| 4247 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4248 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4249 | else |
| 4250 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4251 | #line 4252 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4252 | #include "confdefs.h" |
| 4253 | /* System header to define __stub macros and hopefully few prototypes, |
| 4254 | which can conflict with char $ac_func(); below. */ |
| 4255 | #include <assert.h> |
| 4256 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4257 | /* We use char because int might match the return type of a gcc2 |
| 4258 | builtin and then its argument prototype would still apply. */ |
| 4259 | char $ac_func(); |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4260 | char (*f)(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4261 | |
| 4262 | int main() { |
| 4263 | |
| 4264 | /* The GNU C library defines this for functions which it implements |
| 4265 | to always fail with ENOSYS. Some functions are actually named |
| 4266 | something starting with __ and the normal name is an alias. */ |
| 4267 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4268 | choke me |
| 4269 | #else |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4270 | f = $ac_func; |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4271 | #endif |
| 4272 | |
| 4273 | ; return 0; } |
| 4274 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4275 | if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4276 | rm -rf conftest* |
| 4277 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4278 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4279 | echo "configure: failed program was:" >&5 |
| 4280 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4281 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4282 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4283 | fi |
| 4284 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4285 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4286 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4287 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4288 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4289 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4290 | cat >> confdefs.h <<EOF |
| 4291 | #define $ac_tr_func 1 |
| 4292 | EOF |
| 4293 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4294 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4295 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 4296 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4297 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4298 | done |
| 4299 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4300 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4301 | for ac_func in getpgrp |
| 4302 | do |
| 4303 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4304 | echo "configure:4305: checking for $ac_func" >&5 |
| 4305 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4306 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4307 | else |
| 4308 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4309 | #line 4310 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4310 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4311 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4312 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4313 | #include <assert.h> |
| 4314 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4315 | /* We use char because int might match the return type of a gcc2 |
| 4316 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4317 | char $ac_func(); |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4318 | char (*f)(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4319 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4320 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4321 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4322 | /* The GNU C library defines this for functions which it implements |
| 4323 | to always fail with ENOSYS. Some functions are actually named |
| 4324 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4325 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4326 | choke me |
| 4327 | #else |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4328 | f = $ac_func; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4329 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4330 | |
| 4331 | ; return 0; } |
| 4332 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4333 | if { (eval echo configure:4334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4334 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4335 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4336 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4337 | echo "configure: failed program was:" >&5 |
| 4338 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4339 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4340 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4341 | fi |
| 4342 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4343 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4344 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4345 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4346 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4347 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4348 | cat >> confdefs.h <<EOF |
| 4349 | #define $ac_tr_func 1 |
| 4350 | EOF |
| 4351 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4352 | #line 4353 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4353 | #include "confdefs.h" |
| 4354 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4355 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4356 | getpgrp(0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4357 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4358 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4359 | if { (eval echo configure:4360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4360 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4361 | cat >> confdefs.h <<\EOF |
| 4362 | #define GETPGRP_HAVE_ARG 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4363 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4364 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4365 | else |
| 4366 | echo "configure: failed program was:" >&5 |
| 4367 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4368 | fi |
| 4369 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4370 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4371 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4372 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4373 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4374 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4375 | for ac_func in setpgrp |
| 4376 | do |
| 4377 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4378 | echo "configure:4379: checking for $ac_func" >&5 |
| 4379 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4380 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4381 | else |
| 4382 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4383 | #line 4384 "configure" |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4384 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4385 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4386 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4387 | #include <assert.h> |
| 4388 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4389 | /* We use char because int might match the return type of a gcc2 |
| 4390 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4391 | char $ac_func(); |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4392 | char (*f)(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4393 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4394 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4395 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4396 | /* The GNU C library defines this for functions which it implements |
| 4397 | to always fail with ENOSYS. Some functions are actually named |
| 4398 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4399 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4400 | choke me |
| 4401 | #else |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4402 | f = $ac_func; |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4403 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4404 | |
| 4405 | ; return 0; } |
| 4406 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4407 | if { (eval echo configure:4408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4408 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4409 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4410 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4411 | echo "configure: failed program was:" >&5 |
| 4412 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4413 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4414 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4415 | fi |
| 4416 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4417 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4418 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4419 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4420 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4421 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4422 | cat >> confdefs.h <<EOF |
| 4423 | #define $ac_tr_func 1 |
| 4424 | EOF |
| 4425 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4426 | #line 4427 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4427 | #include "confdefs.h" |
| 4428 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4429 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4430 | setpgrp(0,0); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4431 | ; return 0; } |
| 4432 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4433 | if { (eval echo configure:4434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4434 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4435 | cat >> confdefs.h <<\EOF |
| 4436 | #define SETPGRP_HAVE_ARG 1 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4437 | EOF |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4438 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4439 | else |
| 4440 | echo "configure: failed program was:" >&5 |
| 4441 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4442 | fi |
| 4443 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4444 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4445 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4446 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4447 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4448 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4449 | for ac_func in gettimeofday |
| 4450 | do |
| 4451 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4452 | echo "configure:4453: checking for $ac_func" >&5 |
| 4453 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4454 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4455 | else |
| 4456 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4457 | #line 4458 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4458 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4459 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4460 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4461 | #include <assert.h> |
| 4462 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4463 | /* We use char because int might match the return type of a gcc2 |
| 4464 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4465 | char $ac_func(); |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4466 | char (*f)(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4467 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4468 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4469 | |
| 4470 | /* The GNU C library defines this for functions which it implements |
| 4471 | to always fail with ENOSYS. Some functions are actually named |
| 4472 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4473 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4474 | choke me |
| 4475 | #else |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4476 | f = $ac_func; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4477 | #endif |
| 4478 | |
| 4479 | ; return 0; } |
| 4480 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4481 | if { (eval echo configure:4482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4482 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4483 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4484 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4485 | echo "configure: failed program was:" >&5 |
| 4486 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4487 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4488 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4489 | fi |
| 4490 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4491 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4492 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4493 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4494 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4495 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4496 | cat >> confdefs.h <<EOF |
| 4497 | #define $ac_tr_func 1 |
| 4498 | EOF |
| 4499 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4500 | #line 4501 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4501 | #include "confdefs.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4502 | #include <sys/time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4503 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4504 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
| 4505 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4506 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4507 | if { (eval echo configure:4508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4508 | : |
| 4509 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4510 | echo "configure: failed program was:" >&5 |
| 4511 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4512 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4513 | cat >> confdefs.h <<\EOF |
| 4514 | #define GETTIMEOFDAY_NO_TZ 1 |
| 4515 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4516 | |
| 4517 | fi |
| 4518 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4519 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4520 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4521 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4522 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4523 | |
| 4524 | |
| 4525 | # checks for structures |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4526 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4527 | echo "configure:4528: checking whether time.h and sys/time.h may both be included" >&5 |
| 4528 | if eval "test \"\${ac_cv_header_time+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4529 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4530 | else |
| 4531 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4532 | #line 4533 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4533 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4534 | #include <sys/types.h> |
| 4535 | #include <sys/time.h> |
| 4536 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4537 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4538 | struct tm *tp; |
| 4539 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4540 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4541 | if { (eval echo configure:4542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4542 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4543 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4544 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4545 | echo "configure: failed program was:" >&5 |
| 4546 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4547 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4548 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4549 | fi |
| 4550 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4551 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4552 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4553 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4554 | if test $ac_cv_header_time = yes; then |
| 4555 | cat >> confdefs.h <<\EOF |
| 4556 | #define TIME_WITH_SYS_TIME 1 |
| 4557 | EOF |
| 4558 | |
| 4559 | fi |
| 4560 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4561 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4562 | echo "configure:4563: checking whether struct tm is in sys/time.h or time.h" >&5 |
| 4563 | if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4564 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4565 | else |
| 4566 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4567 | #line 4568 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4568 | #include "confdefs.h" |
| 4569 | #include <sys/types.h> |
| 4570 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4571 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4572 | struct tm *tp; tp->tm_sec; |
| 4573 | ; return 0; } |
| 4574 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4575 | if { (eval echo configure:4576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4576 | rm -rf conftest* |
| 4577 | ac_cv_struct_tm=time.h |
| 4578 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4579 | echo "configure: failed program was:" >&5 |
| 4580 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4581 | rm -rf conftest* |
| 4582 | ac_cv_struct_tm=sys/time.h |
| 4583 | fi |
| 4584 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4585 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4586 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4587 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4588 | if test $ac_cv_struct_tm = sys/time.h; then |
| 4589 | cat >> confdefs.h <<\EOF |
| 4590 | #define TM_IN_SYS_TIME 1 |
| 4591 | EOF |
| 4592 | |
| 4593 | fi |
| 4594 | |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4595 | echo $ac_n "checking for member tm_zone in aggregate type struct tm""... $ac_c" 1>&6 |
| 4596 | echo "configure:4597: checking for member tm_zone in aggregate type struct tm" >&5 |
| 4597 | if eval "test \"\${ac_cv_c_struct_member_tm_zone+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4598 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4599 | else |
| 4600 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4601 | #line 4602 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4602 | #include "confdefs.h" |
| 4603 | #include <sys/types.h> |
| 4604 | #include <$ac_cv_struct_tm> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4605 | int main() { |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4606 | struct tm foo; foo.tm_zone; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4607 | ; return 0; } |
| 4608 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4609 | if { (eval echo configure:4610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4610 | rm -rf conftest* |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4611 | ac_cv_c_struct_member_tm_zone=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4612 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4613 | echo "configure: failed program was:" >&5 |
| 4614 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4615 | rm -rf conftest* |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4616 | ac_cv_c_struct_member_tm_zone=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4617 | fi |
| 4618 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4619 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4620 | |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4621 | echo "$ac_t""$ac_cv_c_struct_member_tm_zone" 1>&6 |
| 4622 | tm_zone="$ac_cv_c_struct_member_tm_zone" |
| 4623 | if test "$ac_cv_c_struct_member_tm_zone" = yes; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4624 | cat >> confdefs.h <<\EOF |
| 4625 | #define HAVE_TM_ZONE 1 |
| 4626 | EOF |
| 4627 | |
| 4628 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4629 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4630 | echo "configure:4631: checking for tzname" >&5 |
| 4631 | if eval "test \"\${ac_cv_var_tzname+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4632 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4633 | else |
| 4634 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4635 | #line 4636 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4636 | #include "confdefs.h" |
| 4637 | #include <time.h> |
| 4638 | #ifndef tzname /* For SGI. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4639 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4640 | #endif |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4641 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4642 | atoi(*tzname); |
| 4643 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4644 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4645 | if { (eval echo configure:4646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4646 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4647 | ac_cv_var_tzname=yes |
| 4648 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4649 | echo "configure: failed program was:" >&5 |
| 4650 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4651 | rm -rf conftest* |
| 4652 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4653 | fi |
| 4654 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4655 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4656 | |
| 4657 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4658 | if test $ac_cv_var_tzname = yes; then |
| 4659 | cat >> confdefs.h <<\EOF |
| 4660 | #define HAVE_TZNAME 1 |
| 4661 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4662 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4663 | fi |
| 4664 | fi |
| 4665 | |
| 4666 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4667 | echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4668 | echo "configure:4669: checking for time.h that defines altzone" >&5 |
| 4669 | if eval "test \"\${ac_cv_header_time_altzone+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4670 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4671 | else |
| 4672 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4673 | #line 4674 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4674 | #include "confdefs.h" |
| 4675 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4676 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4677 | return altzone; |
| 4678 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4679 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4680 | if { (eval echo configure:4681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4681 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4682 | ac_cv_header_time_altzone=yes |
| 4683 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4684 | echo "configure: failed program was:" >&5 |
| 4685 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4686 | rm -rf conftest* |
| 4687 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4688 | fi |
| 4689 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4690 | fi |
| 4691 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4692 | echo "$ac_t""$ac_cv_header_time_altzone" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4693 | if test $ac_cv_header_time_altzone = yes; then |
| 4694 | cat >> confdefs.h <<\EOF |
| 4695 | #define HAVE_ALTZONE 1 |
| 4696 | EOF |
| 4697 | |
| 4698 | fi |
| 4699 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4700 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4701 | echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4702 | echo "configure:4703: checking whether sys/select.h and sys/time.h may both be included" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4703 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4704 | #line 4705 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4705 | #include "confdefs.h" |
| 4706 | |
| 4707 | #include <sys/types.h> |
| 4708 | #include <sys/select.h> |
| 4709 | #include <sys/time.h> |
| 4710 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4711 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4712 | ; |
| 4713 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4714 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4715 | if { (eval echo configure:4716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4716 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4717 | cat >> confdefs.h <<\EOF |
| 4718 | #define SYS_SELECT_WITH_SYS_TIME 1 |
| 4719 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4720 | was_it_defined=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4721 | else |
| 4722 | echo "configure: failed program was:" >&5 |
| 4723 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4724 | fi |
| 4725 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4726 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4727 | |
| 4728 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4729 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4730 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4731 | echo "configure:4732: checking whether char is unsigned" >&5 |
| 4732 | if eval "test \"\${ac_cv_c_char_unsigned+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4733 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4734 | else |
| 4735 | if test "$GCC" = yes; then |
| 4736 | # GCC predefines this symbol on systems where it applies. |
| 4737 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4738 | #line 4739 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4739 | #include "confdefs.h" |
| 4740 | #ifdef __CHAR_UNSIGNED__ |
| 4741 | yes |
| 4742 | #endif |
| 4743 | |
| 4744 | EOF |
| 4745 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4746 | egrep "yes" >/dev/null 2>&1; then |
| 4747 | rm -rf conftest* |
| 4748 | ac_cv_c_char_unsigned=yes |
| 4749 | else |
| 4750 | rm -rf conftest* |
| 4751 | ac_cv_c_char_unsigned=no |
| 4752 | fi |
| 4753 | rm -f conftest* |
| 4754 | |
| 4755 | else |
| 4756 | if test "$cross_compiling" = yes; then |
| 4757 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 4758 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4759 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4760 | #line 4761 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4761 | #include "confdefs.h" |
| 4762 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4763 | #if !defined(__STDC__) || __STDC__ != 1 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4764 | #define volatile |
| 4765 | #endif |
| 4766 | main() { |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4767 | volatile char c = 255; exit(c < 0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4768 | } |
| 4769 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4770 | if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4771 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4772 | ac_cv_c_char_unsigned=yes |
| 4773 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4774 | echo "configure: failed program was:" >&5 |
| 4775 | cat conftest.$ac_ext >&5 |
| 4776 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4777 | ac_cv_c_char_unsigned=no |
| 4778 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4779 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4780 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4781 | |
| 4782 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4783 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4784 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4785 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4786 | if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then |
| 4787 | cat >> confdefs.h <<\EOF |
| 4788 | #define __CHAR_UNSIGNED__ 1 |
| 4789 | EOF |
| 4790 | |
| 4791 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4792 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4793 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4794 | echo "configure:4795: checking for working const" >&5 |
| 4795 | if eval "test \"\${ac_cv_c_const+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4796 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4797 | else |
| 4798 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4799 | #line 4800 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4800 | #include "confdefs.h" |
| 4801 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4802 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4803 | |
| 4804 | /* Ultrix mips cc rejects this. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4805 | typedef int charset[2]; const charset x; |
| 4806 | /* SunOS 4.1.1 cc rejects this. */ |
| 4807 | char const *const *ccp; |
| 4808 | char **p; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4809 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 4810 | struct point {int x, y;}; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4811 | static struct point const zero = {0,0}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4812 | /* AIX XL C 1.02.0.0 rejects this. |
| 4813 | It does not let you subtract one const X* pointer from another in an arm |
| 4814 | of an if-expression whose if-part is not a constant expression */ |
| 4815 | const char *g = "string"; |
| 4816 | ccp = &g + (g ? g-g : 0); |
| 4817 | /* HPUX 7.0 cc rejects these. */ |
| 4818 | ++ccp; |
| 4819 | p = (char**) ccp; |
| 4820 | ccp = (char const *const *) p; |
| 4821 | { /* SCO 3.2v4 cc rejects this. */ |
| 4822 | char *t; |
| 4823 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
| 4824 | |
| 4825 | *t++ = 0; |
| 4826 | } |
| 4827 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4828 | int x[] = {25, 17}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4829 | const int *foo = &x[0]; |
| 4830 | ++foo; |
| 4831 | } |
| 4832 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 4833 | typedef const int *iptr; |
| 4834 | iptr p = 0; |
| 4835 | ++p; |
| 4836 | } |
| 4837 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 4838 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 4839 | struct s { int j; const int *ap[3]; }; |
| 4840 | struct s *b; b->j = 5; |
| 4841 | } |
| 4842 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 4843 | const int foo = 10; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4844 | } |
| 4845 | |
| 4846 | ; return 0; } |
| 4847 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4848 | if { (eval echo configure:4849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4849 | rm -rf conftest* |
| 4850 | ac_cv_c_const=yes |
| 4851 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4852 | echo "configure: failed program was:" >&5 |
| 4853 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4854 | rm -rf conftest* |
| 4855 | ac_cv_c_const=no |
| 4856 | fi |
| 4857 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4858 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4859 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4860 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4861 | if test $ac_cv_c_const = no; then |
| 4862 | cat >> confdefs.h <<\EOF |
| 4863 | #define const |
| 4864 | EOF |
| 4865 | |
| 4866 | fi |
| 4867 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 4868 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4869 | echo "configure:4870: checking for inline" >&5 |
| 4870 | if eval "test \"\${ac_cv_c_inline+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 4871 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4872 | else |
| 4873 | ac_cv_c_inline=no |
| 4874 | for ac_kw in inline __inline__ __inline; do |
| 4875 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4876 | #line 4877 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 4877 | #include "confdefs.h" |
| 4878 | |
| 4879 | int main() { |
| 4880 | } $ac_kw foo() { |
| 4881 | ; return 0; } |
| 4882 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4883 | if { (eval echo configure:4884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 4884 | rm -rf conftest* |
| 4885 | ac_cv_c_inline=$ac_kw; break |
| 4886 | else |
| 4887 | echo "configure: failed program was:" >&5 |
| 4888 | cat conftest.$ac_ext >&5 |
| 4889 | fi |
| 4890 | rm -f conftest* |
| 4891 | done |
| 4892 | |
| 4893 | fi |
| 4894 | |
| 4895 | echo "$ac_t""$ac_cv_c_inline" 1>&6 |
| 4896 | case "$ac_cv_c_inline" in |
| 4897 | inline | yes) ;; |
| 4898 | no) cat >> confdefs.h <<\EOF |
| 4899 | #define inline |
| 4900 | EOF |
| 4901 | ;; |
| 4902 | *) cat >> confdefs.h <<EOF |
| 4903 | #define inline $ac_cv_c_inline |
| 4904 | EOF |
| 4905 | ;; |
| 4906 | esac |
| 4907 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4908 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4909 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4910 | echo $ac_n "checking for working volatile""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4911 | echo "configure:4912: checking for working volatile" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4912 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4913 | #line 4914 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4914 | #include "confdefs.h" |
| 4915 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4916 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4917 | volatile int x; x = 0; |
| 4918 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4919 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4920 | if { (eval echo configure:4921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4921 | rm -rf conftest* |
| 4922 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4923 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4924 | echo "configure: failed program was:" >&5 |
| 4925 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4926 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4927 | cat >> confdefs.h <<\EOF |
| 4928 | #define volatile |
| 4929 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4930 | |
| 4931 | fi |
| 4932 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4933 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4934 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4935 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4936 | echo $ac_n "checking for working signed char""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4937 | echo "configure:4938: checking for working signed char" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4938 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4939 | #line 4940 "configure" |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 4940 | #include "confdefs.h" |
| 4941 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4942 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4943 | signed char c; |
| 4944 | ; return 0; } |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 4945 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4946 | if { (eval echo configure:4947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4947 | rm -rf conftest* |
| 4948 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 4949 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4950 | echo "configure: failed program was:" >&5 |
| 4951 | cat conftest.$ac_ext >&5 |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 4952 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4953 | cat >> confdefs.h <<\EOF |
| 4954 | #define signed |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4955 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4956 | |
| 4957 | fi |
| 4958 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4959 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4960 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4961 | have_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4962 | echo $ac_n "checking for prototypes""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4963 | echo "configure:4964: checking for prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4964 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4965 | #line 4966 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4966 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4967 | int foo(int x) { return 0; } |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4968 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4969 | return foo(10); |
| 4970 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4971 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4972 | if { (eval echo configure:4973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4973 | rm -rf conftest* |
| 4974 | cat >> confdefs.h <<\EOF |
| 4975 | #define HAVE_PROTOTYPES 1 |
| 4976 | EOF |
| 4977 | have_prototypes=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4978 | else |
| 4979 | echo "configure: failed program was:" >&5 |
| 4980 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4981 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4982 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4983 | echo "$ac_t""$have_prototypes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4984 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4985 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4986 | echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4987 | echo "configure:4988: checking for variable length prototypes and stdarg.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4988 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 4989 | #line 4990 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4990 | #include "confdefs.h" |
| 4991 | |
| 4992 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 4993 | int foo(int x, ...) { |
| 4994 | va_list va; |
| 4995 | va_start(va, x); |
| 4996 | va_arg(va, int); |
| 4997 | va_arg(va, char *); |
| 4998 | va_arg(va, double); |
| 4999 | return 0; |
| 5000 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5001 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5002 | int main() { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 5003 | return foo(10, "", 3.14); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5004 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5005 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5006 | if { (eval echo configure:5007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5007 | rm -rf conftest* |
| 5008 | cat >> confdefs.h <<\EOF |
| 5009 | #define HAVE_STDARG_PROTOTYPES 1 |
| 5010 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5011 | works=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5012 | else |
| 5013 | echo "configure: failed program was:" >&5 |
| 5014 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5015 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5016 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5017 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5018 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5019 | if test "$have_prototypes" = yes; then |
| 5020 | bad_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5021 | echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5022 | echo "configure:5023: checking for bad exec* prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5023 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5024 | #line 5025 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5025 | #include "confdefs.h" |
| 5026 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5027 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5028 | char **t;execve("@",t,t); |
| 5029 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5030 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5031 | if { (eval echo configure:5032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5032 | : |
| 5033 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5034 | echo "configure: failed program was:" >&5 |
| 5035 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5036 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5037 | cat >> confdefs.h <<\EOF |
| 5038 | #define BAD_EXEC_PROTOTYPES 1 |
| 5039 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5040 | bad_prototypes=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5041 | fi |
| 5042 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5043 | echo "$ac_t""$bad_prototypes" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5044 | fi |
| 5045 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5046 | bad_forward=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5047 | echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5048 | echo "configure:5049: checking for bad static forward" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5049 | if test "$cross_compiling" = yes; then |
| 5050 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5051 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5052 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5053 | #line 5054 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5054 | #include "confdefs.h" |
| 5055 | |
| 5056 | struct s { int a; int b; }; |
| 5057 | static struct s foo; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5058 | int foobar() { |
| 5059 | static int random; |
| 5060 | random = (int) &foo; |
| 5061 | return random; |
| 5062 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5063 | static struct s foo = { 1, 2 }; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5064 | main() { |
| 5065 | exit(!((int)&foo == foobar())); |
| 5066 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5067 | |
| 5068 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5069 | if { (eval echo configure:5070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5070 | then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5071 | : |
| 5072 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5073 | echo "configure: failed program was:" >&5 |
| 5074 | cat conftest.$ac_ext >&5 |
| 5075 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5076 | cat >> confdefs.h <<\EOF |
| 5077 | #define BAD_STATIC_FORWARD 1 |
| 5078 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5079 | bad_forward=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5080 | fi |
| 5081 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5082 | fi |
| 5083 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5084 | echo "$ac_t""$bad_forward" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5085 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5086 | va_list_is_array=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5087 | echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5088 | echo "configure:5089: checking whether va_list is an array" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5089 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5090 | #line 5091 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5091 | #include "confdefs.h" |
| 5092 | |
| 5093 | #ifdef HAVE_STDARG_PROTOTYPES |
| 5094 | #include <stdarg.h> |
| 5095 | #else |
| 5096 | #include <varargs.h> |
| 5097 | #endif |
| 5098 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5099 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5100 | va_list list1, list2; list1 = list2; |
| 5101 | ; return 0; } |
| 5102 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5103 | if { (eval echo configure:5104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5104 | : |
| 5105 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5106 | echo "configure: failed program was:" >&5 |
| 5107 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5108 | rm -rf conftest* |
| 5109 | cat >> confdefs.h <<\EOF |
| 5110 | #define VA_LIST_IS_ARRAY 1 |
| 5111 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5112 | va_list_is_array=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5113 | fi |
| 5114 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5115 | echo "$ac_t""$va_list_is_array" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5116 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5117 | # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( |
| 5118 | echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5119 | echo "configure:5120: checking for gethostbyname_r" >&5 |
| 5120 | if eval "test \"\${ac_cv_func_gethostbyname_r+set}\" = set"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5121 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5122 | else |
| 5123 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5124 | #line 5125 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5125 | #include "confdefs.h" |
| 5126 | /* System header to define __stub macros and hopefully few prototypes, |
| 5127 | which can conflict with char gethostbyname_r(); below. */ |
| 5128 | #include <assert.h> |
| 5129 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5130 | /* We use char because int might match the return type of a gcc2 |
| 5131 | builtin and then its argument prototype would still apply. */ |
| 5132 | char gethostbyname_r(); |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5133 | char (*f)(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5134 | |
| 5135 | int main() { |
| 5136 | |
| 5137 | /* The GNU C library defines this for functions which it implements |
| 5138 | to always fail with ENOSYS. Some functions are actually named |
| 5139 | something starting with __ and the normal name is an alias. */ |
| 5140 | #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) |
| 5141 | choke me |
| 5142 | #else |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5143 | f = gethostbyname_r; |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5144 | #endif |
| 5145 | |
| 5146 | ; return 0; } |
| 5147 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5148 | if { (eval echo configure:5149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5149 | rm -rf conftest* |
| 5150 | eval "ac_cv_func_gethostbyname_r=yes" |
| 5151 | else |
| 5152 | echo "configure: failed program was:" >&5 |
| 5153 | cat conftest.$ac_ext >&5 |
| 5154 | rm -rf conftest* |
| 5155 | eval "ac_cv_func_gethostbyname_r=no" |
| 5156 | fi |
| 5157 | rm -f conftest* |
| 5158 | fi |
| 5159 | |
| 5160 | if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then |
| 5161 | echo "$ac_t""yes" 1>&6 |
| 5162 | |
| 5163 | cat >> confdefs.h <<\EOF |
| 5164 | #define HAVE_GETHOSTBYNAME_R 1 |
| 5165 | EOF |
| 5166 | |
| 5167 | echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5168 | echo "configure:5169: checking gethostbyname_r with 6 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5169 | OLD_CFLAGS=$CFLAGS |
| 5170 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
| 5171 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5172 | #line 5173 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5173 | #include "confdefs.h" |
| 5174 | |
| 5175 | # include <netdb.h> |
| 5176 | |
| 5177 | int main() { |
| 5178 | |
| 5179 | char *name; |
| 5180 | struct hostent *he, *res; |
| 5181 | char buffer[2048]; |
| 5182 | int buflen = 2048; |
| 5183 | int h_errnop; |
| 5184 | |
| 5185 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
| 5186 | |
| 5187 | ; return 0; } |
| 5188 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5189 | if { (eval echo configure:5190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5190 | rm -rf conftest* |
| 5191 | |
| 5192 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 5193 | #define HAVE_GETHOSTBYNAME_R 1 |
| 5194 | EOF |
| 5195 | |
| 5196 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5197 | #define HAVE_GETHOSTBYNAME_R_6_ARG 1 |
| 5198 | EOF |
| 5199 | |
| 5200 | echo "$ac_t""yes" 1>&6 |
| 5201 | |
| 5202 | else |
| 5203 | echo "configure: failed program was:" >&5 |
| 5204 | cat conftest.$ac_ext >&5 |
| 5205 | rm -rf conftest* |
| 5206 | |
| 5207 | echo "$ac_t""no" 1>&6 |
| 5208 | echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5209 | echo "configure:5210: checking gethostbyname_r with 5 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5210 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5211 | #line 5212 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5212 | #include "confdefs.h" |
| 5213 | |
| 5214 | # include <netdb.h> |
| 5215 | |
| 5216 | int main() { |
| 5217 | |
| 5218 | char *name; |
| 5219 | struct hostent *he; |
| 5220 | char buffer[2048]; |
| 5221 | int buflen = 2048; |
| 5222 | int h_errnop; |
| 5223 | |
| 5224 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
| 5225 | |
| 5226 | ; return 0; } |
| 5227 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5228 | if { (eval echo configure:5229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5229 | rm -rf conftest* |
| 5230 | |
| 5231 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 5232 | #define HAVE_GETHOSTBYNAME_R 1 |
| 5233 | EOF |
| 5234 | |
| 5235 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5236 | #define HAVE_GETHOSTBYNAME_R_5_ARG 1 |
| 5237 | EOF |
| 5238 | |
| 5239 | echo "$ac_t""yes" 1>&6 |
| 5240 | |
| 5241 | else |
| 5242 | echo "configure: failed program was:" >&5 |
| 5243 | cat conftest.$ac_ext >&5 |
| 5244 | rm -rf conftest* |
| 5245 | |
| 5246 | echo "$ac_t""no" 1>&6 |
| 5247 | echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5248 | echo "configure:5249: checking gethostbyname_r with 3 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5249 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5250 | #line 5251 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5251 | #include "confdefs.h" |
| 5252 | |
| 5253 | # include <netdb.h> |
| 5254 | |
| 5255 | int main() { |
| 5256 | |
| 5257 | char *name; |
| 5258 | struct hostent *he; |
| 5259 | struct hostent_data data; |
| 5260 | |
| 5261 | (void) gethostbyname_r(name, he, &data); |
| 5262 | |
| 5263 | ; return 0; } |
| 5264 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5265 | if { (eval echo configure:5266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5266 | rm -rf conftest* |
| 5267 | |
| 5268 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 5269 | #define HAVE_GETHOSTBYNAME_R 1 |
| 5270 | EOF |
| 5271 | |
| 5272 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5273 | #define HAVE_GETHOSTBYNAME_R_3_ARG 1 |
| 5274 | EOF |
| 5275 | |
| 5276 | echo "$ac_t""yes" 1>&6 |
| 5277 | |
| 5278 | else |
| 5279 | echo "configure: failed program was:" >&5 |
| 5280 | cat conftest.$ac_ext >&5 |
| 5281 | rm -rf conftest* |
| 5282 | |
| 5283 | echo "$ac_t""no" 1>&6 |
| 5284 | |
| 5285 | fi |
| 5286 | rm -f conftest* |
| 5287 | |
| 5288 | fi |
| 5289 | rm -f conftest* |
| 5290 | |
| 5291 | fi |
| 5292 | rm -f conftest* |
| 5293 | CFLAGS=$OLD_CFLAGS |
| 5294 | |
| 5295 | else |
| 5296 | echo "$ac_t""no" 1>&6 |
| 5297 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5298 | for ac_func in gethostbyname |
| 5299 | do |
| 5300 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5301 | echo "configure:5302: checking for $ac_func" >&5 |
| 5302 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5303 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5304 | else |
| 5305 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5306 | #line 5307 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5307 | #include "confdefs.h" |
| 5308 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5309 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5310 | #include <assert.h> |
| 5311 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5312 | /* We use char because int might match the return type of a gcc2 |
| 5313 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5314 | char $ac_func(); |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5315 | char (*f)(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5316 | |
| 5317 | int main() { |
| 5318 | |
| 5319 | /* The GNU C library defines this for functions which it implements |
| 5320 | to always fail with ENOSYS. Some functions are actually named |
| 5321 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5322 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5323 | choke me |
| 5324 | #else |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5325 | f = $ac_func; |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5326 | #endif |
| 5327 | |
| 5328 | ; return 0; } |
| 5329 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5330 | if { (eval echo configure:5331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5331 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5332 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5333 | else |
| 5334 | echo "configure: failed program was:" >&5 |
| 5335 | cat conftest.$ac_ext >&5 |
| 5336 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5337 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5338 | fi |
| 5339 | rm -f conftest* |
| 5340 | fi |
| 5341 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5342 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5343 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5344 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5345 | cat >> confdefs.h <<EOF |
| 5346 | #define $ac_tr_func 1 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5347 | EOF |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5348 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5349 | else |
| 5350 | echo "$ac_t""no" 1>&6 |
| 5351 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5352 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5353 | |
| 5354 | |
| 5355 | fi |
| 5356 | |
| 5357 | |
| 5358 | |
| 5359 | |
| 5360 | |
| 5361 | |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 5362 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5363 | # checks for system services |
| 5364 | # (none yet) |
| 5365 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5366 | # Linux requires this for correct f.p. operations |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 5367 | echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5368 | echo "configure:5369: checking for __fpu_control" >&5 |
| 5369 | if eval "test \"\${ac_cv_func___fpu_control+set}\" = set"; then |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 5370 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5371 | else |
| 5372 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5373 | #line 5374 "configure" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 5374 | #include "confdefs.h" |
| 5375 | /* System header to define __stub macros and hopefully few prototypes, |
| 5376 | which can conflict with char __fpu_control(); below. */ |
| 5377 | #include <assert.h> |
| 5378 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5379 | /* We use char because int might match the return type of a gcc2 |
| 5380 | builtin and then its argument prototype would still apply. */ |
| 5381 | char __fpu_control(); |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5382 | char (*f)(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 5383 | |
| 5384 | int main() { |
| 5385 | |
| 5386 | /* The GNU C library defines this for functions which it implements |
| 5387 | to always fail with ENOSYS. Some functions are actually named |
| 5388 | something starting with __ and the normal name is an alias. */ |
| 5389 | #if defined (__stub___fpu_control) || defined (__stub_____fpu_control) |
| 5390 | choke me |
| 5391 | #else |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5392 | f = __fpu_control; |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 5393 | #endif |
| 5394 | |
| 5395 | ; return 0; } |
| 5396 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5397 | if { (eval echo configure:5398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 5398 | rm -rf conftest* |
| 5399 | eval "ac_cv_func___fpu_control=yes" |
| 5400 | else |
| 5401 | echo "configure: failed program was:" >&5 |
| 5402 | cat conftest.$ac_ext >&5 |
| 5403 | rm -rf conftest* |
| 5404 | eval "ac_cv_func___fpu_control=no" |
| 5405 | fi |
| 5406 | rm -f conftest* |
| 5407 | fi |
| 5408 | |
| 5409 | if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then |
| 5410 | echo "$ac_t""yes" 1>&6 |
| 5411 | : |
| 5412 | else |
| 5413 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5414 | echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5415 | echo "configure:5416: checking for __fpu_control in -lieee" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5416 | ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5417 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5418 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5419 | else |
| 5420 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5421 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5422 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5423 | #line 5424 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5424 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5425 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5426 | /* We use char because int might match the return type of a gcc2 |
| 5427 | builtin and then its argument prototype would still apply. */ |
| 5428 | char __fpu_control(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5429 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5430 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5431 | __fpu_control() |
| 5432 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5433 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5434 | if { (eval echo configure:5435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5435 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5436 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5437 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5438 | echo "configure: failed program was:" >&5 |
| 5439 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5440 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5441 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5442 | fi |
| 5443 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5444 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5445 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5446 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5447 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5448 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5449 | ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 5450 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5451 | cat >> confdefs.h <<EOF |
| 5452 | #define $ac_tr_lib 1 |
| 5453 | EOF |
| 5454 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5455 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5456 | |
| 5457 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5458 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5459 | fi |
| 5460 | |
| 5461 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 5462 | fi |
| 5463 | |
| 5464 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5465 | # Check for --with-fpectl |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5466 | echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5467 | echo "configure:5468: checking for --with-fpectl" >&5 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5468 | # Check whether --with-fpectl or --without-fpectl was given. |
| 5469 | if test "${with_fpectl+set}" = set; then |
| 5470 | withval="$with_fpectl" |
| 5471 | |
| 5472 | if test "$withval" != no |
| 5473 | then cat >> confdefs.h <<\EOF |
| 5474 | #define WANT_SIGFPE_HANDLER 1 |
| 5475 | EOF |
| 5476 | echo "$ac_t""yes" 1>&6 |
| 5477 | else echo "$ac_t""no" 1>&6 |
| 5478 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5479 | else |
| 5480 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5481 | fi |
| 5482 | |
| 5483 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5484 | # check for --with-libm=... |
| 5485 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 5486 | case $ac_sys_system in |
| 5487 | next) ;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 5488 | BeOS) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 5489 | *) LIBM=-lm |
| 5490 | esac |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5491 | echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5492 | echo "configure:5493: checking for --with-libm=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5493 | # Check whether --with-libm or --without-libm was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5494 | if test "${with_libm+set}" = set; then |
| 5495 | withval="$with_libm" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5496 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5497 | if test "$withval" = no |
| 5498 | then LIBM= |
| 5499 | echo "$ac_t""force LIBM empty" 1>&6 |
| 5500 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5501 | then LIBM=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5502 | echo "$ac_t""set LIBM=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5503 | else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5504 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5505 | else |
| 5506 | echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5507 | fi |
| 5508 | |
| 5509 | |
| 5510 | # check for --with-libc=... |
| 5511 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5512 | echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5513 | echo "configure:5514: checking for --with-libc=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5514 | # Check whether --with-libc or --without-libc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5515 | if test "${with_libc+set}" = set; then |
| 5516 | withval="$with_libc" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5517 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5518 | if test "$withval" = no |
| 5519 | then LIBC= |
| 5520 | echo "$ac_t""force LIBC empty" 1>&6 |
| 5521 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5522 | then LIBC=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5523 | echo "$ac_t""set LIBC=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5524 | else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5525 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5526 | else |
| 5527 | echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5528 | fi |
| 5529 | |
| 5530 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5531 | # check for hypot() in math library |
| 5532 | LIBS_SAVE=$LIBS |
| 5533 | LIBS="$LIBS $LIBM" |
| 5534 | for ac_func in hypot |
| 5535 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5536 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5537 | echo "configure:5538: checking for $ac_func" >&5 |
| 5538 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5539 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5540 | else |
| 5541 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5542 | #line 5543 "configure" |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5543 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5544 | /* System header to define __stub macros and hopefully few prototypes, |
| 5545 | which can conflict with char $ac_func(); below. */ |
| 5546 | #include <assert.h> |
| 5547 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5548 | /* We use char because int might match the return type of a gcc2 |
| 5549 | builtin and then its argument prototype would still apply. */ |
| 5550 | char $ac_func(); |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5551 | char (*f)(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5552 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5553 | int main() { |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5554 | |
| 5555 | /* The GNU C library defines this for functions which it implements |
| 5556 | to always fail with ENOSYS. Some functions are actually named |
| 5557 | something starting with __ and the normal name is an alias. */ |
| 5558 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5559 | choke me |
| 5560 | #else |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5561 | f = $ac_func; |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5562 | #endif |
| 5563 | |
| 5564 | ; return 0; } |
| 5565 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5566 | if { (eval echo configure:5567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5567 | rm -rf conftest* |
| 5568 | eval "ac_cv_func_$ac_func=yes" |
| 5569 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5570 | echo "configure: failed program was:" >&5 |
| 5571 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5572 | rm -rf conftest* |
| 5573 | eval "ac_cv_func_$ac_func=no" |
| 5574 | fi |
| 5575 | rm -f conftest* |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5576 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5577 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5578 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5579 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5580 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5581 | cat >> confdefs.h <<EOF |
| 5582 | #define $ac_tr_func 1 |
| 5583 | EOF |
| 5584 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5585 | else |
| 5586 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 5587 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5588 | fi |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5589 | done |
| 5590 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5591 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5592 | LIBS=$LIBS_SAVE |
| 5593 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5594 | # check for getopt |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5595 | echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5596 | echo "configure:5597: checking for genuine getopt" >&5 |
| 5597 | if eval "test \"\${ac_cv_func_getopt+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5598 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5599 | else |
| 5600 | if test "$cross_compiling" = yes; then |
| 5601 | ac_cv_func_getopt=no |
| 5602 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5603 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5604 | #line 5605 "configure" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5605 | #include "confdefs.h" |
| 5606 | #include <stdio.h> |
| 5607 | extern int optind, opterr, getopt(); |
| 5608 | extern char* optarg; |
| 5609 | int main() { |
| 5610 | char* av[] = { "testprog", "parameter", "-fFlag", NULL }; |
| 5611 | opterr = 0; |
| 5612 | if (getopt(3, av, "f:") == 'f') { exit(1); } |
| 5613 | exit(0); |
| 5614 | } |
| 5615 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5616 | if { (eval echo configure:5617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5617 | then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5618 | ac_cv_func_getopt=yes |
| 5619 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5620 | echo "configure: failed program was:" >&5 |
| 5621 | cat conftest.$ac_ext >&5 |
| 5622 | rm -fr conftest* |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5623 | ac_cv_func_getopt=no |
| 5624 | fi |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5625 | rm -fr conftest* |
| 5626 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5627 | |
| 5628 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5629 | echo "$ac_t""$ac_cv_func_getopt" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5630 | test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o" |
| 5631 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 5632 | # check whether malloc(0) returns NULL or not |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 5633 | echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5634 | echo "configure:5635: checking what malloc(0) returns" >&5 |
| 5635 | if eval "test \"\${ac_cv_malloc_zero+set}\" = set"; then |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 5636 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5637 | else |
| 5638 | if test "$cross_compiling" = yes; then |
| 5639 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5640 | else |
| 5641 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5642 | #line 5643 "configure" |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 5643 | #include "confdefs.h" |
| 5644 | #include <stdio.h> |
| 5645 | #ifdef HAVE_STDLIB |
| 5646 | #include <stdlib.h> |
| 5647 | #else |
| 5648 | char *malloc(), *realloc(); |
| 5649 | int *free(); |
| 5650 | #endif |
| 5651 | main() { |
| 5652 | char *p; |
| 5653 | p = malloc(0); |
| 5654 | if (p == NULL) exit(1); |
| 5655 | p = realloc(p, 0); |
| 5656 | if (p == NULL) exit(1); |
| 5657 | free(p); |
| 5658 | exit(0); |
| 5659 | } |
| 5660 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5661 | if { (eval echo configure:5662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 5662 | then |
| 5663 | ac_cv_malloc_zero=nonnull |
| 5664 | else |
| 5665 | echo "configure: failed program was:" >&5 |
| 5666 | cat conftest.$ac_ext >&5 |
| 5667 | rm -fr conftest* |
| 5668 | ac_cv_malloc_zero=null |
| 5669 | fi |
| 5670 | rm -fr conftest* |
| 5671 | fi |
| 5672 | |
| 5673 | fi |
| 5674 | |
| 5675 | echo "$ac_t""$ac_cv_malloc_zero" 1>&6 |
| 5676 | if test "$ac_cv_malloc_zero" = null |
| 5677 | then |
| 5678 | cat >> confdefs.h <<\EOF |
| 5679 | #define MALLOC_ZERO_RETURNS_NULL 1 |
| 5680 | EOF |
| 5681 | |
| 5682 | fi |
| 5683 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5684 | # check for wchar.h |
| 5685 | ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` |
| 5686 | echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5687 | echo "configure:5688: checking for wchar.h" >&5 |
| 5688 | if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5689 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5690 | else |
| 5691 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5692 | #line 5693 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5693 | #include "confdefs.h" |
| 5694 | #include <wchar.h> |
| 5695 | EOF |
| 5696 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5697 | { (eval echo configure:5698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5698 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 5699 | if test -z "$ac_err"; then |
| 5700 | rm -rf conftest* |
| 5701 | eval "ac_cv_header_$ac_safe=yes" |
| 5702 | else |
| 5703 | echo "$ac_err" >&5 |
| 5704 | echo "configure: failed program was:" >&5 |
| 5705 | cat conftest.$ac_ext >&5 |
| 5706 | rm -rf conftest* |
| 5707 | eval "ac_cv_header_$ac_safe=no" |
| 5708 | fi |
| 5709 | rm -f conftest* |
| 5710 | fi |
| 5711 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 5712 | echo "$ac_t""yes" 1>&6 |
| 5713 | cat >> confdefs.h <<\EOF |
| 5714 | #define HAVE_WCHAR_H 1 |
| 5715 | EOF |
| 5716 | wchar_h="yes" |
| 5717 | else |
| 5718 | echo "$ac_t""no" 1>&6 |
| 5719 | wchar_h="no" |
| 5720 | |
| 5721 | fi |
| 5722 | |
| 5723 | |
| 5724 | # check for usable wchar_t |
| 5725 | usable_wchar_t="unkown" |
| 5726 | echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5727 | echo "configure:5728: checking for usable wchar_t" >&5 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5728 | if test "$cross_compiling" = yes; then |
| 5729 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5730 | else |
| 5731 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5732 | #line 5733 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5733 | #include "confdefs.h" |
| 5734 | |
| 5735 | #include "wchar.h" |
| 5736 | #include "wctype.h" |
| 5737 | main() { |
| 5738 | wchar_t s; |
| 5739 | if (sizeof(s) == 2) |
| 5740 | exit(0); |
| 5741 | else |
| 5742 | exit(1); |
| 5743 | } |
| 5744 | |
| 5745 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5746 | if { (eval echo configure:5747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5747 | then |
| 5748 | cat >> confdefs.h <<\EOF |
| 5749 | #define HAVE_USABLE_WCHAR_T 1 |
| 5750 | EOF |
| 5751 | usable_wchar_t="yes" |
| 5752 | else |
| 5753 | echo "configure: failed program was:" >&5 |
| 5754 | cat conftest.$ac_ext >&5 |
| 5755 | rm -fr conftest* |
| 5756 | usable_wchar_t="no" |
| 5757 | fi |
| 5758 | rm -fr conftest* |
| 5759 | fi |
| 5760 | |
| 5761 | echo "$ac_t""$usable_wchar_t" 1>&6 |
| 5762 | |
| 5763 | # check for endianness |
| 5764 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5765 | echo "configure:5766: checking whether byte ordering is bigendian" >&5 |
| 5766 | if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5767 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5768 | else |
| 5769 | ac_cv_c_bigendian=unknown |
| 5770 | # See if sys/param.h defines the BYTE_ORDER macro. |
| 5771 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5772 | #line 5773 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5773 | #include "confdefs.h" |
| 5774 | #include <sys/types.h> |
| 5775 | #include <sys/param.h> |
| 5776 | int main() { |
| 5777 | |
| 5778 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 5779 | bogus endian macros |
| 5780 | #endif |
| 5781 | ; return 0; } |
| 5782 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5783 | if { (eval echo configure:5784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5784 | rm -rf conftest* |
| 5785 | # It does; now see whether it defined to BIG_ENDIAN or not. |
| 5786 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5787 | #line 5788 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5788 | #include "confdefs.h" |
| 5789 | #include <sys/types.h> |
| 5790 | #include <sys/param.h> |
| 5791 | int main() { |
| 5792 | |
| 5793 | #if BYTE_ORDER != BIG_ENDIAN |
| 5794 | not big endian |
| 5795 | #endif |
| 5796 | ; return 0; } |
| 5797 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5798 | if { (eval echo configure:5799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5799 | rm -rf conftest* |
| 5800 | ac_cv_c_bigendian=yes |
| 5801 | else |
| 5802 | echo "configure: failed program was:" >&5 |
| 5803 | cat conftest.$ac_ext >&5 |
| 5804 | rm -rf conftest* |
| 5805 | ac_cv_c_bigendian=no |
| 5806 | fi |
| 5807 | rm -f conftest* |
| 5808 | else |
| 5809 | echo "configure: failed program was:" >&5 |
| 5810 | cat conftest.$ac_ext >&5 |
| 5811 | fi |
| 5812 | rm -f conftest* |
| 5813 | if test $ac_cv_c_bigendian = unknown; then |
| 5814 | if test "$cross_compiling" = yes; then |
| 5815 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5816 | else |
| 5817 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5818 | #line 5819 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5819 | #include "confdefs.h" |
| 5820 | main () { |
| 5821 | /* Are we little or big endian? From Harbison&Steele. */ |
| 5822 | union |
| 5823 | { |
| 5824 | long l; |
| 5825 | char c[sizeof (long)]; |
| 5826 | } u; |
| 5827 | u.l = 1; |
| 5828 | exit (u.c[sizeof (long) - 1] == 1); |
| 5829 | } |
| 5830 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5831 | if { (eval echo configure:5832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5832 | then |
| 5833 | ac_cv_c_bigendian=no |
| 5834 | else |
| 5835 | echo "configure: failed program was:" >&5 |
| 5836 | cat conftest.$ac_ext >&5 |
| 5837 | rm -fr conftest* |
| 5838 | ac_cv_c_bigendian=yes |
| 5839 | fi |
| 5840 | rm -fr conftest* |
| 5841 | fi |
| 5842 | |
| 5843 | fi |
| 5844 | fi |
| 5845 | |
| 5846 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 5847 | if test $ac_cv_c_bigendian = yes; then |
| 5848 | cat >> confdefs.h <<\EOF |
| 5849 | #define WORDS_BIGENDIAN 1 |
| 5850 | EOF |
| 5851 | |
| 5852 | fi |
| 5853 | |
| 5854 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 5855 | # Check whether right shifting a negative integer extends the sign bit |
| 5856 | # or fills with zeros (like the Cray J90, according to Tim Peters). |
| 5857 | echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5858 | echo "configure:5859: checking whether right shift extends the sign bit" >&5 |
| 5859 | if eval "test \"\${ac_cv_rshift_extends_sign+set}\" = set"; then |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 5860 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5861 | else |
| 5862 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 5863 | if test "$cross_compiling" = yes; then |
| 5864 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5865 | else |
| 5866 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5867 | #line 5868 "configure" |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 5868 | #include "confdefs.h" |
| 5869 | |
| 5870 | int main() |
| 5871 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 5872 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 5873 | } |
| 5874 | |
| 5875 | EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5876 | if { (eval echo configure:5877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 5877 | then |
| 5878 | ac_cv_rshift_extends_sign=yes |
| 5879 | else |
| 5880 | echo "configure: failed program was:" >&5 |
| 5881 | cat conftest.$ac_ext >&5 |
| 5882 | rm -fr conftest* |
| 5883 | ac_cv_rshift_extends_sign=no |
| 5884 | fi |
| 5885 | rm -fr conftest* |
| 5886 | fi |
| 5887 | |
| 5888 | fi |
| 5889 | |
| 5890 | echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 |
| 5891 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 5892 | then |
| 5893 | cat >> confdefs.h <<\EOF |
| 5894 | #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 |
| 5895 | EOF |
| 5896 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 5897 | fi |
| 5898 | |
| 5899 | |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 5900 | # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! |
| 5901 | # Add sys/socket.h to confdefs.h |
| 5902 | cat >> confdefs.h <<\EOF |
| 5903 | #ifdef HAVE_SYS_SOCKET_H |
| 5904 | #include <sys/socket.h> |
| 5905 | #endif |
| 5906 | EOF |
| 5907 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5908 | echo "configure:5909: checking for socklen_t" >&5 |
| 5909 | if eval "test \"\${ac_cv_type_socklen_t+set}\" = set"; then |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 5910 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5911 | else |
| 5912 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5913 | #line 5914 "configure" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 5914 | #include "confdefs.h" |
| 5915 | #include <sys/types.h> |
| 5916 | #if STDC_HEADERS |
| 5917 | #include <stdlib.h> |
| 5918 | #include <stddef.h> |
| 5919 | #endif |
| 5920 | EOF |
| 5921 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 5922 | egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 5923 | rm -rf conftest* |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5924 | eval "ac_cv_type_socklen_t=yes" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 5925 | else |
| 5926 | rm -rf conftest* |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5927 | eval "ac_cv_type_socklen_t=no" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 5928 | fi |
| 5929 | rm -f conftest* |
| 5930 | |
| 5931 | fi |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 5932 | if eval "test \"`echo '$ac_cv_type_'socklen_t`\" = yes"; then |
| 5933 | echo "$ac_t""yes" 1>&6 |
| 5934 | else |
| 5935 | echo "$ac_t""no" 1>&6 |
| 5936 | cat >> confdefs.h <<EOF |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 5937 | #define socklen_t int |
| 5938 | EOF |
| 5939 | |
| 5940 | fi |
| 5941 | |
| 5942 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5943 | # generate output files |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5944 | trap '' 1 2 15 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5945 | cat > confcache <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5946 | # This file is a shell script that caches the results of configure |
| 5947 | # tests run on this system so they can be shared between configure |
| 5948 | # scripts and configure runs. It is not useful on other systems. |
| 5949 | # If it contains results you don't want to keep, you may remove or edit it. |
| 5950 | # |
| 5951 | # By default, configure uses ./config.cache as the cache file, |
| 5952 | # creating it if it does not exist already. You can give configure |
| 5953 | # the --cache-file=FILE option to use a different cache file; that is |
| 5954 | # what configure does when it calls configure scripts in |
| 5955 | # subdirectories, so they share the cache. |
| 5956 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| 5957 | # config.status only pays attention to the cache file if you give it the |
| 5958 | # --recheck option to rerun configure. |
| 5959 | # |
| 5960 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5961 | # The following way of writing the cache mishandles newlines in values, |
| 5962 | # but we know of no workaround that is simple, portable, and efficient. |
| 5963 | # So, don't put newlines in cache variables' values. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5964 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 5965 | # and sets the high bit in the cache file unless we assign to the vars. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5966 | (set) 2>&1 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 5967 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5968 | *ac_space=\ *) |
| 5969 | # `set' does not quote correctly, so add quotes (double-quote substitution |
| 5970 | # turns \\\\ into \\, and sed turns \\ into \). |
| 5971 | sed -n \ |
| 5972 | -e "s/'/'\\\\''/g" \ |
| 5973 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| 5974 | ;; |
| 5975 | *) |
| 5976 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 5977 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| 5978 | ;; |
| 5979 | esac >> confcache |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5980 | if cmp -s $cache_file confcache; then |
| 5981 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5982 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5983 | if test -w $cache_file; then |
| 5984 | echo "updating cache $cache_file" |
| 5985 | cat confcache > $cache_file |
| 5986 | else |
| 5987 | echo "not updating unwritable cache $cache_file" |
| 5988 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5989 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5990 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 5991 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5992 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5993 | |
| 5994 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 5995 | # Let make expand exec_prefix. |
| 5996 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 5997 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5998 | # Any assignment to VPATH causes Sun make to only execute |
| 5999 | # the first set of double-colon rules, so remove it if not needed. |
| 6000 | # If there is a colon in the path, we need to keep it. |
| 6001 | if test "x$srcdir" = x.; then |
| 6002 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
| 6003 | fi |
| 6004 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6005 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6006 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6007 | DEFS=-DHAVE_CONFIG_H |
| 6008 | |
| 6009 | # Without the "./", some shells look in PATH for config.status. |
| 6010 | : ${CONFIG_STATUS=./config.status} |
| 6011 | |
| 6012 | echo creating $CONFIG_STATUS |
| 6013 | rm -f $CONFIG_STATUS |
| 6014 | cat > $CONFIG_STATUS <<EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6015 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6016 | # Generated automatically by configure. |
| 6017 | # Run this file to recreate the current configuration. |
| 6018 | # This directory was configured as follows, |
| 6019 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 6020 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6021 | # $0 $ac_configure_args |
| 6022 | # |
| 6023 | # Compiler output produced by configure, useful for debugging |
| 6024 | # configure, is in ./config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6025 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6026 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6027 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6028 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6029 | case "\$ac_option" in |
| 6030 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6031 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
| 6032 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6033 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 6034 | echo "$CONFIG_STATUS generated by autoconf version 2.14.1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6035 | exit 0 ;; |
| 6036 | -help | --help | --hel | --he | --h) |
| 6037 | echo "\$ac_cs_usage"; exit 0 ;; |
| 6038 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6039 | esac |
| 6040 | done |
| 6041 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6042 | ac_given_srcdir=$srcdir |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6043 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 6044 | trap 'rm -fr `echo "Makefile \ |
| 6045 | Objects/Makefile \ |
| 6046 | Parser/Makefile \ |
Sjoerd Mullender | a179503 | 2000-08-17 11:41:06 +0000 | [diff] [blame] | 6047 | Grammar/Makefile \ |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 6048 | Python/Makefile \ |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 6049 | Modules/Makefile.pre \ |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 6050 | Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6051 | EOF |
| 6052 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6053 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6054 | # Protect against being on the right side of a sed subst in config.status. |
| 6055 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 6056 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6057 | $ac_vpsub |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6058 | $extrasub |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 6059 | s%@SHELL@%$SHELL%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6060 | s%@CFLAGS@%$CFLAGS%g |
| 6061 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 6062 | s%@CXXFLAGS@%$CXXFLAGS%g |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 6063 | s%@FFLAGS@%$FFLAGS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6064 | s%@DEFS@%$DEFS%g |
| 6065 | s%@LDFLAGS@%$LDFLAGS%g |
| 6066 | s%@LIBS@%$LIBS%g |
| 6067 | s%@exec_prefix@%$exec_prefix%g |
| 6068 | s%@prefix@%$prefix%g |
| 6069 | s%@program_transform_name@%$program_transform_name%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6070 | s%@bindir@%$bindir%g |
| 6071 | s%@sbindir@%$sbindir%g |
| 6072 | s%@libexecdir@%$libexecdir%g |
| 6073 | s%@datadir@%$datadir%g |
| 6074 | s%@sysconfdir@%$sysconfdir%g |
| 6075 | s%@sharedstatedir@%$sharedstatedir%g |
| 6076 | s%@localstatedir@%$localstatedir%g |
| 6077 | s%@libdir@%$libdir%g |
| 6078 | s%@includedir@%$includedir%g |
| 6079 | s%@oldincludedir@%$oldincludedir%g |
| 6080 | s%@infodir@%$infodir%g |
| 6081 | s%@mandir@%$mandir%g |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 6082 | s%@VERSION@%$VERSION%g |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 6083 | s%@MACHDEP@%$MACHDEP%g |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 6084 | s%@SGI_ABI@%$SGI_ABI%g |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 6085 | s%@SET_CXX@%$SET_CXX%g |
| 6086 | s%@MAINOBJ@%$MAINOBJ%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6087 | s%@CC@%$CC%g |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 6088 | s%@EXE@%$EXE%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 6089 | s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g |
| 6090 | s%@LDLIBRARY@%$LDLIBRARY%g |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 6091 | s%@LINKCC@%$LINKCC%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6092 | s%@RANLIB@%$RANLIB%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6093 | s%@AR@%$AR%g |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 6094 | s%@INSTALL@%$INSTALL%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6095 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
| 6096 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 6097 | s%@LN@%$LN%g |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 6098 | s%@OPT@%$OPT%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6099 | s%@CPP@%$CPP%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 6100 | s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 6101 | s%@SO@%$SO%g |
| 6102 | s%@LDSHARED@%$LDSHARED%g |
| 6103 | s%@CCSHARED@%$CCSHARED%g |
| 6104 | s%@LINKFORSHARED@%$LINKFORSHARED%g |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 6105 | s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 6106 | s%@LDLAST@%$LDLAST%g |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 6107 | s%@USE_GC_MODULE@%$USE_GC_MODULE%g |
Fred Drake | a50d6ec | 2000-08-31 16:13:20 +0000 | [diff] [blame] | 6108 | s%@USE_BSDDB_MODULE@%$USE_BSDDB_MODULE%g |
Skip Montanaro | ed33c9a | 2000-09-08 02:17:15 +0000 | [diff] [blame] | 6109 | s%@HAVE_LIBDB@%$HAVE_LIBDB%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6110 | s%@DLINCLDIR@%$DLINCLDIR%g |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 6111 | s%@DYNLOADFILE@%$DYNLOADFILE%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6112 | s%@LIBOBJS@%$LIBOBJS%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6113 | s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g |
| 6114 | s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g |
| 6115 | s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6116 | s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6117 | s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6118 | s%@LIBM@%$LIBM%g |
| 6119 | s%@LIBC@%$LIBC%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6120 | |
| 6121 | CEOF |
| 6122 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6123 | |
| 6124 | cat >> $CONFIG_STATUS <<\EOF |
| 6125 | |
| 6126 | # Split the substitutions into bite-sized pieces for seds with |
| 6127 | # small command number limits, like on Digital OSF/1 and HP-UX. |
| 6128 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 6129 | ac_file=1 # Number of current file. |
| 6130 | ac_beg=1 # First line for current file. |
| 6131 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 6132 | ac_more_lines=: |
| 6133 | ac_sed_cmds="" |
| 6134 | while $ac_more_lines; do |
| 6135 | if test $ac_beg -gt 1; then |
| 6136 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
| 6137 | else |
| 6138 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
| 6139 | fi |
| 6140 | if test ! -s conftest.s$ac_file; then |
| 6141 | ac_more_lines=false |
| 6142 | rm -f conftest.s$ac_file |
| 6143 | else |
| 6144 | if test -z "$ac_sed_cmds"; then |
| 6145 | ac_sed_cmds="sed -f conftest.s$ac_file" |
| 6146 | else |
| 6147 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
| 6148 | fi |
| 6149 | ac_file=`expr $ac_file + 1` |
| 6150 | ac_beg=$ac_end |
| 6151 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
| 6152 | fi |
| 6153 | done |
| 6154 | if test -z "$ac_sed_cmds"; then |
| 6155 | ac_sed_cmds=cat |
| 6156 | fi |
| 6157 | EOF |
| 6158 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6159 | cat >> $CONFIG_STATUS <<EOF |
| 6160 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 6161 | CONFIG_FILES=\${CONFIG_FILES-"Makefile \ |
| 6162 | Objects/Makefile \ |
| 6163 | Parser/Makefile \ |
Sjoerd Mullender | a179503 | 2000-08-17 11:41:06 +0000 | [diff] [blame] | 6164 | Grammar/Makefile \ |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 6165 | Python/Makefile \ |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 6166 | Modules/Makefile.pre \ |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 6167 | Modules/Setup.config"} |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6168 | EOF |
| 6169 | cat >> $CONFIG_STATUS <<\EOF |
| 6170 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6171 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6172 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6173 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6174 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 6175 | *) ac_file_in="${ac_file}.in" ;; |
| 6176 | esac |
| 6177 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6178 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6179 | |
| 6180 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 6181 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 6182 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 6183 | # The file is in a subdirectory. |
| 6184 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6185 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6186 | # A "../" for each directory in $ac_dir_suffix. |
| 6187 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
| 6188 | else |
| 6189 | ac_dir_suffix= ac_dots= |
| 6190 | fi |
| 6191 | |
| 6192 | case "$ac_given_srcdir" in |
| 6193 | .) srcdir=. |
| 6194 | if test -z "$ac_dots"; then top_srcdir=. |
| 6195 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
| 6196 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; |
| 6197 | *) # Relative path. |
| 6198 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 6199 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
| 6200 | esac |
| 6201 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6202 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6203 | echo creating "$ac_file" |
| 6204 | rm -f "$ac_file" |
| 6205 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
| 6206 | case "$ac_file" in |
| 6207 | *Makefile*) ac_comsub="1i\\ |
| 6208 | # $configure_input" ;; |
| 6209 | *) ac_comsub= ;; |
| 6210 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6211 | |
| 6212 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6213 | sed -e "$ac_comsub |
| 6214 | s%@configure_input@%$configure_input%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6215 | s%@srcdir@%$srcdir%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6216 | s%@top_srcdir@%$top_srcdir%g |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6217 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6218 | fi; done |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6219 | rm -f conftest.s* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6220 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6221 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
| 6222 | # NAME is the cpp macro being defined and VALUE is the value it is being given. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6223 | # |
| 6224 | # ac_d sets the value in "#define NAME VALUE" lines. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6225 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 6226 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6227 | ac_dC='\3' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6228 | ac_dD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6229 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6230 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 6231 | ac_uB='\([ ]\)%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6232 | ac_uC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6233 | ac_uD='\4%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6234 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6235 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 6236 | ac_eB='$%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6237 | ac_eC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6238 | ac_eD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6239 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6240 | if test "${CONFIG_HEADERS+set}" != set; then |
| 6241 | EOF |
| 6242 | cat >> $CONFIG_STATUS <<EOF |
| 6243 | CONFIG_HEADERS="config.h" |
| 6244 | EOF |
| 6245 | cat >> $CONFIG_STATUS <<\EOF |
| 6246 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6247 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6248 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6249 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6250 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6251 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 6252 | *) ac_file_in="${ac_file}.in" ;; |
| 6253 | esac |
| 6254 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6255 | echo creating $ac_file |
| 6256 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6257 | rm -f conftest.frag conftest.in conftest.out |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6258 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 6259 | cat $ac_file_inputs > conftest.in |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6260 | |
| 6261 | EOF |
| 6262 | |
| 6263 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
| 6264 | # the proper values into config.h.in to produce config.h. And first: |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6265 | # Protect against being on the right side of a sed subst in config.status. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6266 | # Protect against being in an unquoted here document in config.status. |
| 6267 | rm -f conftest.vals |
| 6268 | cat > conftest.hdr <<\EOF |
| 6269 | s/[\\&%]/\\&/g |
| 6270 | s%[\\$`]%\\&%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6271 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6272 | s%ac_d%ac_u%gp |
| 6273 | s%ac_u%ac_e%gp |
| 6274 | EOF |
| 6275 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
| 6276 | rm -f conftest.hdr |
| 6277 | |
| 6278 | # This sed command replaces #undef with comments. This is necessary, for |
| 6279 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 6280 | # on some systems where configure will not decide to define it. |
| 6281 | cat >> conftest.vals <<\EOF |
| 6282 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
| 6283 | EOF |
| 6284 | |
| 6285 | # Break up conftest.vals because some shells have a limit on |
| 6286 | # the size of here documents, and old seds have small limits too. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6287 | |
| 6288 | rm -f conftest.tail |
| 6289 | while : |
| 6290 | do |
| 6291 | ac_lines=`grep -c . conftest.vals` |
| 6292 | # grep -c gives empty output for an empty file on some AIX systems. |
| 6293 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 6294 | # Write a limited-size here document to conftest.frag. |
| 6295 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
| 6296 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
| 6297 | echo 'CEOF |
| 6298 | sed -f conftest.frag conftest.in > conftest.out |
| 6299 | rm -f conftest.in |
| 6300 | mv conftest.out conftest.in |
| 6301 | ' >> $CONFIG_STATUS |
| 6302 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
| 6303 | rm -f conftest.vals |
| 6304 | mv conftest.tail conftest.vals |
| 6305 | done |
| 6306 | rm -f conftest.vals |
| 6307 | |
| 6308 | cat >> $CONFIG_STATUS <<\EOF |
| 6309 | rm -f conftest.frag conftest.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6310 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6311 | cat conftest.in >> conftest.h |
| 6312 | rm -f conftest.in |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6313 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6314 | echo "$ac_file is unchanged" |
| 6315 | rm -f conftest.h |
| 6316 | else |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6317 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 6318 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 6319 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 6320 | # The file is in a subdirectory. |
| 6321 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 6322 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6323 | rm -f $ac_file |
| 6324 | mv conftest.h $ac_file |
| 6325 | fi |
| 6326 | fi; done |
| 6327 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6328 | EOF |
| 6329 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6330 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6331 | EOF |
| 6332 | cat >> $CONFIG_STATUS <<\EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6333 | |
| 6334 | exit 0 |
| 6335 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6336 | chmod +x $CONFIG_STATUS |
| 6337 | rm -fr confdefs* $ac_clean_files |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 6338 | test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6339 | |