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 | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3 | # From configure.in Revision: 1.173 |
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 | 036144d | 2000-10-26 17:09:35 +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 |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 19 | --with-next-framework Build (OpenStep|Rhapsody|MacOSX|Darwin) framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 20 | ac_help="$ac_help |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 21 | --with-dyld Use (OpenStep|Rhapsody|MacOSX|Darwin) 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 | 036144d | 2000-10-26 17:09:35 +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 | 036144d | 2000-10-26 17:09:35 +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 | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 572 | # NEXTSTEP|MacOSX|Darwin 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 | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 595 | ac_sys_system=`uname -s` |
| 596 | if test "$ac_sys_system" = "Darwin" ; then |
| 597 | ac_sys_release=`uname -r` |
| 598 | else |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 599 | set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \ |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 600 | sed -e 's/://' -e 's/\./_/'` && \ |
| 601 | ac_sys_system=next && ac_sys_release=$4 |
| 602 | fi |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 603 | |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 604 | MACHDEP="$ac_sys_system$ac_sys_release" |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 605 | fi |
| 606 | fi |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 607 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 608 | # Check whether --with-next-framework or --without-next-framework was given. |
| 609 | if test "${with_next_framework+set}" = set; then |
| 610 | withval="$with_next_framework" |
| 611 | : |
| 612 | fi |
| 613 | |
| 614 | # Check whether --with-dyld or --without-dyld was given. |
| 615 | if test "${with_dyld+set}" = set; then |
| 616 | withval="$with_dyld" |
| 617 | : |
| 618 | fi |
| 619 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 620 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 621 | # Set name for machine-dependent library files |
| 622 | |
| 623 | echo $ac_n "checking MACHDEP""... $ac_c" 1>&6 |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 624 | echo "configure:625: checking MACHDEP" >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 625 | if test -z "$MACHDEP" |
| 626 | then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 627 | ac_sys_system=`uname -s` |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 628 | 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] | 629 | ac_sys_release=`uname -v` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 630 | else |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 631 | ac_sys_release=`uname -r` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 632 | fi |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 633 | ac_md_system=`echo $ac_sys_system | |
| 634 | tr -d '/ ' | tr '[A-Z]' '[a-z]'` |
| 635 | ac_md_release=`echo $ac_sys_release | |
| 636 | tr -d '/ ' | sed 's/\..*//'` |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 637 | MACHDEP="$ac_md_system$ac_md_release" |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 638 | |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 639 | case $MACHDEP in |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 640 | '') MACHDEP="unknown";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 641 | esac |
| 642 | fi |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 643 | |
| 644 | # |
| 645 | # SGI compilers allow the specification of the both the ABI and the |
| 646 | # ISA on the command line. Depending on the values of these switches, |
| 647 | # different and often incompatable code will be generated. |
| 648 | # |
| 649 | # The SGI_ABI variable can be used to modify the CC and LDFLAGS and |
| 650 | # thus supply support for various ABI/ISA combinations. The MACHDEP |
| 651 | # variable is also adjusted. |
| 652 | # |
| 653 | |
| 654 | if test ! -z "$SGI_ABI" |
| 655 | then |
| 656 | CC="cc $SGI_ABI" |
| 657 | LDFLAGS="$SGI_ABI $LDFLAGS" |
| 658 | MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'` |
| 659 | fi |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 660 | echo "$ac_t""$MACHDEP" 1>&6 |
| 661 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 662 | # |
| 663 | # CCC is the command that compiles C++ programs |
| 664 | # |
| 665 | # Not all make programs have this predefined. |
| 666 | # |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 667 | #AC_SUBST(SET_CCC) |
| 668 | #AC_MSG_CHECKING(CCC) |
| 669 | #if test -z "$CCC" |
| 670 | #then |
| 671 | # case $ac_sys_system in |
| 672 | # IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";; |
| 673 | # Linux*) SET_CCC="CCC= g++";; |
| 674 | # *) SET_CCC="" |
| 675 | # esac |
| 676 | #else |
| 677 | # SET_CCC="CCC= ${CCC}" |
| 678 | #fi |
| 679 | #AC_MSG_RESULT($SET_CCC) |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 680 | |
| 681 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 682 | # checks for alternative programs |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 683 | echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6 |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 684 | echo "configure:685: checking for --without-gcc" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 685 | # Check whether --with-gcc or --without-gcc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 686 | if test "${with_gcc+set}" = set; then |
| 687 | withval="$with_gcc" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 688 | |
| 689 | case $withval in |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 690 | no) CC=cc |
| 691 | without_gcc=yes;; |
| 692 | yes) CC=gcc |
| 693 | without_gcc=no;; |
| 694 | *) CC=$withval |
| 695 | without_gcc=$withval;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 696 | esac |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 697 | else |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 698 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 699 | case $ac_sys_system in |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 700 | OSF1) CC=cc |
| 701 | without_gcc=;; |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 702 | BeOS*) |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 703 | case $BE_HOST_CPU in |
| 704 | ppc) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 705 | CC=mwcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 706 | without_gcc=yes |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 707 | OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma" |
| 708 | CCSHARED="UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 709 | LDFLAGS="$LDFLAGS -nodup" |
| 710 | |
| 711 | AR="$PWD/BeOS/ar-fake" |
| 712 | RANLIB=: |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 713 | ;; |
| 714 | x86) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 715 | CC=gcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 716 | without_gcc=no |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 717 | OPT=-O |
| 718 | # Really should use srcdir instead of PWD |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 719 | AR="$PWD/BeOS/ar-fake" |
| 720 | RANLIB=: |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 721 | ;; |
| 722 | *) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 723 | { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; } |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 724 | ;; |
| 725 | esac |
| 726 | ;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 727 | Monterey*) |
| 728 | RANLIB=: |
| 729 | without_gcc=;; |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 730 | *) without_gcc=no;; |
| 731 | esac |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 732 | fi |
| 733 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 734 | echo "$ac_t""$without_gcc" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 735 | |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 736 | |
| 737 | |
| 738 | MAINOBJ=python.o |
| 739 | echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 740 | echo "configure:741: checking for --with-cxx=<compiler>" >&5 |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 741 | # Check whether --with-cxx or --without-cxx was given. |
| 742 | if test "${with_cxx+set}" = set; then |
| 743 | withval="$with_cxx" |
| 744 | |
| 745 | case $withval in |
| 746 | no) CXX= |
| 747 | with_cxx=no;; |
| 748 | *) CXX=$withval |
| 749 | MAINOBJ=ccpython.o |
| 750 | with_cxx=$withval;; |
| 751 | esac |
| 752 | else |
| 753 | |
| 754 | with_cxx=no |
| 755 | |
| 756 | fi |
| 757 | |
| 758 | echo "$ac_t""$with_cxx" 1>&6 |
Guido van Rossum | e126233 | 2000-09-22 19:41:56 +0000 | [diff] [blame] | 759 | SET_CXX="CXX=$CXX" |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 760 | |
| 761 | #AC_MSG_CHECKING(CCC) |
| 762 | #if test -z "$CCC" |
| 763 | #then |
| 764 | # case $ac_sys_system in |
| 765 | # IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";; |
| 766 | # Linux*) SET_CCC="CCC= g++";; |
| 767 | # *) SET_CCC="" |
| 768 | # esac |
| 769 | #else |
| 770 | # SET_CCC="CCC= ${CCC}" |
| 771 | #fi |
| 772 | #AC_MSG_RESULT($SET_CCC) |
| 773 | |
Guido van Rossum | 8b131c5 | 1995-03-09 14:10:13 +0000 | [diff] [blame] | 774 | # If the user switches compilers, we can't believe the cache |
| 775 | if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" |
| 776 | then |
| 777 | { echo "configure: error: cached CC is different -- throw away $cache_file |
| 778 | (it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; } |
| 779 | fi |
| 780 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 781 | # Extract the first word of "gcc", so it can be a program name with args. |
| 782 | set dummy gcc; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 783 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 784 | echo "configure:785: checking for $ac_word" >&5 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 785 | if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 786 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 787 | else |
| 788 | if test -n "$CC"; then |
| 789 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 790 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 791 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 792 | ac_dummy="$PATH" |
| 793 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 794 | test -z "$ac_dir" && ac_dir=. |
| 795 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 796 | ac_cv_prog_CC="gcc" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 797 | break |
| 798 | fi |
| 799 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 800 | IFS="$ac_save_ifs" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 801 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 802 | fi |
| 803 | CC="$ac_cv_prog_CC" |
| 804 | if test -n "$CC"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 805 | echo "$ac_t""$CC" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 806 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 807 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 808 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 809 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 810 | if test -z "$CC"; then |
| 811 | # Extract the first word of "cc", so it can be a program name with args. |
| 812 | set dummy cc; ac_word=$2 |
| 813 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 814 | echo "configure:815: checking for $ac_word" >&5 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 815 | if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 816 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 817 | else |
| 818 | if test -n "$CC"; then |
| 819 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 820 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 821 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 822 | ac_prog_rejected=no |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 823 | ac_dummy="$PATH" |
| 824 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 825 | test -z "$ac_dir" && ac_dir=. |
| 826 | if test -f $ac_dir/$ac_word; then |
| 827 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then |
| 828 | ac_prog_rejected=yes |
| 829 | continue |
| 830 | fi |
| 831 | ac_cv_prog_CC="cc" |
| 832 | break |
| 833 | fi |
| 834 | done |
| 835 | IFS="$ac_save_ifs" |
| 836 | if test $ac_prog_rejected = yes; then |
| 837 | # We found a bogon in the path, so make sure we never use it. |
| 838 | set dummy $ac_cv_prog_CC |
| 839 | shift |
| 840 | if test $# -gt 0; then |
| 841 | # We chose a different compiler from the bogus one. |
| 842 | # However, it has the same basename, so the bogon will be chosen |
| 843 | # first if we set CC to just the basename; use the full file name. |
| 844 | shift |
| 845 | set dummy "$ac_dir/$ac_word" "$@" |
| 846 | shift |
| 847 | ac_cv_prog_CC="$@" |
| 848 | fi |
| 849 | fi |
| 850 | fi |
| 851 | fi |
| 852 | CC="$ac_cv_prog_CC" |
| 853 | if test -n "$CC"; then |
| 854 | echo "$ac_t""$CC" 1>&6 |
| 855 | else |
| 856 | echo "$ac_t""no" 1>&6 |
| 857 | fi |
| 858 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 859 | if test -z "$CC"; then |
| 860 | case "`uname -s`" in |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 861 | *win32* | *WIN32* | *CYGWIN*) |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 862 | # Extract the first word of "cl", so it can be a program name with args. |
| 863 | set dummy cl; ac_word=$2 |
| 864 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 865 | echo "configure:866: checking for $ac_word" >&5 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 866 | if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 867 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 868 | else |
| 869 | if test -n "$CC"; then |
| 870 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 871 | else |
| 872 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 873 | ac_dummy="$PATH" |
| 874 | for ac_dir in $ac_dummy; do |
| 875 | test -z "$ac_dir" && ac_dir=. |
| 876 | if test -f $ac_dir/$ac_word; then |
| 877 | ac_cv_prog_CC="cl" |
| 878 | break |
| 879 | fi |
| 880 | done |
| 881 | IFS="$ac_save_ifs" |
| 882 | fi |
| 883 | fi |
| 884 | CC="$ac_cv_prog_CC" |
| 885 | if test -n "$CC"; then |
| 886 | echo "$ac_t""$CC" 1>&6 |
| 887 | else |
| 888 | echo "$ac_t""no" 1>&6 |
| 889 | fi |
| 890 | ;; |
| 891 | esac |
| 892 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 893 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
| 894 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 895 | |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 896 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
| 897 | echo "configure:898: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 898 | |
| 899 | ac_ext=c |
| 900 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 901 | ac_cpp='$CPP $CPPFLAGS' |
| 902 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 903 | 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] | 904 | cross_compiling=$ac_cv_prog_cc_cross |
| 905 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 906 | cat > conftest.$ac_ext << EOF |
| 907 | |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 908 | #line 909 "configure" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 909 | #include "confdefs.h" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 910 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 911 | main(){return(0);} |
| 912 | EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 913 | if { (eval echo configure:914: \"$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] | 914 | ac_cv_prog_cc_works=yes |
| 915 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 916 | if (./conftest; exit) 2>/dev/null; then |
| 917 | ac_cv_prog_cc_cross=no |
| 918 | else |
| 919 | ac_cv_prog_cc_cross=yes |
| 920 | fi |
| 921 | else |
| 922 | echo "configure: failed program was:" >&5 |
| 923 | cat conftest.$ac_ext >&5 |
| 924 | ac_cv_prog_cc_works=no |
| 925 | fi |
| 926 | rm -fr conftest* |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 927 | ac_ext=c |
| 928 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 929 | ac_cpp='$CPP $CPPFLAGS' |
| 930 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 931 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 932 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 933 | |
| 934 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
| 935 | if test $ac_cv_prog_cc_works = no; then |
| 936 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } |
| 937 | fi |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 938 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
| 939 | echo "configure:940: 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] | 940 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
| 941 | cross_compiling=$ac_cv_prog_cc_cross |
| 942 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 943 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 944 | echo "configure:945: checking whether we are using GNU C" >&5 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 945 | if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 946 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 947 | else |
| 948 | cat > conftest.c <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 949 | #ifdef __GNUC__ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 950 | yes; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 951 | #endif |
| 952 | EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 953 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 954 | ac_cv_prog_gcc=yes |
| 955 | else |
| 956 | ac_cv_prog_gcc=no |
| 957 | fi |
| 958 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 959 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 960 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 961 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 962 | if test $ac_cv_prog_gcc = yes; then |
| 963 | GCC=yes |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 964 | else |
| 965 | GCC= |
| 966 | fi |
| 967 | |
| 968 | ac_test_CFLAGS="${CFLAGS+set}" |
| 969 | ac_save_CFLAGS="$CFLAGS" |
| 970 | CFLAGS= |
| 971 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 972 | echo "configure:973: checking whether ${CC-cc} accepts -g" >&5 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 973 | if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 974 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 975 | else |
| 976 | echo 'void f(){}' > conftest.c |
| 977 | 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] | 978 | ac_cv_prog_cc_g=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 979 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 980 | ac_cv_prog_cc_g=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 981 | fi |
| 982 | rm -f conftest* |
| 983 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 984 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 985 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 986 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 987 | if test "$ac_test_CFLAGS" = set; then |
| 988 | CFLAGS="$ac_save_CFLAGS" |
| 989 | elif test $ac_cv_prog_cc_g = yes; then |
| 990 | if test "$GCC" = yes; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 991 | CFLAGS="-g -O2" |
| 992 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 993 | CFLAGS="-g" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 994 | fi |
| 995 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 996 | if test "$GCC" = yes; then |
| 997 | CFLAGS="-O2" |
| 998 | else |
| 999 | CFLAGS= |
| 1000 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1001 | fi |
| 1002 | |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1003 | |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1004 | echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1005 | echo "configure:1006: checking for --with-suffix" >&5 |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1006 | # Check whether --with-suffix or --without-suffix was given. |
| 1007 | if test "${with_suffix+set}" = set; then |
| 1008 | withval="$with_suffix" |
| 1009 | |
| 1010 | case $withval in |
| 1011 | no) EXE=;; |
| 1012 | yes) EXE=.exe;; |
| 1013 | *) EXE=$withval;; |
| 1014 | esac |
| 1015 | fi |
| 1016 | |
| 1017 | echo "$ac_t""$EXE" 1>&6 |
| 1018 | |
Guido van Rossum | dd997f7 | 1998-10-07 19:58:26 +0000 | [diff] [blame] | 1019 | case $MACHDEP in |
| 1020 | bsdos*) |
| 1021 | case $CC in |
| 1022 | gcc) CC="$CC -D_HAVE_BSDI";; |
| 1023 | esac;; |
| 1024 | esac |
| 1025 | |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1026 | case $ac_sys_system in |
| 1027 | hp*|HP*) |
| 1028 | case $CC in |
Guido van Rossum | cd5ff9f | 2000-09-22 16:15:54 +0000 | [diff] [blame] | 1029 | cc|*/cc) CC="$CC -Ae";; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1030 | esac;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1031 | Monterey*) |
| 1032 | case $CC in |
| 1033 | cc) CC="$CC -Wl,-Bexport";; |
| 1034 | esac;; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1035 | esac |
| 1036 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1037 | # LDLIBRARY is the name of the library to link against (as opposed to the |
| 1038 | # name of the library into which to insert object files). On systems |
| 1039 | # without shared libraries, LDLIBRARY is the same as LIBRARY (defined in |
| 1040 | # the Makefiles). |
| 1041 | |
| 1042 | |
| 1043 | LDLIBRARY='' |
| 1044 | |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1045 | # LINKCC is the command that links the python executable -- default is $(CC). |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1046 | # This is altered for AIX in order to build the export list before |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1047 | # linking. |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1048 | |
| 1049 | echo $ac_n "checking LINKCC""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1050 | echo "configure:1051: checking LINKCC" >&5 |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 1051 | if test -z "$LINKCC" -a ! -z "$CXX" |
| 1052 | then |
| 1053 | LINKCC="$CXX" |
| 1054 | fi |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1055 | if test -z "$LINKCC" |
| 1056 | then |
| 1057 | case $ac_sys_system in |
| 1058 | AIX*) |
Guido van Rossum | 45140f9 | 1997-08-29 18:44:06 +0000 | [diff] [blame] | 1059 | LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 1060 | dgux*) |
| 1061 | LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1062 | Monterey64*) |
| 1063 | LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";; |
Guido van Rossum | 25f9303 | 1997-08-18 16:00:04 +0000 | [diff] [blame] | 1064 | *) LINKCC="\$(PURIFY) \$(CC)";; |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1065 | esac |
| 1066 | fi |
| 1067 | echo "$ac_t""$LINKCC" 1>&6 |
| 1068 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1069 | echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1070 | echo "configure:1071: checking LDLIBRARY" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1071 | |
| 1072 | # NeXT framework builds require that the 'ar' library be converted into |
| 1073 | # a bundle using libtool. |
| 1074 | if test "$with_next_framework" |
| 1075 | then |
| 1076 | LDLIBRARY='libpython$(VERSION).dylib' |
| 1077 | fi |
| 1078 | |
| 1079 | # DG/UX requires some fancy ld contortions to produce a .so from an .a |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1080 | case $MACHDEP in |
| 1081 | dguxR4) |
| 1082 | LDLIBRARY='libpython$(VERSION).so' |
| 1083 | OPT="$OPT -pic" |
| 1084 | ;; |
| 1085 | beos*) |
| 1086 | LDLIBRARY='libpython$(VERSION).so' |
| 1087 | ;; |
| 1088 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1089 | echo "$ac_t""$LDLIBRARY" 1>&6 |
| 1090 | |
| 1091 | # If LDLIBRARY is different from LIBRARY, emit a rule to build it. |
| 1092 | if test -z "$LDLIBRARY" |
| 1093 | then |
| 1094 | LDLIBRARY='libpython$(VERSION).a' |
| 1095 | MAKE_LDLIBRARY="true" |
| 1096 | else |
| 1097 | MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)' |
| 1098 | fi |
| 1099 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1100 | # Extract the first word of "ranlib", so it can be a program name with args. |
| 1101 | set dummy ranlib; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1102 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1103 | echo "configure:1104: checking for $ac_word" >&5 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1104 | if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1105 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1106 | else |
| 1107 | if test -n "$RANLIB"; then |
| 1108 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 1109 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1110 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1111 | ac_dummy="$PATH" |
| 1112 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1113 | test -z "$ac_dir" && ac_dir=. |
| 1114 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1115 | ac_cv_prog_RANLIB="ranlib" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1116 | break |
| 1117 | fi |
| 1118 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1119 | IFS="$ac_save_ifs" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1120 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1121 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1122 | fi |
| 1123 | RANLIB="$ac_cv_prog_RANLIB" |
| 1124 | if test -n "$RANLIB"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1125 | echo "$ac_t""$RANLIB" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1126 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1127 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1128 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1129 | |
| 1130 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1131 | for ac_prog in ar aal |
| 1132 | do |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1133 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 1134 | set dummy $ac_prog; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1135 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1136 | echo "configure:1137: checking for $ac_word" >&5 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1137 | if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1138 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1139 | else |
| 1140 | if test -n "$AR"; then |
| 1141 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 1142 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1143 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1144 | ac_dummy="$PATH" |
| 1145 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1146 | test -z "$ac_dir" && ac_dir=. |
| 1147 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1148 | ac_cv_prog_AR="$ac_prog" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1149 | break |
| 1150 | fi |
| 1151 | done |
| 1152 | IFS="$ac_save_ifs" |
| 1153 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1154 | fi |
| 1155 | AR="$ac_cv_prog_AR" |
| 1156 | if test -n "$AR"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1157 | echo "$ac_t""$AR" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1158 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1159 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1160 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1161 | |
| 1162 | test -n "$AR" && break |
| 1163 | done |
| 1164 | test -n "$AR" || AR="ar" |
| 1165 | |
| 1166 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1167 | |
| 1168 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1169 | # Install just never works :-( |
| 1170 | if test -z "$INSTALL" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1171 | then |
| 1172 | INSTALL=cp |
| 1173 | INSTALL_PROGRAM=cp |
| 1174 | INSTALL_DATA=cp |
| 1175 | else |
| 1176 | INSTALL_PROGRAM="$INSTALL" |
| 1177 | INSTALL_DATA="$INSTALL -m 644" |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1178 | fi |
| 1179 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1180 | # Not every filesystem supports hard links |
| 1181 | |
| 1182 | if test -z "$LN" ; then |
| 1183 | case $ac_sys_system in |
| 1184 | BeOS*) LN="ln -s";; |
| 1185 | *) LN=ln;; |
| 1186 | esac |
| 1187 | fi |
| 1188 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1189 | # Optimizer/debugger flags passed between Makefiles |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1190 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1191 | if test -z "$OPT" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1192 | then |
Guido van Rossum | edca74a | 1997-07-18 23:29:40 +0000 | [diff] [blame] | 1193 | case $GCC in |
| 1194 | yes) |
| 1195 | case $ac_cv_prog_cc_g in |
Fred Drake | f4670e9 | 2000-10-12 17:11:38 +0000 | [diff] [blame] | 1196 | yes) OPT="-g -O2 -Wall -Wstrict-prototypes";; |
| 1197 | *) OPT="-O2 -Wall -Wstrict-prototypes";; |
Guido van Rossum | edca74a | 1997-07-18 23:29:40 +0000 | [diff] [blame] | 1198 | esac |
| 1199 | ;; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1200 | *) OPT="-O";; |
| 1201 | esac |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1202 | fi |
| 1203 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1204 | # The current (beta) Monterey compiler dies with optimizations |
| 1205 | case $ac_sys_system in |
| 1206 | Monterey*) OPT="";; |
| 1207 | esac |
| 1208 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 1209 | if test "$ac_arch_flags" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 1210 | then |
| 1211 | OPT="$OPT $ac_arch_flags" |
| 1212 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1213 | # checks for UNIX variants that set C preprocessor variables |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1214 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1215 | echo "configure:1216: checking how to run the C preprocessor" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1216 | # On Suns, sometimes $CPP names a directory. |
| 1217 | if test -n "$CPP" && test -d "$CPP"; then |
| 1218 | CPP= |
| 1219 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1220 | if test -z "$CPP"; then |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1221 | if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1222 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1223 | else |
| 1224 | # This must be in double quotes, not single quotes, because CPP may get |
| 1225 | # substituted into the Makefile and "${CC-cc}" will confuse make. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1226 | CPP="${CC-cc} -E" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1227 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 1228 | # not just through cpp. |
| 1229 | cat > conftest.$ac_ext <<EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1230 | #line 1231 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1231 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1232 | #include <assert.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1233 | Syntax Error |
| 1234 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1235 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1236 | { (eval echo configure:1237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1237 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1238 | if test -z "$ac_err"; then |
| 1239 | : |
| 1240 | else |
| 1241 | echo "$ac_err" >&5 |
| 1242 | echo "configure: failed program was:" >&5 |
| 1243 | cat conftest.$ac_ext >&5 |
| 1244 | rm -rf conftest* |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1245 | CPP="${CC-cc} -E -traditional-cpp" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1246 | cat > conftest.$ac_ext <<EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1247 | #line 1248 "configure" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1248 | #include "confdefs.h" |
| 1249 | #include <assert.h> |
| 1250 | Syntax Error |
| 1251 | EOF |
| 1252 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1253 | { (eval echo configure:1254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1254 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1255 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1256 | : |
| 1257 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1258 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1259 | echo "configure: failed program was:" >&5 |
| 1260 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1261 | rm -rf conftest* |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1262 | CPP="${CC-cc} -nologo -E" |
| 1263 | cat > conftest.$ac_ext <<EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1264 | #line 1265 "configure" |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1265 | #include "confdefs.h" |
| 1266 | #include <assert.h> |
| 1267 | Syntax Error |
| 1268 | EOF |
| 1269 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1270 | { (eval echo configure:1271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1271 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1272 | if test -z "$ac_err"; then |
| 1273 | : |
| 1274 | else |
| 1275 | echo "$ac_err" >&5 |
| 1276 | echo "configure: failed program was:" >&5 |
| 1277 | cat conftest.$ac_ext >&5 |
| 1278 | rm -rf conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1279 | CPP=/lib/cpp |
| 1280 | fi |
| 1281 | rm -f conftest* |
| 1282 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1283 | rm -f conftest* |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1284 | fi |
| 1285 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1286 | ac_cv_prog_CPP="$CPP" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1287 | fi |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 1288 | CPP="$ac_cv_prog_CPP" |
| 1289 | else |
| 1290 | ac_cv_prog_CPP="$CPP" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1291 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1292 | echo "$ac_t""$CPP" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1293 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1294 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1295 | echo "configure:1296: checking for AIX" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1296 | cat > conftest.$ac_ext <<EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1297 | #line 1298 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1298 | #include "confdefs.h" |
| 1299 | #ifdef _AIX |
| 1300 | yes |
| 1301 | #endif |
| 1302 | |
| 1303 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1304 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1305 | egrep "yes" >/dev/null 2>&1; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1306 | rm -rf conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1307 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1308 | #define _ALL_SOURCE 1 |
| 1309 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1310 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1311 | else |
| 1312 | rm -rf conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1313 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1314 | fi |
| 1315 | rm -f conftest* |
| 1316 | |
| 1317 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1318 | ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1319 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1320 | echo "configure:1321: checking for minix/config.h" >&5 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1321 | if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1322 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1323 | else |
| 1324 | cat > conftest.$ac_ext <<EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1325 | #line 1326 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1326 | #include "confdefs.h" |
| 1327 | #include <minix/config.h> |
| 1328 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1329 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1330 | { (eval echo configure:1331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1331 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1332 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1333 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1334 | eval "ac_cv_header_$ac_safe=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1335 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1336 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1337 | echo "configure: failed program was:" >&5 |
| 1338 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1339 | rm -rf conftest* |
| 1340 | eval "ac_cv_header_$ac_safe=no" |
| 1341 | fi |
| 1342 | rm -f conftest* |
| 1343 | fi |
| 1344 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1345 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1346 | MINIX=yes |
| 1347 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1348 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1349 | MINIX= |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1350 | fi |
| 1351 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1352 | if test "$MINIX" = yes; then |
| 1353 | cat >> confdefs.h <<\EOF |
| 1354 | #define _POSIX_SOURCE 1 |
| 1355 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1356 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1357 | cat >> confdefs.h <<\EOF |
| 1358 | #define _POSIX_1_SOURCE 2 |
| 1359 | EOF |
| 1360 | |
| 1361 | cat >> confdefs.h <<\EOF |
| 1362 | #define _MINIX 1 |
| 1363 | EOF |
| 1364 | |
| 1365 | fi |
| 1366 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1367 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1368 | echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1369 | echo "configure:1370: checking whether $CC accepts -OPT:Olimit=0" >&5 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1370 | if eval "test \"\${ac_cv_opt_olimit_ok+set}\" = set"; then |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1371 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1372 | else |
| 1373 | ac_save_cc="$CC" |
| 1374 | CC="$CC -OPT:Olimit=0" |
| 1375 | if test "$cross_compiling" = yes; then |
| 1376 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1377 | else |
| 1378 | cat > conftest.$ac_ext <<EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1379 | #line 1380 "configure" |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1380 | #include "confdefs.h" |
| 1381 | int main() { return 0; } |
| 1382 | EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1383 | if { (eval echo configure:1384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1384 | then |
| 1385 | ac_cv_opt_olimit_ok=yes |
| 1386 | else |
| 1387 | echo "configure: failed program was:" >&5 |
| 1388 | cat conftest.$ac_ext >&5 |
| 1389 | rm -fr conftest* |
| 1390 | ac_cv_opt_olimit_ok=no |
| 1391 | fi |
| 1392 | rm -fr conftest* |
| 1393 | fi |
| 1394 | |
| 1395 | CC="$ac_save_cc" |
| 1396 | fi |
| 1397 | |
| 1398 | echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6 |
Guido van Rossum | 2efa34b | 1997-10-23 17:43:11 +0000 | [diff] [blame] | 1399 | if test $ac_cv_opt_olimit_ok = yes; then |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 1400 | case $ac_sys_system in |
| 1401 | Darwin*) OPT="$OPT" ;; |
| 1402 | *) OPT="$OPT -OPT:Olimit=0";; |
| 1403 | esac |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1404 | else |
| 1405 | echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1406 | echo "configure:1407: checking whether $CC accepts -Olimit 1500" >&5 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1407 | if eval "test \"\${ac_cv_olimit_ok+set}\" = set"; then |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1408 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1409 | else |
| 1410 | ac_save_cc="$CC" |
| 1411 | CC="$CC -Olimit 1500" |
| 1412 | if test "$cross_compiling" = yes; then |
| 1413 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1414 | else |
| 1415 | cat > conftest.$ac_ext <<EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1416 | #line 1417 "configure" |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1417 | #include "confdefs.h" |
| 1418 | int main() { return 0; } |
| 1419 | EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1420 | if { (eval echo configure:1421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1421 | then |
| 1422 | ac_cv_olimit_ok=yes |
| 1423 | else |
| 1424 | echo "configure: failed program was:" >&5 |
| 1425 | cat conftest.$ac_ext >&5 |
| 1426 | rm -fr conftest* |
| 1427 | ac_cv_olimit_ok=no |
Guido van Rossum | 201afe5 | 1997-05-14 21:14:44 +0000 | [diff] [blame] | 1428 | fi |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1429 | rm -fr conftest* |
| 1430 | fi |
| 1431 | |
| 1432 | CC="$ac_save_cc" |
| 1433 | fi |
| 1434 | |
| 1435 | echo "$ac_t""$ac_cv_olimit_ok" 1>&6 |
| 1436 | if test $ac_cv_olimit_ok = yes; then |
| 1437 | OPT="$OPT -Olimit 1500" |
| 1438 | fi |
| 1439 | fi |
| 1440 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1441 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1442 | # checks for header files |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1443 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1444 | echo "configure:1445: checking for ANSI C header files" >&5 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1445 | if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1446 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1447 | else |
| 1448 | cat > conftest.$ac_ext <<EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1449 | #line 1450 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1450 | #include "confdefs.h" |
| 1451 | #include <stdlib.h> |
| 1452 | #include <stdarg.h> |
| 1453 | #include <string.h> |
| 1454 | #include <float.h> |
| 1455 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1456 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1457 | { (eval echo configure:1458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1458 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1459 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1460 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1461 | ac_cv_header_stdc=yes |
| 1462 | else |
| 1463 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1464 | echo "configure: failed program was:" >&5 |
| 1465 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1466 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1467 | ac_cv_header_stdc=no |
| 1468 | fi |
| 1469 | rm -f conftest* |
| 1470 | |
| 1471 | if test $ac_cv_header_stdc = yes; then |
| 1472 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 1473 | cat > conftest.$ac_ext <<EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1474 | #line 1475 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1475 | #include "confdefs.h" |
| 1476 | #include <string.h> |
| 1477 | EOF |
| 1478 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1479 | egrep "memchr" >/dev/null 2>&1; then |
| 1480 | : |
| 1481 | else |
| 1482 | rm -rf conftest* |
| 1483 | ac_cv_header_stdc=no |
| 1484 | fi |
| 1485 | rm -f conftest* |
| 1486 | |
| 1487 | fi |
| 1488 | |
| 1489 | if test $ac_cv_header_stdc = yes; then |
| 1490 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 1491 | cat > conftest.$ac_ext <<EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1492 | #line 1493 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1493 | #include "confdefs.h" |
| 1494 | #include <stdlib.h> |
| 1495 | EOF |
| 1496 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1497 | egrep "free" >/dev/null 2>&1; then |
| 1498 | : |
| 1499 | else |
| 1500 | rm -rf conftest* |
| 1501 | ac_cv_header_stdc=no |
| 1502 | fi |
| 1503 | rm -f conftest* |
| 1504 | |
| 1505 | fi |
| 1506 | |
| 1507 | if test $ac_cv_header_stdc = yes; then |
| 1508 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| 1509 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1510 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1511 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1512 | cat > conftest.$ac_ext <<EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1513 | #line 1514 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1514 | #include "confdefs.h" |
| 1515 | #include <ctype.h> |
| 1516 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 1517 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1518 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1519 | int main () { int i; for (i = 0; i < 256; i++) |
| 1520 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 1521 | exit (0); } |
| 1522 | |
| 1523 | EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1524 | if { (eval echo configure:1525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1525 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1526 | : |
| 1527 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1528 | echo "configure: failed program was:" >&5 |
| 1529 | cat conftest.$ac_ext >&5 |
| 1530 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1531 | ac_cv_header_stdc=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1532 | fi |
| 1533 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1534 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1535 | |
| 1536 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1537 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1538 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1539 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1540 | if test $ac_cv_header_stdc = yes; then |
| 1541 | cat >> confdefs.h <<\EOF |
| 1542 | #define STDC_HEADERS 1 |
| 1543 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1544 | |
| 1545 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1546 | |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 1547 | 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] | 1548 | 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] | 1549 | 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] | 1550 | 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] | 1551 | sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ |
| 1552 | ndbm.h db1/ndbm.h gdbm/ndbm.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1553 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1554 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1555 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1556 | echo "configure:1557: checking for $ac_hdr" >&5 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1557 | if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1558 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1559 | else |
| 1560 | cat > conftest.$ac_ext <<EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1561 | #line 1562 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1562 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1563 | #include <$ac_hdr> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1564 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1565 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1566 | { (eval echo configure:1567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1567 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1568 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1569 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1570 | eval "ac_cv_header_$ac_safe=yes" |
| 1571 | else |
| 1572 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1573 | echo "configure: failed program was:" >&5 |
| 1574 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1575 | rm -rf conftest* |
| 1576 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1577 | fi |
| 1578 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1579 | fi |
| 1580 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1581 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1582 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1583 | cat >> confdefs.h <<EOF |
| 1584 | #define $ac_tr_hdr 1 |
| 1585 | EOF |
| 1586 | |
| 1587 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1588 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1589 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1590 | done |
| 1591 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1592 | ac_header_dirent=no |
| 1593 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h |
| 1594 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1595 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1596 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1597 | echo "configure:1598: checking for $ac_hdr that defines DIR" >&5 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1598 | 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] | 1599 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1600 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1601 | cat > conftest.$ac_ext <<EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1602 | #line 1603 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1603 | #include "confdefs.h" |
| 1604 | #include <sys/types.h> |
| 1605 | #include <$ac_hdr> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1606 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1607 | DIR *dirp = 0; |
| 1608 | ; return 0; } |
| 1609 | EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1610 | if { (eval echo configure:1611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1611 | rm -rf conftest* |
| 1612 | eval "ac_cv_header_dirent_$ac_safe=yes" |
| 1613 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1614 | echo "configure: failed program was:" >&5 |
| 1615 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1616 | rm -rf conftest* |
| 1617 | eval "ac_cv_header_dirent_$ac_safe=no" |
| 1618 | fi |
| 1619 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1620 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1621 | 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] | 1622 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1623 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1624 | cat >> confdefs.h <<EOF |
| 1625 | #define $ac_tr_hdr 1 |
| 1626 | EOF |
| 1627 | ac_header_dirent=$ac_hdr; break |
| 1628 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1629 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1630 | fi |
| 1631 | done |
| 1632 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| 1633 | if test $ac_header_dirent = dirent.h; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1634 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1635 | echo "configure:1636: checking for opendir in -ldir" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1636 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1637 | 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] | 1638 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1639 | else |
| 1640 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1641 | LIBS="-ldir $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1642 | cat > conftest.$ac_ext <<EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1643 | #line 1644 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1644 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1645 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 1646 | /* We use char because int might match the return type of a gcc2 |
| 1647 | builtin and then its argument prototype would still apply. */ |
| 1648 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1649 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1650 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1651 | opendir() |
| 1652 | ; return 0; } |
| 1653 | EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1654 | if { (eval echo configure:1655: \"$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] | 1655 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1656 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1657 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1658 | echo "configure: failed program was:" >&5 |
| 1659 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1660 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1661 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1662 | fi |
| 1663 | rm -f conftest* |
| 1664 | LIBS="$ac_save_LIBS" |
| 1665 | |
| 1666 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1667 | 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] | 1668 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1669 | LIBS="$LIBS -ldir" |
| 1670 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1671 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1672 | fi |
| 1673 | |
| 1674 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1675 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1676 | echo "configure:1677: checking for opendir in -lx" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1677 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1678 | 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] | 1679 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1680 | else |
| 1681 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1682 | LIBS="-lx $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1683 | cat > conftest.$ac_ext <<EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1684 | #line 1685 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1685 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1686 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 1687 | /* We use char because int might match the return type of a gcc2 |
| 1688 | builtin and then its argument prototype would still apply. */ |
| 1689 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1690 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1691 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1692 | opendir() |
| 1693 | ; return 0; } |
| 1694 | EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1695 | if { (eval echo configure:1696: \"$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] | 1696 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1697 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1698 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1699 | echo "configure: failed program was:" >&5 |
| 1700 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1701 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1702 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1703 | fi |
| 1704 | rm -f conftest* |
| 1705 | LIBS="$ac_save_LIBS" |
| 1706 | |
| 1707 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1708 | 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] | 1709 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1710 | LIBS="$LIBS -lx" |
| 1711 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1712 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1713 | fi |
| 1714 | |
| 1715 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1716 | |
| 1717 | |
| 1718 | # checks for typedefs |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1719 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1720 | echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1721 | echo "configure:1722: checking for clock_t in time.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1722 | cat > conftest.$ac_ext <<EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1723 | #line 1724 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1724 | #include "confdefs.h" |
| 1725 | #include <time.h> |
| 1726 | EOF |
| 1727 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1728 | egrep "clock_t" >/dev/null 2>&1; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1729 | rm -rf conftest* |
| 1730 | was_it_defined=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1731 | else |
| 1732 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1733 | cat >> confdefs.h <<\EOF |
| 1734 | #define clock_t long |
| 1735 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1736 | |
| 1737 | fi |
| 1738 | rm -f conftest* |
| 1739 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1740 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1741 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1742 | # Add some code to confdefs.h so that the test for off_t works on SCO |
| 1743 | cat >> confdefs.h <<\EOF |
| 1744 | #if defined(SCO_DS) |
| 1745 | #undef _OFF_T |
| 1746 | #endif |
| 1747 | EOF |
| 1748 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1749 | # Type availability checks |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1750 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1751 | echo "configure:1752: checking for mode_t" >&5 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1752 | if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1753 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1754 | else |
| 1755 | cat > conftest.$ac_ext <<EOF |
Fred Drake | c9a5cc1 | 2000-10-09 20:18:32 +0000 | [diff] [blame] | 1756 | #line 1757 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1757 | #include "confdefs.h" |
| 1758 | #include <sys/types.h> |
| 1759 | #if STDC_HEADERS |
| 1760 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1761 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1762 | #endif |
| 1763 | EOF |
| 1764 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1765 | 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] | 1766 | rm -rf conftest* |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1767 | eval "ac_cv_type_mode_t=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1768 | else |
| 1769 | rm -rf conftest* |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1770 | eval "ac_cv_type_mode_t=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1771 | fi |
| 1772 | rm -f conftest* |
| 1773 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1774 | fi |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1775 | if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then |
| 1776 | echo "$ac_t""yes" 1>&6 |
| 1777 | else |
| 1778 | echo "$ac_t""no" 1>&6 |
| 1779 | cat >> confdefs.h <<EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1780 | #define mode_t int |
| 1781 | EOF |
| 1782 | |
| 1783 | fi |
| 1784 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1785 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1786 | echo "configure:1787: checking for off_t" >&5 |
| 1787 | if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1788 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1789 | else |
| 1790 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1791 | #line 1792 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1792 | #include "confdefs.h" |
| 1793 | #include <sys/types.h> |
| 1794 | #if STDC_HEADERS |
| 1795 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1796 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1797 | #endif |
| 1798 | EOF |
| 1799 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1800 | 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] | 1801 | rm -rf conftest* |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1802 | eval "ac_cv_type_off_t=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1803 | else |
| 1804 | rm -rf conftest* |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1805 | eval "ac_cv_type_off_t=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1806 | fi |
| 1807 | rm -f conftest* |
| 1808 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1809 | fi |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1810 | if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then |
| 1811 | echo "$ac_t""yes" 1>&6 |
| 1812 | else |
| 1813 | echo "$ac_t""no" 1>&6 |
| 1814 | cat >> confdefs.h <<EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1815 | #define off_t long |
| 1816 | EOF |
| 1817 | |
| 1818 | fi |
| 1819 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1820 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1821 | echo "configure:1822: checking for pid_t" >&5 |
| 1822 | if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1823 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1824 | else |
| 1825 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1826 | #line 1827 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1827 | #include "confdefs.h" |
| 1828 | #include <sys/types.h> |
| 1829 | #if STDC_HEADERS |
| 1830 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1831 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1832 | #endif |
| 1833 | EOF |
| 1834 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1835 | 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] | 1836 | rm -rf conftest* |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1837 | eval "ac_cv_type_pid_t=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1838 | else |
| 1839 | rm -rf conftest* |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1840 | eval "ac_cv_type_pid_t=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1841 | fi |
| 1842 | rm -f conftest* |
| 1843 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1844 | fi |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1845 | if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then |
| 1846 | echo "$ac_t""yes" 1>&6 |
| 1847 | else |
| 1848 | echo "$ac_t""no" 1>&6 |
| 1849 | cat >> confdefs.h <<EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1850 | #define pid_t int |
| 1851 | EOF |
| 1852 | |
| 1853 | fi |
| 1854 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1855 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1856 | echo "configure:1857: checking return type of signal handlers" >&5 |
| 1857 | if eval "test \"\${ac_cv_type_signal+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1858 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1859 | else |
| 1860 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1861 | #line 1862 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1862 | #include "confdefs.h" |
| 1863 | #include <sys/types.h> |
| 1864 | #include <signal.h> |
| 1865 | #ifdef signal |
| 1866 | #undef signal |
| 1867 | #endif |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1868 | #ifdef __cplusplus |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1869 | extern "C" void (*signal (int, void (*)(int)))(int); |
| 1870 | #else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1871 | void (*signal ()) (); |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1872 | #endif |
| 1873 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1874 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1875 | int i; |
| 1876 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1877 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1878 | if { (eval echo configure:1879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1879 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1880 | ac_cv_type_signal=void |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1881 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1882 | echo "configure: failed program was:" >&5 |
| 1883 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1884 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1885 | ac_cv_type_signal=int |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1886 | fi |
| 1887 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1888 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1889 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1890 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1891 | cat >> confdefs.h <<EOF |
| 1892 | #define RETSIGTYPE $ac_cv_type_signal |
| 1893 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1894 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1895 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1896 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1897 | echo "configure:1898: checking for size_t" >&5 |
| 1898 | if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1899 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1900 | else |
| 1901 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1902 | #line 1903 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1903 | #include "confdefs.h" |
| 1904 | #include <sys/types.h> |
| 1905 | #if STDC_HEADERS |
| 1906 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1907 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1908 | #endif |
| 1909 | EOF |
| 1910 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1911 | 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] | 1912 | rm -rf conftest* |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1913 | eval "ac_cv_type_size_t=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1914 | else |
| 1915 | rm -rf conftest* |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1916 | eval "ac_cv_type_size_t=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1917 | fi |
| 1918 | rm -f conftest* |
| 1919 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1920 | fi |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1921 | if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then |
| 1922 | echo "$ac_t""yes" 1>&6 |
| 1923 | else |
| 1924 | echo "$ac_t""no" 1>&6 |
| 1925 | cat >> confdefs.h <<EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1926 | #define size_t unsigned |
| 1927 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1928 | |
| 1929 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1930 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1931 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1932 | echo "configure:1933: checking for uid_t in sys/types.h" >&5 |
| 1933 | if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1934 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1935 | else |
| 1936 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1937 | #line 1938 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1938 | #include "confdefs.h" |
| 1939 | #include <sys/types.h> |
| 1940 | EOF |
| 1941 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1942 | egrep "uid_t" >/dev/null 2>&1; then |
| 1943 | rm -rf conftest* |
| 1944 | ac_cv_type_uid_t=yes |
| 1945 | else |
| 1946 | rm -rf conftest* |
| 1947 | ac_cv_type_uid_t=no |
| 1948 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1949 | rm -f conftest* |
| 1950 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1951 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1952 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1953 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1954 | if test $ac_cv_type_uid_t = no; then |
| 1955 | cat >> confdefs.h <<\EOF |
| 1956 | #define uid_t int |
| 1957 | EOF |
| 1958 | |
| 1959 | cat >> confdefs.h <<\EOF |
| 1960 | #define gid_t int |
| 1961 | EOF |
| 1962 | |
| 1963 | fi |
| 1964 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1965 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 1966 | # Sizes of various common basic types |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 1967 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1968 | echo "configure:1969: checking size of int" >&5 |
| 1969 | if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 1970 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1971 | else |
| 1972 | if test "$cross_compiling" = yes; then |
| 1973 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1974 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1975 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1976 | #line 1977 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 1977 | #include "confdefs.h" |
| 1978 | #include <stdio.h> |
| 1979 | main() |
| 1980 | { |
| 1981 | FILE *f=fopen("conftestval", "w"); |
| 1982 | if (!f) exit(1); |
| 1983 | fprintf(f, "%d\n", sizeof(int)); |
| 1984 | exit(0); |
| 1985 | } |
| 1986 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 1987 | if { (eval echo configure:1988: \"$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] | 1988 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 1989 | ac_cv_sizeof_int=`cat conftestval` |
| 1990 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1991 | echo "configure: failed program was:" >&5 |
| 1992 | cat conftest.$ac_ext >&5 |
| 1993 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 1994 | ac_cv_sizeof_int=0 |
| 1995 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 1996 | rm -fr conftest* |
| 1997 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1998 | |
| 1999 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2000 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
| 2001 | cat >> confdefs.h <<EOF |
| 2002 | #define SIZEOF_INT $ac_cv_sizeof_int |
| 2003 | EOF |
| 2004 | |
| 2005 | |
| 2006 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2007 | echo "configure:2008: checking size of long" >&5 |
| 2008 | if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2009 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2010 | else |
| 2011 | if test "$cross_compiling" = yes; then |
| 2012 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2013 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2014 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2015 | #line 2016 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2016 | #include "confdefs.h" |
| 2017 | #include <stdio.h> |
| 2018 | main() |
| 2019 | { |
| 2020 | FILE *f=fopen("conftestval", "w"); |
| 2021 | if (!f) exit(1); |
| 2022 | fprintf(f, "%d\n", sizeof(long)); |
| 2023 | exit(0); |
| 2024 | } |
| 2025 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2026 | if { (eval echo configure:2027: \"$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] | 2027 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2028 | ac_cv_sizeof_long=`cat conftestval` |
| 2029 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2030 | echo "configure: failed program was:" >&5 |
| 2031 | cat conftest.$ac_ext >&5 |
| 2032 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2033 | ac_cv_sizeof_long=0 |
| 2034 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2035 | rm -fr conftest* |
| 2036 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2037 | |
| 2038 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2039 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
| 2040 | cat >> confdefs.h <<EOF |
| 2041 | #define SIZEOF_LONG $ac_cv_sizeof_long |
| 2042 | EOF |
| 2043 | |
| 2044 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2045 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2046 | echo "configure:2047: checking size of void *" >&5 |
| 2047 | if eval "test \"\${ac_cv_sizeof_void_p+set}\" = set"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2048 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2049 | else |
| 2050 | if test "$cross_compiling" = yes; then |
| 2051 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2052 | else |
| 2053 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2054 | #line 2055 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2055 | #include "confdefs.h" |
| 2056 | #include <stdio.h> |
| 2057 | main() |
| 2058 | { |
| 2059 | FILE *f=fopen("conftestval", "w"); |
| 2060 | if (!f) exit(1); |
| 2061 | fprintf(f, "%d\n", sizeof(void *)); |
| 2062 | exit(0); |
| 2063 | } |
| 2064 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2065 | if { (eval echo configure:2066: \"$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] | 2066 | then |
| 2067 | ac_cv_sizeof_void_p=`cat conftestval` |
| 2068 | else |
| 2069 | echo "configure: failed program was:" >&5 |
| 2070 | cat conftest.$ac_ext >&5 |
| 2071 | rm -fr conftest* |
| 2072 | ac_cv_sizeof_void_p=0 |
| 2073 | fi |
| 2074 | rm -fr conftest* |
| 2075 | fi |
| 2076 | |
| 2077 | fi |
| 2078 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 |
| 2079 | cat >> confdefs.h <<EOF |
| 2080 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
| 2081 | EOF |
| 2082 | |
| 2083 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2084 | echo $ac_n "checking size of char""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2085 | echo "configure:2086: checking size of char" >&5 |
| 2086 | if eval "test \"\${ac_cv_sizeof_char+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2087 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2088 | else |
| 2089 | if test "$cross_compiling" = yes; then |
| 2090 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2091 | else |
| 2092 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2093 | #line 2094 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2094 | #include "confdefs.h" |
| 2095 | #include <stdio.h> |
| 2096 | main() |
| 2097 | { |
| 2098 | FILE *f=fopen("conftestval", "w"); |
| 2099 | if (!f) exit(1); |
| 2100 | fprintf(f, "%d\n", sizeof(char)); |
| 2101 | exit(0); |
| 2102 | } |
| 2103 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2104 | if { (eval echo configure:2105: \"$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] | 2105 | then |
| 2106 | ac_cv_sizeof_char=`cat conftestval` |
| 2107 | else |
| 2108 | echo "configure: failed program was:" >&5 |
| 2109 | cat conftest.$ac_ext >&5 |
| 2110 | rm -fr conftest* |
| 2111 | ac_cv_sizeof_char=0 |
| 2112 | fi |
| 2113 | rm -fr conftest* |
| 2114 | fi |
| 2115 | |
| 2116 | fi |
| 2117 | echo "$ac_t""$ac_cv_sizeof_char" 1>&6 |
| 2118 | cat >> confdefs.h <<EOF |
| 2119 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
| 2120 | EOF |
| 2121 | |
| 2122 | |
| 2123 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2124 | echo "configure:2125: checking size of short" >&5 |
| 2125 | if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2126 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2127 | else |
| 2128 | if test "$cross_compiling" = yes; then |
| 2129 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2130 | else |
| 2131 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2132 | #line 2133 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2133 | #include "confdefs.h" |
| 2134 | #include <stdio.h> |
| 2135 | main() |
| 2136 | { |
| 2137 | FILE *f=fopen("conftestval", "w"); |
| 2138 | if (!f) exit(1); |
| 2139 | fprintf(f, "%d\n", sizeof(short)); |
| 2140 | exit(0); |
| 2141 | } |
| 2142 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2143 | if { (eval echo configure:2144: \"$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] | 2144 | then |
| 2145 | ac_cv_sizeof_short=`cat conftestval` |
| 2146 | else |
| 2147 | echo "configure: failed program was:" >&5 |
| 2148 | cat conftest.$ac_ext >&5 |
| 2149 | rm -fr conftest* |
| 2150 | ac_cv_sizeof_short=0 |
| 2151 | fi |
| 2152 | rm -fr conftest* |
| 2153 | fi |
| 2154 | |
| 2155 | fi |
| 2156 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
| 2157 | cat >> confdefs.h <<EOF |
| 2158 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
| 2159 | EOF |
| 2160 | |
| 2161 | |
| 2162 | echo $ac_n "checking size of float""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2163 | echo "configure:2164: checking size of float" >&5 |
| 2164 | if eval "test \"\${ac_cv_sizeof_float+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2165 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2166 | else |
| 2167 | if test "$cross_compiling" = yes; then |
| 2168 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2169 | else |
| 2170 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2171 | #line 2172 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2172 | #include "confdefs.h" |
| 2173 | #include <stdio.h> |
| 2174 | main() |
| 2175 | { |
| 2176 | FILE *f=fopen("conftestval", "w"); |
| 2177 | if (!f) exit(1); |
| 2178 | fprintf(f, "%d\n", sizeof(float)); |
| 2179 | exit(0); |
| 2180 | } |
| 2181 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2182 | if { (eval echo configure:2183: \"$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] | 2183 | then |
| 2184 | ac_cv_sizeof_float=`cat conftestval` |
| 2185 | else |
| 2186 | echo "configure: failed program was:" >&5 |
| 2187 | cat conftest.$ac_ext >&5 |
| 2188 | rm -fr conftest* |
| 2189 | ac_cv_sizeof_float=0 |
| 2190 | fi |
| 2191 | rm -fr conftest* |
| 2192 | fi |
| 2193 | |
| 2194 | fi |
| 2195 | echo "$ac_t""$ac_cv_sizeof_float" 1>&6 |
| 2196 | cat >> confdefs.h <<EOF |
| 2197 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
| 2198 | EOF |
| 2199 | |
| 2200 | |
| 2201 | echo $ac_n "checking size of double""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2202 | echo "configure:2203: checking size of double" >&5 |
| 2203 | if eval "test \"\${ac_cv_sizeof_double+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2204 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2205 | else |
| 2206 | if test "$cross_compiling" = yes; then |
| 2207 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2208 | else |
| 2209 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2210 | #line 2211 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2211 | #include "confdefs.h" |
| 2212 | #include <stdio.h> |
| 2213 | main() |
| 2214 | { |
| 2215 | FILE *f=fopen("conftestval", "w"); |
| 2216 | if (!f) exit(1); |
| 2217 | fprintf(f, "%d\n", sizeof(double)); |
| 2218 | exit(0); |
| 2219 | } |
| 2220 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2221 | if { (eval echo configure:2222: \"$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] | 2222 | then |
| 2223 | ac_cv_sizeof_double=`cat conftestval` |
| 2224 | else |
| 2225 | echo "configure: failed program was:" >&5 |
| 2226 | cat conftest.$ac_ext >&5 |
| 2227 | rm -fr conftest* |
| 2228 | ac_cv_sizeof_double=0 |
| 2229 | fi |
| 2230 | rm -fr conftest* |
| 2231 | fi |
| 2232 | |
| 2233 | fi |
| 2234 | echo "$ac_t""$ac_cv_sizeof_double" 1>&6 |
| 2235 | cat >> confdefs.h <<EOF |
| 2236 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
| 2237 | EOF |
| 2238 | |
| 2239 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2240 | echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2241 | echo "configure:2242: checking size of fpos_t" >&5 |
| 2242 | if eval "test \"\${ac_cv_sizeof_fpos_t+set}\" = set"; then |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2243 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2244 | else |
| 2245 | if test "$cross_compiling" = yes; then |
| 2246 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2247 | else |
| 2248 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2249 | #line 2250 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2250 | #include "confdefs.h" |
| 2251 | #include <stdio.h> |
| 2252 | main() |
| 2253 | { |
| 2254 | FILE *f=fopen("conftestval", "w"); |
| 2255 | if (!f) exit(1); |
| 2256 | fprintf(f, "%d\n", sizeof(fpos_t)); |
| 2257 | exit(0); |
| 2258 | } |
| 2259 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2260 | if { (eval echo configure:2261: \"$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] | 2261 | then |
| 2262 | ac_cv_sizeof_fpos_t=`cat conftestval` |
| 2263 | else |
| 2264 | echo "configure: failed program was:" >&5 |
| 2265 | cat conftest.$ac_ext >&5 |
| 2266 | rm -fr conftest* |
| 2267 | ac_cv_sizeof_fpos_t=0 |
| 2268 | fi |
| 2269 | rm -fr conftest* |
| 2270 | fi |
| 2271 | |
| 2272 | fi |
| 2273 | echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6 |
| 2274 | cat >> confdefs.h <<EOF |
| 2275 | #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t |
| 2276 | EOF |
| 2277 | |
| 2278 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2279 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2280 | echo $ac_n "checking for long long support""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2281 | echo "configure:2282: checking for long long support" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2282 | have_long_long=no |
| 2283 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2284 | #line 2285 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2285 | #include "confdefs.h" |
| 2286 | |
| 2287 | int main() { |
| 2288 | long long x; x = (long long)0; |
| 2289 | ; return 0; } |
| 2290 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2291 | if { (eval echo configure:2292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2292 | rm -rf conftest* |
| 2293 | cat >> confdefs.h <<\EOF |
| 2294 | #define HAVE_LONG_LONG 1 |
| 2295 | EOF |
| 2296 | have_long_long=yes |
| 2297 | else |
| 2298 | echo "configure: failed program was:" >&5 |
| 2299 | cat conftest.$ac_ext >&5 |
| 2300 | fi |
| 2301 | rm -f conftest* |
| 2302 | echo "$ac_t""$have_long_long" 1>&6 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2303 | if test "$have_long_long" = yes ; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2304 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2305 | echo "configure:2306: checking size of long long" >&5 |
| 2306 | if eval "test \"\${ac_cv_sizeof_long_long+set}\" = set"; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2307 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2308 | else |
| 2309 | if test "$cross_compiling" = yes; then |
| 2310 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2311 | else |
| 2312 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2313 | #line 2314 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2314 | #include "confdefs.h" |
| 2315 | #include <stdio.h> |
| 2316 | main() |
| 2317 | { |
| 2318 | FILE *f=fopen("conftestval", "w"); |
| 2319 | if (!f) exit(1); |
| 2320 | fprintf(f, "%d\n", sizeof(long long)); |
| 2321 | exit(0); |
| 2322 | } |
| 2323 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2324 | if { (eval echo configure:2325: \"$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] | 2325 | then |
| 2326 | ac_cv_sizeof_long_long=`cat conftestval` |
| 2327 | else |
| 2328 | echo "configure: failed program was:" >&5 |
| 2329 | cat conftest.$ac_ext >&5 |
| 2330 | rm -fr conftest* |
| 2331 | ac_cv_sizeof_long_long=0 |
| 2332 | fi |
| 2333 | rm -fr conftest* |
| 2334 | fi |
| 2335 | |
| 2336 | fi |
| 2337 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
| 2338 | cat >> confdefs.h <<EOF |
| 2339 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 2340 | EOF |
| 2341 | |
| 2342 | |
| 2343 | fi |
| 2344 | |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2345 | echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2346 | echo "configure:2347: checking for uintptr_t support" >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2347 | have_uintptr_t=no |
| 2348 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2349 | #line 2350 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2350 | #include "confdefs.h" |
| 2351 | |
| 2352 | int main() { |
| 2353 | uintptr_t x; x = (uintptr_t)0; |
| 2354 | ; return 0; } |
| 2355 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2356 | if { (eval echo configure:2357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2357 | rm -rf conftest* |
| 2358 | cat >> confdefs.h <<\EOF |
| 2359 | #define HAVE_UINTPTR_T 1 |
| 2360 | EOF |
| 2361 | have_uintptr_t=yes |
| 2362 | else |
| 2363 | echo "configure: failed program was:" >&5 |
| 2364 | cat conftest.$ac_ext >&5 |
| 2365 | fi |
| 2366 | rm -f conftest* |
| 2367 | echo "$ac_t""$have_uintptr_t" 1>&6 |
| 2368 | if test "$have_uintptr_t" = yes ; then |
| 2369 | echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2370 | echo "configure:2371: checking size of uintptr_t" >&5 |
| 2371 | if eval "test \"\${ac_cv_sizeof_uintptr_t+set}\" = set"; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2372 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2373 | else |
| 2374 | if test "$cross_compiling" = yes; then |
| 2375 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2376 | else |
| 2377 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2378 | #line 2379 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2379 | #include "confdefs.h" |
| 2380 | #include <stdio.h> |
| 2381 | main() |
| 2382 | { |
| 2383 | FILE *f=fopen("conftestval", "w"); |
| 2384 | if (!f) exit(1); |
| 2385 | fprintf(f, "%d\n", sizeof(uintptr_t)); |
| 2386 | exit(0); |
| 2387 | } |
| 2388 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2389 | if { (eval echo configure:2390: \"$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] | 2390 | then |
| 2391 | ac_cv_sizeof_uintptr_t=`cat conftestval` |
| 2392 | else |
| 2393 | echo "configure: failed program was:" >&5 |
| 2394 | cat conftest.$ac_ext >&5 |
| 2395 | rm -fr conftest* |
| 2396 | ac_cv_sizeof_uintptr_t=0 |
| 2397 | fi |
| 2398 | rm -fr conftest* |
| 2399 | fi |
| 2400 | |
| 2401 | fi |
| 2402 | echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6 |
| 2403 | cat >> confdefs.h <<EOF |
| 2404 | #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t |
| 2405 | EOF |
| 2406 | |
| 2407 | |
| 2408 | fi |
| 2409 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2410 | # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>. |
| 2411 | echo $ac_n "checking size of off_t""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2412 | echo "configure:2413: checking size of off_t" >&5 |
| 2413 | if eval "test \"\${ac_cv_sizeof_off_t+set}\" = set"; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2414 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2415 | else |
| 2416 | if test "$cross_compiling" = yes; then |
| 2417 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2418 | else |
| 2419 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2420 | #line 2421 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2421 | #include "confdefs.h" |
| 2422 | #include <stdio.h> |
| 2423 | #include <sys/types.h> |
| 2424 | main() |
| 2425 | { |
| 2426 | FILE *f=fopen("conftestval", "w"); |
| 2427 | if (!f) exit(1); |
| 2428 | fprintf(f, "%d\n", sizeof(off_t)); |
| 2429 | exit(0); |
| 2430 | } |
| 2431 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2432 | if { (eval echo configure:2433: \"$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] | 2433 | then |
| 2434 | ac_cv_sizeof_off_t=`cat conftestval` |
| 2435 | else |
| 2436 | echo "configure: failed program was:" >&5 |
| 2437 | cat conftest.$ac_ext >&5 |
| 2438 | rm -fr conftest* |
| 2439 | ac_cv_sizeof_off_t=0 |
| 2440 | fi |
| 2441 | rm -fr conftest* |
| 2442 | fi |
| 2443 | |
| 2444 | |
| 2445 | fi |
| 2446 | |
| 2447 | echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6 |
| 2448 | cat >> confdefs.h <<EOF |
| 2449 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
| 2450 | EOF |
| 2451 | |
| 2452 | |
| 2453 | echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2454 | echo "configure:2455: checking whether to enable large file support" >&5 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2455 | if test "$have_long_long" = yes -a \ |
| 2456 | "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ |
| 2457 | "$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] | 2458 | cat >> confdefs.h <<\EOF |
| 2459 | #define HAVE_LARGEFILE_SUPPORT 1 |
| 2460 | EOF |
| 2461 | |
| 2462 | echo "$ac_t""yes" 1>&6 |
| 2463 | else |
| 2464 | echo "$ac_t""no" 1>&6 |
| 2465 | fi |
| 2466 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2467 | # AC_CHECK_SIZEOF() doesn't include <time.h>. |
| 2468 | echo $ac_n "checking size of time_t""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2469 | echo "configure:2470: checking size of time_t" >&5 |
| 2470 | if eval "test \"\${ac_cv_sizeof_time_t+set}\" = set"; then |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2471 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2472 | else |
| 2473 | if test "$cross_compiling" = yes; then |
| 2474 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2475 | else |
| 2476 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2477 | #line 2478 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2478 | #include "confdefs.h" |
| 2479 | #include <stdio.h> |
| 2480 | #include <time.h> |
| 2481 | main() |
| 2482 | { |
| 2483 | FILE *f=fopen("conftestval", "w"); |
| 2484 | if (!f) exit(1); |
| 2485 | fprintf(f, "%d\n", sizeof(time_t)); |
| 2486 | exit(0); |
| 2487 | } |
| 2488 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2489 | if { (eval echo configure:2490: \"$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] | 2490 | then |
| 2491 | ac_cv_sizeof_time_t=`cat conftestval` |
| 2492 | else |
| 2493 | echo "configure: failed program was:" >&5 |
| 2494 | cat conftest.$ac_ext >&5 |
| 2495 | rm -fr conftest* |
| 2496 | ac_cv_sizeof_time_t=0 |
| 2497 | fi |
| 2498 | rm -fr conftest* |
| 2499 | fi |
| 2500 | |
| 2501 | |
| 2502 | fi |
| 2503 | |
| 2504 | echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 |
| 2505 | cat >> confdefs.h <<EOF |
| 2506 | #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
| 2507 | EOF |
| 2508 | |
| 2509 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2510 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2511 | # if have pthread_t then define SIZEOF_PTHREAD_T |
| 2512 | echo $ac_n "checking for pthread_t""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2513 | echo "configure:2514: checking for pthread_t" >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2514 | have_pthread_t=no |
| 2515 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2516 | #line 2517 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2517 | #include "confdefs.h" |
| 2518 | #include <pthread.h> |
| 2519 | int main() { |
Guido van Rossum | 1258049 | 2000-09-24 16:47:19 +0000 | [diff] [blame] | 2520 | pthread_t x; x = *(pthread_t*)0; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2521 | ; return 0; } |
| 2522 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2523 | if { (eval echo configure:2524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2524 | rm -rf conftest* |
| 2525 | have_pthread_t=yes |
| 2526 | else |
| 2527 | echo "configure: failed program was:" >&5 |
| 2528 | cat conftest.$ac_ext >&5 |
| 2529 | fi |
| 2530 | rm -f conftest* |
| 2531 | echo "$ac_t""$have_pthread_t" 1>&6 |
| 2532 | if test "$have_pthread_t" = yes ; then |
| 2533 | # AC_CHECK_SIZEOF() doesn't include <pthread.h>. |
| 2534 | echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2535 | echo "configure:2536: checking size of pthread_t" >&5 |
| 2536 | if eval "test \"\${ac_cv_sizeof_pthread_t+set}\" = set"; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2537 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2538 | else |
| 2539 | if test "$cross_compiling" = yes; then |
| 2540 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2541 | else |
| 2542 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2543 | #line 2544 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2544 | #include "confdefs.h" |
| 2545 | #include <stdio.h> |
| 2546 | #include <pthread.h> |
| 2547 | main() |
| 2548 | { |
| 2549 | FILE *f=fopen("conftestval", "w"); |
| 2550 | if (!f) exit(1); |
| 2551 | fprintf(f, "%d\n", sizeof(pthread_t)); |
| 2552 | exit(0); |
| 2553 | } |
| 2554 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2555 | if { (eval echo configure:2556: \"$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] | 2556 | then |
| 2557 | ac_cv_sizeof_pthread_t=`cat conftestval` |
| 2558 | else |
| 2559 | echo "configure: failed program was:" >&5 |
| 2560 | cat conftest.$ac_ext >&5 |
| 2561 | rm -fr conftest* |
| 2562 | ac_cv_sizeof_pthread_t=0 |
| 2563 | fi |
| 2564 | rm -fr conftest* |
| 2565 | fi |
| 2566 | |
| 2567 | |
| 2568 | fi |
| 2569 | |
| 2570 | echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6 |
| 2571 | cat >> confdefs.h <<EOF |
| 2572 | #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t |
| 2573 | EOF |
| 2574 | |
| 2575 | fi |
| 2576 | |
| 2577 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2578 | # Minor variations in building a framework between NextStep versions 4 and 5 |
| 2579 | |
| 2580 | case $ac_sys_system/$ac_sys_release in |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 2581 | Darwin/*) |
| 2582 | ns_undef_sym='_environ' |
| 2583 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2584 | next/4*) |
| 2585 | ns_undef_sym='__environ' |
| 2586 | LIBTOOL_CRUFT="-U $ns_undef_sym" ;; |
| 2587 | next/5*) |
| 2588 | ns_undef_sym='_environ' |
| 2589 | LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;; |
| 2590 | esac |
| 2591 | |
| 2592 | echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2593 | echo "configure:2594: checking for --with-next-framework" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2594 | if test "$with_next_framework" |
| 2595 | then |
| 2596 | OPT="$OPT -fno-common" |
| 2597 | # -U __environ is needed since bundles don't have access |
| 2598 | # to crt0 when built but will always be linked against it |
| 2599 | LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym" |
| 2600 | cat >> confdefs.h <<\EOF |
| 2601 | #define WITH_NEXT_FRAMEWORK 1 |
| 2602 | EOF |
| 2603 | |
| 2604 | echo "$ac_t""yes" 1>&6 |
| 2605 | else |
| 2606 | echo "$ac_t""no" 1>&6 |
| 2607 | fi |
| 2608 | |
| 2609 | echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2610 | echo "configure:2611: checking for --with-dyld" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2611 | if test "$with_next_framework" -o "$with_dyld" |
| 2612 | then |
| 2613 | if test "$with_dyld" |
| 2614 | then |
| 2615 | echo "$ac_t""yes" 1>&6 |
| 2616 | else |
| 2617 | echo "$ac_t""required for framework build" 1>&6 |
| 2618 | fi |
| 2619 | cat >> confdefs.h <<\EOF |
| 2620 | #define WITH_DYLD 1 |
| 2621 | EOF |
| 2622 | |
| 2623 | ns_dyld='set' |
| 2624 | else |
| 2625 | echo "$ac_t""no" 1>&6 |
| 2626 | fi |
| 2627 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2628 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2629 | |
| 2630 | |
| 2631 | |
| 2632 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2633 | # SO is the extension of shared libraries `(including the dot!) |
| 2634 | # -- usually .so, .sl on HP-UX |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2635 | echo $ac_n "checking SO""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2636 | echo "configure:2637: checking SO" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2637 | if test -z "$SO" |
| 2638 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2639 | case $ac_sys_system in |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 2640 | hp*|HP*) SO=.sl;; |
| 2641 | *) SO=.so;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2642 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2643 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2644 | echo "$ac_t""$SO" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2645 | # LDSHARED is the ld *command* used to create shared library |
| 2646 | # -- "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] | 2647 | # (Shared libraries in this instance are shared modules to be loaded into |
| 2648 | # Python, as opposed to building Python itself as a shared library.) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2649 | echo $ac_n "checking LDSHARED""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2650 | echo "configure:2651: checking LDSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2651 | if test -z "$LDSHARED" |
| 2652 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2653 | case $ac_sys_system/$ac_sys_release in |
Guido van Rossum | 45140f9 | 1997-08-29 18:44:06 +0000 | [diff] [blame] | 2654 | AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2655 | BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";; |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 2656 | IRIX/5*) LDSHARED="ld -shared";; |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 2657 | IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2658 | SunOS/4*) LDSHARED="ld";; |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 2659 | SunOS/5*) |
| 2660 | if test "$GCC" = "yes" |
| 2661 | then LDSHARED='$(CC) -G' |
| 2662 | else LDSHARED="ld -G"; |
| 2663 | fi ;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2664 | hp*|HP*) LDSHARED="ld -b";; |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2665 | OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; |
| 2666 | DYNIX/ptx*) LDSHARED="ld -G";; |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 2667 | Darwin/*|next/*) |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2668 | if test "$ns_dyld" |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 2669 | then |
| 2670 | if test "$ac_sys_system" = Darwin |
| 2671 | then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress' |
| 2672 | else LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind' |
| 2673 | fi |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2674 | else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r'; |
| 2675 | fi |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 2676 | if test "$with_next_framework" ; then |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2677 | LDSHARED="$LDSHARED \$(LDLIBRARY)" |
| 2678 | fi ;; |
Guido van Rossum | 81652ab | 1996-07-21 02:53:27 +0000 | [diff] [blame] | 2679 | Linux*) LDSHARED="gcc -shared";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 2680 | dgux*) LDSHARED="ld -G";; |
Guido van Rossum | 458e7fa | 1999-09-17 15:40:40 +0000 | [diff] [blame] | 2681 | BSD/OS*/4*) LDSHARED="gcc -shared";; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 2682 | OpenBSD*) LDSHARED="ld -Bshareable";; |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 2683 | NetBSD*) |
| 2684 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 2685 | then |
| 2686 | LDSHARED="cc -shared" |
| 2687 | else |
| 2688 | LDSHARED="ld -Bshareable" |
| 2689 | fi;; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 2690 | FreeBSD*) |
Jeremy Hylton | 4bcc7c5 | 2000-08-31 17:45:35 +0000 | [diff] [blame] | 2691 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 2692 | then |
| 2693 | LDSHARED="cc -shared ${LDFLAGS}" |
| 2694 | else |
| 2695 | LDSHARED="ld -Bshareable ${LDFLAGS}" |
| 2696 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2697 | SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2698 | Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2699 | *) LDSHARED="ld";; |
| 2700 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2701 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2702 | echo "$ac_t""$LDSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2703 | # 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] | 2704 | # library (module) -- this is only needed for a few systems |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2705 | echo $ac_n "checking CCSHARED""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2706 | echo "configure:2707: checking CCSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2707 | if test -z "$CCSHARED" |
| 2708 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 2709 | case $ac_sys_system/$ac_sys_release in |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 2710 | hp*|HP*) if test "$GCC" = yes; |
| 2711 | then CCSHARED="-fpic"; |
| 2712 | else CCSHARED="+z"; |
| 2713 | fi;; |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2714 | Linux*) CCSHARED="-fpic";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 2715 | BSD/OS*/4*) CCSHARED="-fpic";; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 2716 | OpenBSD*) CCSHARED="-fpic";; |
| 2717 | FreeBSD*|NetBSD*) CCSHARED="-fPIC";; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2718 | SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2719 | Monterey*) CCSHARED="-G";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 2720 | IRIX*/6*) case $CC in |
| 2721 | *gcc*) CCSHARED="-shared";; |
Guido van Rossum | ee21f41 | 1998-04-20 18:51:54 +0000 | [diff] [blame] | 2722 | *) CCSHARED="";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 2723 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2724 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2725 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2726 | echo "$ac_t""$CCSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2727 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2728 | # the python executable -- this is only needed for a few systems |
| 2729 | echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2730 | echo "configure:2731: checking LINKFORSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2731 | if test -z "$LINKFORSHARED" |
| 2732 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 2733 | case $ac_sys_system/$ac_sys_release in |
Guido van Rossum | 69f6580 | 1998-03-03 21:47:00 +0000 | [diff] [blame] | 2734 | AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2735 | hp*|HP*) |
Guido van Rossum | 304dd2d | 1997-10-20 23:10:56 +0000 | [diff] [blame] | 2736 | LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 2737 | BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 2d9feed | 1997-11-24 17:36:21 +0000 | [diff] [blame] | 2738 | Linux*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2739 | # -u libsys_s pulls in all symbols in libsys |
| 2740 | next/2*|next/3*) LINKFORSHARED="-u libsys_s";; |
| 2741 | # -u __dummy makes the linker aware of the objc runtime |
| 2742 | # in System.framework; otherwise, __objcInit (referenced in |
| 2743 | # crt1.o) gets erroneously defined as common, which breaks dynamic |
| 2744 | # loading of any modules which reference it in System.framework |
| 2745 | next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;; |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 2746 | Darwin/*) LINKFORSHARED="-framework System" ;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2747 | SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 2748 | ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 2749 | FreeBSD*|NetBSD*) |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 2750 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 2751 | then |
| 2752 | LINKFORSHARED="-Wl,--export-dynamic" |
| 2753 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 2754 | SunOS/5*) case $CC in |
| 2755 | *gcc*) |
Guido van Rossum | ff48418 | 2000-02-03 13:50:24 +0000 | [diff] [blame] | 2756 | if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 2757 | then |
| 2758 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 2759 | fi;; |
| 2760 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2761 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2762 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2763 | echo "$ac_t""$LINKFORSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2764 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2765 | # checks for libraries |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2766 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2767 | echo "configure:2768: checking for dlopen in -ldl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2768 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2769 | 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] | 2770 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2771 | else |
| 2772 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2773 | LIBS="-ldl $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2774 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2775 | #line 2776 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2776 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2777 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2778 | /* We use char because int might match the return type of a gcc2 |
| 2779 | builtin and then its argument prototype would still apply. */ |
| 2780 | char dlopen(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2781 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2782 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2783 | dlopen() |
| 2784 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2785 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2786 | if { (eval echo configure:2787: \"$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] | 2787 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2788 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2789 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2790 | echo "configure: failed program was:" >&5 |
| 2791 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +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=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2794 | fi |
| 2795 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2796 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2797 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2798 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2799 | 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] | 2800 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2801 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 2802 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2803 | cat >> confdefs.h <<EOF |
| 2804 | #define $ac_tr_lib 1 |
| 2805 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2806 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2807 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2808 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2809 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2810 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2811 | fi |
| 2812 | # Dynamic linking for SunOS/Solaris and SYSV |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2813 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2814 | echo "configure:2815: checking for shl_load in -ldld" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2815 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2816 | 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] | 2817 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2818 | else |
| 2819 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2820 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2821 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2822 | #line 2823 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2823 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2824 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2825 | /* We use char because int might match the return type of a gcc2 |
| 2826 | builtin and then its argument prototype would still apply. */ |
| 2827 | char shl_load(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2828 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2829 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2830 | shl_load() |
| 2831 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2832 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2833 | if { (eval echo configure:2834: \"$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] | 2834 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2835 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2836 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2837 | echo "configure: failed program was:" >&5 |
| 2838 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +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=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2841 | fi |
| 2842 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2843 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2844 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2845 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2846 | 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] | 2847 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2848 | ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 2849 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2850 | cat >> confdefs.h <<EOF |
| 2851 | #define $ac_tr_lib 1 |
| 2852 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2853 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2854 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2855 | |
| 2856 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2857 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2858 | fi |
| 2859 | # Dynamic linking for HP-UX |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 2860 | |
Skip Montanaro | cb85326 | 2000-08-30 22:29:48 +0000 | [diff] [blame] | 2861 | # Check for --with-pydebug |
| 2862 | echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2863 | echo "configure:2864: checking for --with-pydebug" >&5 |
Skip Montanaro | cb85326 | 2000-08-30 22:29:48 +0000 | [diff] [blame] | 2864 | # Check whether --with-pydebug or --without-pydebug was given. |
| 2865 | if test "${with_pydebug+set}" = set; then |
| 2866 | withval="$with_pydebug" |
| 2867 | |
| 2868 | if test "$withval" != no |
| 2869 | then cat >> confdefs.h <<\EOF |
| 2870 | #define Py_DEBUG 1 |
| 2871 | EOF |
| 2872 | echo "$ac_t""yes" 1>&6 |
| 2873 | else echo "$ac_t""no" 1>&6 |
| 2874 | fi |
| 2875 | else |
| 2876 | echo "$ac_t""no" 1>&6 |
| 2877 | fi |
| 2878 | |
| 2879 | |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 2880 | # checks for system dependent C++ extensions support |
| 2881 | case "$ac_sys_system" in |
| 2882 | AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2883 | echo "configure:2884: checking for genuine AIX C++ extensions support" >&5 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 2884 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2885 | #line 2886 "configure" |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 2886 | #include "confdefs.h" |
| 2887 | #include "/usr/lpp/xlC/include/load.h" |
| 2888 | int main() { |
| 2889 | loadAndInit("", 0, "") |
| 2890 | ; return 0; } |
| 2891 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2892 | if { (eval echo configure:2893: \"$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] | 2893 | rm -rf conftest* |
| 2894 | cat >> confdefs.h <<\EOF |
| 2895 | #define AIX_GENUINE_CPLUSPLUS 1 |
| 2896 | EOF |
| 2897 | |
| 2898 | echo "$ac_t""yes" 1>&6 |
| 2899 | else |
| 2900 | echo "configure: failed program was:" >&5 |
| 2901 | cat conftest.$ac_ext >&5 |
| 2902 | rm -rf conftest* |
| 2903 | echo "$ac_t""no" 1>&6 |
| 2904 | fi |
| 2905 | rm -f conftest*;; |
| 2906 | *) ;; |
| 2907 | esac |
| 2908 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 2909 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
| 2910 | # However on SGI IRIX, these exist but are broken. |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2911 | # BeOS' sockets are stashed in libnet. |
| 2912 | case "$ac_sys_system" in |
| 2913 | IRIX*) ;; |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 2914 | *) |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2915 | echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2916 | echo "configure:2917: checking for t_open in -lnsl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2917 | ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'` |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2918 | 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] | 2919 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2920 | else |
| 2921 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2922 | LIBS="-lnsl $LIBS" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2923 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2924 | #line 2925 "configure" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2925 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2926 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2927 | /* We use char because int might match the return type of a gcc2 |
| 2928 | builtin and then its argument prototype would still apply. */ |
| 2929 | char t_open(); |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2930 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2931 | int main() { |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 2932 | t_open() |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2933 | ; return 0; } |
| 2934 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2935 | if { (eval echo configure:2936: \"$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] | 2936 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2937 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2938 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2939 | echo "configure: failed program was:" >&5 |
| 2940 | cat conftest.$ac_ext >&5 |
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=no" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2943 | fi |
| 2944 | rm -f conftest* |
| 2945 | LIBS="$ac_save_LIBS" |
| 2946 | |
| 2947 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2948 | 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] | 2949 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2950 | LIBS="-lnsl $LIBS" |
| 2951 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2952 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 2953 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 2954 | # SVR4 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2955 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2956 | echo "configure:2957: checking for socket in -lsocket" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2957 | ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2958 | 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] | 2959 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2960 | else |
| 2961 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2962 | LIBS="-lsocket $LIBS $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2963 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2964 | #line 2965 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2965 | #include "confdefs.h" |
| 2966 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2967 | /* We use char because int might match the return type of a gcc2 |
| 2968 | builtin and then its argument prototype would still apply. */ |
| 2969 | char socket(); |
| 2970 | |
| 2971 | int main() { |
| 2972 | socket() |
| 2973 | ; return 0; } |
| 2974 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 2975 | if { (eval echo configure:2976: \"$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] | 2976 | rm -rf conftest* |
| 2977 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 2978 | else |
| 2979 | echo "configure: failed program was:" >&5 |
| 2980 | cat conftest.$ac_ext >&5 |
| 2981 | rm -rf conftest* |
| 2982 | eval "ac_cv_lib_$ac_lib_var=no" |
| 2983 | fi |
| 2984 | rm -f conftest* |
| 2985 | LIBS="$ac_save_LIBS" |
| 2986 | |
| 2987 | fi |
| 2988 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 2989 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2990 | LIBS="-lsocket $LIBS" |
| 2991 | else |
| 2992 | echo "$ac_t""no" 1>&6 |
| 2993 | fi |
| 2994 | # SVR4 sockets |
Jeremy Hylton | cb25d5e | 2000-07-27 21:23:28 +0000 | [diff] [blame] | 2995 | ;; |
| 2996 | esac |
| 2997 | case "$ac_sys_system" in |
| 2998 | BeOS*) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2999 | echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3000 | echo "configure:3001: checking for socket in -lnet" >&5 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3001 | ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'` |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3002 | 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] | 3003 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3004 | else |
| 3005 | ac_save_LIBS="$LIBS" |
| 3006 | LIBS="-lnet $LIBS $LIBS" |
| 3007 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3008 | #line 3009 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3009 | #include "confdefs.h" |
| 3010 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3011 | /* We use char because int might match the return type of a gcc2 |
| 3012 | builtin and then its argument prototype would still apply. */ |
| 3013 | char socket(); |
| 3014 | |
| 3015 | int main() { |
| 3016 | socket() |
| 3017 | ; return 0; } |
| 3018 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3019 | if { (eval echo configure:3020: \"$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] | 3020 | rm -rf conftest* |
| 3021 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3022 | else |
| 3023 | echo "configure: failed program was:" >&5 |
| 3024 | cat conftest.$ac_ext >&5 |
| 3025 | rm -rf conftest* |
| 3026 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3027 | fi |
| 3028 | rm -f conftest* |
| 3029 | LIBS="$ac_save_LIBS" |
| 3030 | |
| 3031 | fi |
| 3032 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3033 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3034 | LIBS="-lnet $LIBS" |
| 3035 | else |
| 3036 | echo "$ac_t""no" 1>&6 |
| 3037 | fi |
| 3038 | # BeOS |
| 3039 | ;; |
| 3040 | esac |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3041 | |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3042 | echo $ac_n "checking for --with-libs""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3043 | echo "configure:3044: checking for --with-libs" >&5 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3044 | # Check whether --with-libs or --without-libs was given. |
| 3045 | if test "${with_libs+set}" = set; then |
| 3046 | withval="$with_libs" |
| 3047 | |
| 3048 | echo "$ac_t""$withval" 1>&6 |
| 3049 | LIBS="$withval $LIBS" |
| 3050 | |
| 3051 | else |
| 3052 | echo "$ac_t""no" 1>&6 |
| 3053 | fi |
| 3054 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3055 | |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3056 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3057 | USE_THREAD_MODULE="" |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3058 | |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3059 | echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3060 | echo "configure:3061: checking for --with-dec-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3061 | |
| 3062 | # Check whether --with-dec-threads or --without-dec-threads was given. |
| 3063 | if test "${with_dec_threads+set}" = set; then |
| 3064 | withval="$with_dec_threads" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3065 | |
| 3066 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3067 | LDLAST=-threads |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3068 | if test "${with_thread+set}" != set; then |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3069 | with_thread="$withval"; |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3070 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3071 | else |
| 3072 | echo "$ac_t""no" 1>&6 |
| 3073 | fi |
| 3074 | |
| 3075 | |
| 3076 | echo $ac_n "checking for --with-threads""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3077 | echo "configure:3078: checking for --with-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3078 | # Check whether --with-threads or --without-threads was given. |
| 3079 | if test "${with_threads+set}" = set; then |
| 3080 | withval="$with_threads" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3081 | : |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3082 | fi |
| 3083 | |
| 3084 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3085 | # --with-thread is deprecated, but check for it anyway |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3086 | # Check whether --with-thread or --without-thread was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3087 | if test "${with_thread+set}" = set; then |
| 3088 | withval="$with_thread" |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 3089 | |
| 3090 | with_threads=$with_thread |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3091 | fi |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3092 | |
| 3093 | |
| 3094 | if test -z "$with_threads" |
| 3095 | then with_threads="yes" |
| 3096 | fi |
| 3097 | echo "$ac_t""$with_threads" 1>&6 |
| 3098 | |
| 3099 | if test "$with_threads" = "no" |
| 3100 | then |
| 3101 | USE_THREAD_MODULE="#" |
| 3102 | else |
Guido van Rossum | 4095101 | 2000-10-07 16:21:27 +0000 | [diff] [blame] | 3103 | if test ! -z "$with_threads" -a -d "$with_threads" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3104 | then LDFLAGS="$LDFLAGS -L$with_threads" |
| 3105 | fi |
Guido van Rossum | 4095101 | 2000-10-07 16:21:27 +0000 | [diff] [blame] | 3106 | if test ! -z "$withval" -a -d "$withval" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3107 | then LDFLAGS="$LDFLAGS -L$withval" |
| 3108 | fi |
| 3109 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 3110 | #define _REENTRANT 1 |
| 3111 | EOF |
| 3112 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3113 | ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3114 | echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3115 | echo "configure:3116: checking for mach/cthreads.h" >&5 |
| 3116 | if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3117 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3118 | else |
| 3119 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3120 | #line 3121 "configure" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3121 | #include "confdefs.h" |
| 3122 | #include <mach/cthreads.h> |
| 3123 | EOF |
| 3124 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3125 | { (eval echo configure:3126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3126 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3127 | if test -z "$ac_err"; then |
| 3128 | rm -rf conftest* |
| 3129 | eval "ac_cv_header_$ac_safe=yes" |
| 3130 | else |
| 3131 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3132 | echo "configure: failed program was:" >&5 |
| 3133 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3134 | rm -rf conftest* |
| 3135 | eval "ac_cv_header_$ac_safe=no" |
| 3136 | fi |
| 3137 | rm -f conftest* |
| 3138 | fi |
| 3139 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3140 | echo "$ac_t""yes" 1>&6 |
| 3141 | cat >> confdefs.h <<\EOF |
| 3142 | #define WITH_THREAD 1 |
| 3143 | EOF |
| 3144 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3145 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3146 | #define C_THREADS 1 |
| 3147 | EOF |
| 3148 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3149 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3150 | else |
| 3151 | echo "$ac_t""no" 1>&6 |
| 3152 | |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3153 | echo $ac_n "checking for --with-pth""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3154 | echo "configure:3155: checking for --with-pth" >&5 |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3155 | # Check whether --with-pth or --without-pth was given. |
| 3156 | if test "${with_pth+set}" = set; then |
| 3157 | withval="$with_pth" |
| 3158 | |
| 3159 | echo "$ac_t""$withval" 1>&6 |
| 3160 | cat >> confdefs.h <<\EOF |
| 3161 | #define WITH_THREAD 1 |
| 3162 | EOF |
| 3163 | |
| 3164 | cat >> confdefs.h <<\EOF |
| 3165 | #define HAVE_PTH 1 |
| 3166 | EOF |
| 3167 | |
| 3168 | LIBS="-lpth $LIBS" |
| 3169 | LIBOBJS="$LIBOBJS thread.o" |
| 3170 | else |
| 3171 | |
| 3172 | echo "$ac_t""no" 1>&6 |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3173 | echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3174 | echo "configure:3175: checking for pthread_create in -lpthread" >&5 |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3175 | ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3176 | 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] | 3177 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3178 | else |
| 3179 | ac_save_LIBS="$LIBS" |
| 3180 | LIBS="-lpthread $LIBS" |
| 3181 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3182 | #line 3183 "configure" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3183 | #include "confdefs.h" |
| 3184 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3185 | /* We use char because int might match the return type of a gcc2 |
| 3186 | builtin and then its argument prototype would still apply. */ |
| 3187 | char pthread_create(); |
| 3188 | |
| 3189 | int main() { |
| 3190 | pthread_create() |
| 3191 | ; return 0; } |
| 3192 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3193 | if { (eval echo configure:3194: \"$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] | 3194 | rm -rf conftest* |
| 3195 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3196 | else |
| 3197 | echo "configure: failed program was:" >&5 |
| 3198 | cat conftest.$ac_ext >&5 |
| 3199 | rm -rf conftest* |
| 3200 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3201 | fi |
| 3202 | rm -f conftest* |
| 3203 | LIBS="$ac_save_LIBS" |
| 3204 | |
| 3205 | fi |
| 3206 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3207 | echo "$ac_t""yes" 1>&6 |
| 3208 | cat >> confdefs.h <<\EOF |
| 3209 | #define WITH_THREAD 1 |
| 3210 | EOF |
| 3211 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3212 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3213 | #define _POSIX_THREADS 1 |
| 3214 | EOF |
| 3215 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3216 | LIBS="-lpthread $LIBS" |
| 3217 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3218 | else |
| 3219 | echo "$ac_t""no" 1>&6 |
| 3220 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3221 | echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3222 | echo "configure:3223: checking for pthread_detach" >&5 |
| 3223 | if eval "test \"\${ac_cv_func_pthread_detach+set}\" = set"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3224 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3225 | else |
| 3226 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3227 | #line 3228 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3228 | #include "confdefs.h" |
| 3229 | /* System header to define __stub macros and hopefully few prototypes, |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3230 | which can conflict with char pthread_detach(); below. */ |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3231 | #include <assert.h> |
| 3232 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3233 | /* We use char because int might match the return type of a gcc2 |
| 3234 | builtin and then its argument prototype would still apply. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3235 | char pthread_detach(); |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3236 | char (*f)(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3237 | |
| 3238 | int main() { |
| 3239 | |
| 3240 | /* The GNU C library defines this for functions which it implements |
| 3241 | to always fail with ENOSYS. Some functions are actually named |
| 3242 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3243 | #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3244 | choke me |
| 3245 | #else |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3246 | f = pthread_detach; |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3247 | #endif |
| 3248 | |
| 3249 | ; return 0; } |
| 3250 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3251 | if { (eval echo configure:3252: \"$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] | 3252 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3253 | eval "ac_cv_func_pthread_detach=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3254 | else |
| 3255 | echo "configure: failed program was:" >&5 |
| 3256 | cat conftest.$ac_ext >&5 |
| 3257 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3258 | eval "ac_cv_func_pthread_detach=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3259 | fi |
| 3260 | rm -f conftest* |
| 3261 | fi |
| 3262 | |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3263 | if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3264 | echo "$ac_t""yes" 1>&6 |
| 3265 | cat >> confdefs.h <<\EOF |
| 3266 | #define WITH_THREAD 1 |
| 3267 | EOF |
| 3268 | |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 3269 | case $ac_sys_system in |
| 3270 | Darwin*) ;; |
| 3271 | *) cat >> confdefs.h <<\EOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3272 | #define _POSIX_THREADS 1 |
| 3273 | EOF |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 3274 | ;; |
| 3275 | esac |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3276 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3277 | else |
| 3278 | echo "$ac_t""no" 1>&6 |
| 3279 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3280 | ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3281 | echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3282 | echo "configure:3283: checking for kernel/OS.h" >&5 |
| 3283 | if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3284 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3285 | else |
| 3286 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3287 | #line 3288 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3288 | #include "confdefs.h" |
| 3289 | #include <kernel/OS.h> |
| 3290 | EOF |
| 3291 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3292 | { (eval echo configure:3293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3293 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3294 | if test -z "$ac_err"; then |
| 3295 | rm -rf conftest* |
| 3296 | eval "ac_cv_header_$ac_safe=yes" |
| 3297 | else |
| 3298 | echo "$ac_err" >&5 |
| 3299 | echo "configure: failed program was:" >&5 |
| 3300 | cat conftest.$ac_ext >&5 |
| 3301 | rm -rf conftest* |
| 3302 | eval "ac_cv_header_$ac_safe=no" |
| 3303 | fi |
| 3304 | rm -f conftest* |
| 3305 | fi |
| 3306 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3307 | echo "$ac_t""yes" 1>&6 |
| 3308 | cat >> confdefs.h <<\EOF |
| 3309 | #define WITH_THREAD 1 |
| 3310 | EOF |
| 3311 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3312 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3313 | #define BEOS_THREADS 1 |
| 3314 | EOF |
| 3315 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3316 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3317 | else |
| 3318 | echo "$ac_t""no" 1>&6 |
| 3319 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3320 | echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3321 | echo "configure:3322: checking for pthread_create in -lpthreads" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3322 | ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3323 | 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] | 3324 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3325 | else |
| 3326 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3327 | LIBS="-lpthreads $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3328 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3329 | #line 3330 "configure" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3330 | #include "confdefs.h" |
| 3331 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3332 | /* We use char because int might match the return type of a gcc2 |
| 3333 | builtin and then its argument prototype would still apply. */ |
| 3334 | char pthread_create(); |
| 3335 | |
| 3336 | int main() { |
| 3337 | pthread_create() |
| 3338 | ; return 0; } |
| 3339 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3340 | if { (eval echo configure:3341: \"$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] | 3341 | rm -rf conftest* |
| 3342 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3343 | else |
| 3344 | echo "configure: failed program was:" >&5 |
| 3345 | cat conftest.$ac_ext >&5 |
| 3346 | rm -rf conftest* |
| 3347 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3348 | fi |
| 3349 | rm -f conftest* |
| 3350 | LIBS="$ac_save_LIBS" |
| 3351 | |
| 3352 | fi |
| 3353 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3354 | echo "$ac_t""yes" 1>&6 |
| 3355 | cat >> confdefs.h <<\EOF |
| 3356 | #define WITH_THREAD 1 |
| 3357 | EOF |
| 3358 | |
| 3359 | cat >> confdefs.h <<\EOF |
| 3360 | #define _POSIX_THREADS 1 |
| 3361 | EOF |
| 3362 | |
| 3363 | LIBS="$LIBS -lpthreads" |
| 3364 | LIBOBJS="$LIBOBJS thread.o" |
| 3365 | else |
| 3366 | echo "$ac_t""no" 1>&6 |
| 3367 | |
| 3368 | echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3369 | echo "configure:3370: checking for pthread_create in -lc_r" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3370 | ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3371 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3372 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3373 | else |
| 3374 | ac_save_LIBS="$LIBS" |
| 3375 | LIBS="-lc_r $LIBS" |
| 3376 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3377 | #line 3378 "configure" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3378 | #include "confdefs.h" |
| 3379 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3380 | /* We use char because int might match the return type of a gcc2 |
| 3381 | builtin and then its argument prototype would still apply. */ |
| 3382 | char pthread_create(); |
| 3383 | |
| 3384 | int main() { |
| 3385 | pthread_create() |
| 3386 | ; return 0; } |
| 3387 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3388 | if { (eval echo configure:3389: \"$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] | 3389 | rm -rf conftest* |
| 3390 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3391 | else |
| 3392 | echo "configure: failed program was:" >&5 |
| 3393 | cat conftest.$ac_ext >&5 |
| 3394 | rm -rf conftest* |
| 3395 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3396 | fi |
| 3397 | rm -f conftest* |
| 3398 | LIBS="$ac_save_LIBS" |
| 3399 | |
| 3400 | fi |
| 3401 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3402 | echo "$ac_t""yes" 1>&6 |
| 3403 | cat >> confdefs.h <<\EOF |
| 3404 | #define WITH_THREAD 1 |
| 3405 | EOF |
| 3406 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3407 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3408 | #define _POSIX_THREADS 1 |
| 3409 | EOF |
| 3410 | |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3411 | LIBS="$LIBS -lc_r" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3412 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3413 | else |
| 3414 | echo "$ac_t""no" 1>&6 |
| 3415 | |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3416 | echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3417 | echo "configure:3418: checking for __d6_pthread_create in -lthread" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3418 | ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3419 | 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] | 3420 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3421 | else |
| 3422 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3423 | LIBS="-lthread $LIBS" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3424 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3425 | #line 3426 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3426 | #include "confdefs.h" |
| 3427 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3428 | /* We use char because int might match the return type of a gcc2 |
| 3429 | builtin and then its argument prototype would still apply. */ |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3430 | char __d6_pthread_create(); |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3431 | |
| 3432 | int main() { |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3433 | __d6_pthread_create() |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3434 | ; return 0; } |
| 3435 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3436 | if { (eval echo configure:3437: \"$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] | 3437 | rm -rf conftest* |
| 3438 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3439 | else |
| 3440 | echo "configure: failed program was:" >&5 |
| 3441 | cat conftest.$ac_ext >&5 |
| 3442 | rm -rf conftest* |
| 3443 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3444 | fi |
| 3445 | rm -f conftest* |
| 3446 | LIBS="$ac_save_LIBS" |
| 3447 | |
| 3448 | fi |
| 3449 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3450 | echo "$ac_t""yes" 1>&6 |
| 3451 | cat >> confdefs.h <<\EOF |
| 3452 | #define WITH_THREAD 1 |
| 3453 | EOF |
| 3454 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3455 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3456 | #define _POSIX_THREADS 1 |
| 3457 | EOF |
| 3458 | |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3459 | LIBS="$LIBS -lthread" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3460 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3461 | else |
| 3462 | echo "$ac_t""no" 1>&6 |
| 3463 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3464 | echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3465 | echo "configure:3466: checking for pthread_create in -lcma" >&5 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3466 | ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3467 | 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] | 3468 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3469 | else |
| 3470 | ac_save_LIBS="$LIBS" |
| 3471 | LIBS="-lcma $LIBS" |
| 3472 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3473 | #line 3474 "configure" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3474 | #include "confdefs.h" |
| 3475 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3476 | /* We use char because int might match the return type of a gcc2 |
| 3477 | builtin and then its argument prototype would still apply. */ |
| 3478 | char pthread_create(); |
| 3479 | |
| 3480 | int main() { |
| 3481 | pthread_create() |
| 3482 | ; return 0; } |
| 3483 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3484 | if { (eval echo configure:3485: \"$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] | 3485 | rm -rf conftest* |
| 3486 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3487 | else |
| 3488 | echo "configure: failed program was:" >&5 |
| 3489 | cat conftest.$ac_ext >&5 |
| 3490 | rm -rf conftest* |
| 3491 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3492 | fi |
| 3493 | rm -f conftest* |
| 3494 | LIBS="$ac_save_LIBS" |
| 3495 | |
| 3496 | fi |
| 3497 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3498 | echo "$ac_t""yes" 1>&6 |
| 3499 | cat >> confdefs.h <<\EOF |
| 3500 | #define WITH_THREAD 1 |
| 3501 | EOF |
| 3502 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3503 | cat >> confdefs.h <<\EOF |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3504 | #define _POSIX_THREADS 1 |
| 3505 | EOF |
| 3506 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3507 | LIBS="$LIBS -lcma" |
| 3508 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3509 | else |
| 3510 | echo "$ac_t""no" 1>&6 |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 3511 | |
| 3512 | USE_THREAD_MODULE="#" |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 3513 | fi |
| 3514 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3515 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3516 | fi |
| 3517 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3518 | fi |
| 3519 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 3520 | fi |
| 3521 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3522 | fi |
| 3523 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3524 | fi |
| 3525 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3526 | fi |
| 3527 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3528 | fi |
| 3529 | |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3530 | fi |
| 3531 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 3532 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3533 | echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3534 | echo "configure:3535: checking for usconfig in -lmpc" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3535 | ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3536 | 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] | 3537 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3538 | else |
| 3539 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3540 | LIBS="-lmpc $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3541 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3542 | #line 3543 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3543 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3544 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3545 | /* We use char because int might match the return type of a gcc2 |
| 3546 | builtin and then its argument prototype would still apply. */ |
| 3547 | char usconfig(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3548 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3549 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3550 | usconfig() |
| 3551 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3552 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3553 | if { (eval echo configure:3554: \"$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] | 3554 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3555 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3556 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3557 | echo "configure: failed program was:" >&5 |
| 3558 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3559 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3560 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3561 | fi |
| 3562 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3563 | LIBS="$ac_save_LIBS" |
| 3564 | |
| 3565 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3566 | 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] | 3567 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3568 | cat >> confdefs.h <<\EOF |
| 3569 | #define WITH_THREAD 1 |
| 3570 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3571 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3572 | LIBS="$LIBS -lmpc" |
| 3573 | LIBOBJS="$LIBOBJS thread.o" |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 3574 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3575 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3576 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3577 | fi |
| 3578 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3579 | echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3580 | echo "configure:3581: checking for thr_create in -lthread" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3581 | ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3582 | 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] | 3583 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3584 | else |
| 3585 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3586 | LIBS="-lthread $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3587 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3588 | #line 3589 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3589 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3590 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3591 | /* We use char because int might match the return type of a gcc2 |
| 3592 | builtin and then its argument prototype would still apply. */ |
| 3593 | char thr_create(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3594 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3595 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3596 | thr_create() |
| 3597 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3598 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3599 | if { (eval echo configure:3600: \"$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] | 3600 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3601 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3602 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3603 | echo "configure: failed program was:" >&5 |
| 3604 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3605 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3606 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3607 | fi |
| 3608 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3609 | LIBS="$ac_save_LIBS" |
| 3610 | |
| 3611 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3612 | 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] | 3613 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3614 | cat >> confdefs.h <<\EOF |
| 3615 | #define WITH_THREAD 1 |
| 3616 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3617 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3618 | LIBS="$LIBS -lthread" |
| 3619 | LIBOBJS="$LIBOBJS thread.o" |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 3620 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3621 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3622 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3623 | fi |
| 3624 | |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 3625 | |
| 3626 | if test "$USE_THREAD_MODULE" != "#" |
| 3627 | then |
| 3628 | # If the above checks didn't disable threads, (at least) OSF1 |
| 3629 | # needs this '-threads' argument during linking. |
| 3630 | case $ac_sys_system in |
| 3631 | OSF1) LDLAST=-threads;; |
| 3632 | esac |
| 3633 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3634 | fi |
| 3635 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 3636 | # Check for GC support |
| 3637 | |
| 3638 | USE_GC_MODULE="" |
| 3639 | echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3640 | echo "configure:3641: checking for --with-cycle-gc" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 3641 | # Check whether --with-cycle-gc or --without-cycle-gc was given. |
| 3642 | if test "${with_cycle_gc+set}" = set; then |
| 3643 | withval="$with_cycle_gc" |
| 3644 | : |
| 3645 | fi |
| 3646 | |
| 3647 | |
| 3648 | if test -z "$with_cycle_gc" |
| 3649 | then with_cycle_gc="yes" |
| 3650 | fi |
| 3651 | if test "$with_cycle_gc" = "no" |
| 3652 | then |
| 3653 | USE_GC_MODULE="#" |
| 3654 | else |
| 3655 | cat >> confdefs.h <<\EOF |
| 3656 | #define WITH_CYCLE_GC 1 |
| 3657 | EOF |
| 3658 | |
| 3659 | fi |
| 3660 | echo "$ac_t""$with_cycle_gc" 1>&6 |
| 3661 | |
Fred Drake | a50d6ec | 2000-08-31 16:13:20 +0000 | [diff] [blame] | 3662 | # Check for LIBDB support |
| 3663 | # either --with-libdb or, in its absence, the presence of db.h |
| 3664 | |
| 3665 | USE_BSDDB_MODULE="" |
| 3666 | echo $ac_n "checking for --with-libdb""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3667 | echo "configure:3668: checking for --with-libdb" >&5 |
Fred Drake | a50d6ec | 2000-08-31 16:13:20 +0000 | [diff] [blame] | 3668 | # Check whether --with-libdb or --without-libdb was given. |
| 3669 | if test "${with_libdb+set}" = set; then |
| 3670 | withval="$with_libdb" |
| 3671 | : |
| 3672 | fi |
| 3673 | |
| 3674 | |
Skip Montanaro | b89f41e | 2000-09-04 04:06:05 +0000 | [diff] [blame] | 3675 | # enabled by default, but db.h must be found |
| 3676 | if test "$ac_cv_header_db_h" = "yes" |
| 3677 | then |
| 3678 | if test "$with_libdb" != "no" |
| 3679 | then with_libdb="yes" |
| 3680 | fi |
| 3681 | else |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 3682 | # make sure user knows why bsddb support wasn't enabled even |
Skip Montanaro | b89f41e | 2000-09-04 04:06:05 +0000 | [diff] [blame] | 3683 | # though s/he requested it |
| 3684 | if test "$with_libdb" = "yes" |
| 3685 | then echo $ac_n "(requested, but db.h was not found) $ac_c" |
| 3686 | fi |
| 3687 | with_libdb="no" |
Fred Drake | a50d6ec | 2000-08-31 16:13:20 +0000 | [diff] [blame] | 3688 | fi |
Skip Montanaro | b89f41e | 2000-09-04 04:06:05 +0000 | [diff] [blame] | 3689 | |
Fred Drake | a50d6ec | 2000-08-31 16:13:20 +0000 | [diff] [blame] | 3690 | if test "$with_libdb" = "no" |
| 3691 | then |
| 3692 | USE_BSDDB_MODULE="#" |
| 3693 | else |
| 3694 | cat >> confdefs.h <<\EOF |
| 3695 | #define WITH_LIBDB 1 |
| 3696 | EOF |
| 3697 | |
| 3698 | fi |
| 3699 | echo "$ac_t""$with_libdb" 1>&6 |
| 3700 | |
Skip Montanaro | ed33c9a | 2000-09-08 02:17:15 +0000 | [diff] [blame] | 3701 | if test "$with_libdb" = "yes" |
| 3702 | then |
| 3703 | # check for libdb; BSD systems have the DB routines in libc --tg |
| 3704 | |
Martin v. Löwis | 05a65d6 | 2000-09-24 19:40:25 +0000 | [diff] [blame] | 3705 | # If dbopen is not in libc, then checking whether it is in libdb |
| 3706 | # is difficult: db_185.h may #define it as __db185_open |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3707 | # Instead, we just trust it is in libdb; linking will fail if it |
| 3708 | # is not. |
Skip Montanaro | ed33c9a | 2000-09-08 02:17:15 +0000 | [diff] [blame] | 3709 | echo $ac_n "checking for dbopen""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3710 | echo "configure:3711: checking for dbopen" >&5 |
| 3711 | if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then |
Skip Montanaro | ed33c9a | 2000-09-08 02:17:15 +0000 | [diff] [blame] | 3712 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3713 | else |
| 3714 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3715 | #line 3716 "configure" |
Skip Montanaro | ed33c9a | 2000-09-08 02:17:15 +0000 | [diff] [blame] | 3716 | #include "confdefs.h" |
| 3717 | /* System header to define __stub macros and hopefully few prototypes, |
| 3718 | which can conflict with char dbopen(); below. */ |
| 3719 | #include <assert.h> |
| 3720 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3721 | /* We use char because int might match the return type of a gcc2 |
| 3722 | builtin and then its argument prototype would still apply. */ |
| 3723 | char dbopen(); |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3724 | char (*f)(); |
Skip Montanaro | ed33c9a | 2000-09-08 02:17:15 +0000 | [diff] [blame] | 3725 | |
| 3726 | int main() { |
| 3727 | |
| 3728 | /* The GNU C library defines this for functions which it implements |
| 3729 | to always fail with ENOSYS. Some functions are actually named |
| 3730 | something starting with __ and the normal name is an alias. */ |
| 3731 | #if defined (__stub_dbopen) || defined (__stub___dbopen) |
| 3732 | choke me |
| 3733 | #else |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3734 | f = dbopen; |
Skip Montanaro | ed33c9a | 2000-09-08 02:17:15 +0000 | [diff] [blame] | 3735 | #endif |
| 3736 | |
| 3737 | ; return 0; } |
| 3738 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3739 | if { (eval echo configure:3740: \"$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] | 3740 | rm -rf conftest* |
| 3741 | eval "ac_cv_func_dbopen=yes" |
| 3742 | else |
| 3743 | echo "configure: failed program was:" >&5 |
| 3744 | cat conftest.$ac_ext >&5 |
| 3745 | rm -rf conftest* |
| 3746 | eval "ac_cv_func_dbopen=no" |
| 3747 | fi |
| 3748 | rm -f conftest* |
| 3749 | fi |
| 3750 | |
| 3751 | if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then |
| 3752 | echo "$ac_t""yes" 1>&6 |
| 3753 | HAVE_LIBDB= |
| 3754 | else |
| 3755 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 05a65d6 | 2000-09-24 19:40:25 +0000 | [diff] [blame] | 3756 | HAVE_LIBDB=-ldb |
Skip Montanaro | ed33c9a | 2000-09-08 02:17:15 +0000 | [diff] [blame] | 3757 | fi |
| 3758 | |
| 3759 | fi |
| 3760 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 3761 | # Check for --with-wctype-functions |
| 3762 | echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3763 | echo "configure:3764: checking for --with-wctype-functions" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 3764 | # Check whether --with-wctype-functions or --without-wctype-functions was given. |
| 3765 | if test "${with_wctype_functions+set}" = set; then |
| 3766 | withval="$with_wctype_functions" |
| 3767 | |
| 3768 | if test "$withval" != no |
| 3769 | then cat >> confdefs.h <<\EOF |
| 3770 | #define WANT_WCTYPE_FUNCTIONS 1 |
| 3771 | EOF |
| 3772 | echo "$ac_t""yes" 1>&6 |
| 3773 | else echo "$ac_t""no" 1>&6 |
| 3774 | fi |
| 3775 | else |
| 3776 | echo "$ac_t""no" 1>&6 |
| 3777 | fi |
| 3778 | |
| 3779 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3780 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3781 | |
| 3782 | DLINCLDIR=/ |
| 3783 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3784 | echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3785 | echo "configure:3786: checking for --with-sgi-dl" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3786 | # Check whether --with-sgi-dl or --without-sgi-dl was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3787 | if test "${with_sgi_dl+set}" = set; then |
| 3788 | withval="$with_sgi_dl" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3789 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3790 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3791 | cat >> confdefs.h <<\EOF |
| 3792 | #define WITH_SGI_DL 1 |
| 3793 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3794 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3795 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3796 | dldir=$withval |
Guido van Rossum | 4095101 | 2000-10-07 16:21:27 +0000 | [diff] [blame] | 3797 | if test ! -z "$dldir" -a -d "$dldir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3798 | then LDFLAGS="$LDFLAGS -L$dldir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3799 | 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] | 3800 | fi |
| 3801 | DLINCLDIR=${dldir} |
| 3802 | LIBS="$LIBS -ldl -lmld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3803 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3804 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3805 | fi |
| 3806 | |
| 3807 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3808 | echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3809 | echo "configure:3810: checking for --with-dl-dld" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3810 | # Check whether --with-dl-dld or --without-dl-dld was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3811 | if test "${with_dl_dld+set}" = set; then |
| 3812 | withval="$with_dl_dld" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3813 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3814 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3815 | cat >> confdefs.h <<\EOF |
| 3816 | #define WITH_DL_DLD 1 |
| 3817 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3818 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3819 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3820 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 3821 | dlddir=`echo "$withval" | sed 's/.*,//'` |
Barry Warsaw | 7d1219d | 2000-10-05 18:45:53 +0000 | [diff] [blame] | 3822 | if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3823 | then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3824 | 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] | 3825 | fi |
| 3826 | DLINCLDIR=${dldir} |
| 3827 | LIBS="$LIBS -ldl -ldld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3828 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3829 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3830 | fi |
| 3831 | |
| 3832 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3833 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 3834 | # 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] | 3835 | for ac_func in dlopen |
| 3836 | do |
| 3837 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3838 | echo "configure:3839: checking for $ac_func" >&5 |
| 3839 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3840 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3841 | else |
| 3842 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3843 | #line 3844 "configure" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3844 | #include "confdefs.h" |
| 3845 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3846 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3847 | #include <assert.h> |
| 3848 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3849 | /* We use char because int might match the return type of a gcc2 |
| 3850 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3851 | char $ac_func(); |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3852 | char (*f)(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3853 | |
| 3854 | int main() { |
| 3855 | |
| 3856 | /* The GNU C library defines this for functions which it implements |
| 3857 | to always fail with ENOSYS. Some functions are actually named |
| 3858 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3859 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3860 | choke me |
| 3861 | #else |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3862 | f = $ac_func; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3863 | #endif |
| 3864 | |
| 3865 | ; return 0; } |
| 3866 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3867 | if { (eval echo configure:3868: \"$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] | 3868 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3869 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3870 | else |
| 3871 | echo "configure: failed program was:" >&5 |
| 3872 | cat conftest.$ac_ext >&5 |
| 3873 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3874 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3875 | fi |
| 3876 | rm -f conftest* |
| 3877 | fi |
| 3878 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3879 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3880 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3881 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 3882 | cat >> confdefs.h <<EOF |
| 3883 | #define $ac_tr_func 1 |
| 3884 | EOF |
| 3885 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3886 | else |
| 3887 | echo "$ac_t""no" 1>&6 |
| 3888 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3889 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3890 | |
| 3891 | |
| 3892 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 3893 | # loading of modules. |
| 3894 | |
| 3895 | echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3896 | echo "configure:3897: checking DYNLOADFILE" >&5 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3897 | if test -z "$DYNLOADFILE" |
| 3898 | then |
| 3899 | case $ac_sys_system/$ac_sys_release in |
| 3900 | AIX*) DYNLOADFILE="dynload_aix.o";; |
| 3901 | BeOS*) DYNLOADFILE="dynload_beos.o";; |
| 3902 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 3903 | Darwin/*|next/*) DYNLOADFILE="dynload_next.o";; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 3904 | *) |
| 3905 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 3906 | # out any dynamic loading |
| 3907 | if test "$ac_cv_func_dlopen" = yes |
| 3908 | then DYNLOADFILE="dynload_shlib.o" |
| 3909 | else DYNLOADFILE="dynload_stub.o" |
| 3910 | fi |
| 3911 | ;; |
| 3912 | esac |
| 3913 | fi |
| 3914 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
| 3915 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 3916 | then |
| 3917 | cat >> confdefs.h <<\EOF |
| 3918 | #define HAVE_DYNAMIC_LOADING 1 |
| 3919 | EOF |
| 3920 | |
| 3921 | fi |
| 3922 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3923 | # checks for library functions |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3924 | for ac_func in alarm chown clock confstr ctermid ctermid_r execv \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 3925 | flock fork fsync fdatasync fpathconf ftime ftruncate \ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3926 | getgroups getlogin getpeername getpid getpwent getwd \ |
Andrew M. Kuchling | 22c6934 | 2000-06-18 15:07:40 +0000 | [diff] [blame] | 3927 | kill link lstat mkfifo mktime mremap \ |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 3928 | nice pathconf pause plock poll pthread_init \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 3929 | putenv readlink \ |
Andrew M. Kuchling | 8d2f2b2 | 2000-07-13 01:26:58 +0000 | [diff] [blame] | 3930 | select setegid seteuid setgid \ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 3931 | setlocale setregid setreuid setsid setpgid setuid setvbuf \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 3932 | sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ |
Fred Drake | 89143df | 1999-12-09 22:03:25 +0000 | [diff] [blame] | 3933 | tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Thomas Wouters | 70c21a1 | 2000-07-14 14:28:33 +0000 | [diff] [blame] | 3934 | truncate uname waitpid _getpty |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3935 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3936 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3937 | echo "configure:3938: checking for $ac_func" >&5 |
| 3938 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3939 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3940 | else |
| 3941 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3942 | #line 3943 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3943 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3944 | /* System header to define __stub macros and hopefully few prototypes, |
| 3945 | which can conflict with char $ac_func(); below. */ |
| 3946 | #include <assert.h> |
| 3947 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3948 | /* We use char because int might match the return type of a gcc2 |
| 3949 | builtin and then its argument prototype would still apply. */ |
| 3950 | char $ac_func(); |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3951 | char (*f)(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3952 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3953 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3954 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3955 | /* The GNU C library defines this for functions which it implements |
| 3956 | to always fail with ENOSYS. Some functions are actually named |
| 3957 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3958 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3959 | choke me |
| 3960 | #else |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3961 | f = $ac_func; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3962 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3963 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3964 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3965 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3966 | if { (eval echo configure:3967: \"$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] | 3967 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3968 | eval "ac_cv_func_$ac_func=yes" |
| 3969 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3970 | echo "configure: failed program was:" >&5 |
| 3971 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3972 | rm -rf conftest* |
| 3973 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3974 | fi |
| 3975 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3976 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3977 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3978 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3979 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3980 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3981 | cat >> confdefs.h <<EOF |
| 3982 | #define $ac_tr_func 1 |
| 3983 | EOF |
| 3984 | |
| 3985 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3986 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3987 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3988 | done |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3989 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 3990 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 3991 | # check for openpty and forkpty |
| 3992 | |
| 3993 | for ac_func in openpty |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3994 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3995 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 3996 | echo "configure:3997: checking for $ac_func" >&5 |
| 3997 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3998 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3999 | else |
| 4000 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4001 | #line 4002 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4002 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4003 | /* System header to define __stub macros and hopefully few prototypes, |
| 4004 | which can conflict with char $ac_func(); below. */ |
| 4005 | #include <assert.h> |
| 4006 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4007 | /* We use char because int might match the return type of a gcc2 |
| 4008 | builtin and then its argument prototype would still apply. */ |
| 4009 | char $ac_func(); |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4010 | char (*f)(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4011 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4012 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4013 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4014 | /* The GNU C library defines this for functions which it implements |
| 4015 | to always fail with ENOSYS. Some functions are actually named |
| 4016 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4017 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4018 | choke me |
| 4019 | #else |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4020 | f = $ac_func; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4021 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4022 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4023 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4024 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4025 | if { (eval echo configure:4026: \"$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] | 4026 | rm -rf conftest* |
| 4027 | eval "ac_cv_func_$ac_func=yes" |
| 4028 | else |
| 4029 | echo "configure: failed program was:" >&5 |
| 4030 | cat conftest.$ac_ext >&5 |
| 4031 | rm -rf conftest* |
| 4032 | eval "ac_cv_func_$ac_func=no" |
| 4033 | fi |
| 4034 | rm -f conftest* |
| 4035 | fi |
| 4036 | |
| 4037 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4038 | echo "$ac_t""yes" 1>&6 |
| 4039 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4040 | cat >> confdefs.h <<EOF |
| 4041 | #define $ac_tr_func 1 |
| 4042 | EOF |
| 4043 | |
| 4044 | else |
| 4045 | echo "$ac_t""no" 1>&6 |
| 4046 | echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4047 | echo "configure:4048: checking for openpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4048 | ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4049 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4050 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4051 | else |
| 4052 | ac_save_LIBS="$LIBS" |
| 4053 | LIBS="-lutil $LIBS" |
| 4054 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4055 | #line 4056 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4056 | #include "confdefs.h" |
| 4057 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4058 | /* We use char because int might match the return type of a gcc2 |
| 4059 | builtin and then its argument prototype would still apply. */ |
| 4060 | char openpty(); |
| 4061 | |
| 4062 | int main() { |
| 4063 | openpty() |
| 4064 | ; return 0; } |
| 4065 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4066 | if { (eval echo configure:4067: \"$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] | 4067 | rm -rf conftest* |
| 4068 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4069 | else |
| 4070 | echo "configure: failed program was:" >&5 |
| 4071 | cat conftest.$ac_ext >&5 |
| 4072 | rm -rf conftest* |
| 4073 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4074 | fi |
| 4075 | rm -f conftest* |
| 4076 | LIBS="$ac_save_LIBS" |
| 4077 | |
| 4078 | fi |
| 4079 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4080 | echo "$ac_t""yes" 1>&6 |
| 4081 | cat >> confdefs.h <<\EOF |
| 4082 | #define HAVE_OPENPTY 1 |
| 4083 | EOF |
| 4084 | LIBS="$LIBS -lutil" |
| 4085 | else |
| 4086 | echo "$ac_t""no" 1>&6 |
| 4087 | fi |
| 4088 | |
| 4089 | fi |
| 4090 | done |
| 4091 | |
| 4092 | for ac_func in forkpty |
| 4093 | do |
| 4094 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4095 | echo "configure:4096: checking for $ac_func" >&5 |
| 4096 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4097 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4098 | else |
| 4099 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4100 | #line 4101 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4101 | #include "confdefs.h" |
| 4102 | /* System header to define __stub macros and hopefully few prototypes, |
| 4103 | which can conflict with char $ac_func(); below. */ |
| 4104 | #include <assert.h> |
| 4105 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4106 | /* We use char because int might match the return type of a gcc2 |
| 4107 | builtin and then its argument prototype would still apply. */ |
| 4108 | char $ac_func(); |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4109 | char (*f)(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4110 | |
| 4111 | int main() { |
| 4112 | |
| 4113 | /* The GNU C library defines this for functions which it implements |
| 4114 | to always fail with ENOSYS. Some functions are actually named |
| 4115 | something starting with __ and the normal name is an alias. */ |
| 4116 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4117 | choke me |
| 4118 | #else |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4119 | f = $ac_func; |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4120 | #endif |
| 4121 | |
| 4122 | ; return 0; } |
| 4123 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4124 | if { (eval echo configure:4125: \"$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] | 4125 | rm -rf conftest* |
| 4126 | eval "ac_cv_func_$ac_func=yes" |
| 4127 | else |
| 4128 | echo "configure: failed program was:" >&5 |
| 4129 | cat conftest.$ac_ext >&5 |
| 4130 | rm -rf conftest* |
| 4131 | eval "ac_cv_func_$ac_func=no" |
| 4132 | fi |
| 4133 | rm -f conftest* |
| 4134 | fi |
| 4135 | |
| 4136 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4137 | echo "$ac_t""yes" 1>&6 |
| 4138 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4139 | cat >> confdefs.h <<EOF |
| 4140 | #define $ac_tr_func 1 |
| 4141 | EOF |
| 4142 | |
| 4143 | else |
| 4144 | echo "$ac_t""no" 1>&6 |
| 4145 | echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4146 | echo "configure:4147: checking for forkpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4147 | ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4148 | if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4149 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4150 | else |
| 4151 | ac_save_LIBS="$LIBS" |
| 4152 | LIBS="-lutil $LIBS" |
| 4153 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4154 | #line 4155 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4155 | #include "confdefs.h" |
| 4156 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4157 | /* We use char because int might match the return type of a gcc2 |
| 4158 | builtin and then its argument prototype would still apply. */ |
| 4159 | char forkpty(); |
| 4160 | |
| 4161 | int main() { |
| 4162 | forkpty() |
| 4163 | ; return 0; } |
| 4164 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4165 | if { (eval echo configure:4166: \"$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] | 4166 | rm -rf conftest* |
| 4167 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4168 | else |
| 4169 | echo "configure: failed program was:" >&5 |
| 4170 | cat conftest.$ac_ext >&5 |
| 4171 | rm -rf conftest* |
| 4172 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4173 | fi |
| 4174 | rm -f conftest* |
| 4175 | LIBS="$ac_save_LIBS" |
| 4176 | |
| 4177 | fi |
| 4178 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4179 | echo "$ac_t""yes" 1>&6 |
| 4180 | cat >> confdefs.h <<\EOF |
| 4181 | #define HAVE_FORKPTY 1 |
| 4182 | EOF |
| 4183 | LIBS="$LIBS -lutil" |
| 4184 | else |
| 4185 | echo "$ac_t""no" 1>&6 |
| 4186 | fi |
| 4187 | |
| 4188 | fi |
| 4189 | done |
| 4190 | |
| 4191 | |
| 4192 | # check for long file support functions |
| 4193 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
| 4194 | do |
| 4195 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4196 | echo "configure:4197: checking for $ac_func" >&5 |
| 4197 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4198 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4199 | else |
| 4200 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4201 | #line 4202 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4202 | #include "confdefs.h" |
| 4203 | /* System header to define __stub macros and hopefully few prototypes, |
| 4204 | which can conflict with char $ac_func(); below. */ |
| 4205 | #include <assert.h> |
| 4206 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4207 | /* We use char because int might match the return type of a gcc2 |
| 4208 | builtin and then its argument prototype would still apply. */ |
| 4209 | char $ac_func(); |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4210 | char (*f)(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4211 | |
| 4212 | int main() { |
| 4213 | |
| 4214 | /* The GNU C library defines this for functions which it implements |
| 4215 | to always fail with ENOSYS. Some functions are actually named |
| 4216 | something starting with __ and the normal name is an alias. */ |
| 4217 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4218 | choke me |
| 4219 | #else |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4220 | f = $ac_func; |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4221 | #endif |
| 4222 | |
| 4223 | ; return 0; } |
| 4224 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4225 | if { (eval echo configure:4226: \"$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] | 4226 | rm -rf conftest* |
| 4227 | eval "ac_cv_func_$ac_func=yes" |
| 4228 | else |
| 4229 | echo "configure: failed program was:" >&5 |
| 4230 | cat conftest.$ac_ext >&5 |
| 4231 | rm -rf conftest* |
| 4232 | eval "ac_cv_func_$ac_func=no" |
| 4233 | fi |
| 4234 | rm -f conftest* |
| 4235 | fi |
| 4236 | |
| 4237 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4238 | echo "$ac_t""yes" 1>&6 |
| 4239 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4240 | cat >> confdefs.h <<EOF |
| 4241 | #define $ac_tr_func 1 |
| 4242 | EOF |
| 4243 | |
| 4244 | else |
| 4245 | echo "$ac_t""no" 1>&6 |
| 4246 | fi |
| 4247 | done |
| 4248 | |
| 4249 | |
| 4250 | for ac_func in dup2 getcwd strdup strerror memmove |
| 4251 | do |
| 4252 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4253 | echo "configure:4254: checking for $ac_func" >&5 |
| 4254 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4255 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4256 | else |
| 4257 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4258 | #line 4259 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4259 | #include "confdefs.h" |
| 4260 | /* System header to define __stub macros and hopefully few prototypes, |
| 4261 | which can conflict with char $ac_func(); below. */ |
| 4262 | #include <assert.h> |
| 4263 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4264 | /* We use char because int might match the return type of a gcc2 |
| 4265 | builtin and then its argument prototype would still apply. */ |
| 4266 | char $ac_func(); |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4267 | char (*f)(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4268 | |
| 4269 | int main() { |
| 4270 | |
| 4271 | /* The GNU C library defines this for functions which it implements |
| 4272 | to always fail with ENOSYS. Some functions are actually named |
| 4273 | something starting with __ and the normal name is an alias. */ |
| 4274 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4275 | choke me |
| 4276 | #else |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4277 | f = $ac_func; |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4278 | #endif |
| 4279 | |
| 4280 | ; return 0; } |
| 4281 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4282 | if { (eval echo configure:4283: \"$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] | 4283 | rm -rf conftest* |
| 4284 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4285 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4286 | echo "configure: failed program was:" >&5 |
| 4287 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4288 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4289 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4290 | fi |
| 4291 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4292 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4293 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4294 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4295 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4296 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4297 | cat >> confdefs.h <<EOF |
| 4298 | #define $ac_tr_func 1 |
| 4299 | EOF |
| 4300 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4301 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4302 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 4303 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4304 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4305 | done |
| 4306 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4307 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4308 | for ac_func in getpgrp |
| 4309 | do |
| 4310 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4311 | echo "configure:4312: checking for $ac_func" >&5 |
| 4312 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4313 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4314 | else |
| 4315 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4316 | #line 4317 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4317 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4318 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4319 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4320 | #include <assert.h> |
| 4321 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4322 | /* We use char because int might match the return type of a gcc2 |
| 4323 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4324 | char $ac_func(); |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4325 | char (*f)(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4326 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4327 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4328 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4329 | /* The GNU C library defines this for functions which it implements |
| 4330 | to always fail with ENOSYS. Some functions are actually named |
| 4331 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4332 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4333 | choke me |
| 4334 | #else |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4335 | f = $ac_func; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4336 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4337 | |
| 4338 | ; return 0; } |
| 4339 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4340 | if { (eval echo configure:4341: \"$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] | 4341 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4342 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4343 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4344 | echo "configure: failed program was:" >&5 |
| 4345 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4346 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4347 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4348 | fi |
| 4349 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4350 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4351 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4352 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4353 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4354 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4355 | cat >> confdefs.h <<EOF |
| 4356 | #define $ac_tr_func 1 |
| 4357 | EOF |
| 4358 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4359 | #line 4360 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4360 | #include "confdefs.h" |
| 4361 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4362 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4363 | getpgrp(0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4364 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4365 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4366 | if { (eval echo configure:4367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4367 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4368 | cat >> confdefs.h <<\EOF |
| 4369 | #define GETPGRP_HAVE_ARG 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4370 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4371 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4372 | else |
| 4373 | echo "configure: failed program was:" >&5 |
| 4374 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4375 | fi |
| 4376 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4377 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4378 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4379 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4380 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4381 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4382 | for ac_func in setpgrp |
| 4383 | do |
| 4384 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4385 | echo "configure:4386: checking for $ac_func" >&5 |
| 4386 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4387 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4388 | else |
| 4389 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4390 | #line 4391 "configure" |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4391 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4392 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4393 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4394 | #include <assert.h> |
| 4395 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4396 | /* We use char because int might match the return type of a gcc2 |
| 4397 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4398 | char $ac_func(); |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4399 | char (*f)(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4400 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4401 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4402 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4403 | /* The GNU C library defines this for functions which it implements |
| 4404 | to always fail with ENOSYS. Some functions are actually named |
| 4405 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4406 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4407 | choke me |
| 4408 | #else |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4409 | f = $ac_func; |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4410 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4411 | |
| 4412 | ; return 0; } |
| 4413 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4414 | if { (eval echo configure:4415: \"$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] | 4415 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4416 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4417 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4418 | echo "configure: failed program was:" >&5 |
| 4419 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4420 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4421 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4422 | fi |
| 4423 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4424 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4425 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4426 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4427 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4428 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4429 | cat >> confdefs.h <<EOF |
| 4430 | #define $ac_tr_func 1 |
| 4431 | EOF |
| 4432 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4433 | #line 4434 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4434 | #include "confdefs.h" |
| 4435 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4436 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4437 | setpgrp(0,0); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4438 | ; return 0; } |
| 4439 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4440 | if { (eval echo configure:4441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4441 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4442 | cat >> confdefs.h <<\EOF |
| 4443 | #define SETPGRP_HAVE_ARG 1 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4444 | EOF |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4445 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4446 | else |
| 4447 | echo "configure: failed program was:" >&5 |
| 4448 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4449 | fi |
| 4450 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4451 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4452 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4453 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4454 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 4455 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4456 | for ac_func in gettimeofday |
| 4457 | do |
| 4458 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4459 | echo "configure:4460: checking for $ac_func" >&5 |
| 4460 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4461 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4462 | else |
| 4463 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4464 | #line 4465 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4465 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4466 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4467 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4468 | #include <assert.h> |
| 4469 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4470 | /* We use char because int might match the return type of a gcc2 |
| 4471 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4472 | char $ac_func(); |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4473 | char (*f)(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4474 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4475 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4476 | |
| 4477 | /* The GNU C library defines this for functions which it implements |
| 4478 | to always fail with ENOSYS. Some functions are actually named |
| 4479 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4480 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4481 | choke me |
| 4482 | #else |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4483 | f = $ac_func; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4484 | #endif |
| 4485 | |
| 4486 | ; return 0; } |
| 4487 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4488 | if { (eval echo configure:4489: \"$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] | 4489 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4490 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4491 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4492 | echo "configure: failed program was:" >&5 |
| 4493 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4494 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4495 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4496 | fi |
| 4497 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4498 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4499 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4500 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4501 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4502 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4503 | cat >> confdefs.h <<EOF |
| 4504 | #define $ac_tr_func 1 |
| 4505 | EOF |
| 4506 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4507 | #line 4508 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4508 | #include "confdefs.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4509 | #include <sys/time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4510 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4511 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
| 4512 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4513 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4514 | if { (eval echo configure:4515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4515 | : |
| 4516 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4517 | echo "configure: failed program was:" >&5 |
| 4518 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4519 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4520 | cat >> confdefs.h <<\EOF |
| 4521 | #define GETTIMEOFDAY_NO_TZ 1 |
| 4522 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4523 | |
| 4524 | fi |
| 4525 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4526 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4527 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4528 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4529 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4530 | |
| 4531 | |
| 4532 | # checks for structures |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4533 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4534 | echo "configure:4535: checking whether time.h and sys/time.h may both be included" >&5 |
| 4535 | if eval "test \"\${ac_cv_header_time+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4536 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4537 | else |
| 4538 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4539 | #line 4540 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4540 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4541 | #include <sys/types.h> |
| 4542 | #include <sys/time.h> |
| 4543 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4544 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4545 | struct tm *tp; |
| 4546 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4547 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4548 | if { (eval echo configure:4549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4549 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4550 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4551 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4552 | echo "configure: failed program was:" >&5 |
| 4553 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4554 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4555 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4556 | fi |
| 4557 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4558 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4559 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4560 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4561 | if test $ac_cv_header_time = yes; then |
| 4562 | cat >> confdefs.h <<\EOF |
| 4563 | #define TIME_WITH_SYS_TIME 1 |
| 4564 | EOF |
| 4565 | |
| 4566 | fi |
| 4567 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4568 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4569 | echo "configure:4570: checking whether struct tm is in sys/time.h or time.h" >&5 |
| 4570 | if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4571 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4572 | else |
| 4573 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4574 | #line 4575 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4575 | #include "confdefs.h" |
| 4576 | #include <sys/types.h> |
| 4577 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4578 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4579 | struct tm *tp; tp->tm_sec; |
| 4580 | ; return 0; } |
| 4581 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4582 | if { (eval echo configure:4583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4583 | rm -rf conftest* |
| 4584 | ac_cv_struct_tm=time.h |
| 4585 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4586 | echo "configure: failed program was:" >&5 |
| 4587 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4588 | rm -rf conftest* |
| 4589 | ac_cv_struct_tm=sys/time.h |
| 4590 | fi |
| 4591 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4592 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4593 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4594 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4595 | if test $ac_cv_struct_tm = sys/time.h; then |
| 4596 | cat >> confdefs.h <<\EOF |
| 4597 | #define TM_IN_SYS_TIME 1 |
| 4598 | EOF |
| 4599 | |
| 4600 | fi |
| 4601 | |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4602 | echo $ac_n "checking for member tm_zone in aggregate type struct tm""... $ac_c" 1>&6 |
| 4603 | echo "configure:4604: checking for member tm_zone in aggregate type struct tm" >&5 |
| 4604 | 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] | 4605 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4606 | else |
| 4607 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4608 | #line 4609 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4609 | #include "confdefs.h" |
| 4610 | #include <sys/types.h> |
| 4611 | #include <$ac_cv_struct_tm> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4612 | int main() { |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4613 | struct tm foo; foo.tm_zone; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4614 | ; return 0; } |
| 4615 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4616 | if { (eval echo configure:4617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4617 | rm -rf conftest* |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4618 | ac_cv_c_struct_member_tm_zone=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4619 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4620 | echo "configure: failed program was:" >&5 |
| 4621 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4622 | rm -rf conftest* |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4623 | ac_cv_c_struct_member_tm_zone=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4624 | fi |
| 4625 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4626 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4627 | |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4628 | echo "$ac_t""$ac_cv_c_struct_member_tm_zone" 1>&6 |
| 4629 | tm_zone="$ac_cv_c_struct_member_tm_zone" |
| 4630 | if test "$ac_cv_c_struct_member_tm_zone" = yes; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4631 | cat >> confdefs.h <<\EOF |
| 4632 | #define HAVE_TM_ZONE 1 |
| 4633 | EOF |
| 4634 | |
| 4635 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4636 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4637 | echo "configure:4638: checking for tzname" >&5 |
| 4638 | if eval "test \"\${ac_cv_var_tzname+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4639 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4640 | else |
| 4641 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4642 | #line 4643 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4643 | #include "confdefs.h" |
| 4644 | #include <time.h> |
| 4645 | #ifndef tzname /* For SGI. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4646 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4647 | #endif |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4648 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4649 | atoi(*tzname); |
| 4650 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4651 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4652 | if { (eval echo configure:4653: \"$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] | 4653 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4654 | ac_cv_var_tzname=yes |
| 4655 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4656 | echo "configure: failed program was:" >&5 |
| 4657 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4658 | rm -rf conftest* |
| 4659 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4660 | fi |
| 4661 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4662 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4663 | |
| 4664 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4665 | if test $ac_cv_var_tzname = yes; then |
| 4666 | cat >> confdefs.h <<\EOF |
| 4667 | #define HAVE_TZNAME 1 |
| 4668 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4669 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4670 | fi |
| 4671 | fi |
| 4672 | |
| 4673 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4674 | echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4675 | echo "configure:4676: checking for time.h that defines altzone" >&5 |
| 4676 | if eval "test \"\${ac_cv_header_time_altzone+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4677 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4678 | else |
| 4679 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4680 | #line 4681 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4681 | #include "confdefs.h" |
| 4682 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4683 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4684 | return altzone; |
| 4685 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4686 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4687 | if { (eval echo configure:4688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4688 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4689 | ac_cv_header_time_altzone=yes |
| 4690 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4691 | echo "configure: failed program was:" >&5 |
| 4692 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4693 | rm -rf conftest* |
| 4694 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4695 | fi |
| 4696 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4697 | fi |
| 4698 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4699 | echo "$ac_t""$ac_cv_header_time_altzone" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4700 | if test $ac_cv_header_time_altzone = yes; then |
| 4701 | cat >> confdefs.h <<\EOF |
| 4702 | #define HAVE_ALTZONE 1 |
| 4703 | EOF |
| 4704 | |
| 4705 | fi |
| 4706 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4707 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4708 | echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4709 | echo "configure:4710: 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] | 4710 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4711 | #line 4712 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4712 | #include "confdefs.h" |
| 4713 | |
| 4714 | #include <sys/types.h> |
| 4715 | #include <sys/select.h> |
| 4716 | #include <sys/time.h> |
| 4717 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4718 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4719 | ; |
| 4720 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4721 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4722 | if { (eval echo configure:4723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4723 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4724 | cat >> confdefs.h <<\EOF |
| 4725 | #define SYS_SELECT_WITH_SYS_TIME 1 |
| 4726 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4727 | was_it_defined=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4728 | else |
| 4729 | echo "configure: failed program was:" >&5 |
| 4730 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4731 | fi |
| 4732 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4733 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4734 | |
| 4735 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4736 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4737 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4738 | echo "configure:4739: checking whether char is unsigned" >&5 |
| 4739 | if eval "test \"\${ac_cv_c_char_unsigned+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4740 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4741 | else |
| 4742 | if test "$GCC" = yes; then |
| 4743 | # GCC predefines this symbol on systems where it applies. |
| 4744 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4745 | #line 4746 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4746 | #include "confdefs.h" |
| 4747 | #ifdef __CHAR_UNSIGNED__ |
| 4748 | yes |
| 4749 | #endif |
| 4750 | |
| 4751 | EOF |
| 4752 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4753 | egrep "yes" >/dev/null 2>&1; then |
| 4754 | rm -rf conftest* |
| 4755 | ac_cv_c_char_unsigned=yes |
| 4756 | else |
| 4757 | rm -rf conftest* |
| 4758 | ac_cv_c_char_unsigned=no |
| 4759 | fi |
| 4760 | rm -f conftest* |
| 4761 | |
| 4762 | else |
| 4763 | if test "$cross_compiling" = yes; then |
| 4764 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 4765 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4766 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4767 | #line 4768 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4768 | #include "confdefs.h" |
| 4769 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4770 | #if !defined(__STDC__) || __STDC__ != 1 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4771 | #define volatile |
| 4772 | #endif |
| 4773 | main() { |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4774 | volatile char c = 255; exit(c < 0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4775 | } |
| 4776 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4777 | if { (eval echo configure:4778: \"$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] | 4778 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4779 | ac_cv_c_char_unsigned=yes |
| 4780 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4781 | echo "configure: failed program was:" >&5 |
| 4782 | cat conftest.$ac_ext >&5 |
| 4783 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4784 | ac_cv_c_char_unsigned=no |
| 4785 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4786 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4787 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4788 | |
| 4789 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4790 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4791 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4792 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4793 | if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then |
| 4794 | cat >> confdefs.h <<\EOF |
| 4795 | #define __CHAR_UNSIGNED__ 1 |
| 4796 | EOF |
| 4797 | |
| 4798 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4799 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4800 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4801 | echo "configure:4802: checking for working const" >&5 |
| 4802 | if eval "test \"\${ac_cv_c_const+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4803 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4804 | else |
| 4805 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4806 | #line 4807 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4807 | #include "confdefs.h" |
| 4808 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4809 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4810 | |
| 4811 | /* Ultrix mips cc rejects this. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4812 | typedef int charset[2]; const charset x; |
| 4813 | /* SunOS 4.1.1 cc rejects this. */ |
| 4814 | char const *const *ccp; |
| 4815 | char **p; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4816 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 4817 | struct point {int x, y;}; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4818 | static struct point const zero = {0,0}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4819 | /* AIX XL C 1.02.0.0 rejects this. |
| 4820 | It does not let you subtract one const X* pointer from another in an arm |
| 4821 | of an if-expression whose if-part is not a constant expression */ |
| 4822 | const char *g = "string"; |
| 4823 | ccp = &g + (g ? g-g : 0); |
| 4824 | /* HPUX 7.0 cc rejects these. */ |
| 4825 | ++ccp; |
| 4826 | p = (char**) ccp; |
| 4827 | ccp = (char const *const *) p; |
| 4828 | { /* SCO 3.2v4 cc rejects this. */ |
| 4829 | char *t; |
| 4830 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
| 4831 | |
| 4832 | *t++ = 0; |
| 4833 | } |
| 4834 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4835 | int x[] = {25, 17}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4836 | const int *foo = &x[0]; |
| 4837 | ++foo; |
| 4838 | } |
| 4839 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 4840 | typedef const int *iptr; |
| 4841 | iptr p = 0; |
| 4842 | ++p; |
| 4843 | } |
| 4844 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 4845 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 4846 | struct s { int j; const int *ap[3]; }; |
| 4847 | struct s *b; b->j = 5; |
| 4848 | } |
| 4849 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 4850 | const int foo = 10; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4851 | } |
| 4852 | |
| 4853 | ; return 0; } |
| 4854 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4855 | if { (eval echo configure:4856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4856 | rm -rf conftest* |
| 4857 | ac_cv_c_const=yes |
| 4858 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4859 | echo "configure: failed program was:" >&5 |
| 4860 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4861 | rm -rf conftest* |
| 4862 | ac_cv_c_const=no |
| 4863 | fi |
| 4864 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4865 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4866 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4867 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4868 | if test $ac_cv_c_const = no; then |
| 4869 | cat >> confdefs.h <<\EOF |
| 4870 | #define const |
| 4871 | EOF |
| 4872 | |
| 4873 | fi |
| 4874 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 4875 | echo $ac_n "checking for inline""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4876 | echo "configure:4877: checking for inline" >&5 |
| 4877 | if eval "test \"\${ac_cv_c_inline+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 4878 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4879 | else |
| 4880 | ac_cv_c_inline=no |
| 4881 | for ac_kw in inline __inline__ __inline; do |
| 4882 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4883 | #line 4884 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 4884 | #include "confdefs.h" |
| 4885 | |
| 4886 | int main() { |
| 4887 | } $ac_kw foo() { |
| 4888 | ; return 0; } |
| 4889 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4890 | if { (eval echo configure:4891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 4891 | rm -rf conftest* |
| 4892 | ac_cv_c_inline=$ac_kw; break |
| 4893 | else |
| 4894 | echo "configure: failed program was:" >&5 |
| 4895 | cat conftest.$ac_ext >&5 |
| 4896 | fi |
| 4897 | rm -f conftest* |
| 4898 | done |
| 4899 | |
| 4900 | fi |
| 4901 | |
| 4902 | echo "$ac_t""$ac_cv_c_inline" 1>&6 |
| 4903 | case "$ac_cv_c_inline" in |
| 4904 | inline | yes) ;; |
| 4905 | no) cat >> confdefs.h <<\EOF |
| 4906 | #define inline |
| 4907 | EOF |
| 4908 | ;; |
| 4909 | *) cat >> confdefs.h <<EOF |
| 4910 | #define inline $ac_cv_c_inline |
| 4911 | EOF |
| 4912 | ;; |
| 4913 | esac |
| 4914 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4915 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4916 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4917 | echo $ac_n "checking for working volatile""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4918 | echo "configure:4919: checking for working volatile" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4919 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4920 | #line 4921 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4921 | #include "confdefs.h" |
| 4922 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4923 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4924 | volatile int x; x = 0; |
| 4925 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4926 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4927 | if { (eval echo configure:4928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4928 | rm -rf conftest* |
| 4929 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4930 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4931 | echo "configure: failed program was:" >&5 |
| 4932 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4933 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4934 | cat >> confdefs.h <<\EOF |
| 4935 | #define volatile |
| 4936 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4937 | |
| 4938 | fi |
| 4939 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4940 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4941 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4942 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4943 | echo $ac_n "checking for working signed char""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4944 | echo "configure:4945: checking for working signed char" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4945 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4946 | #line 4947 "configure" |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 4947 | #include "confdefs.h" |
| 4948 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4949 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4950 | signed char c; |
| 4951 | ; return 0; } |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 4952 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4953 | if { (eval echo configure:4954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4954 | rm -rf conftest* |
| 4955 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 4956 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4957 | echo "configure: failed program was:" >&5 |
| 4958 | cat conftest.$ac_ext >&5 |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 4959 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4960 | cat >> confdefs.h <<\EOF |
| 4961 | #define signed |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4962 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4963 | |
| 4964 | fi |
| 4965 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4966 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4967 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4968 | have_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4969 | echo $ac_n "checking for prototypes""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4970 | echo "configure:4971: checking for prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4971 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4972 | #line 4973 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4973 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4974 | int foo(int x) { return 0; } |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4975 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4976 | return foo(10); |
| 4977 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4978 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4979 | if { (eval echo configure:4980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4980 | rm -rf conftest* |
| 4981 | cat >> confdefs.h <<\EOF |
| 4982 | #define HAVE_PROTOTYPES 1 |
| 4983 | EOF |
| 4984 | have_prototypes=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4985 | else |
| 4986 | echo "configure: failed program was:" >&5 |
| 4987 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4988 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4989 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4990 | echo "$ac_t""$have_prototypes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4991 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4992 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4993 | echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4994 | echo "configure:4995: checking for variable length prototypes and stdarg.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4995 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 4996 | #line 4997 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4997 | #include "confdefs.h" |
| 4998 | |
| 4999 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 5000 | int foo(int x, ...) { |
| 5001 | va_list va; |
| 5002 | va_start(va, x); |
| 5003 | va_arg(va, int); |
| 5004 | va_arg(va, char *); |
| 5005 | va_arg(va, double); |
| 5006 | return 0; |
| 5007 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5008 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5009 | int main() { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 5010 | return foo(10, "", 3.14); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5011 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5012 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5013 | if { (eval echo configure:5014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5014 | rm -rf conftest* |
| 5015 | cat >> confdefs.h <<\EOF |
| 5016 | #define HAVE_STDARG_PROTOTYPES 1 |
| 5017 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5018 | works=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5019 | else |
| 5020 | echo "configure: failed program was:" >&5 |
| 5021 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5022 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5023 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5024 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5025 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5026 | if test "$have_prototypes" = yes; then |
| 5027 | bad_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5028 | echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5029 | echo "configure:5030: checking for bad exec* prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5030 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5031 | #line 5032 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5032 | #include "confdefs.h" |
| 5033 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5034 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5035 | char **t;execve("@",t,t); |
| 5036 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5037 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5038 | if { (eval echo configure:5039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5039 | : |
| 5040 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5041 | echo "configure: failed program was:" >&5 |
| 5042 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5043 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5044 | cat >> confdefs.h <<\EOF |
| 5045 | #define BAD_EXEC_PROTOTYPES 1 |
| 5046 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5047 | bad_prototypes=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5048 | fi |
| 5049 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5050 | echo "$ac_t""$bad_prototypes" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5051 | fi |
| 5052 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5053 | bad_forward=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5054 | echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5055 | echo "configure:5056: checking for bad static forward" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5056 | if test "$cross_compiling" = yes; then |
| 5057 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5058 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5059 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5060 | #line 5061 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5061 | #include "confdefs.h" |
| 5062 | |
| 5063 | struct s { int a; int b; }; |
| 5064 | static struct s foo; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5065 | int foobar() { |
| 5066 | static int random; |
| 5067 | random = (int) &foo; |
| 5068 | return random; |
| 5069 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5070 | static struct s foo = { 1, 2 }; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5071 | main() { |
| 5072 | exit(!((int)&foo == foobar())); |
| 5073 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5074 | |
| 5075 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5076 | if { (eval echo configure:5077: \"$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] | 5077 | then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5078 | : |
| 5079 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5080 | echo "configure: failed program was:" >&5 |
| 5081 | cat conftest.$ac_ext >&5 |
| 5082 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5083 | cat >> confdefs.h <<\EOF |
| 5084 | #define BAD_STATIC_FORWARD 1 |
| 5085 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5086 | bad_forward=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5087 | fi |
| 5088 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5089 | fi |
| 5090 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5091 | echo "$ac_t""$bad_forward" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5092 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5093 | va_list_is_array=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5094 | echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5095 | echo "configure:5096: checking whether va_list is an array" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5096 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5097 | #line 5098 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5098 | #include "confdefs.h" |
| 5099 | |
| 5100 | #ifdef HAVE_STDARG_PROTOTYPES |
| 5101 | #include <stdarg.h> |
| 5102 | #else |
| 5103 | #include <varargs.h> |
| 5104 | #endif |
| 5105 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5106 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5107 | va_list list1, list2; list1 = list2; |
| 5108 | ; return 0; } |
| 5109 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5110 | if { (eval echo configure:5111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5111 | : |
| 5112 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5113 | echo "configure: failed program was:" >&5 |
| 5114 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5115 | rm -rf conftest* |
| 5116 | cat >> confdefs.h <<\EOF |
| 5117 | #define VA_LIST_IS_ARRAY 1 |
| 5118 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5119 | va_list_is_array=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5120 | fi |
| 5121 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5122 | echo "$ac_t""$va_list_is_array" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5123 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5124 | # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( |
| 5125 | echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5126 | echo "configure:5127: checking for gethostbyname_r" >&5 |
| 5127 | if eval "test \"\${ac_cv_func_gethostbyname_r+set}\" = set"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5128 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5129 | else |
| 5130 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5131 | #line 5132 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5132 | #include "confdefs.h" |
| 5133 | /* System header to define __stub macros and hopefully few prototypes, |
| 5134 | which can conflict with char gethostbyname_r(); below. */ |
| 5135 | #include <assert.h> |
| 5136 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5137 | /* We use char because int might match the return type of a gcc2 |
| 5138 | builtin and then its argument prototype would still apply. */ |
| 5139 | char gethostbyname_r(); |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5140 | char (*f)(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5141 | |
| 5142 | int main() { |
| 5143 | |
| 5144 | /* The GNU C library defines this for functions which it implements |
| 5145 | to always fail with ENOSYS. Some functions are actually named |
| 5146 | something starting with __ and the normal name is an alias. */ |
| 5147 | #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) |
| 5148 | choke me |
| 5149 | #else |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5150 | f = gethostbyname_r; |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5151 | #endif |
| 5152 | |
| 5153 | ; return 0; } |
| 5154 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5155 | if { (eval echo configure:5156: \"$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] | 5156 | rm -rf conftest* |
| 5157 | eval "ac_cv_func_gethostbyname_r=yes" |
| 5158 | else |
| 5159 | echo "configure: failed program was:" >&5 |
| 5160 | cat conftest.$ac_ext >&5 |
| 5161 | rm -rf conftest* |
| 5162 | eval "ac_cv_func_gethostbyname_r=no" |
| 5163 | fi |
| 5164 | rm -f conftest* |
| 5165 | fi |
| 5166 | |
| 5167 | if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then |
| 5168 | echo "$ac_t""yes" 1>&6 |
| 5169 | |
| 5170 | cat >> confdefs.h <<\EOF |
| 5171 | #define HAVE_GETHOSTBYNAME_R 1 |
| 5172 | EOF |
| 5173 | |
| 5174 | echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5175 | echo "configure:5176: checking gethostbyname_r with 6 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5176 | OLD_CFLAGS=$CFLAGS |
| 5177 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
| 5178 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5179 | #line 5180 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5180 | #include "confdefs.h" |
| 5181 | |
| 5182 | # include <netdb.h> |
| 5183 | |
| 5184 | int main() { |
| 5185 | |
| 5186 | char *name; |
| 5187 | struct hostent *he, *res; |
| 5188 | char buffer[2048]; |
| 5189 | int buflen = 2048; |
| 5190 | int h_errnop; |
| 5191 | |
| 5192 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
| 5193 | |
| 5194 | ; return 0; } |
| 5195 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5196 | if { (eval echo configure:5197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5197 | rm -rf conftest* |
| 5198 | |
| 5199 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 5200 | #define HAVE_GETHOSTBYNAME_R 1 |
| 5201 | EOF |
| 5202 | |
| 5203 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5204 | #define HAVE_GETHOSTBYNAME_R_6_ARG 1 |
| 5205 | EOF |
| 5206 | |
| 5207 | echo "$ac_t""yes" 1>&6 |
| 5208 | |
| 5209 | else |
| 5210 | echo "configure: failed program was:" >&5 |
| 5211 | cat conftest.$ac_ext >&5 |
| 5212 | rm -rf conftest* |
| 5213 | |
| 5214 | echo "$ac_t""no" 1>&6 |
| 5215 | echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5216 | echo "configure:5217: checking gethostbyname_r with 5 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5217 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5218 | #line 5219 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5219 | #include "confdefs.h" |
| 5220 | |
| 5221 | # include <netdb.h> |
| 5222 | |
| 5223 | int main() { |
| 5224 | |
| 5225 | char *name; |
| 5226 | struct hostent *he; |
| 5227 | char buffer[2048]; |
| 5228 | int buflen = 2048; |
| 5229 | int h_errnop; |
| 5230 | |
| 5231 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
| 5232 | |
| 5233 | ; return 0; } |
| 5234 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5235 | if { (eval echo configure:5236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5236 | rm -rf conftest* |
| 5237 | |
| 5238 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 5239 | #define HAVE_GETHOSTBYNAME_R 1 |
| 5240 | EOF |
| 5241 | |
| 5242 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5243 | #define HAVE_GETHOSTBYNAME_R_5_ARG 1 |
| 5244 | EOF |
| 5245 | |
| 5246 | echo "$ac_t""yes" 1>&6 |
| 5247 | |
| 5248 | else |
| 5249 | echo "configure: failed program was:" >&5 |
| 5250 | cat conftest.$ac_ext >&5 |
| 5251 | rm -rf conftest* |
| 5252 | |
| 5253 | echo "$ac_t""no" 1>&6 |
| 5254 | echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5255 | echo "configure:5256: checking gethostbyname_r with 3 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5256 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5257 | #line 5258 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5258 | #include "confdefs.h" |
| 5259 | |
| 5260 | # include <netdb.h> |
| 5261 | |
| 5262 | int main() { |
| 5263 | |
| 5264 | char *name; |
| 5265 | struct hostent *he; |
| 5266 | struct hostent_data data; |
| 5267 | |
| 5268 | (void) gethostbyname_r(name, he, &data); |
| 5269 | |
| 5270 | ; return 0; } |
| 5271 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5272 | if { (eval echo configure:5273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5273 | rm -rf conftest* |
| 5274 | |
| 5275 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 5276 | #define HAVE_GETHOSTBYNAME_R 1 |
| 5277 | EOF |
| 5278 | |
| 5279 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5280 | #define HAVE_GETHOSTBYNAME_R_3_ARG 1 |
| 5281 | EOF |
| 5282 | |
| 5283 | echo "$ac_t""yes" 1>&6 |
| 5284 | |
| 5285 | else |
| 5286 | echo "configure: failed program was:" >&5 |
| 5287 | cat conftest.$ac_ext >&5 |
| 5288 | rm -rf conftest* |
| 5289 | |
| 5290 | echo "$ac_t""no" 1>&6 |
| 5291 | |
| 5292 | fi |
| 5293 | rm -f conftest* |
| 5294 | |
| 5295 | fi |
| 5296 | rm -f conftest* |
| 5297 | |
| 5298 | fi |
| 5299 | rm -f conftest* |
| 5300 | CFLAGS=$OLD_CFLAGS |
| 5301 | |
| 5302 | else |
| 5303 | echo "$ac_t""no" 1>&6 |
| 5304 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5305 | for ac_func in gethostbyname |
| 5306 | do |
| 5307 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5308 | echo "configure:5309: checking for $ac_func" >&5 |
| 5309 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5310 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5311 | else |
| 5312 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5313 | #line 5314 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5314 | #include "confdefs.h" |
| 5315 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5316 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5317 | #include <assert.h> |
| 5318 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5319 | /* We use char because int might match the return type of a gcc2 |
| 5320 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5321 | char $ac_func(); |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5322 | char (*f)(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5323 | |
| 5324 | int main() { |
| 5325 | |
| 5326 | /* The GNU C library defines this for functions which it implements |
| 5327 | to always fail with ENOSYS. Some functions are actually named |
| 5328 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5329 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5330 | choke me |
| 5331 | #else |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5332 | f = $ac_func; |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5333 | #endif |
| 5334 | |
| 5335 | ; return 0; } |
| 5336 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5337 | if { (eval echo configure:5338: \"$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] | 5338 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5339 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5340 | else |
| 5341 | echo "configure: failed program was:" >&5 |
| 5342 | cat conftest.$ac_ext >&5 |
| 5343 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5344 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5345 | fi |
| 5346 | rm -f conftest* |
| 5347 | fi |
| 5348 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5349 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5350 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5351 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5352 | cat >> confdefs.h <<EOF |
| 5353 | #define $ac_tr_func 1 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5354 | EOF |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5355 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5356 | else |
| 5357 | echo "$ac_t""no" 1>&6 |
| 5358 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5359 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 5360 | |
| 5361 | |
| 5362 | fi |
| 5363 | |
| 5364 | |
| 5365 | |
| 5366 | |
| 5367 | |
| 5368 | |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 5369 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5370 | # checks for system services |
| 5371 | # (none yet) |
| 5372 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5373 | # Linux requires this for correct f.p. operations |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 5374 | echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5375 | echo "configure:5376: checking for __fpu_control" >&5 |
| 5376 | if eval "test \"\${ac_cv_func___fpu_control+set}\" = set"; then |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 5377 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5378 | else |
| 5379 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5380 | #line 5381 "configure" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 5381 | #include "confdefs.h" |
| 5382 | /* System header to define __stub macros and hopefully few prototypes, |
| 5383 | which can conflict with char __fpu_control(); below. */ |
| 5384 | #include <assert.h> |
| 5385 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5386 | /* We use char because int might match the return type of a gcc2 |
| 5387 | builtin and then its argument prototype would still apply. */ |
| 5388 | char __fpu_control(); |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5389 | char (*f)(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 5390 | |
| 5391 | int main() { |
| 5392 | |
| 5393 | /* The GNU C library defines this for functions which it implements |
| 5394 | to always fail with ENOSYS. Some functions are actually named |
| 5395 | something starting with __ and the normal name is an alias. */ |
| 5396 | #if defined (__stub___fpu_control) || defined (__stub_____fpu_control) |
| 5397 | choke me |
| 5398 | #else |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5399 | f = __fpu_control; |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 5400 | #endif |
| 5401 | |
| 5402 | ; return 0; } |
| 5403 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5404 | if { (eval echo configure:5405: \"$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] | 5405 | rm -rf conftest* |
| 5406 | eval "ac_cv_func___fpu_control=yes" |
| 5407 | else |
| 5408 | echo "configure: failed program was:" >&5 |
| 5409 | cat conftest.$ac_ext >&5 |
| 5410 | rm -rf conftest* |
| 5411 | eval "ac_cv_func___fpu_control=no" |
| 5412 | fi |
| 5413 | rm -f conftest* |
| 5414 | fi |
| 5415 | |
| 5416 | if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then |
| 5417 | echo "$ac_t""yes" 1>&6 |
| 5418 | : |
| 5419 | else |
| 5420 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5421 | echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5422 | echo "configure:5423: checking for __fpu_control in -lieee" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5423 | ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5424 | 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] | 5425 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5426 | else |
| 5427 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5428 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5429 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5430 | #line 5431 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5431 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5432 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5433 | /* We use char because int might match the return type of a gcc2 |
| 5434 | builtin and then its argument prototype would still apply. */ |
| 5435 | char __fpu_control(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5436 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5437 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5438 | __fpu_control() |
| 5439 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5440 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5441 | if { (eval echo configure:5442: \"$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] | 5442 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5443 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5444 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5445 | echo "configure: failed program was:" >&5 |
| 5446 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5447 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5448 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5449 | fi |
| 5450 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5451 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5452 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5453 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5454 | 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] | 5455 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5456 | ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 5457 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5458 | cat >> confdefs.h <<EOF |
| 5459 | #define $ac_tr_lib 1 |
| 5460 | EOF |
| 5461 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5462 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5463 | |
| 5464 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5465 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5466 | fi |
| 5467 | |
| 5468 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 5469 | fi |
| 5470 | |
| 5471 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5472 | # Check for --with-fpectl |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5473 | echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5474 | echo "configure:5475: checking for --with-fpectl" >&5 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5475 | # Check whether --with-fpectl or --without-fpectl was given. |
| 5476 | if test "${with_fpectl+set}" = set; then |
| 5477 | withval="$with_fpectl" |
| 5478 | |
| 5479 | if test "$withval" != no |
| 5480 | then cat >> confdefs.h <<\EOF |
| 5481 | #define WANT_SIGFPE_HANDLER 1 |
| 5482 | EOF |
| 5483 | echo "$ac_t""yes" 1>&6 |
| 5484 | else echo "$ac_t""no" 1>&6 |
| 5485 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5486 | else |
| 5487 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5488 | fi |
| 5489 | |
| 5490 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5491 | # check for --with-libm=... |
| 5492 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 5493 | case $ac_sys_system in |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 5494 | Darwin) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 5495 | next) ;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 5496 | BeOS) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 5497 | *) LIBM=-lm |
| 5498 | esac |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5499 | echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5500 | echo "configure:5501: checking for --with-libm=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5501 | # Check whether --with-libm or --without-libm was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5502 | if test "${with_libm+set}" = set; then |
| 5503 | withval="$with_libm" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5504 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5505 | if test "$withval" = no |
| 5506 | then LIBM= |
| 5507 | echo "$ac_t""force LIBM empty" 1>&6 |
| 5508 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5509 | then LIBM=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5510 | echo "$ac_t""set LIBM=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5511 | 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] | 5512 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5513 | else |
| 5514 | echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5515 | fi |
| 5516 | |
| 5517 | |
| 5518 | # check for --with-libc=... |
| 5519 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5520 | echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5521 | echo "configure:5522: checking for --with-libc=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5522 | # Check whether --with-libc or --without-libc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5523 | if test "${with_libc+set}" = set; then |
| 5524 | withval="$with_libc" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5525 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5526 | if test "$withval" = no |
| 5527 | then LIBC= |
| 5528 | echo "$ac_t""force LIBC empty" 1>&6 |
| 5529 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5530 | then LIBC=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5531 | echo "$ac_t""set LIBC=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5532 | 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] | 5533 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 5534 | else |
| 5535 | echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5536 | fi |
| 5537 | |
| 5538 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5539 | # check for hypot() in math library |
| 5540 | LIBS_SAVE=$LIBS |
| 5541 | LIBS="$LIBS $LIBM" |
| 5542 | for ac_func in hypot |
| 5543 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5544 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5545 | echo "configure:5546: checking for $ac_func" >&5 |
| 5546 | if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5547 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5548 | else |
| 5549 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5550 | #line 5551 "configure" |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5551 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5552 | /* System header to define __stub macros and hopefully few prototypes, |
| 5553 | which can conflict with char $ac_func(); below. */ |
| 5554 | #include <assert.h> |
| 5555 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5556 | /* We use char because int might match the return type of a gcc2 |
| 5557 | builtin and then its argument prototype would still apply. */ |
| 5558 | char $ac_func(); |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5559 | char (*f)(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5560 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5561 | int main() { |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5562 | |
| 5563 | /* The GNU C library defines this for functions which it implements |
| 5564 | to always fail with ENOSYS. Some functions are actually named |
| 5565 | something starting with __ and the normal name is an alias. */ |
| 5566 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5567 | choke me |
| 5568 | #else |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5569 | f = $ac_func; |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5570 | #endif |
| 5571 | |
| 5572 | ; return 0; } |
| 5573 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5574 | if { (eval echo configure:5575: \"$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] | 5575 | rm -rf conftest* |
| 5576 | eval "ac_cv_func_$ac_func=yes" |
| 5577 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5578 | echo "configure: failed program was:" >&5 |
| 5579 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5580 | rm -rf conftest* |
| 5581 | eval "ac_cv_func_$ac_func=no" |
| 5582 | fi |
| 5583 | rm -f conftest* |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5584 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5585 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5586 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5587 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5588 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5589 | cat >> confdefs.h <<EOF |
| 5590 | #define $ac_tr_func 1 |
| 5591 | EOF |
| 5592 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5593 | else |
| 5594 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 5595 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5596 | fi |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 5597 | done |
| 5598 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5599 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 5600 | LIBS=$LIBS_SAVE |
| 5601 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5602 | # check for getopt |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5603 | echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5604 | echo "configure:5605: checking for genuine getopt" >&5 |
| 5605 | if eval "test \"\${ac_cv_func_getopt+set}\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5606 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5607 | else |
| 5608 | if test "$cross_compiling" = yes; then |
| 5609 | ac_cv_func_getopt=no |
| 5610 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5611 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5612 | #line 5613 "configure" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5613 | #include "confdefs.h" |
| 5614 | #include <stdio.h> |
| 5615 | extern int optind, opterr, getopt(); |
| 5616 | extern char* optarg; |
| 5617 | int main() { |
| 5618 | char* av[] = { "testprog", "parameter", "-fFlag", NULL }; |
| 5619 | opterr = 0; |
| 5620 | if (getopt(3, av, "f:") == 'f') { exit(1); } |
| 5621 | exit(0); |
| 5622 | } |
| 5623 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5624 | if { (eval echo configure:5625: \"$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] | 5625 | then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5626 | ac_cv_func_getopt=yes |
| 5627 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5628 | echo "configure: failed program was:" >&5 |
| 5629 | cat conftest.$ac_ext >&5 |
| 5630 | rm -fr conftest* |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5631 | ac_cv_func_getopt=no |
| 5632 | fi |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5633 | rm -fr conftest* |
| 5634 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5635 | |
| 5636 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5637 | echo "$ac_t""$ac_cv_func_getopt" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5638 | test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o" |
| 5639 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 5640 | # check whether malloc(0) returns NULL or not |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 5641 | echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5642 | echo "configure:5643: checking what malloc(0) returns" >&5 |
| 5643 | if eval "test \"\${ac_cv_malloc_zero+set}\" = set"; then |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 5644 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5645 | else |
| 5646 | if test "$cross_compiling" = yes; then |
| 5647 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5648 | else |
| 5649 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5650 | #line 5651 "configure" |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 5651 | #include "confdefs.h" |
| 5652 | #include <stdio.h> |
| 5653 | #ifdef HAVE_STDLIB |
| 5654 | #include <stdlib.h> |
| 5655 | #else |
| 5656 | char *malloc(), *realloc(); |
| 5657 | int *free(); |
| 5658 | #endif |
| 5659 | main() { |
| 5660 | char *p; |
| 5661 | p = malloc(0); |
| 5662 | if (p == NULL) exit(1); |
| 5663 | p = realloc(p, 0); |
| 5664 | if (p == NULL) exit(1); |
| 5665 | free(p); |
| 5666 | exit(0); |
| 5667 | } |
| 5668 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5669 | if { (eval echo configure:5670: \"$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] | 5670 | then |
| 5671 | ac_cv_malloc_zero=nonnull |
| 5672 | else |
| 5673 | echo "configure: failed program was:" >&5 |
| 5674 | cat conftest.$ac_ext >&5 |
| 5675 | rm -fr conftest* |
| 5676 | ac_cv_malloc_zero=null |
| 5677 | fi |
| 5678 | rm -fr conftest* |
| 5679 | fi |
| 5680 | |
| 5681 | fi |
| 5682 | |
| 5683 | echo "$ac_t""$ac_cv_malloc_zero" 1>&6 |
| 5684 | if test "$ac_cv_malloc_zero" = null |
| 5685 | then |
| 5686 | cat >> confdefs.h <<\EOF |
| 5687 | #define MALLOC_ZERO_RETURNS_NULL 1 |
| 5688 | EOF |
| 5689 | |
| 5690 | fi |
| 5691 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5692 | # check for wchar.h |
| 5693 | ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` |
| 5694 | echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5695 | echo "configure:5696: checking for wchar.h" >&5 |
| 5696 | if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5697 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5698 | else |
| 5699 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5700 | #line 5701 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5701 | #include "confdefs.h" |
| 5702 | #include <wchar.h> |
| 5703 | EOF |
| 5704 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5705 | { (eval echo configure:5706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5706 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 5707 | if test -z "$ac_err"; then |
| 5708 | rm -rf conftest* |
| 5709 | eval "ac_cv_header_$ac_safe=yes" |
| 5710 | else |
| 5711 | echo "$ac_err" >&5 |
| 5712 | echo "configure: failed program was:" >&5 |
| 5713 | cat conftest.$ac_ext >&5 |
| 5714 | rm -rf conftest* |
| 5715 | eval "ac_cv_header_$ac_safe=no" |
| 5716 | fi |
| 5717 | rm -f conftest* |
| 5718 | fi |
| 5719 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 5720 | echo "$ac_t""yes" 1>&6 |
| 5721 | cat >> confdefs.h <<\EOF |
| 5722 | #define HAVE_WCHAR_H 1 |
| 5723 | EOF |
| 5724 | wchar_h="yes" |
| 5725 | else |
| 5726 | echo "$ac_t""no" 1>&6 |
| 5727 | wchar_h="no" |
| 5728 | |
| 5729 | fi |
| 5730 | |
| 5731 | |
| 5732 | # check for usable wchar_t |
| 5733 | usable_wchar_t="unkown" |
| 5734 | echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5735 | echo "configure:5736: checking for usable wchar_t" >&5 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5736 | if test "$cross_compiling" = yes; then |
| 5737 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5738 | else |
| 5739 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5740 | #line 5741 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5741 | #include "confdefs.h" |
| 5742 | |
| 5743 | #include "wchar.h" |
| 5744 | #include "wctype.h" |
| 5745 | main() { |
| 5746 | wchar_t s; |
| 5747 | if (sizeof(s) == 2) |
| 5748 | exit(0); |
| 5749 | else |
| 5750 | exit(1); |
| 5751 | } |
| 5752 | |
| 5753 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5754 | if { (eval echo configure:5755: \"$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] | 5755 | then |
| 5756 | cat >> confdefs.h <<\EOF |
| 5757 | #define HAVE_USABLE_WCHAR_T 1 |
| 5758 | EOF |
| 5759 | usable_wchar_t="yes" |
| 5760 | else |
| 5761 | echo "configure: failed program was:" >&5 |
| 5762 | cat conftest.$ac_ext >&5 |
| 5763 | rm -fr conftest* |
| 5764 | usable_wchar_t="no" |
| 5765 | fi |
| 5766 | rm -fr conftest* |
| 5767 | fi |
| 5768 | |
| 5769 | echo "$ac_t""$usable_wchar_t" 1>&6 |
| 5770 | |
| 5771 | # check for endianness |
| 5772 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5773 | echo "configure:5774: checking whether byte ordering is bigendian" >&5 |
| 5774 | if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5775 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5776 | else |
| 5777 | ac_cv_c_bigendian=unknown |
| 5778 | # See if sys/param.h defines the BYTE_ORDER macro. |
| 5779 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5780 | #line 5781 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5781 | #include "confdefs.h" |
| 5782 | #include <sys/types.h> |
| 5783 | #include <sys/param.h> |
| 5784 | int main() { |
| 5785 | |
| 5786 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 5787 | bogus endian macros |
| 5788 | #endif |
| 5789 | ; return 0; } |
| 5790 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5791 | if { (eval echo configure:5792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5792 | rm -rf conftest* |
| 5793 | # It does; now see whether it defined to BIG_ENDIAN or not. |
| 5794 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5795 | #line 5796 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5796 | #include "confdefs.h" |
| 5797 | #include <sys/types.h> |
| 5798 | #include <sys/param.h> |
| 5799 | int main() { |
| 5800 | |
| 5801 | #if BYTE_ORDER != BIG_ENDIAN |
| 5802 | not big endian |
| 5803 | #endif |
| 5804 | ; return 0; } |
| 5805 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5806 | if { (eval echo configure:5807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5807 | rm -rf conftest* |
| 5808 | ac_cv_c_bigendian=yes |
| 5809 | else |
| 5810 | echo "configure: failed program was:" >&5 |
| 5811 | cat conftest.$ac_ext >&5 |
| 5812 | rm -rf conftest* |
| 5813 | ac_cv_c_bigendian=no |
| 5814 | fi |
| 5815 | rm -f conftest* |
| 5816 | else |
| 5817 | echo "configure: failed program was:" >&5 |
| 5818 | cat conftest.$ac_ext >&5 |
| 5819 | fi |
| 5820 | rm -f conftest* |
| 5821 | if test $ac_cv_c_bigendian = unknown; then |
| 5822 | if test "$cross_compiling" = yes; then |
| 5823 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5824 | else |
| 5825 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5826 | #line 5827 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 5827 | #include "confdefs.h" |
| 5828 | main () { |
| 5829 | /* Are we little or big endian? From Harbison&Steele. */ |
| 5830 | union |
| 5831 | { |
| 5832 | long l; |
| 5833 | char c[sizeof (long)]; |
| 5834 | } u; |
| 5835 | u.l = 1; |
| 5836 | exit (u.c[sizeof (long) - 1] == 1); |
| 5837 | } |
| 5838 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5839 | if { (eval echo configure:5840: \"$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] | 5840 | then |
| 5841 | ac_cv_c_bigendian=no |
| 5842 | else |
| 5843 | echo "configure: failed program was:" >&5 |
| 5844 | cat conftest.$ac_ext >&5 |
| 5845 | rm -fr conftest* |
| 5846 | ac_cv_c_bigendian=yes |
| 5847 | fi |
| 5848 | rm -fr conftest* |
| 5849 | fi |
| 5850 | |
| 5851 | fi |
| 5852 | fi |
| 5853 | |
| 5854 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 5855 | if test $ac_cv_c_bigendian = yes; then |
| 5856 | cat >> confdefs.h <<\EOF |
| 5857 | #define WORDS_BIGENDIAN 1 |
| 5858 | EOF |
| 5859 | |
| 5860 | fi |
| 5861 | |
| 5862 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 5863 | # Check whether right shifting a negative integer extends the sign bit |
| 5864 | # or fills with zeros (like the Cray J90, according to Tim Peters). |
| 5865 | echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5866 | echo "configure:5867: checking whether right shift extends the sign bit" >&5 |
| 5867 | if eval "test \"\${ac_cv_rshift_extends_sign+set}\" = set"; then |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 5868 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5869 | else |
| 5870 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 5871 | if test "$cross_compiling" = yes; then |
| 5872 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5873 | else |
| 5874 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5875 | #line 5876 "configure" |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 5876 | #include "confdefs.h" |
| 5877 | |
| 5878 | int main() |
| 5879 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 5880 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 5881 | } |
| 5882 | |
| 5883 | EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5884 | if { (eval echo configure:5885: \"$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] | 5885 | then |
| 5886 | ac_cv_rshift_extends_sign=yes |
| 5887 | else |
| 5888 | echo "configure: failed program was:" >&5 |
| 5889 | cat conftest.$ac_ext >&5 |
| 5890 | rm -fr conftest* |
| 5891 | ac_cv_rshift_extends_sign=no |
| 5892 | fi |
| 5893 | rm -fr conftest* |
| 5894 | fi |
| 5895 | |
| 5896 | fi |
| 5897 | |
| 5898 | echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 |
| 5899 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 5900 | then |
| 5901 | cat >> confdefs.h <<\EOF |
| 5902 | #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 |
| 5903 | EOF |
| 5904 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 5905 | fi |
| 5906 | |
| 5907 | |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 5908 | # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! |
| 5909 | # Add sys/socket.h to confdefs.h |
| 5910 | cat >> confdefs.h <<\EOF |
| 5911 | #ifdef HAVE_SYS_SOCKET_H |
| 5912 | #include <sys/socket.h> |
| 5913 | #endif |
| 5914 | EOF |
| 5915 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5916 | echo "configure:5917: checking for socklen_t" >&5 |
| 5917 | if eval "test \"\${ac_cv_type_socklen_t+set}\" = set"; then |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 5918 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5919 | else |
| 5920 | cat > conftest.$ac_ext <<EOF |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5921 | #line 5922 "configure" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 5922 | #include "confdefs.h" |
| 5923 | #include <sys/types.h> |
| 5924 | #if STDC_HEADERS |
| 5925 | #include <stdlib.h> |
| 5926 | #include <stddef.h> |
| 5927 | #endif |
| 5928 | EOF |
| 5929 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 5930 | egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 5931 | rm -rf conftest* |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5932 | eval "ac_cv_type_socklen_t=yes" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 5933 | else |
| 5934 | rm -rf conftest* |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5935 | eval "ac_cv_type_socklen_t=no" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 5936 | fi |
| 5937 | rm -f conftest* |
| 5938 | |
| 5939 | fi |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5940 | if eval "test \"`echo '$ac_cv_type_'socklen_t`\" = yes"; then |
| 5941 | echo "$ac_t""yes" 1>&6 |
| 5942 | else |
| 5943 | echo "$ac_t""no" 1>&6 |
| 5944 | cat >> confdefs.h <<EOF |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 5945 | #define socklen_t int |
| 5946 | EOF |
| 5947 | |
| 5948 | fi |
| 5949 | |
| 5950 | |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 5951 | echo $ac_n "checking for Modules/Setup""... $ac_c" 1>&6 |
| 5952 | echo "configure:5953: checking for Modules/Setup" >&5 |
| 5953 | if test ! -f Modules/Setup ; then |
| 5954 | cp "$srcdir/Modules/Setup.dist" Modules/Setup |
| 5955 | echo "$ac_t""creating" 1>&6 |
| 5956 | else |
| 5957 | echo "$ac_t""already exists" 1>&6 |
| 5958 | fi |
| 5959 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5960 | # generate output files |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5961 | trap '' 1 2 15 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5962 | cat > confcache <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5963 | # This file is a shell script that caches the results of configure |
| 5964 | # tests run on this system so they can be shared between configure |
| 5965 | # scripts and configure runs. It is not useful on other systems. |
| 5966 | # If it contains results you don't want to keep, you may remove or edit it. |
| 5967 | # |
| 5968 | # By default, configure uses ./config.cache as the cache file, |
| 5969 | # creating it if it does not exist already. You can give configure |
| 5970 | # the --cache-file=FILE option to use a different cache file; that is |
| 5971 | # what configure does when it calls configure scripts in |
| 5972 | # subdirectories, so they share the cache. |
| 5973 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| 5974 | # config.status only pays attention to the cache file if you give it the |
| 5975 | # --recheck option to rerun configure. |
| 5976 | # |
| 5977 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5978 | # The following way of writing the cache mishandles newlines in values, |
| 5979 | # but we know of no workaround that is simple, portable, and efficient. |
| 5980 | # So, don't put newlines in cache variables' values. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5981 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 5982 | # 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] | 5983 | (set) 2>&1 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 5984 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5985 | *ac_space=\ *) |
| 5986 | # `set' does not quote correctly, so add quotes (double-quote substitution |
| 5987 | # turns \\\\ into \\, and sed turns \\ into \). |
| 5988 | sed -n \ |
| 5989 | -e "s/'/'\\\\''/g" \ |
| 5990 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| 5991 | ;; |
| 5992 | *) |
| 5993 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 5994 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| 5995 | ;; |
| 5996 | esac >> confcache |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5997 | if cmp -s $cache_file confcache; then |
| 5998 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5999 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6000 | if test -w $cache_file; then |
| 6001 | echo "updating cache $cache_file" |
| 6002 | cat confcache > $cache_file |
| 6003 | else |
| 6004 | echo "not updating unwritable cache $cache_file" |
| 6005 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6006 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6007 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 6008 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6009 | 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] | 6010 | |
| 6011 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 6012 | # Let make expand exec_prefix. |
| 6013 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 6014 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6015 | # Any assignment to VPATH causes Sun make to only execute |
| 6016 | # the first set of double-colon rules, so remove it if not needed. |
| 6017 | # If there is a colon in the path, we need to keep it. |
| 6018 | if test "x$srcdir" = x.; then |
| 6019 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
| 6020 | fi |
| 6021 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6022 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6023 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6024 | DEFS=-DHAVE_CONFIG_H |
| 6025 | |
| 6026 | # Without the "./", some shells look in PATH for config.status. |
| 6027 | : ${CONFIG_STATUS=./config.status} |
| 6028 | |
| 6029 | echo creating $CONFIG_STATUS |
| 6030 | rm -f $CONFIG_STATUS |
| 6031 | cat > $CONFIG_STATUS <<EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6032 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6033 | # Generated automatically by configure. |
| 6034 | # Run this file to recreate the current configuration. |
| 6035 | # This directory was configured as follows, |
| 6036 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 6037 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6038 | # $0 $ac_configure_args |
| 6039 | # |
| 6040 | # Compiler output produced by configure, useful for debugging |
| 6041 | # configure, is in ./config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6042 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6043 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6044 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6045 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6046 | case "\$ac_option" in |
| 6047 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6048 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
| 6049 | 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] | 6050 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 6051 | echo "$CONFIG_STATUS generated by autoconf version 2.14.1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6052 | exit 0 ;; |
| 6053 | -help | --help | --hel | --he | --h) |
| 6054 | echo "\$ac_cs_usage"; exit 0 ;; |
| 6055 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6056 | esac |
| 6057 | done |
| 6058 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6059 | ac_given_srcdir=$srcdir |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6060 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 6061 | trap 'rm -fr `echo "Makefile \ |
| 6062 | Objects/Makefile \ |
| 6063 | Parser/Makefile \ |
Sjoerd Mullender | a179503 | 2000-08-17 11:41:06 +0000 | [diff] [blame] | 6064 | Grammar/Makefile \ |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 6065 | Python/Makefile \ |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 6066 | Modules/Makefile.pre \ |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 6067 | 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] | 6068 | EOF |
| 6069 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6070 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6071 | # Protect against being on the right side of a sed subst in config.status. |
| 6072 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 6073 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6074 | $ac_vpsub |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6075 | $extrasub |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 6076 | s%@SHELL@%$SHELL%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6077 | s%@CFLAGS@%$CFLAGS%g |
| 6078 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 6079 | s%@CXXFLAGS@%$CXXFLAGS%g |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 6080 | s%@FFLAGS@%$FFLAGS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6081 | s%@DEFS@%$DEFS%g |
| 6082 | s%@LDFLAGS@%$LDFLAGS%g |
| 6083 | s%@LIBS@%$LIBS%g |
| 6084 | s%@exec_prefix@%$exec_prefix%g |
| 6085 | s%@prefix@%$prefix%g |
| 6086 | s%@program_transform_name@%$program_transform_name%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6087 | s%@bindir@%$bindir%g |
| 6088 | s%@sbindir@%$sbindir%g |
| 6089 | s%@libexecdir@%$libexecdir%g |
| 6090 | s%@datadir@%$datadir%g |
| 6091 | s%@sysconfdir@%$sysconfdir%g |
| 6092 | s%@sharedstatedir@%$sharedstatedir%g |
| 6093 | s%@localstatedir@%$localstatedir%g |
| 6094 | s%@libdir@%$libdir%g |
| 6095 | s%@includedir@%$includedir%g |
| 6096 | s%@oldincludedir@%$oldincludedir%g |
| 6097 | s%@infodir@%$infodir%g |
| 6098 | s%@mandir@%$mandir%g |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 6099 | s%@VERSION@%$VERSION%g |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 6100 | s%@MACHDEP@%$MACHDEP%g |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 6101 | s%@SGI_ABI@%$SGI_ABI%g |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 6102 | s%@SET_CXX@%$SET_CXX%g |
| 6103 | s%@MAINOBJ@%$MAINOBJ%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6104 | s%@CC@%$CC%g |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 6105 | s%@EXE@%$EXE%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 6106 | s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g |
| 6107 | s%@LDLIBRARY@%$LDLIBRARY%g |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 6108 | s%@LINKCC@%$LINKCC%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6109 | s%@RANLIB@%$RANLIB%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6110 | s%@AR@%$AR%g |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 6111 | s%@INSTALL@%$INSTALL%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6112 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
| 6113 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 6114 | s%@LN@%$LN%g |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 6115 | s%@OPT@%$OPT%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6116 | s%@CPP@%$CPP%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 6117 | s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 6118 | s%@SO@%$SO%g |
| 6119 | s%@LDSHARED@%$LDSHARED%g |
| 6120 | s%@CCSHARED@%$CCSHARED%g |
| 6121 | s%@LINKFORSHARED@%$LINKFORSHARED%g |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 6122 | s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 6123 | s%@LDLAST@%$LDLAST%g |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 6124 | s%@USE_GC_MODULE@%$USE_GC_MODULE%g |
Fred Drake | a50d6ec | 2000-08-31 16:13:20 +0000 | [diff] [blame] | 6125 | s%@USE_BSDDB_MODULE@%$USE_BSDDB_MODULE%g |
Skip Montanaro | ed33c9a | 2000-09-08 02:17:15 +0000 | [diff] [blame] | 6126 | s%@HAVE_LIBDB@%$HAVE_LIBDB%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6127 | s%@DLINCLDIR@%$DLINCLDIR%g |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 6128 | s%@DYNLOADFILE@%$DYNLOADFILE%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6129 | s%@LIBOBJS@%$LIBOBJS%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6130 | s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g |
| 6131 | s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g |
| 6132 | 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] | 6133 | s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6134 | s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6135 | s%@LIBM@%$LIBM%g |
| 6136 | s%@LIBC@%$LIBC%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6137 | |
| 6138 | CEOF |
| 6139 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6140 | |
| 6141 | cat >> $CONFIG_STATUS <<\EOF |
| 6142 | |
| 6143 | # Split the substitutions into bite-sized pieces for seds with |
| 6144 | # small command number limits, like on Digital OSF/1 and HP-UX. |
| 6145 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 6146 | ac_file=1 # Number of current file. |
| 6147 | ac_beg=1 # First line for current file. |
| 6148 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 6149 | ac_more_lines=: |
| 6150 | ac_sed_cmds="" |
| 6151 | while $ac_more_lines; do |
| 6152 | if test $ac_beg -gt 1; then |
| 6153 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
| 6154 | else |
| 6155 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
| 6156 | fi |
| 6157 | if test ! -s conftest.s$ac_file; then |
| 6158 | ac_more_lines=false |
| 6159 | rm -f conftest.s$ac_file |
| 6160 | else |
| 6161 | if test -z "$ac_sed_cmds"; then |
| 6162 | ac_sed_cmds="sed -f conftest.s$ac_file" |
| 6163 | else |
| 6164 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
| 6165 | fi |
| 6166 | ac_file=`expr $ac_file + 1` |
| 6167 | ac_beg=$ac_end |
| 6168 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
| 6169 | fi |
| 6170 | done |
| 6171 | if test -z "$ac_sed_cmds"; then |
| 6172 | ac_sed_cmds=cat |
| 6173 | fi |
| 6174 | EOF |
| 6175 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6176 | cat >> $CONFIG_STATUS <<EOF |
| 6177 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 6178 | CONFIG_FILES=\${CONFIG_FILES-"Makefile \ |
| 6179 | Objects/Makefile \ |
| 6180 | Parser/Makefile \ |
Sjoerd Mullender | a179503 | 2000-08-17 11:41:06 +0000 | [diff] [blame] | 6181 | Grammar/Makefile \ |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 6182 | Python/Makefile \ |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 6183 | Modules/Makefile.pre \ |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 6184 | Modules/Setup.config"} |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6185 | EOF |
| 6186 | cat >> $CONFIG_STATUS <<\EOF |
| 6187 | 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] | 6188 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6189 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6190 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6191 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 6192 | *) ac_file_in="${ac_file}.in" ;; |
| 6193 | esac |
| 6194 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6195 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6196 | |
| 6197 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 6198 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 6199 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 6200 | # The file is in a subdirectory. |
| 6201 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6202 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6203 | # A "../" for each directory in $ac_dir_suffix. |
| 6204 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
| 6205 | else |
| 6206 | ac_dir_suffix= ac_dots= |
| 6207 | fi |
| 6208 | |
| 6209 | case "$ac_given_srcdir" in |
| 6210 | .) srcdir=. |
| 6211 | if test -z "$ac_dots"; then top_srcdir=. |
| 6212 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
| 6213 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; |
| 6214 | *) # Relative path. |
| 6215 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 6216 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
| 6217 | esac |
| 6218 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6219 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6220 | echo creating "$ac_file" |
| 6221 | rm -f "$ac_file" |
| 6222 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
| 6223 | case "$ac_file" in |
| 6224 | *Makefile*) ac_comsub="1i\\ |
| 6225 | # $configure_input" ;; |
| 6226 | *) ac_comsub= ;; |
| 6227 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6228 | |
| 6229 | 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] | 6230 | sed -e "$ac_comsub |
| 6231 | s%@configure_input@%$configure_input%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6232 | s%@srcdir@%$srcdir%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6233 | s%@top_srcdir@%$top_srcdir%g |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6234 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6235 | fi; done |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6236 | rm -f conftest.s* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6237 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6238 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
| 6239 | # 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] | 6240 | # |
| 6241 | # ac_d sets the value in "#define NAME VALUE" lines. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6242 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 6243 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6244 | ac_dC='\3' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6245 | ac_dD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6246 | # 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] | 6247 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 6248 | ac_uB='\([ ]\)%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6249 | ac_uC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6250 | ac_uD='\4%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6251 | # 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] | 6252 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 6253 | ac_eB='$%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6254 | ac_eC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6255 | ac_eD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6256 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6257 | if test "${CONFIG_HEADERS+set}" != set; then |
| 6258 | EOF |
| 6259 | cat >> $CONFIG_STATUS <<EOF |
| 6260 | CONFIG_HEADERS="config.h" |
| 6261 | EOF |
| 6262 | cat >> $CONFIG_STATUS <<\EOF |
| 6263 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6264 | 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] | 6265 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6266 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6267 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6268 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 6269 | *) ac_file_in="${ac_file}.in" ;; |
| 6270 | esac |
| 6271 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6272 | echo creating $ac_file |
| 6273 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6274 | rm -f conftest.frag conftest.in conftest.out |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6275 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 6276 | cat $ac_file_inputs > conftest.in |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6277 | |
| 6278 | EOF |
| 6279 | |
| 6280 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
| 6281 | # 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] | 6282 | # 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] | 6283 | # Protect against being in an unquoted here document in config.status. |
| 6284 | rm -f conftest.vals |
| 6285 | cat > conftest.hdr <<\EOF |
| 6286 | s/[\\&%]/\\&/g |
| 6287 | s%[\\$`]%\\&%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6288 | 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] | 6289 | s%ac_d%ac_u%gp |
| 6290 | s%ac_u%ac_e%gp |
| 6291 | EOF |
| 6292 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
| 6293 | rm -f conftest.hdr |
| 6294 | |
| 6295 | # This sed command replaces #undef with comments. This is necessary, for |
| 6296 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 6297 | # on some systems where configure will not decide to define it. |
| 6298 | cat >> conftest.vals <<\EOF |
| 6299 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
| 6300 | EOF |
| 6301 | |
| 6302 | # Break up conftest.vals because some shells have a limit on |
| 6303 | # 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] | 6304 | |
| 6305 | rm -f conftest.tail |
| 6306 | while : |
| 6307 | do |
| 6308 | ac_lines=`grep -c . conftest.vals` |
| 6309 | # grep -c gives empty output for an empty file on some AIX systems. |
| 6310 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 6311 | # Write a limited-size here document to conftest.frag. |
| 6312 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
| 6313 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
| 6314 | echo 'CEOF |
| 6315 | sed -f conftest.frag conftest.in > conftest.out |
| 6316 | rm -f conftest.in |
| 6317 | mv conftest.out conftest.in |
| 6318 | ' >> $CONFIG_STATUS |
| 6319 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
| 6320 | rm -f conftest.vals |
| 6321 | mv conftest.tail conftest.vals |
| 6322 | done |
| 6323 | rm -f conftest.vals |
| 6324 | |
| 6325 | cat >> $CONFIG_STATUS <<\EOF |
| 6326 | rm -f conftest.frag conftest.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6327 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6328 | cat conftest.in >> conftest.h |
| 6329 | rm -f conftest.in |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6330 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6331 | echo "$ac_file is unchanged" |
| 6332 | rm -f conftest.h |
| 6333 | else |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6334 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 6335 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 6336 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 6337 | # The file is in a subdirectory. |
| 6338 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 6339 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6340 | rm -f $ac_file |
| 6341 | mv conftest.h $ac_file |
| 6342 | fi |
| 6343 | fi; done |
| 6344 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6345 | EOF |
| 6346 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6347 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6348 | EOF |
| 6349 | cat >> $CONFIG_STATUS <<\EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6350 | |
| 6351 | exit 0 |
| 6352 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6353 | chmod +x $CONFIG_STATUS |
| 6354 | rm -fr confdefs* $ac_clean_files |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 6355 | test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6356 | |