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 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3 | # From configure.in Revision: 1.241 |
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. |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6 | # Generated automatically using autoconf version 2.13 |
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 | c0d24d8 | 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 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 21 | --with-dyld Use (OpenStep|Rhapsody) dynamic linker" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 22 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 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 | c0d24d8 | 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 |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 27 | --with-suffix=.exe set executable suffix" |
| 28 | ac_help="$ac_help |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 29 | --with-pydebug build with Py_DEBUG defined" |
| 30 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 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 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 33 | --with-signal-module disable/enable signal module" |
| 34 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 35 | --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries" |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 36 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 37 | --with(out)-threads[=DIRECTORY] disable/enable thread support" |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 38 | ac_help="$ac_help |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 39 | --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 40 | ac_help="$ac_help |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 41 | --with-pth use GNU pth threading libraries" |
| 42 | ac_help="$ac_help |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 43 | --enable-ipv6 Enable ipv6 (with ipv4) support |
| 44 | --disable-ipv6 Disable ipv6 support" |
| 45 | ac_help="$ac_help |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 46 | --with(out)-cycle-gc disable/enable garbage collection" |
| 47 | ac_help="$ac_help |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 48 | --with(out)-pymalloc disable/enable specialized mallocs" |
| 49 | ac_help="$ac_help |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 50 | --with-wctype-functions use wctype.h functions" |
| 51 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 52 | --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 53 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 54 | --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 55 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 56 | --with-fpectl enable SIGFPE catching" |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 57 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 58 | --with-libm=STRING math library" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 59 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 60 | --with-libc=STRING C library" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 61 | ac_help="$ac_help |
| 62 | --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 63 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 64 | # Initialize some variables set by options. |
| 65 | # The variables have the same names as the options, with |
| 66 | # dashes changed to underlines. |
| 67 | build=NONE |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 68 | cache_file=./config.cache |
| 69 | exec_prefix=NONE |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 70 | host=NONE |
| 71 | no_create= |
| 72 | nonopt=NONE |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 73 | no_recursion= |
| 74 | prefix=NONE |
| 75 | program_prefix=NONE |
| 76 | program_suffix=NONE |
| 77 | program_transform_name=s,x,x, |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 78 | silent= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 79 | site= |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 80 | srcdir= |
| 81 | target=NONE |
| 82 | verbose= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 83 | x_includes=NONE |
| 84 | x_libraries=NONE |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 85 | bindir='${exec_prefix}/bin' |
| 86 | sbindir='${exec_prefix}/sbin' |
| 87 | libexecdir='${exec_prefix}/libexec' |
| 88 | datadir='${prefix}/share' |
| 89 | sysconfdir='${prefix}/etc' |
| 90 | sharedstatedir='${prefix}/com' |
| 91 | localstatedir='${prefix}/var' |
| 92 | libdir='${exec_prefix}/lib' |
| 93 | includedir='${prefix}/include' |
| 94 | oldincludedir='/usr/include' |
| 95 | infodir='${prefix}/info' |
| 96 | mandir='${prefix}/man' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 97 | |
| 98 | # Initialize some other variables. |
| 99 | subdirs= |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 100 | MFLAGS= MAKEFLAGS= |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 101 | SHELL=${CONFIG_SHELL-/bin/sh} |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 102 | # Maximum number of lines to put in a shell here document. |
| 103 | ac_max_here_lines=12 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 104 | |
| 105 | ac_prev= |
| 106 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 107 | do |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 108 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 109 | # If the previous option needs an argument, assign it. |
| 110 | if test -n "$ac_prev"; then |
| 111 | eval "$ac_prev=\$ac_option" |
| 112 | ac_prev= |
| 113 | continue |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 114 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 115 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 116 | case "$ac_option" in |
| 117 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
| 118 | *) ac_optarg= ;; |
| 119 | esac |
| 120 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 121 | # Accept the important Cygnus configure options, so we can diagnose typos. |
| 122 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 123 | case "$ac_option" in |
| 124 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 125 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
| 126 | ac_prev=bindir ;; |
| 127 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) |
| 128 | bindir="$ac_optarg" ;; |
| 129 | |
| 130 | -build | --build | --buil | --bui | --bu) |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 131 | ac_prev=build ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 132 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 133 | build="$ac_optarg" ;; |
| 134 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 135 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
| 136 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) |
| 137 | ac_prev=cache_file ;; |
| 138 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ |
| 139 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) |
| 140 | cache_file="$ac_optarg" ;; |
| 141 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 142 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
| 143 | ac_prev=datadir ;; |
| 144 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ |
| 145 | | --da=*) |
| 146 | datadir="$ac_optarg" ;; |
| 147 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 148 | -disable-* | --disable-*) |
| 149 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 150 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 151 | 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] | 152 | { 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] | 153 | fi |
| 154 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 155 | eval "enable_${ac_feature}=no" ;; |
| 156 | |
| 157 | -enable-* | --enable-*) |
| 158 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 159 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 160 | 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] | 161 | { 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] | 162 | fi |
| 163 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 164 | case "$ac_option" in |
| 165 | *=*) ;; |
| 166 | *) ac_optarg=yes ;; |
| 167 | esac |
| 168 | eval "enable_${ac_feature}='$ac_optarg'" ;; |
| 169 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 170 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ |
| 171 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ |
| 172 | | --exec | --exe | --ex) |
| 173 | ac_prev=exec_prefix ;; |
| 174 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ |
| 175 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ |
| 176 | | --exec=* | --exe=* | --ex=*) |
| 177 | exec_prefix="$ac_optarg" ;; |
| 178 | |
| 179 | -gas | --gas | --ga | --g) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 180 | # Obsolete; use --with-gas. |
| 181 | with_gas=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 182 | |
| 183 | -help | --help | --hel | --he) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 184 | # Omit some internal or obsolete options to make the list less imposing. |
| 185 | # 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] | 186 | cat << EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 187 | Usage: configure [options] [host] |
| 188 | Options: [defaults in brackets after descriptions] |
| 189 | Configuration: |
| 190 | --cache-file=FILE cache test results in FILE |
| 191 | --help print this message |
| 192 | --no-create do not create output files |
| 193 | --quiet, --silent do not print \`checking...' messages |
| 194 | --version print the version of autoconf that created configure |
| 195 | Directory and file names: |
| 196 | --prefix=PREFIX install architecture-independent files in PREFIX |
| 197 | [$ac_default_prefix] |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 198 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 199 | [same as prefix] |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 200 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
| 201 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] |
| 202 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] |
| 203 | --datadir=DIR read-only architecture-independent data in DIR |
| 204 | [PREFIX/share] |
| 205 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] |
| 206 | --sharedstatedir=DIR modifiable architecture-independent data in DIR |
| 207 | [PREFIX/com] |
| 208 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] |
| 209 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] |
| 210 | --includedir=DIR C header files in DIR [PREFIX/include] |
| 211 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] |
| 212 | --infodir=DIR info documentation in DIR [PREFIX/info] |
| 213 | --mandir=DIR man documentation in DIR [PREFIX/man] |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 214 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
| 215 | --program-prefix=PREFIX prepend PREFIX to installed program names |
| 216 | --program-suffix=SUFFIX append SUFFIX to installed program names |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 217 | --program-transform-name=PROGRAM |
| 218 | run sed PROGRAM on installed program names |
| 219 | EOF |
| 220 | cat << EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 221 | Host type: |
| 222 | --build=BUILD configure for building on BUILD [BUILD=HOST] |
| 223 | --host=HOST configure for HOST [guessed] |
| 224 | --target=TARGET configure for TARGET [TARGET=HOST] |
| 225 | Features and packages: |
| 226 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
| 227 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
| 228 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
| 229 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
| 230 | --x-includes=DIR X include files are in DIR |
| 231 | --x-libraries=DIR X library files are in DIR |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 232 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 233 | if test -n "$ac_help"; then |
| 234 | echo "--enable and --with options recognized:$ac_help" |
| 235 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 236 | exit 0 ;; |
| 237 | |
| 238 | -host | --host | --hos | --ho) |
| 239 | ac_prev=host ;; |
| 240 | -host=* | --host=* | --hos=* | --ho=*) |
| 241 | host="$ac_optarg" ;; |
| 242 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 243 | -includedir | --includedir | --includedi | --included | --include \ |
| 244 | | --includ | --inclu | --incl | --inc) |
| 245 | ac_prev=includedir ;; |
| 246 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ |
| 247 | | --includ=* | --inclu=* | --incl=* | --inc=*) |
| 248 | includedir="$ac_optarg" ;; |
| 249 | |
| 250 | -infodir | --infodir | --infodi | --infod | --info | --inf) |
| 251 | ac_prev=infodir ;; |
| 252 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) |
| 253 | infodir="$ac_optarg" ;; |
| 254 | |
| 255 | -libdir | --libdir | --libdi | --libd) |
| 256 | ac_prev=libdir ;; |
| 257 | -libdir=* | --libdir=* | --libdi=* | --libd=*) |
| 258 | libdir="$ac_optarg" ;; |
| 259 | |
| 260 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ |
| 261 | | --libexe | --libex | --libe) |
| 262 | ac_prev=libexecdir ;; |
| 263 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ |
| 264 | | --libexe=* | --libex=* | --libe=*) |
| 265 | libexecdir="$ac_optarg" ;; |
| 266 | |
| 267 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
| 268 | | --localstate | --localstat | --localsta | --localst \ |
| 269 | | --locals | --local | --loca | --loc | --lo) |
| 270 | ac_prev=localstatedir ;; |
| 271 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ |
| 272 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ |
| 273 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) |
| 274 | localstatedir="$ac_optarg" ;; |
| 275 | |
| 276 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) |
| 277 | ac_prev=mandir ;; |
| 278 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) |
| 279 | mandir="$ac_optarg" ;; |
| 280 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 281 | -nfp | --nfp | --nf) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 282 | # Obsolete; use --without-fp. |
| 283 | with_fp=no ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 284 | |
| 285 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 286 | | --no-cr | --no-c) |
| 287 | no_create=yes ;; |
| 288 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 289 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 290 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) |
| 291 | no_recursion=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 292 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 293 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
| 294 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ |
| 295 | | --oldin | --oldi | --old | --ol | --o) |
| 296 | ac_prev=oldincludedir ;; |
| 297 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ |
| 298 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ |
| 299 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) |
| 300 | oldincludedir="$ac_optarg" ;; |
| 301 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 302 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
| 303 | ac_prev=prefix ;; |
| 304 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) |
| 305 | prefix="$ac_optarg" ;; |
| 306 | |
| 307 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ |
| 308 | | --program-pre | --program-pr | --program-p) |
| 309 | ac_prev=program_prefix ;; |
| 310 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ |
| 311 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) |
| 312 | program_prefix="$ac_optarg" ;; |
| 313 | |
| 314 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ |
| 315 | | --program-suf | --program-su | --program-s) |
| 316 | ac_prev=program_suffix ;; |
| 317 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ |
| 318 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) |
| 319 | program_suffix="$ac_optarg" ;; |
| 320 | |
| 321 | -program-transform-name | --program-transform-name \ |
| 322 | | --program-transform-nam | --program-transform-na \ |
| 323 | | --program-transform-n | --program-transform- \ |
| 324 | | --program-transform | --program-transfor \ |
| 325 | | --program-transfo | --program-transf \ |
| 326 | | --program-trans | --program-tran \ |
| 327 | | --progr-tra | --program-tr | --program-t) |
| 328 | ac_prev=program_transform_name ;; |
| 329 | -program-transform-name=* | --program-transform-name=* \ |
| 330 | | --program-transform-nam=* | --program-transform-na=* \ |
| 331 | | --program-transform-n=* | --program-transform-=* \ |
| 332 | | --program-transform=* | --program-transfor=* \ |
| 333 | | --program-transfo=* | --program-transf=* \ |
| 334 | | --program-trans=* | --program-tran=* \ |
| 335 | | --progr-tra=* | --program-tr=* | --program-t=*) |
| 336 | program_transform_name="$ac_optarg" ;; |
| 337 | |
| 338 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 339 | | -silent | --silent | --silen | --sile | --sil) |
| 340 | silent=yes ;; |
| 341 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 342 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
| 343 | ac_prev=sbindir ;; |
| 344 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ |
| 345 | | --sbi=* | --sb=*) |
| 346 | sbindir="$ac_optarg" ;; |
| 347 | |
| 348 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ |
| 349 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ |
| 350 | | --sharedst | --shareds | --shared | --share | --shar \ |
| 351 | | --sha | --sh) |
| 352 | ac_prev=sharedstatedir ;; |
| 353 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ |
| 354 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ |
| 355 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ |
| 356 | | --sha=* | --sh=*) |
| 357 | sharedstatedir="$ac_optarg" ;; |
| 358 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 359 | -site | --site | --sit) |
| 360 | ac_prev=site ;; |
| 361 | -site=* | --site=* | --sit=*) |
| 362 | site="$ac_optarg" ;; |
| 363 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 364 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
| 365 | ac_prev=srcdir ;; |
| 366 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
| 367 | srcdir="$ac_optarg" ;; |
| 368 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 369 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
| 370 | | --syscon | --sysco | --sysc | --sys | --sy) |
| 371 | ac_prev=sysconfdir ;; |
| 372 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ |
| 373 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) |
| 374 | sysconfdir="$ac_optarg" ;; |
| 375 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 376 | -target | --target | --targe | --targ | --tar | --ta | --t) |
| 377 | ac_prev=target ;; |
| 378 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
| 379 | target="$ac_optarg" ;; |
| 380 | |
| 381 | -v | -verbose | --verbose | --verbos | --verbo | --verb) |
| 382 | verbose=yes ;; |
| 383 | |
| 384 | -version | --version | --versio | --versi | --vers) |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 385 | echo "configure generated by autoconf version 2.13" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 386 | exit 0 ;; |
| 387 | |
| 388 | -with-* | --with-*) |
| 389 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 390 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 391 | 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] | 392 | { 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] | 393 | fi |
| 394 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 395 | case "$ac_option" in |
| 396 | *=*) ;; |
| 397 | *) ac_optarg=yes ;; |
| 398 | esac |
| 399 | eval "with_${ac_package}='$ac_optarg'" ;; |
| 400 | |
| 401 | -without-* | --without-*) |
| 402 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 403 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 404 | 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] | 405 | { 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] | 406 | fi |
| 407 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 408 | eval "with_${ac_package}=no" ;; |
| 409 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 410 | --x) |
| 411 | # Obsolete; use --with-x. |
| 412 | with_x=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 413 | |
| 414 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ |
| 415 | | --x-incl | --x-inc | --x-in | --x-i) |
| 416 | ac_prev=x_includes ;; |
| 417 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ |
| 418 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) |
| 419 | x_includes="$ac_optarg" ;; |
| 420 | |
| 421 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ |
| 422 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) |
| 423 | ac_prev=x_libraries ;; |
| 424 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ |
| 425 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) |
| 426 | x_libraries="$ac_optarg" ;; |
| 427 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 428 | -*) { 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] | 429 | ;; |
| 430 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 431 | *) |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 432 | 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] | 433 | echo "configure: warning: $ac_option: invalid host type" 1>&2 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 434 | fi |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 435 | if test "x$nonopt" != xNONE; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 436 | { 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] | 437 | fi |
| 438 | nonopt="$ac_option" |
| 439 | ;; |
| 440 | |
| 441 | esac |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 442 | done |
| 443 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 444 | if test -n "$ac_prev"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 445 | { 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] | 446 | fi |
| 447 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 448 | 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] | 449 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 450 | # File descriptor usage: |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 451 | # 0 standard input |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 452 | # 1 file creation |
| 453 | # 2 errors and warnings |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 454 | # 3 some systems may open it to /dev/tty |
| 455 | # 4 used on the Kubota Titan |
| 456 | # 6 checking for... messages and results |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 457 | # 5 compiler messages saved in config.log |
| 458 | if test "$silent" = yes; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 459 | exec 6>/dev/null |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 460 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 461 | exec 6>&1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 462 | fi |
| 463 | exec 5>./config.log |
| 464 | |
| 465 | echo "\ |
| 466 | This file contains any messages produced by compilers while |
| 467 | running configure, to aid debugging if configure makes a mistake. |
| 468 | " 1>&5 |
| 469 | |
| 470 | # Strip out --no-create and --no-recursion so they do not pile up. |
| 471 | # Also quote any args containing shell metacharacters. |
| 472 | ac_configure_args= |
| 473 | for ac_arg |
| 474 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 475 | case "$ac_arg" in |
| 476 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 477 | | --no-cr | --no-c) ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 478 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 479 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; |
| 480 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) |
| 481 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; |
| 482 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 483 | esac |
| 484 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 485 | |
| 486 | # NLS nuisances. |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 487 | # Only set these to C if already set. These must not be set unconditionally |
| 488 | # because not all systems understand e.g. LANG=C (notably SCO). |
| 489 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! |
| 490 | # Non-C LC_CTYPE values break the ctype check. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 491 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 492 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
| 493 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi |
| 494 | 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] | 495 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 496 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
| 497 | rm -rf conftest* confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 498 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. |
| 499 | echo > confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 500 | |
| 501 | # A filename unique to this package, relative to the directory that |
| 502 | # 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] | 503 | ac_unique_file=Include/object.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 504 | |
| 505 | # Find the source files, if location was not specified. |
| 506 | if test -z "$srcdir"; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 507 | ac_srcdir_defaulted=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 508 | # Try the directory containing this script, then its parent. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 509 | ac_prog=$0 |
| 510 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` |
| 511 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. |
| 512 | srcdir=$ac_confdir |
| 513 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 514 | srcdir=.. |
| 515 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 516 | else |
| 517 | ac_srcdir_defaulted=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 518 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 519 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 520 | if test "$ac_srcdir_defaulted" = yes; then |
| 521 | { 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] | 522 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 523 | { 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] | 524 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 525 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 526 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
| 527 | |
| 528 | # Prefer explicitly selected file to automatically selected ones. |
| 529 | if test -z "$CONFIG_SITE"; then |
| 530 | if test "x$prefix" != xNONE; then |
| 531 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" |
| 532 | else |
| 533 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" |
| 534 | fi |
| 535 | fi |
| 536 | for ac_site_file in $CONFIG_SITE; do |
| 537 | if test -r "$ac_site_file"; then |
| 538 | echo "loading site script $ac_site_file" |
| 539 | . "$ac_site_file" |
| 540 | fi |
| 541 | done |
| 542 | |
| 543 | if test -r "$cache_file"; then |
| 544 | echo "loading cache $cache_file" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 545 | . $cache_file |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 546 | else |
| 547 | echo "creating cache $cache_file" |
| 548 | > $cache_file |
| 549 | fi |
| 550 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 551 | ac_ext=c |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 552 | # 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] | 553 | ac_cpp='$CPP $CPPFLAGS' |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 554 | 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] | 555 | 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] | 556 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 557 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 558 | ac_exeext= |
| 559 | ac_objext=o |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 560 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
| 561 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. |
| 562 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then |
| 563 | ac_n= ac_c=' |
| 564 | ' ac_t=' ' |
| 565 | else |
| 566 | ac_n=-n ac_c= ac_t= |
| 567 | fi |
| 568 | else |
| 569 | ac_n= ac_c='\c' ac_t= |
| 570 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 571 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 572 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 573 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 574 | |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 575 | # Set VERSION so we only need to edit in one place (i.e., here) |
| 576 | |
Guido van Rossum | 6db412b | 2001-04-18 04:37:57 +0000 | [diff] [blame] | 577 | VERSION=2.2 |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 578 | |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 579 | # Arguments passed to configure. |
| 580 | |
| 581 | CONFIG_ARGS="$ac_configure_args" |
| 582 | |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 583 | # NEXTSTEP|MacOSX|Darwin stuff |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 584 | 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] | 585 | |
| 586 | echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 587 | echo "configure:588: checking for --with-next-archs" >&5 |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 588 | # Check whether --with-next-archs or --without-next-archs was given. |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 589 | if test "${with_next_archs+set}" = set; then |
| 590 | withval="$with_next_archs" |
| 591 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 592 | if test -n "$withval"; then |
| 593 | ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval` |
| 594 | # GCC does not currently support multi archs on the NeXT |
| 595 | with_gcc=no |
| 596 | fi |
| 597 | echo "$ac_t""$with_next_archs" 1>&6 |
| 598 | |
| 599 | else |
| 600 | echo "$ac_t""none: using `arch`" 1>&6 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 601 | fi |
| 602 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 603 | |
| 604 | if test -z "$MACHDEP" |
| 605 | then |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 606 | ac_sys_system=`uname -s` |
| 607 | if test "$ac_sys_system" = "Darwin" ; then |
| 608 | ac_sys_release=`uname -r` |
| 609 | else |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 610 | set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \ |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 611 | sed -e 's/://' -e 's/\./_/'` && \ |
| 612 | ac_sys_system=next && ac_sys_release=$4 |
| 613 | fi |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 614 | |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 615 | MACHDEP="$ac_sys_system$ac_sys_release" |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 616 | fi |
| 617 | fi |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 618 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 619 | # Check whether --with-next-framework or --without-next-framework was given. |
| 620 | if test "${with_next_framework+set}" = set; then |
| 621 | withval="$with_next_framework" |
| 622 | : |
| 623 | fi |
| 624 | |
| 625 | # Check whether --with-dyld or --without-dyld was given. |
| 626 | if test "${with_dyld+set}" = set; then |
| 627 | withval="$with_dyld" |
| 628 | : |
| 629 | fi |
| 630 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 631 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 632 | # Set name for machine-dependent library files |
| 633 | |
| 634 | echo $ac_n "checking MACHDEP""... $ac_c" 1>&6 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 635 | echo "configure:636: checking MACHDEP" >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 636 | if test -z "$MACHDEP" |
| 637 | then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 638 | ac_sys_system=`uname -s` |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 639 | 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] | 640 | ac_sys_release=`uname -v` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 641 | else |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 642 | ac_sys_release=`uname -r` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 643 | fi |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 644 | ac_md_system=`echo $ac_sys_system | |
| 645 | tr -d '/ ' | tr '[A-Z]' '[a-z]'` |
| 646 | ac_md_release=`echo $ac_sys_release | |
| 647 | tr -d '/ ' | sed 's/\..*//'` |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 648 | MACHDEP="$ac_md_system$ac_md_release" |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 649 | |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 650 | case $MACHDEP in |
Andrew M. Kuchling | 5a3e4cb | 2001-07-20 19:29:04 +0000 | [diff] [blame] | 651 | cygwin*) MACHDEP="cygwin";; |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 652 | '') MACHDEP="unknown";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 653 | esac |
| 654 | fi |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 655 | |
| 656 | # |
| 657 | # SGI compilers allow the specification of the both the ABI and the |
| 658 | # ISA on the command line. Depending on the values of these switches, |
| 659 | # different and often incompatable code will be generated. |
| 660 | # |
| 661 | # The SGI_ABI variable can be used to modify the CC and LDFLAGS and |
| 662 | # thus supply support for various ABI/ISA combinations. The MACHDEP |
| 663 | # variable is also adjusted. |
| 664 | # |
| 665 | |
| 666 | if test ! -z "$SGI_ABI" |
| 667 | then |
| 668 | CC="cc $SGI_ABI" |
| 669 | LDFLAGS="$SGI_ABI $LDFLAGS" |
| 670 | MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'` |
| 671 | fi |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 672 | echo "$ac_t""$MACHDEP" 1>&6 |
| 673 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 674 | # checks for alternative programs |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 675 | echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6 |
Andrew M. Kuchling | 5a3e4cb | 2001-07-20 19:29:04 +0000 | [diff] [blame] | 676 | echo "configure:677: checking for --without-gcc" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 677 | # Check whether --with-gcc or --without-gcc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 678 | if test "${with_gcc+set}" = set; then |
| 679 | withval="$with_gcc" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 680 | |
| 681 | case $withval in |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 682 | no) CC=cc |
| 683 | without_gcc=yes;; |
| 684 | yes) CC=gcc |
| 685 | without_gcc=no;; |
| 686 | *) CC=$withval |
| 687 | without_gcc=$withval;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 688 | esac |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 689 | else |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 690 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 691 | case $ac_sys_system in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 692 | AIX*) CC=cc_r |
| 693 | without_gcc=;; |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 694 | BeOS*) |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 695 | case $BE_HOST_CPU in |
| 696 | ppc) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 697 | CC=mwcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 698 | without_gcc=yes |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 699 | OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 700 | CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 701 | LDFLAGS="$LDFLAGS -nodup" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 702 | ;; |
| 703 | x86) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 704 | CC=gcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 705 | without_gcc=no |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 706 | OPT=-O |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 707 | ;; |
| 708 | *) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 709 | { 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] | 710 | ;; |
| 711 | esac |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 712 | AR="\$(srcdir)/Modules/ar_beos" |
| 713 | RANLIB=: |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 714 | ;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 715 | Monterey*) |
| 716 | RANLIB=: |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 717 | without_gcc=;; |
| 718 | *) without_gcc=no;; |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 719 | esac |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 720 | fi |
| 721 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 722 | echo "$ac_t""$without_gcc" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 723 | |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 724 | |
| 725 | |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 726 | MAINOBJ=python.o |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 727 | echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6 |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 728 | echo "configure:729: checking for --with-cxx=<compiler>" >&5 |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 729 | # Check whether --with-cxx or --without-cxx was given. |
| 730 | if test "${with_cxx+set}" = set; then |
| 731 | withval="$with_cxx" |
| 732 | |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 733 | check_cxx=no |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 734 | case $withval in |
| 735 | no) CXX= |
| 736 | with_cxx=no;; |
| 737 | *) CXX=$withval |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 738 | MAINOBJ=ccpython.o |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 739 | with_cxx=$withval;; |
| 740 | esac |
| 741 | else |
| 742 | |
| 743 | with_cxx=no |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 744 | check_cxx=yes |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 745 | |
| 746 | fi |
| 747 | |
| 748 | echo "$ac_t""$with_cxx" 1>&6 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 749 | |
| 750 | |
| 751 | if test "$check_cxx" = "yes" |
| 752 | then |
| 753 | for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl |
| 754 | do |
| 755 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 756 | set dummy $ac_prog; ac_word=$2 |
| 757 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 758 | echo "configure:759: checking for $ac_word" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 759 | if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then |
| 760 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 761 | else |
| 762 | if test -n "$CXX"; then |
| 763 | ac_cv_prog_CXX="$CXX" # Let the user override the test. |
| 764 | else |
| 765 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 766 | ac_dummy="$PATH" |
| 767 | for ac_dir in $ac_dummy; do |
| 768 | test -z "$ac_dir" && ac_dir=. |
| 769 | if test -f $ac_dir/$ac_word; then |
| 770 | ac_cv_prog_CXX="$ac_prog" |
| 771 | break |
| 772 | fi |
| 773 | done |
| 774 | IFS="$ac_save_ifs" |
| 775 | fi |
| 776 | fi |
| 777 | CXX="$ac_cv_prog_CXX" |
| 778 | if test -n "$CXX"; then |
| 779 | echo "$ac_t""$CXX" 1>&6 |
| 780 | else |
| 781 | echo "$ac_t""no" 1>&6 |
| 782 | fi |
| 783 | |
| 784 | test -n "$CXX" && break |
| 785 | done |
| 786 | test -n "$CXX" || CXX="notfound" |
| 787 | |
| 788 | if test "$CXX" = "notfound" |
| 789 | then |
| 790 | CXX= |
| 791 | else |
| 792 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 793 | echo "configure:794: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 794 | |
| 795 | ac_ext=C |
| 796 | # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 797 | ac_cpp='$CXXCPP $CPPFLAGS' |
| 798 | ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 799 | ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 800 | cross_compiling=$ac_cv_prog_cxx_cross |
| 801 | |
| 802 | cat > conftest.$ac_ext << EOF |
| 803 | |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 804 | #line 805 "configure" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 805 | #include "confdefs.h" |
| 806 | |
| 807 | int main(){return(0);} |
| 808 | EOF |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 809 | if { (eval echo configure:810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 810 | ac_cv_prog_cxx_works=yes |
| 811 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 812 | if (./conftest; exit) 2>/dev/null; then |
| 813 | ac_cv_prog_cxx_cross=no |
| 814 | else |
| 815 | ac_cv_prog_cxx_cross=yes |
| 816 | fi |
| 817 | else |
| 818 | echo "configure: failed program was:" >&5 |
| 819 | cat conftest.$ac_ext >&5 |
| 820 | ac_cv_prog_cxx_works=no |
| 821 | fi |
| 822 | rm -fr conftest* |
| 823 | ac_ext=c |
| 824 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 825 | ac_cpp='$CPP $CPPFLAGS' |
| 826 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 827 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 828 | cross_compiling=$ac_cv_prog_cc_cross |
| 829 | |
| 830 | echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 |
| 831 | if test $ac_cv_prog_cxx_works = no; then |
| 832 | { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } |
| 833 | fi |
| 834 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 835 | echo "configure:836: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 836 | echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 |
| 837 | cross_compiling=$ac_cv_prog_cxx_cross |
| 838 | |
| 839 | fi |
| 840 | fi |
| 841 | |
Guido van Rossum | 8b131c5 | 1995-03-09 14:10:13 +0000 | [diff] [blame] | 842 | # If the user switches compilers, we can't believe the cache |
| 843 | if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" |
| 844 | then |
| 845 | { echo "configure: error: cached CC is different -- throw away $cache_file |
| 846 | (it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; } |
| 847 | fi |
| 848 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 849 | # Extract the first word of "gcc", so it can be a program name with args. |
| 850 | set dummy gcc; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 851 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 852 | echo "configure:853: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 853 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 854 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 855 | else |
| 856 | if test -n "$CC"; then |
| 857 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 858 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 859 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 860 | ac_dummy="$PATH" |
| 861 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 862 | test -z "$ac_dir" && ac_dir=. |
| 863 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 864 | ac_cv_prog_CC="gcc" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 865 | break |
| 866 | fi |
| 867 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 868 | IFS="$ac_save_ifs" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 869 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 870 | fi |
| 871 | CC="$ac_cv_prog_CC" |
| 872 | if test -n "$CC"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 873 | echo "$ac_t""$CC" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 874 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 875 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 876 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 877 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 878 | if test -z "$CC"; then |
| 879 | # Extract the first word of "cc", so it can be a program name with args. |
| 880 | set dummy cc; ac_word=$2 |
| 881 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 882 | echo "configure:883: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 883 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 884 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 885 | else |
| 886 | if test -n "$CC"; then |
| 887 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 888 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 889 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 890 | ac_prog_rejected=no |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 891 | ac_dummy="$PATH" |
| 892 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 893 | test -z "$ac_dir" && ac_dir=. |
| 894 | if test -f $ac_dir/$ac_word; then |
| 895 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then |
| 896 | ac_prog_rejected=yes |
| 897 | continue |
| 898 | fi |
| 899 | ac_cv_prog_CC="cc" |
| 900 | break |
| 901 | fi |
| 902 | done |
| 903 | IFS="$ac_save_ifs" |
| 904 | if test $ac_prog_rejected = yes; then |
| 905 | # We found a bogon in the path, so make sure we never use it. |
| 906 | set dummy $ac_cv_prog_CC |
| 907 | shift |
| 908 | if test $# -gt 0; then |
| 909 | # We chose a different compiler from the bogus one. |
| 910 | # However, it has the same basename, so the bogon will be chosen |
| 911 | # first if we set CC to just the basename; use the full file name. |
| 912 | shift |
| 913 | set dummy "$ac_dir/$ac_word" "$@" |
| 914 | shift |
| 915 | ac_cv_prog_CC="$@" |
| 916 | fi |
| 917 | fi |
| 918 | fi |
| 919 | fi |
| 920 | CC="$ac_cv_prog_CC" |
| 921 | if test -n "$CC"; then |
| 922 | echo "$ac_t""$CC" 1>&6 |
| 923 | else |
| 924 | echo "$ac_t""no" 1>&6 |
| 925 | fi |
| 926 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 927 | if test -z "$CC"; then |
| 928 | case "`uname -s`" in |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 929 | *win32* | *WIN32*) |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 930 | # Extract the first word of "cl", so it can be a program name with args. |
| 931 | set dummy cl; ac_word=$2 |
| 932 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 933 | echo "configure:934: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 934 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 935 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 936 | else |
| 937 | if test -n "$CC"; then |
| 938 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 939 | else |
| 940 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 941 | ac_dummy="$PATH" |
| 942 | for ac_dir in $ac_dummy; do |
| 943 | test -z "$ac_dir" && ac_dir=. |
| 944 | if test -f $ac_dir/$ac_word; then |
| 945 | ac_cv_prog_CC="cl" |
| 946 | break |
| 947 | fi |
| 948 | done |
| 949 | IFS="$ac_save_ifs" |
| 950 | fi |
| 951 | fi |
| 952 | CC="$ac_cv_prog_CC" |
| 953 | if test -n "$CC"; then |
| 954 | echo "$ac_t""$CC" 1>&6 |
| 955 | else |
| 956 | echo "$ac_t""no" 1>&6 |
| 957 | fi |
| 958 | ;; |
| 959 | esac |
| 960 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 961 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
| 962 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 963 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 964 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 965 | echo "configure:966: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 966 | |
| 967 | ac_ext=c |
| 968 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 969 | ac_cpp='$CPP $CPPFLAGS' |
| 970 | 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] | 971 | 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] | 972 | cross_compiling=$ac_cv_prog_cc_cross |
| 973 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 974 | cat > conftest.$ac_ext << EOF |
| 975 | |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 976 | #line 977 "configure" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 977 | #include "confdefs.h" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 978 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 979 | main(){return(0);} |
| 980 | EOF |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 981 | if { (eval echo configure:982: \"$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] | 982 | ac_cv_prog_cc_works=yes |
| 983 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 984 | if (./conftest; exit) 2>/dev/null; then |
| 985 | ac_cv_prog_cc_cross=no |
| 986 | else |
| 987 | ac_cv_prog_cc_cross=yes |
| 988 | fi |
| 989 | else |
| 990 | echo "configure: failed program was:" >&5 |
| 991 | cat conftest.$ac_ext >&5 |
| 992 | ac_cv_prog_cc_works=no |
| 993 | fi |
| 994 | rm -fr conftest* |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 995 | ac_ext=c |
| 996 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 997 | ac_cpp='$CPP $CPPFLAGS' |
| 998 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 999 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 1000 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1001 | |
| 1002 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
| 1003 | if test $ac_cv_prog_cc_works = no; then |
| 1004 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } |
| 1005 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1006 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 1007 | echo "configure:1008: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1008 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
| 1009 | cross_compiling=$ac_cv_prog_cc_cross |
| 1010 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1011 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 1012 | echo "configure:1013: checking whether we are using GNU C" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1013 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1014 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1015 | else |
| 1016 | cat > conftest.c <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1017 | #ifdef __GNUC__ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1018 | yes; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1019 | #endif |
| 1020 | EOF |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 1021 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1022: \"$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] | 1022 | ac_cv_prog_gcc=yes |
| 1023 | else |
| 1024 | ac_cv_prog_gcc=no |
| 1025 | fi |
| 1026 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1027 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1028 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1029 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1030 | if test $ac_cv_prog_gcc = yes; then |
| 1031 | GCC=yes |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1032 | else |
| 1033 | GCC= |
| 1034 | fi |
| 1035 | |
| 1036 | ac_test_CFLAGS="${CFLAGS+set}" |
| 1037 | ac_save_CFLAGS="$CFLAGS" |
| 1038 | CFLAGS= |
| 1039 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 1040 | echo "configure:1041: checking whether ${CC-cc} accepts -g" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1041 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1042 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1043 | else |
| 1044 | echo 'void f(){}' > conftest.c |
| 1045 | 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] | 1046 | ac_cv_prog_cc_g=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1047 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1048 | ac_cv_prog_cc_g=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1049 | fi |
| 1050 | rm -f conftest* |
| 1051 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1052 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1053 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1054 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1055 | if test "$ac_test_CFLAGS" = set; then |
| 1056 | CFLAGS="$ac_save_CFLAGS" |
| 1057 | elif test $ac_cv_prog_cc_g = yes; then |
| 1058 | if test "$GCC" = yes; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1059 | CFLAGS="-g -O2" |
| 1060 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1061 | CFLAGS="-g" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1062 | fi |
| 1063 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1064 | if test "$GCC" = yes; then |
| 1065 | CFLAGS="-O2" |
| 1066 | else |
| 1067 | CFLAGS= |
| 1068 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1069 | fi |
| 1070 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1071 | |
| 1072 | # checks for UNIX variants that set C preprocessor variables |
| 1073 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
| 1074 | echo "configure:1075: checking how to run the C preprocessor" >&5 |
| 1075 | # On Suns, sometimes $CPP names a directory. |
| 1076 | if test -n "$CPP" && test -d "$CPP"; then |
| 1077 | CPP= |
| 1078 | fi |
| 1079 | if test -z "$CPP"; then |
| 1080 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
| 1081 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1082 | else |
| 1083 | # This must be in double quotes, not single quotes, because CPP may get |
| 1084 | # substituted into the Makefile and "${CC-cc}" will confuse make. |
| 1085 | CPP="${CC-cc} -E" |
| 1086 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 1087 | # not just through cpp. |
| 1088 | cat > conftest.$ac_ext <<EOF |
| 1089 | #line 1090 "configure" |
| 1090 | #include "confdefs.h" |
| 1091 | #include <assert.h> |
| 1092 | Syntax Error |
| 1093 | EOF |
| 1094 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| 1095 | { (eval echo configure:1096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| 1096 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1097 | if test -z "$ac_err"; then |
| 1098 | : |
| 1099 | else |
| 1100 | echo "$ac_err" >&5 |
| 1101 | echo "configure: failed program was:" >&5 |
| 1102 | cat conftest.$ac_ext >&5 |
| 1103 | rm -rf conftest* |
| 1104 | CPP="${CC-cc} -E -traditional-cpp" |
| 1105 | cat > conftest.$ac_ext <<EOF |
| 1106 | #line 1107 "configure" |
| 1107 | #include "confdefs.h" |
| 1108 | #include <assert.h> |
| 1109 | Syntax Error |
| 1110 | EOF |
| 1111 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| 1112 | { (eval echo configure:1113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| 1113 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1114 | if test -z "$ac_err"; then |
| 1115 | : |
| 1116 | else |
| 1117 | echo "$ac_err" >&5 |
| 1118 | echo "configure: failed program was:" >&5 |
| 1119 | cat conftest.$ac_ext >&5 |
| 1120 | rm -rf conftest* |
| 1121 | CPP="${CC-cc} -nologo -E" |
| 1122 | cat > conftest.$ac_ext <<EOF |
| 1123 | #line 1124 "configure" |
| 1124 | #include "confdefs.h" |
| 1125 | #include <assert.h> |
| 1126 | Syntax Error |
| 1127 | EOF |
| 1128 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| 1129 | { (eval echo configure:1130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| 1130 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1131 | if test -z "$ac_err"; then |
| 1132 | : |
| 1133 | else |
| 1134 | echo "$ac_err" >&5 |
| 1135 | echo "configure: failed program was:" >&5 |
| 1136 | cat conftest.$ac_ext >&5 |
| 1137 | rm -rf conftest* |
| 1138 | CPP=/lib/cpp |
| 1139 | fi |
| 1140 | rm -f conftest* |
| 1141 | fi |
| 1142 | rm -f conftest* |
| 1143 | fi |
| 1144 | rm -f conftest* |
| 1145 | ac_cv_prog_CPP="$CPP" |
| 1146 | fi |
| 1147 | CPP="$ac_cv_prog_CPP" |
| 1148 | else |
| 1149 | ac_cv_prog_CPP="$CPP" |
| 1150 | fi |
| 1151 | echo "$ac_t""$CPP" 1>&6 |
| 1152 | |
| 1153 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 |
| 1154 | echo "configure:1155: checking for AIX" >&5 |
| 1155 | cat > conftest.$ac_ext <<EOF |
| 1156 | #line 1157 "configure" |
| 1157 | #include "confdefs.h" |
| 1158 | #ifdef _AIX |
| 1159 | yes |
| 1160 | #endif |
| 1161 | |
| 1162 | EOF |
| 1163 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1164 | egrep "yes" >/dev/null 2>&1; then |
| 1165 | rm -rf conftest* |
| 1166 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF |
| 1167 | #define _ALL_SOURCE 1 |
| 1168 | EOF |
| 1169 | |
| 1170 | else |
| 1171 | rm -rf conftest* |
| 1172 | echo "$ac_t""no" 1>&6 |
| 1173 | fi |
| 1174 | rm -f conftest* |
| 1175 | |
| 1176 | |
| 1177 | ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` |
| 1178 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 |
| 1179 | echo "configure:1180: checking for minix/config.h" >&5 |
| 1180 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 1181 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1182 | else |
| 1183 | cat > conftest.$ac_ext <<EOF |
| 1184 | #line 1185 "configure" |
| 1185 | #include "confdefs.h" |
| 1186 | #include <minix/config.h> |
| 1187 | EOF |
| 1188 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
| 1189 | { (eval echo configure:1190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
| 1190 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1191 | if test -z "$ac_err"; then |
| 1192 | rm -rf conftest* |
| 1193 | eval "ac_cv_header_$ac_safe=yes" |
| 1194 | else |
| 1195 | echo "$ac_err" >&5 |
| 1196 | echo "configure: failed program was:" >&5 |
| 1197 | cat conftest.$ac_ext >&5 |
| 1198 | rm -rf conftest* |
| 1199 | eval "ac_cv_header_$ac_safe=no" |
| 1200 | fi |
| 1201 | rm -f conftest* |
| 1202 | fi |
| 1203 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 1204 | echo "$ac_t""yes" 1>&6 |
| 1205 | MINIX=yes |
| 1206 | else |
| 1207 | echo "$ac_t""no" 1>&6 |
| 1208 | MINIX= |
| 1209 | fi |
| 1210 | |
| 1211 | if test "$MINIX" = yes; then |
| 1212 | cat >> confdefs.h <<\EOF |
| 1213 | #define _POSIX_SOURCE 1 |
| 1214 | EOF |
| 1215 | |
| 1216 | cat >> confdefs.h <<\EOF |
| 1217 | #define _POSIX_1_SOURCE 2 |
| 1218 | EOF |
| 1219 | |
| 1220 | cat >> confdefs.h <<\EOF |
| 1221 | #define _MINIX 1 |
| 1222 | EOF |
| 1223 | |
| 1224 | fi |
| 1225 | |
| 1226 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1227 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1228 | echo "configure:1229: checking for Cygwin environment" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1229 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
| 1230 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1231 | else |
| 1232 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1233 | #line 1234 "configure" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1234 | #include "confdefs.h" |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1235 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1236 | int main() { |
| 1237 | |
| 1238 | #ifndef __CYGWIN__ |
| 1239 | #define __CYGWIN__ __CYGWIN32__ |
| 1240 | #endif |
| 1241 | return __CYGWIN__; |
| 1242 | ; return 0; } |
| 1243 | EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1244 | if { (eval echo configure:1245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1245 | rm -rf conftest* |
| 1246 | ac_cv_cygwin=yes |
| 1247 | else |
| 1248 | echo "configure: failed program was:" >&5 |
| 1249 | cat conftest.$ac_ext >&5 |
| 1250 | rm -rf conftest* |
| 1251 | ac_cv_cygwin=no |
| 1252 | fi |
| 1253 | rm -f conftest* |
| 1254 | rm -f conftest* |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1255 | fi |
| 1256 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1257 | echo "$ac_t""$ac_cv_cygwin" 1>&6 |
| 1258 | CYGWIN= |
| 1259 | test "$ac_cv_cygwin" = yes && CYGWIN=yes |
| 1260 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1261 | echo "configure:1262: checking for mingw32 environment" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1262 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
| 1263 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1264 | else |
| 1265 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1266 | #line 1267 "configure" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1267 | #include "confdefs.h" |
| 1268 | |
| 1269 | int main() { |
| 1270 | return __MINGW32__; |
| 1271 | ; return 0; } |
| 1272 | EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1273 | if { (eval echo configure:1274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1274 | rm -rf conftest* |
| 1275 | ac_cv_mingw32=yes |
| 1276 | else |
| 1277 | echo "configure: failed program was:" >&5 |
| 1278 | cat conftest.$ac_ext >&5 |
| 1279 | rm -rf conftest* |
| 1280 | ac_cv_mingw32=no |
| 1281 | fi |
| 1282 | rm -f conftest* |
| 1283 | rm -f conftest* |
| 1284 | fi |
| 1285 | |
| 1286 | echo "$ac_t""$ac_cv_mingw32" 1>&6 |
| 1287 | MINGW32= |
| 1288 | test "$ac_cv_mingw32" = yes && MINGW32=yes |
| 1289 | |
| 1290 | |
| 1291 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1292 | echo "configure:1293: checking for executable suffix" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1293 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
| 1294 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1295 | else |
| 1296 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then |
| 1297 | ac_cv_exeext=.exe |
| 1298 | else |
| 1299 | rm -f conftest* |
| 1300 | echo 'int main () { return 0; }' > conftest.$ac_ext |
| 1301 | ac_cv_exeext= |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1302 | if { (eval echo configure:1303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1303 | for file in conftest.*; do |
| 1304 | case $file in |
| 1305 | *.c | *.o | *.obj) ;; |
| 1306 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
| 1307 | esac |
| 1308 | done |
| 1309 | else |
| 1310 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } |
| 1311 | fi |
| 1312 | rm -f conftest* |
| 1313 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no |
| 1314 | fi |
| 1315 | fi |
| 1316 | |
| 1317 | EXEEXT="" |
| 1318 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} |
| 1319 | echo "$ac_t""${ac_cv_exeext}" 1>&6 |
| 1320 | ac_exeext=$EXEEXT |
| 1321 | |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1322 | echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1323 | echo "configure:1324: checking for --with-suffix" >&5 |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1324 | # Check whether --with-suffix or --without-suffix was given. |
| 1325 | if test "${with_suffix+set}" = set; then |
| 1326 | withval="$with_suffix" |
| 1327 | |
| 1328 | case $withval in |
| 1329 | no) EXEEXT=;; |
| 1330 | yes) EXEEXT=.exe;; |
| 1331 | *) EXEEXT=$withval;; |
| 1332 | esac |
| 1333 | fi |
| 1334 | |
| 1335 | echo "$ac_t""$EXEEXT" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1336 | # Test whether we're running on a non-case-sensitive system, in which |
| 1337 | # case we give a warning if no ext is given |
| 1338 | if test -d "python" -a -z "$EXEEXT" |
| 1339 | then |
| 1340 | echo "configure: warning: This filesystem is not case-sensitive so you should probably use --with-suffix" 1>&2 |
| 1341 | fi |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1342 | |
Guido van Rossum | dd997f7 | 1998-10-07 19:58:26 +0000 | [diff] [blame] | 1343 | case $MACHDEP in |
| 1344 | bsdos*) |
| 1345 | case $CC in |
| 1346 | gcc) CC="$CC -D_HAVE_BSDI";; |
| 1347 | esac;; |
| 1348 | esac |
| 1349 | |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1350 | case $ac_sys_system in |
| 1351 | hp*|HP*) |
| 1352 | case $CC in |
Guido van Rossum | cd5ff9f | 2000-09-22 16:15:54 +0000 | [diff] [blame] | 1353 | cc|*/cc) CC="$CC -Ae";; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1354 | esac;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1355 | Monterey*) |
| 1356 | case $CC in |
| 1357 | cc) CC="$CC -Wl,-Bexport";; |
| 1358 | esac;; |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1359 | SunOS*) |
| 1360 | # Some functions have a prototype only with that define, e.g. confstr |
| 1361 | cat >> confdefs.h <<\EOF |
| 1362 | #define __EXTENSIONS__ 1 |
| 1363 | EOF |
| 1364 | |
| 1365 | ;; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1366 | esac |
| 1367 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1368 | |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1369 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1370 | echo $ac_n "checking LIBRARY""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1371 | echo "configure:1372: checking LIBRARY" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1372 | if test -z "$LIBRARY" |
| 1373 | then |
| 1374 | LIBRARY='libpython$(VERSION).a' |
| 1375 | fi |
| 1376 | echo "$ac_t""$LIBRARY" 1>&6 |
| 1377 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1378 | # LDLIBRARY is the name of the library to link against (as opposed to the |
| 1379 | # name of the library into which to insert object files). On systems |
| 1380 | # without shared libraries, LDLIBRARY is the same as LIBRARY (defined in |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1381 | # the Makefiles). On Cygwin LDLIBRARY is the import library, DLLLIBRARY is the |
| 1382 | # shared (i.e., DLL) library. |
| 1383 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1384 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1385 | LDLIBRARY="$LIBRARY" |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 1386 | DLLLIBRARY='' |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1387 | |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1388 | # LINKCC is the command that links the python executable -- default is $(CC). |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1389 | # 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] | 1390 | # linking. |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1391 | |
| 1392 | echo $ac_n "checking LINKCC""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1393 | echo "configure:1394: checking LINKCC" >&5 |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1394 | if test -z "$LINKCC" |
| 1395 | then |
| 1396 | case $ac_sys_system in |
| 1397 | AIX*) |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 1398 | LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 1399 | dgux*) |
| 1400 | LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1401 | Monterey64*) |
| 1402 | LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";; |
Guido van Rossum | 25f9303 | 1997-08-18 16:00:04 +0000 | [diff] [blame] | 1403 | *) LINKCC="\$(PURIFY) \$(CC)";; |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1404 | esac |
| 1405 | fi |
| 1406 | echo "$ac_t""$LINKCC" 1>&6 |
| 1407 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1408 | echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1409 | echo "configure:1410: checking LDLIBRARY" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1410 | |
| 1411 | # NeXT framework builds require that the 'ar' library be converted into |
| 1412 | # a bundle using libtool. |
| 1413 | if test "$with_next_framework" |
| 1414 | then |
| 1415 | LDLIBRARY='libpython$(VERSION).dylib' |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 1416 | DLLLIBRARY=$LDLIBRARY |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1417 | fi |
| 1418 | |
| 1419 | # 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] | 1420 | case $MACHDEP in |
| 1421 | dguxR4) |
| 1422 | LDLIBRARY='libpython$(VERSION).so' |
| 1423 | OPT="$OPT -pic" |
| 1424 | ;; |
| 1425 | beos*) |
| 1426 | LDLIBRARY='libpython$(VERSION).so' |
| 1427 | ;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1428 | cygwin*) |
| 1429 | LDLIBRARY='libpython$(VERSION).dll.a' |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1430 | DLLLIBRARY='libpython$(VERSION).dll' |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1431 | ;; |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1432 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1433 | echo "$ac_t""$LDLIBRARY" 1>&6 |
| 1434 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1435 | # Extract the first word of "ranlib", so it can be a program name with args. |
| 1436 | set dummy ranlib; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1437 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1438 | echo "configure:1439: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1439 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1440 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1441 | else |
| 1442 | if test -n "$RANLIB"; then |
| 1443 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 1444 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1445 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1446 | ac_dummy="$PATH" |
| 1447 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1448 | test -z "$ac_dir" && ac_dir=. |
| 1449 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1450 | ac_cv_prog_RANLIB="ranlib" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1451 | break |
| 1452 | fi |
| 1453 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1454 | IFS="$ac_save_ifs" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1455 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1456 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1457 | fi |
| 1458 | RANLIB="$ac_cv_prog_RANLIB" |
| 1459 | if test -n "$RANLIB"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1460 | echo "$ac_t""$RANLIB" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1461 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1462 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1463 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1464 | |
| 1465 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1466 | for ac_prog in ar aal |
| 1467 | do |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1468 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 1469 | set dummy $ac_prog; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1470 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1471 | echo "configure:1472: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1472 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1473 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1474 | else |
| 1475 | if test -n "$AR"; then |
| 1476 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 1477 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1478 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1479 | ac_dummy="$PATH" |
| 1480 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1481 | test -z "$ac_dir" && ac_dir=. |
| 1482 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1483 | ac_cv_prog_AR="$ac_prog" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1484 | break |
| 1485 | fi |
| 1486 | done |
| 1487 | IFS="$ac_save_ifs" |
| 1488 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1489 | fi |
| 1490 | AR="$ac_cv_prog_AR" |
| 1491 | if test -n "$AR"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1492 | echo "$ac_t""$AR" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1493 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1494 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1495 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1496 | |
| 1497 | test -n "$AR" && break |
| 1498 | done |
| 1499 | test -n "$AR" || AR="ar" |
| 1500 | |
Neil Schemenauer | a42c827 | 2001-03-31 00:01:55 +0000 | [diff] [blame] | 1501 | |
| 1502 | case $MACHDEP in |
| 1503 | bsdos*) |
| 1504 | # install -d does not work on BSDI |
| 1505 | if test -z "$INSTALL" |
| 1506 | then |
| 1507 | INSTALL="${srcdir}/install-sh -c" |
| 1508 | fi |
| 1509 | esac |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1510 | ac_aux_dir= |
| 1511 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
| 1512 | if test -f $ac_dir/install-sh; then |
| 1513 | ac_aux_dir=$ac_dir |
| 1514 | ac_install_sh="$ac_aux_dir/install-sh -c" |
| 1515 | break |
| 1516 | elif test -f $ac_dir/install.sh; then |
| 1517 | ac_aux_dir=$ac_dir |
| 1518 | ac_install_sh="$ac_aux_dir/install.sh -c" |
| 1519 | break |
| 1520 | fi |
| 1521 | done |
| 1522 | if test -z "$ac_aux_dir"; then |
| 1523 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1524 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1525 | ac_config_guess=$ac_aux_dir/config.guess |
| 1526 | ac_config_sub=$ac_aux_dir/config.sub |
| 1527 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. |
| 1528 | |
| 1529 | # Find a good install program. We prefer a C program (faster), |
| 1530 | # so one script is as good as another. But avoid the broken or |
| 1531 | # incompatible versions: |
| 1532 | # SysV /etc/install, /usr/sbin/install |
| 1533 | # SunOS /usr/etc/install |
| 1534 | # IRIX /sbin/install |
| 1535 | # AIX /bin/install |
| 1536 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
| 1537 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
| 1538 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
| 1539 | # ./install, which can be erroneously created by make from ./install.sh. |
| 1540 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1541 | echo "configure:1542: checking for a BSD compatible install" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1542 | if test -z "$INSTALL"; then |
| 1543 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
| 1544 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1545 | else |
| 1546 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" |
| 1547 | for ac_dir in $PATH; do |
| 1548 | # Account for people who put trailing slashes in PATH elements. |
| 1549 | case "$ac_dir/" in |
| 1550 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; |
| 1551 | *) |
| 1552 | # OSF1 and SCO ODT 3.0 have their own names for install. |
| 1553 | # Don't use installbsd from OSF since it installs stuff as root |
| 1554 | # by default. |
| 1555 | for ac_prog in ginstall scoinst install; do |
| 1556 | if test -f $ac_dir/$ac_prog; then |
| 1557 | if test $ac_prog = install && |
| 1558 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then |
| 1559 | # AIX install. It has an incompatible calling convention. |
| 1560 | : |
| 1561 | else |
| 1562 | ac_cv_path_install="$ac_dir/$ac_prog -c" |
| 1563 | break 2 |
| 1564 | fi |
| 1565 | fi |
| 1566 | done |
| 1567 | ;; |
| 1568 | esac |
| 1569 | done |
| 1570 | IFS="$ac_save_IFS" |
| 1571 | |
| 1572 | fi |
| 1573 | if test "${ac_cv_path_install+set}" = set; then |
| 1574 | INSTALL="$ac_cv_path_install" |
| 1575 | else |
| 1576 | # As a last resort, use the slow shell script. We don't cache a |
| 1577 | # path for INSTALL within a source directory, because that will |
| 1578 | # break other packages using the cache if that directory is |
| 1579 | # removed, or if the path is relative. |
| 1580 | INSTALL="$ac_install_sh" |
| 1581 | fi |
| 1582 | fi |
| 1583 | echo "$ac_t""$INSTALL" 1>&6 |
| 1584 | |
| 1585 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
| 1586 | # It thinks the first close brace ends the variable substitution. |
| 1587 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' |
| 1588 | |
| 1589 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
| 1590 | |
| 1591 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
| 1592 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1593 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1594 | # Not every filesystem supports hard links |
| 1595 | |
| 1596 | if test -z "$LN" ; then |
| 1597 | case $ac_sys_system in |
| 1598 | BeOS*) LN="ln -s";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1599 | CYGWIN*) LN="ln -s";; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1600 | *) LN=ln;; |
| 1601 | esac |
| 1602 | fi |
| 1603 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1604 | # Check for --with-pydebug |
| 1605 | echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1606 | echo "configure:1607: checking for --with-pydebug" >&5 |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1607 | # Check whether --with-pydebug or --without-pydebug was given. |
| 1608 | if test "${with_pydebug+set}" = set; then |
| 1609 | withval="$with_pydebug" |
| 1610 | |
| 1611 | if test "$withval" != no |
| 1612 | then cat >> confdefs.h <<\EOF |
| 1613 | #define Py_DEBUG 1 |
| 1614 | EOF |
| 1615 | echo "$ac_t""yes" 1>&6; Py_DEBUG='true' |
| 1616 | else echo "$ac_t""no" 1>&6; Py_DEBUG='false' |
| 1617 | fi |
| 1618 | else |
| 1619 | echo "$ac_t""no" 1>&6 |
| 1620 | fi |
| 1621 | |
| 1622 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1623 | # Optimizer/debugger flags |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1624 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1625 | if test -z "$OPT" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1626 | then |
Guido van Rossum | edca74a | 1997-07-18 23:29:40 +0000 | [diff] [blame] | 1627 | case $GCC in |
| 1628 | yes) |
| 1629 | case $ac_cv_prog_cc_g in |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1630 | yes) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1631 | if test "$Py_DEBUG" = 'true' ; then |
| 1632 | # Optimization messes up debuggers, so turn it off for |
| 1633 | # debug builds. |
| 1634 | OPT="-g -Wall -Wstrict-prototypes" |
| 1635 | else |
| 1636 | OPT="-g -O3 -Wall -Wstrict-prototypes" |
| 1637 | fi;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1638 | *) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1639 | OPT="-O3 -Wall -Wstrict-prototypes";; |
| 1640 | esac |
| 1641 | ;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1642 | *) |
| 1643 | case $ac_sys_system in |
| 1644 | UnixWare*) |
| 1645 | OPT="-O -K pentium,host,inline,loop_unroll,alloca ";; |
| 1646 | *) |
| 1647 | OPT="-O";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1648 | esac |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1649 | esac |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 1650 | case $ac_sys_system in |
| 1651 | Darwin*) |
| 1652 | OPT="$OPT -no-cpp-precomp";; |
| 1653 | esac |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1654 | fi |
| 1655 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1656 | # The current (beta) Monterey compiler dies with optimizations |
| 1657 | case $ac_sys_system in |
| 1658 | Monterey*) OPT="";; |
| 1659 | esac |
| 1660 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 1661 | if test "$ac_arch_flags" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 1662 | then |
| 1663 | OPT="$OPT $ac_arch_flags" |
| 1664 | fi |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1665 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1666 | echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1667 | echo "configure:1668: checking whether $CC accepts -OPT:Olimit=0" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1668 | if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1669 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1670 | else |
| 1671 | ac_save_cc="$CC" |
| 1672 | CC="$CC -OPT:Olimit=0" |
| 1673 | if test "$cross_compiling" = yes; then |
| 1674 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1675 | else |
| 1676 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1677 | #line 1678 "configure" |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1678 | #include "confdefs.h" |
| 1679 | int main() { return 0; } |
| 1680 | EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1681 | if { (eval echo configure:1682: \"$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] | 1682 | then |
| 1683 | ac_cv_opt_olimit_ok=yes |
| 1684 | else |
| 1685 | echo "configure: failed program was:" >&5 |
| 1686 | cat conftest.$ac_ext >&5 |
| 1687 | rm -fr conftest* |
| 1688 | ac_cv_opt_olimit_ok=no |
| 1689 | fi |
| 1690 | rm -fr conftest* |
| 1691 | fi |
| 1692 | |
| 1693 | CC="$ac_save_cc" |
| 1694 | fi |
| 1695 | |
| 1696 | echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6 |
Guido van Rossum | 2efa34b | 1997-10-23 17:43:11 +0000 | [diff] [blame] | 1697 | if test $ac_cv_opt_olimit_ok = yes; then |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 1698 | case $ac_sys_system in |
| 1699 | Darwin*) OPT="$OPT" ;; |
| 1700 | *) OPT="$OPT -OPT:Olimit=0";; |
| 1701 | esac |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1702 | else |
| 1703 | echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1704 | echo "configure:1705: checking whether $CC accepts -Olimit 1500" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1705 | if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1706 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1707 | else |
| 1708 | ac_save_cc="$CC" |
| 1709 | CC="$CC -Olimit 1500" |
| 1710 | if test "$cross_compiling" = yes; then |
| 1711 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1712 | else |
| 1713 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1714 | #line 1715 "configure" |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1715 | #include "confdefs.h" |
| 1716 | int main() { return 0; } |
| 1717 | EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1718 | if { (eval echo configure:1719: \"$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] | 1719 | then |
| 1720 | ac_cv_olimit_ok=yes |
| 1721 | else |
| 1722 | echo "configure: failed program was:" >&5 |
| 1723 | cat conftest.$ac_ext >&5 |
| 1724 | rm -fr conftest* |
| 1725 | ac_cv_olimit_ok=no |
Guido van Rossum | 201afe5 | 1997-05-14 21:14:44 +0000 | [diff] [blame] | 1726 | fi |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1727 | rm -fr conftest* |
| 1728 | fi |
| 1729 | |
| 1730 | CC="$ac_save_cc" |
| 1731 | fi |
| 1732 | |
| 1733 | echo "$ac_t""$ac_cv_olimit_ok" 1>&6 |
| 1734 | if test $ac_cv_olimit_ok = yes; then |
| 1735 | OPT="$OPT -Olimit 1500" |
| 1736 | fi |
| 1737 | fi |
| 1738 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1739 | # -Kpthread, if available, provides the right #defines |
| 1740 | # and linker options to make pthread_create available |
| 1741 | echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1742 | echo "configure:1743: checking whether $CC accepts -Kpthread" >&5 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1743 | if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then |
| 1744 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1745 | else |
| 1746 | ac_save_cc="$CC" |
| 1747 | CC="$CC -Kpthread" |
| 1748 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1749 | #line 1750 "configure" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1750 | #include "confdefs.h" |
| 1751 | #include <pthread.h> |
| 1752 | int main() { |
| 1753 | pthread_create(0,0,0,0) |
| 1754 | ; return 0; } |
| 1755 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1756 | if { (eval echo configure:1757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1757 | rm -rf conftest* |
| 1758 | ac_cv_kpthread=yes |
| 1759 | else |
| 1760 | echo "configure: failed program was:" >&5 |
| 1761 | cat conftest.$ac_ext >&5 |
| 1762 | rm -rf conftest* |
| 1763 | ac_cv_kpthread=no |
| 1764 | fi |
| 1765 | rm -f conftest* |
| 1766 | CC="$ac_save_cc" |
| 1767 | fi |
| 1768 | |
| 1769 | |
| 1770 | # GCC does not reject -Kpthread as an illegal option, it merely complains that |
| 1771 | # it is unrecognized |
| 1772 | if test "$GCC" = "yes" |
| 1773 | then ac_cv_kpthread="no, we have gcc" |
| 1774 | fi |
| 1775 | echo "$ac_t""$ac_cv_kpthread" 1>&6 |
| 1776 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1777 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1778 | # checks for header files |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1779 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1780 | echo "configure:1781: checking for ANSI C header files" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1781 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1782 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1783 | else |
| 1784 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1785 | #line 1786 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1786 | #include "confdefs.h" |
| 1787 | #include <stdlib.h> |
| 1788 | #include <stdarg.h> |
| 1789 | #include <string.h> |
| 1790 | #include <float.h> |
| 1791 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1792 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1793 | { (eval echo configure:1794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1794 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1795 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1796 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1797 | ac_cv_header_stdc=yes |
| 1798 | else |
| 1799 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1800 | echo "configure: failed program was:" >&5 |
| 1801 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1802 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1803 | ac_cv_header_stdc=no |
| 1804 | fi |
| 1805 | rm -f conftest* |
| 1806 | |
| 1807 | if test $ac_cv_header_stdc = yes; then |
| 1808 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 1809 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1810 | #line 1811 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1811 | #include "confdefs.h" |
| 1812 | #include <string.h> |
| 1813 | EOF |
| 1814 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1815 | egrep "memchr" >/dev/null 2>&1; then |
| 1816 | : |
| 1817 | else |
| 1818 | rm -rf conftest* |
| 1819 | ac_cv_header_stdc=no |
| 1820 | fi |
| 1821 | rm -f conftest* |
| 1822 | |
| 1823 | fi |
| 1824 | |
| 1825 | if test $ac_cv_header_stdc = yes; then |
| 1826 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 1827 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1828 | #line 1829 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1829 | #include "confdefs.h" |
| 1830 | #include <stdlib.h> |
| 1831 | EOF |
| 1832 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1833 | egrep "free" >/dev/null 2>&1; then |
| 1834 | : |
| 1835 | else |
| 1836 | rm -rf conftest* |
| 1837 | ac_cv_header_stdc=no |
| 1838 | fi |
| 1839 | rm -f conftest* |
| 1840 | |
| 1841 | fi |
| 1842 | |
| 1843 | if test $ac_cv_header_stdc = yes; then |
| 1844 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| 1845 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1846 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1847 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1848 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1849 | #line 1850 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1850 | #include "confdefs.h" |
| 1851 | #include <ctype.h> |
| 1852 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 1853 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1854 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1855 | int main () { int i; for (i = 0; i < 256; i++) |
| 1856 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 1857 | exit (0); } |
| 1858 | |
| 1859 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1860 | if { (eval echo configure:1861: \"$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] | 1861 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1862 | : |
| 1863 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1864 | echo "configure: failed program was:" >&5 |
| 1865 | cat conftest.$ac_ext >&5 |
| 1866 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1867 | ac_cv_header_stdc=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1868 | fi |
| 1869 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1870 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1871 | |
| 1872 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1873 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1874 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1875 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1876 | if test $ac_cv_header_stdc = yes; then |
| 1877 | cat >> confdefs.h <<\EOF |
| 1878 | #define STDC_HEADERS 1 |
| 1879 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1880 | |
| 1881 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1882 | |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 1883 | for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h poll.h pthread.h \ |
Eric S. Raymond | d2d75d3 | 2001-01-16 15:26:34 +0000 | [diff] [blame] | 1884 | signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \ |
Fred Drake | bbc3c5a | 2001-05-11 16:11:25 +0000 | [diff] [blame] | 1885 | sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \ |
Andrew M. Kuchling | 881fd90 | 2001-07-14 20:55:52 +0000 | [diff] [blame] | 1886 | sys/param.h sys/poll.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] | 1887 | sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 1888 | ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1889 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1890 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1891 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1892 | echo "configure:1893: checking for $ac_hdr" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1893 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1894 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1895 | else |
| 1896 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1897 | #line 1898 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1898 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1899 | #include <$ac_hdr> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1900 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1901 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1902 | { (eval echo configure:1903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1903 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1904 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1905 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1906 | eval "ac_cv_header_$ac_safe=yes" |
| 1907 | else |
| 1908 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1909 | echo "configure: failed program was:" >&5 |
| 1910 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1911 | rm -rf conftest* |
| 1912 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1913 | fi |
| 1914 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1915 | fi |
| 1916 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1917 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1918 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1919 | cat >> confdefs.h <<EOF |
| 1920 | #define $ac_tr_hdr 1 |
| 1921 | EOF |
| 1922 | |
| 1923 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1924 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1925 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1926 | done |
| 1927 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1928 | ac_header_dirent=no |
| 1929 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h |
| 1930 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1931 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1932 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1933 | echo "configure:1934: checking for $ac_hdr that defines DIR" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1934 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1935 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1936 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1937 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1938 | #line 1939 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1939 | #include "confdefs.h" |
| 1940 | #include <sys/types.h> |
| 1941 | #include <$ac_hdr> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1942 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1943 | DIR *dirp = 0; |
| 1944 | ; return 0; } |
| 1945 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1946 | if { (eval echo configure:1947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1947 | rm -rf conftest* |
| 1948 | eval "ac_cv_header_dirent_$ac_safe=yes" |
| 1949 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1950 | echo "configure: failed program was:" >&5 |
| 1951 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1952 | rm -rf conftest* |
| 1953 | eval "ac_cv_header_dirent_$ac_safe=no" |
| 1954 | fi |
| 1955 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1956 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1957 | 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] | 1958 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1959 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1960 | cat >> confdefs.h <<EOF |
| 1961 | #define $ac_tr_hdr 1 |
| 1962 | EOF |
| 1963 | ac_header_dirent=$ac_hdr; break |
| 1964 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1965 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1966 | fi |
| 1967 | done |
| 1968 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| 1969 | if test $ac_header_dirent = dirent.h; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1970 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1971 | echo "configure:1972: checking for opendir in -ldir" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1972 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1973 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1974 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1975 | else |
| 1976 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1977 | LIBS="-ldir $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1978 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1979 | #line 1980 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1980 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1981 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 1982 | /* We use char because int might match the return type of a gcc2 |
| 1983 | builtin and then its argument prototype would still apply. */ |
| 1984 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1985 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1986 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1987 | opendir() |
| 1988 | ; return 0; } |
| 1989 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1990 | if { (eval echo configure:1991: \"$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] | 1991 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1992 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1993 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1994 | echo "configure: failed program was:" >&5 |
| 1995 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1996 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1997 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1998 | fi |
| 1999 | rm -f conftest* |
| 2000 | LIBS="$ac_save_LIBS" |
| 2001 | |
| 2002 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2003 | 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] | 2004 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2005 | LIBS="$LIBS -ldir" |
| 2006 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2007 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2008 | fi |
| 2009 | |
| 2010 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2011 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2012 | echo "configure:2013: checking for opendir in -lx" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2013 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2014 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2015 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2016 | else |
| 2017 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2018 | LIBS="-lx $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2019 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2020 | #line 2021 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2021 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2022 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2023 | /* We use char because int might match the return type of a gcc2 |
| 2024 | builtin and then its argument prototype would still apply. */ |
| 2025 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2026 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2027 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2028 | opendir() |
| 2029 | ; return 0; } |
| 2030 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2031 | if { (eval echo configure:2032: \"$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] | 2032 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2033 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2034 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2035 | echo "configure: failed program was:" >&5 |
| 2036 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2037 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2038 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2039 | fi |
| 2040 | rm -f conftest* |
| 2041 | LIBS="$ac_save_LIBS" |
| 2042 | |
| 2043 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2044 | 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] | 2045 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2046 | LIBS="$LIBS -lx" |
| 2047 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2048 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2049 | fi |
| 2050 | |
| 2051 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2052 | |
| 2053 | |
| 2054 | # checks for typedefs |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2055 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2056 | echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2057 | echo "configure:2058: checking for clock_t in time.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2058 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2059 | #line 2060 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2060 | #include "confdefs.h" |
| 2061 | #include <time.h> |
| 2062 | EOF |
| 2063 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2064 | egrep "clock_t" >/dev/null 2>&1; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2065 | rm -rf conftest* |
| 2066 | was_it_defined=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2067 | else |
| 2068 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2069 | cat >> confdefs.h <<\EOF |
| 2070 | #define clock_t long |
| 2071 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2072 | |
| 2073 | fi |
| 2074 | rm -f conftest* |
| 2075 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2076 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2077 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2078 | # Add some code to confdefs.h so that the test for off_t works on SCO |
| 2079 | cat >> confdefs.h <<\EOF |
| 2080 | #if defined(SCO_DS) |
| 2081 | #undef _OFF_T |
| 2082 | #endif |
| 2083 | EOF |
| 2084 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2085 | # Type availability checks |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2086 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2087 | echo "configure:2088: checking for mode_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2088 | if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2089 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2090 | else |
| 2091 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2092 | #line 2093 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2093 | #include "confdefs.h" |
| 2094 | #include <sys/types.h> |
| 2095 | #if STDC_HEADERS |
| 2096 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2097 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2098 | #endif |
| 2099 | EOF |
| 2100 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2101 | 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] | 2102 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2103 | ac_cv_type_mode_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2104 | else |
| 2105 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2106 | ac_cv_type_mode_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2107 | fi |
| 2108 | rm -f conftest* |
| 2109 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2110 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2111 | echo "$ac_t""$ac_cv_type_mode_t" 1>&6 |
| 2112 | if test $ac_cv_type_mode_t = no; then |
| 2113 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2114 | #define mode_t int |
| 2115 | EOF |
| 2116 | |
| 2117 | fi |
| 2118 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2119 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2120 | echo "configure:2121: checking for off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2121 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2122 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2123 | else |
| 2124 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2125 | #line 2126 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2126 | #include "confdefs.h" |
| 2127 | #include <sys/types.h> |
| 2128 | #if STDC_HEADERS |
| 2129 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2130 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2131 | #endif |
| 2132 | EOF |
| 2133 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2134 | 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] | 2135 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2136 | ac_cv_type_off_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2137 | else |
| 2138 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2139 | ac_cv_type_off_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2140 | fi |
| 2141 | rm -f conftest* |
| 2142 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2143 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2144 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
| 2145 | if test $ac_cv_type_off_t = no; then |
| 2146 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2147 | #define off_t long |
| 2148 | EOF |
| 2149 | |
| 2150 | fi |
| 2151 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2152 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2153 | echo "configure:2154: checking for pid_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2154 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2155 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2156 | else |
| 2157 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2158 | #line 2159 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2159 | #include "confdefs.h" |
| 2160 | #include <sys/types.h> |
| 2161 | #if STDC_HEADERS |
| 2162 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2163 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2164 | #endif |
| 2165 | EOF |
| 2166 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2167 | 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] | 2168 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2169 | ac_cv_type_pid_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2170 | else |
| 2171 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2172 | ac_cv_type_pid_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2173 | fi |
| 2174 | rm -f conftest* |
| 2175 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2176 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2177 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
| 2178 | if test $ac_cv_type_pid_t = no; then |
| 2179 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2180 | #define pid_t int |
| 2181 | EOF |
| 2182 | |
| 2183 | fi |
| 2184 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2185 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2186 | echo "configure:2187: checking return type of signal handlers" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2187 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2188 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2189 | else |
| 2190 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2191 | #line 2192 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2192 | #include "confdefs.h" |
| 2193 | #include <sys/types.h> |
| 2194 | #include <signal.h> |
| 2195 | #ifdef signal |
| 2196 | #undef signal |
| 2197 | #endif |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2198 | #ifdef __cplusplus |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2199 | extern "C" void (*signal (int, void (*)(int)))(int); |
| 2200 | #else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2201 | void (*signal ()) (); |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2202 | #endif |
| 2203 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2204 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2205 | int i; |
| 2206 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2207 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2208 | if { (eval echo configure:2209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2209 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2210 | ac_cv_type_signal=void |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2211 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2212 | echo "configure: failed program was:" >&5 |
| 2213 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2214 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2215 | ac_cv_type_signal=int |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2216 | fi |
| 2217 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2218 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2219 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2220 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2221 | cat >> confdefs.h <<EOF |
| 2222 | #define RETSIGTYPE $ac_cv_type_signal |
| 2223 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2224 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2225 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2226 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2227 | echo "configure:2228: checking for size_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2228 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2229 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2230 | else |
| 2231 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2232 | #line 2233 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2233 | #include "confdefs.h" |
| 2234 | #include <sys/types.h> |
| 2235 | #if STDC_HEADERS |
| 2236 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2237 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2238 | #endif |
| 2239 | EOF |
| 2240 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2241 | 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] | 2242 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2243 | ac_cv_type_size_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2244 | else |
| 2245 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2246 | ac_cv_type_size_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2247 | fi |
| 2248 | rm -f conftest* |
| 2249 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2250 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2251 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
| 2252 | if test $ac_cv_type_size_t = no; then |
| 2253 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2254 | #define size_t unsigned |
| 2255 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2256 | |
| 2257 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2258 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2259 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2260 | echo "configure:2261: checking for uid_t in sys/types.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2261 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2262 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2263 | else |
| 2264 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2265 | #line 2266 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2266 | #include "confdefs.h" |
| 2267 | #include <sys/types.h> |
| 2268 | EOF |
| 2269 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2270 | egrep "uid_t" >/dev/null 2>&1; then |
| 2271 | rm -rf conftest* |
| 2272 | ac_cv_type_uid_t=yes |
| 2273 | else |
| 2274 | rm -rf conftest* |
| 2275 | ac_cv_type_uid_t=no |
| 2276 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2277 | rm -f conftest* |
| 2278 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2279 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2280 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2281 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2282 | if test $ac_cv_type_uid_t = no; then |
| 2283 | cat >> confdefs.h <<\EOF |
| 2284 | #define uid_t int |
| 2285 | EOF |
| 2286 | |
| 2287 | cat >> confdefs.h <<\EOF |
| 2288 | #define gid_t int |
| 2289 | EOF |
| 2290 | |
| 2291 | fi |
| 2292 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2293 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2294 | # Sizes of various common basic types |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2295 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2296 | echo "configure:2297: checking size of int" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2297 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2298 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2299 | else |
| 2300 | if test "$cross_compiling" = yes; then |
| 2301 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2302 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2303 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2304 | #line 2305 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2305 | #include "confdefs.h" |
| 2306 | #include <stdio.h> |
| 2307 | main() |
| 2308 | { |
| 2309 | FILE *f=fopen("conftestval", "w"); |
| 2310 | if (!f) exit(1); |
| 2311 | fprintf(f, "%d\n", sizeof(int)); |
| 2312 | exit(0); |
| 2313 | } |
| 2314 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2315 | if { (eval echo configure:2316: \"$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] | 2316 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2317 | ac_cv_sizeof_int=`cat conftestval` |
| 2318 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2319 | echo "configure: failed program was:" >&5 |
| 2320 | cat conftest.$ac_ext >&5 |
| 2321 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2322 | ac_cv_sizeof_int=0 |
| 2323 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2324 | rm -fr conftest* |
| 2325 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2326 | |
| 2327 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2328 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
| 2329 | cat >> confdefs.h <<EOF |
| 2330 | #define SIZEOF_INT $ac_cv_sizeof_int |
| 2331 | EOF |
| 2332 | |
| 2333 | |
| 2334 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2335 | echo "configure:2336: checking size of long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2336 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2337 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2338 | else |
| 2339 | if test "$cross_compiling" = yes; then |
| 2340 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2341 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2342 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2343 | #line 2344 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2344 | #include "confdefs.h" |
| 2345 | #include <stdio.h> |
| 2346 | main() |
| 2347 | { |
| 2348 | FILE *f=fopen("conftestval", "w"); |
| 2349 | if (!f) exit(1); |
| 2350 | fprintf(f, "%d\n", sizeof(long)); |
| 2351 | exit(0); |
| 2352 | } |
| 2353 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2354 | if { (eval echo configure:2355: \"$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] | 2355 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2356 | ac_cv_sizeof_long=`cat conftestval` |
| 2357 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2358 | echo "configure: failed program was:" >&5 |
| 2359 | cat conftest.$ac_ext >&5 |
| 2360 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2361 | ac_cv_sizeof_long=0 |
| 2362 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2363 | rm -fr conftest* |
| 2364 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2365 | |
| 2366 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2367 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
| 2368 | cat >> confdefs.h <<EOF |
| 2369 | #define SIZEOF_LONG $ac_cv_sizeof_long |
| 2370 | EOF |
| 2371 | |
| 2372 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2373 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2374 | echo "configure:2375: checking size of void *" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2375 | if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2376 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2377 | else |
| 2378 | if test "$cross_compiling" = yes; then |
| 2379 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2380 | else |
| 2381 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2382 | #line 2383 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2383 | #include "confdefs.h" |
| 2384 | #include <stdio.h> |
| 2385 | main() |
| 2386 | { |
| 2387 | FILE *f=fopen("conftestval", "w"); |
| 2388 | if (!f) exit(1); |
| 2389 | fprintf(f, "%d\n", sizeof(void *)); |
| 2390 | exit(0); |
| 2391 | } |
| 2392 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2393 | if { (eval echo configure:2394: \"$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] | 2394 | then |
| 2395 | ac_cv_sizeof_void_p=`cat conftestval` |
| 2396 | else |
| 2397 | echo "configure: failed program was:" >&5 |
| 2398 | cat conftest.$ac_ext >&5 |
| 2399 | rm -fr conftest* |
| 2400 | ac_cv_sizeof_void_p=0 |
| 2401 | fi |
| 2402 | rm -fr conftest* |
| 2403 | fi |
| 2404 | |
| 2405 | fi |
| 2406 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 |
| 2407 | cat >> confdefs.h <<EOF |
| 2408 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
| 2409 | EOF |
| 2410 | |
| 2411 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2412 | echo $ac_n "checking size of char""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2413 | echo "configure:2414: checking size of char" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2414 | if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2415 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2416 | else |
| 2417 | if test "$cross_compiling" = yes; then |
| 2418 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2419 | else |
| 2420 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2421 | #line 2422 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2422 | #include "confdefs.h" |
| 2423 | #include <stdio.h> |
| 2424 | main() |
| 2425 | { |
| 2426 | FILE *f=fopen("conftestval", "w"); |
| 2427 | if (!f) exit(1); |
| 2428 | fprintf(f, "%d\n", sizeof(char)); |
| 2429 | exit(0); |
| 2430 | } |
| 2431 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +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 | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2433 | then |
| 2434 | ac_cv_sizeof_char=`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_char=0 |
| 2440 | fi |
| 2441 | rm -fr conftest* |
| 2442 | fi |
| 2443 | |
| 2444 | fi |
| 2445 | echo "$ac_t""$ac_cv_sizeof_char" 1>&6 |
| 2446 | cat >> confdefs.h <<EOF |
| 2447 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
| 2448 | EOF |
| 2449 | |
| 2450 | |
| 2451 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2452 | echo "configure:2453: checking size of short" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2453 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2454 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2455 | else |
| 2456 | if test "$cross_compiling" = yes; then |
| 2457 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2458 | else |
| 2459 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2460 | #line 2461 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2461 | #include "confdefs.h" |
| 2462 | #include <stdio.h> |
| 2463 | main() |
| 2464 | { |
| 2465 | FILE *f=fopen("conftestval", "w"); |
| 2466 | if (!f) exit(1); |
| 2467 | fprintf(f, "%d\n", sizeof(short)); |
| 2468 | exit(0); |
| 2469 | } |
| 2470 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2471 | if { (eval echo configure:2472: \"$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] | 2472 | then |
| 2473 | ac_cv_sizeof_short=`cat conftestval` |
| 2474 | else |
| 2475 | echo "configure: failed program was:" >&5 |
| 2476 | cat conftest.$ac_ext >&5 |
| 2477 | rm -fr conftest* |
| 2478 | ac_cv_sizeof_short=0 |
| 2479 | fi |
| 2480 | rm -fr conftest* |
| 2481 | fi |
| 2482 | |
| 2483 | fi |
| 2484 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
| 2485 | cat >> confdefs.h <<EOF |
| 2486 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
| 2487 | EOF |
| 2488 | |
| 2489 | |
| 2490 | echo $ac_n "checking size of float""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2491 | echo "configure:2492: checking size of float" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2492 | if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2493 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2494 | else |
| 2495 | if test "$cross_compiling" = yes; then |
| 2496 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2497 | else |
| 2498 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2499 | #line 2500 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2500 | #include "confdefs.h" |
| 2501 | #include <stdio.h> |
| 2502 | main() |
| 2503 | { |
| 2504 | FILE *f=fopen("conftestval", "w"); |
| 2505 | if (!f) exit(1); |
| 2506 | fprintf(f, "%d\n", sizeof(float)); |
| 2507 | exit(0); |
| 2508 | } |
| 2509 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2510 | if { (eval echo configure:2511: \"$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] | 2511 | then |
| 2512 | ac_cv_sizeof_float=`cat conftestval` |
| 2513 | else |
| 2514 | echo "configure: failed program was:" >&5 |
| 2515 | cat conftest.$ac_ext >&5 |
| 2516 | rm -fr conftest* |
| 2517 | ac_cv_sizeof_float=0 |
| 2518 | fi |
| 2519 | rm -fr conftest* |
| 2520 | fi |
| 2521 | |
| 2522 | fi |
| 2523 | echo "$ac_t""$ac_cv_sizeof_float" 1>&6 |
| 2524 | cat >> confdefs.h <<EOF |
| 2525 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
| 2526 | EOF |
| 2527 | |
| 2528 | |
| 2529 | echo $ac_n "checking size of double""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2530 | echo "configure:2531: checking size of double" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2531 | if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2532 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2533 | else |
| 2534 | if test "$cross_compiling" = yes; then |
| 2535 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2536 | else |
| 2537 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2538 | #line 2539 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2539 | #include "confdefs.h" |
| 2540 | #include <stdio.h> |
| 2541 | main() |
| 2542 | { |
| 2543 | FILE *f=fopen("conftestval", "w"); |
| 2544 | if (!f) exit(1); |
| 2545 | fprintf(f, "%d\n", sizeof(double)); |
| 2546 | exit(0); |
| 2547 | } |
| 2548 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2549 | if { (eval echo configure:2550: \"$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] | 2550 | then |
| 2551 | ac_cv_sizeof_double=`cat conftestval` |
| 2552 | else |
| 2553 | echo "configure: failed program was:" >&5 |
| 2554 | cat conftest.$ac_ext >&5 |
| 2555 | rm -fr conftest* |
| 2556 | ac_cv_sizeof_double=0 |
| 2557 | fi |
| 2558 | rm -fr conftest* |
| 2559 | fi |
| 2560 | |
| 2561 | fi |
| 2562 | echo "$ac_t""$ac_cv_sizeof_double" 1>&6 |
| 2563 | cat >> confdefs.h <<EOF |
| 2564 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
| 2565 | EOF |
| 2566 | |
| 2567 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2568 | echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2569 | echo "configure:2570: checking size of fpos_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2570 | if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2571 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2572 | else |
| 2573 | if test "$cross_compiling" = yes; then |
| 2574 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2575 | else |
| 2576 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2577 | #line 2578 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2578 | #include "confdefs.h" |
| 2579 | #include <stdio.h> |
| 2580 | main() |
| 2581 | { |
| 2582 | FILE *f=fopen("conftestval", "w"); |
| 2583 | if (!f) exit(1); |
| 2584 | fprintf(f, "%d\n", sizeof(fpos_t)); |
| 2585 | exit(0); |
| 2586 | } |
| 2587 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2588 | if { (eval echo configure:2589: \"$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] | 2589 | then |
| 2590 | ac_cv_sizeof_fpos_t=`cat conftestval` |
| 2591 | else |
| 2592 | echo "configure: failed program was:" >&5 |
| 2593 | cat conftest.$ac_ext >&5 |
| 2594 | rm -fr conftest* |
| 2595 | ac_cv_sizeof_fpos_t=0 |
| 2596 | fi |
| 2597 | rm -fr conftest* |
| 2598 | fi |
| 2599 | |
| 2600 | fi |
| 2601 | echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6 |
| 2602 | cat >> confdefs.h <<EOF |
| 2603 | #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t |
| 2604 | EOF |
| 2605 | |
| 2606 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2607 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2608 | echo $ac_n "checking for long long support""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2609 | echo "configure:2610: checking for long long support" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2610 | have_long_long=no |
| 2611 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2612 | #line 2613 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2613 | #include "confdefs.h" |
| 2614 | |
| 2615 | int main() { |
| 2616 | long long x; x = (long long)0; |
| 2617 | ; return 0; } |
| 2618 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2619 | if { (eval echo configure:2620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2620 | rm -rf conftest* |
| 2621 | cat >> confdefs.h <<\EOF |
| 2622 | #define HAVE_LONG_LONG 1 |
| 2623 | EOF |
| 2624 | have_long_long=yes |
| 2625 | else |
| 2626 | echo "configure: failed program was:" >&5 |
| 2627 | cat conftest.$ac_ext >&5 |
| 2628 | fi |
| 2629 | rm -f conftest* |
| 2630 | echo "$ac_t""$have_long_long" 1>&6 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2631 | if test "$have_long_long" = yes ; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2632 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2633 | echo "configure:2634: checking size of long long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2634 | if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2635 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2636 | else |
| 2637 | if test "$cross_compiling" = yes; then |
| 2638 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2639 | else |
| 2640 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2641 | #line 2642 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2642 | #include "confdefs.h" |
| 2643 | #include <stdio.h> |
| 2644 | main() |
| 2645 | { |
| 2646 | FILE *f=fopen("conftestval", "w"); |
| 2647 | if (!f) exit(1); |
| 2648 | fprintf(f, "%d\n", sizeof(long long)); |
| 2649 | exit(0); |
| 2650 | } |
| 2651 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2652 | if { (eval echo configure:2653: \"$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] | 2653 | then |
| 2654 | ac_cv_sizeof_long_long=`cat conftestval` |
| 2655 | else |
| 2656 | echo "configure: failed program was:" >&5 |
| 2657 | cat conftest.$ac_ext >&5 |
| 2658 | rm -fr conftest* |
| 2659 | ac_cv_sizeof_long_long=0 |
| 2660 | fi |
| 2661 | rm -fr conftest* |
| 2662 | fi |
| 2663 | |
| 2664 | fi |
| 2665 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
| 2666 | cat >> confdefs.h <<EOF |
| 2667 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 2668 | EOF |
| 2669 | |
| 2670 | |
| 2671 | fi |
| 2672 | |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2673 | echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2674 | echo "configure:2675: checking for uintptr_t support" >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2675 | have_uintptr_t=no |
| 2676 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2677 | #line 2678 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2678 | #include "confdefs.h" |
| 2679 | |
| 2680 | int main() { |
| 2681 | uintptr_t x; x = (uintptr_t)0; |
| 2682 | ; return 0; } |
| 2683 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2684 | if { (eval echo configure:2685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2685 | rm -rf conftest* |
| 2686 | cat >> confdefs.h <<\EOF |
| 2687 | #define HAVE_UINTPTR_T 1 |
| 2688 | EOF |
| 2689 | have_uintptr_t=yes |
| 2690 | else |
| 2691 | echo "configure: failed program was:" >&5 |
| 2692 | cat conftest.$ac_ext >&5 |
| 2693 | fi |
| 2694 | rm -f conftest* |
| 2695 | echo "$ac_t""$have_uintptr_t" 1>&6 |
| 2696 | if test "$have_uintptr_t" = yes ; then |
| 2697 | echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2698 | echo "configure:2699: checking size of uintptr_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2699 | if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2700 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2701 | else |
| 2702 | if test "$cross_compiling" = yes; then |
| 2703 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2704 | else |
| 2705 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2706 | #line 2707 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2707 | #include "confdefs.h" |
| 2708 | #include <stdio.h> |
| 2709 | main() |
| 2710 | { |
| 2711 | FILE *f=fopen("conftestval", "w"); |
| 2712 | if (!f) exit(1); |
| 2713 | fprintf(f, "%d\n", sizeof(uintptr_t)); |
| 2714 | exit(0); |
| 2715 | } |
| 2716 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2717 | if { (eval echo configure:2718: \"$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] | 2718 | then |
| 2719 | ac_cv_sizeof_uintptr_t=`cat conftestval` |
| 2720 | else |
| 2721 | echo "configure: failed program was:" >&5 |
| 2722 | cat conftest.$ac_ext >&5 |
| 2723 | rm -fr conftest* |
| 2724 | ac_cv_sizeof_uintptr_t=0 |
| 2725 | fi |
| 2726 | rm -fr conftest* |
| 2727 | fi |
| 2728 | |
| 2729 | fi |
| 2730 | echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6 |
| 2731 | cat >> confdefs.h <<EOF |
| 2732 | #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t |
| 2733 | EOF |
| 2734 | |
| 2735 | |
| 2736 | fi |
| 2737 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2738 | # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>. |
| 2739 | echo $ac_n "checking size of off_t""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2740 | echo "configure:2741: checking size of off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2741 | if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2742 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2743 | else |
| 2744 | if test "$cross_compiling" = yes; then |
| 2745 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2746 | else |
| 2747 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2748 | #line 2749 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2749 | #include "confdefs.h" |
| 2750 | #include <stdio.h> |
| 2751 | #include <sys/types.h> |
| 2752 | main() |
| 2753 | { |
| 2754 | FILE *f=fopen("conftestval", "w"); |
| 2755 | if (!f) exit(1); |
| 2756 | fprintf(f, "%d\n", sizeof(off_t)); |
| 2757 | exit(0); |
| 2758 | } |
| 2759 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2760 | if { (eval echo configure:2761: \"$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] | 2761 | then |
| 2762 | ac_cv_sizeof_off_t=`cat conftestval` |
| 2763 | else |
| 2764 | echo "configure: failed program was:" >&5 |
| 2765 | cat conftest.$ac_ext >&5 |
| 2766 | rm -fr conftest* |
| 2767 | ac_cv_sizeof_off_t=0 |
| 2768 | fi |
| 2769 | rm -fr conftest* |
| 2770 | fi |
| 2771 | |
| 2772 | |
| 2773 | fi |
| 2774 | |
| 2775 | echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6 |
| 2776 | cat >> confdefs.h <<EOF |
| 2777 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
| 2778 | EOF |
| 2779 | |
| 2780 | |
| 2781 | echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2782 | echo "configure:2783: checking whether to enable large file support" >&5 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2783 | if test "$have_long_long" = yes -a \ |
| 2784 | "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ |
| 2785 | "$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] | 2786 | cat >> confdefs.h <<\EOF |
| 2787 | #define HAVE_LARGEFILE_SUPPORT 1 |
| 2788 | EOF |
| 2789 | |
| 2790 | echo "$ac_t""yes" 1>&6 |
| 2791 | else |
| 2792 | echo "$ac_t""no" 1>&6 |
| 2793 | fi |
| 2794 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2795 | # AC_CHECK_SIZEOF() doesn't include <time.h>. |
| 2796 | echo $ac_n "checking size of time_t""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2797 | echo "configure:2798: checking size of time_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2798 | if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2799 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2800 | else |
| 2801 | if test "$cross_compiling" = yes; then |
| 2802 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2803 | else |
| 2804 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2805 | #line 2806 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2806 | #include "confdefs.h" |
| 2807 | #include <stdio.h> |
| 2808 | #include <time.h> |
| 2809 | main() |
| 2810 | { |
| 2811 | FILE *f=fopen("conftestval", "w"); |
| 2812 | if (!f) exit(1); |
| 2813 | fprintf(f, "%d\n", sizeof(time_t)); |
| 2814 | exit(0); |
| 2815 | } |
| 2816 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2817 | if { (eval echo configure:2818: \"$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] | 2818 | then |
| 2819 | ac_cv_sizeof_time_t=`cat conftestval` |
| 2820 | else |
| 2821 | echo "configure: failed program was:" >&5 |
| 2822 | cat conftest.$ac_ext >&5 |
| 2823 | rm -fr conftest* |
| 2824 | ac_cv_sizeof_time_t=0 |
| 2825 | fi |
| 2826 | rm -fr conftest* |
| 2827 | fi |
| 2828 | |
| 2829 | |
| 2830 | fi |
| 2831 | |
| 2832 | echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 |
| 2833 | cat >> confdefs.h <<EOF |
| 2834 | #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
| 2835 | EOF |
| 2836 | |
| 2837 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2838 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2839 | # if have pthread_t then define SIZEOF_PTHREAD_T |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 2840 | ac_save_cc="$CC" |
| 2841 | if test "$ac_cv_kpthread" = "yes" |
| 2842 | then CC="$CC -Kpthread" |
| 2843 | fi |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2844 | echo $ac_n "checking for pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2845 | echo "configure:2846: checking for pthread_t" >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2846 | have_pthread_t=no |
| 2847 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2848 | #line 2849 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2849 | #include "confdefs.h" |
| 2850 | #include <pthread.h> |
| 2851 | int main() { |
Guido van Rossum | 1258049 | 2000-09-24 16:47:19 +0000 | [diff] [blame] | 2852 | pthread_t x; x = *(pthread_t*)0; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2853 | ; return 0; } |
| 2854 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2855 | if { (eval echo configure:2856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2856 | rm -rf conftest* |
| 2857 | have_pthread_t=yes |
| 2858 | else |
| 2859 | echo "configure: failed program was:" >&5 |
| 2860 | cat conftest.$ac_ext >&5 |
| 2861 | fi |
| 2862 | rm -f conftest* |
| 2863 | echo "$ac_t""$have_pthread_t" 1>&6 |
| 2864 | if test "$have_pthread_t" = yes ; then |
| 2865 | # AC_CHECK_SIZEOF() doesn't include <pthread.h>. |
| 2866 | echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2867 | echo "configure:2868: checking size of pthread_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2868 | if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2869 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2870 | else |
| 2871 | if test "$cross_compiling" = yes; then |
| 2872 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2873 | else |
| 2874 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2875 | #line 2876 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2876 | #include "confdefs.h" |
| 2877 | #include <stdio.h> |
| 2878 | #include <pthread.h> |
| 2879 | main() |
| 2880 | { |
| 2881 | FILE *f=fopen("conftestval", "w"); |
| 2882 | if (!f) exit(1); |
| 2883 | fprintf(f, "%d\n", sizeof(pthread_t)); |
| 2884 | exit(0); |
| 2885 | } |
| 2886 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2887 | if { (eval echo configure:2888: \"$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] | 2888 | then |
| 2889 | ac_cv_sizeof_pthread_t=`cat conftestval` |
| 2890 | else |
| 2891 | echo "configure: failed program was:" >&5 |
| 2892 | cat conftest.$ac_ext >&5 |
| 2893 | rm -fr conftest* |
| 2894 | ac_cv_sizeof_pthread_t=0 |
| 2895 | fi |
| 2896 | rm -fr conftest* |
| 2897 | fi |
| 2898 | |
| 2899 | |
| 2900 | fi |
| 2901 | |
| 2902 | echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6 |
| 2903 | cat >> confdefs.h <<EOF |
| 2904 | #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t |
| 2905 | EOF |
| 2906 | |
| 2907 | fi |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 2908 | CC="$ac_save_cc" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2909 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2910 | # Minor variations in building a framework between NextStep versions 4 and 5 |
| 2911 | |
| 2912 | case $ac_sys_system/$ac_sys_release in |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 2913 | Darwin/*) |
| 2914 | ns_undef_sym='_environ' |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 2915 | LIBTOOL_CRUFT="-framework Foundation -framework Carbon -lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2916 | next/4*) |
| 2917 | ns_undef_sym='__environ' |
| 2918 | LIBTOOL_CRUFT="-U $ns_undef_sym" ;; |
| 2919 | next/5*) |
| 2920 | ns_undef_sym='_environ' |
| 2921 | LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;; |
| 2922 | esac |
| 2923 | |
| 2924 | echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2925 | echo "configure:2926: checking for --with-next-framework" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2926 | if test "$with_next_framework" |
| 2927 | then |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 2928 | OPT="$OPT -fno-common -dynamic" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2929 | # -U __environ is needed since bundles don't have access |
| 2930 | # to crt0 when built but will always be linked against it |
| 2931 | LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym" |
| 2932 | cat >> confdefs.h <<\EOF |
| 2933 | #define WITH_NEXT_FRAMEWORK 1 |
| 2934 | EOF |
| 2935 | |
| 2936 | echo "$ac_t""yes" 1>&6 |
| 2937 | else |
| 2938 | echo "$ac_t""no" 1>&6 |
| 2939 | fi |
| 2940 | |
| 2941 | echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2942 | echo "configure:2943: checking for --with-dyld" >&5 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2943 | case $ac_sys_system/$ac_sys_release in |
| 2944 | Darwin/*) |
| 2945 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2946 | #define WITH_DYLD 1 |
| 2947 | EOF |
| 2948 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2949 | echo "$ac_t""always on for Darwin" 1>&6 |
| 2950 | ;; |
| 2951 | *) |
| 2952 | if test "$with_next_framework" -o "$with_dyld" |
| 2953 | then |
| 2954 | if test "$with_dyld" |
| 2955 | then |
| 2956 | echo "$ac_t""yes" 1>&6 |
| 2957 | else |
| 2958 | echo "$ac_t""required for framework build" 1>&6 |
| 2959 | fi |
| 2960 | cat >> confdefs.h <<\EOF |
| 2961 | #define WITH_DYLD 1 |
| 2962 | EOF |
| 2963 | |
| 2964 | ns_dyld='set' |
| 2965 | else |
| 2966 | echo "$ac_t""no" 1>&6 |
| 2967 | fi ;; |
| 2968 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2969 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2970 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2971 | |
| 2972 | |
| 2973 | |
| 2974 | |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 2975 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2976 | # SO is the extension of shared libraries `(including the dot!) |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 2977 | # -- usually .so, .sl on HP-UX, .dll on Cygwin |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2978 | echo $ac_n "checking SO""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2979 | echo "configure:2980: checking SO" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2980 | if test -z "$SO" |
| 2981 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2982 | case $ac_sys_system in |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 2983 | hp*|HP*) SO=.sl;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 2984 | CYGWIN*) SO=.dll;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 2985 | *) SO=.so;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2986 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2987 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2988 | echo "$ac_t""$SO" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2989 | # LDSHARED is the ld *command* used to create shared library |
| 2990 | # -- "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] | 2991 | # (Shared libraries in this instance are shared modules to be loaded into |
| 2992 | # Python, as opposed to building Python itself as a shared library.) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2993 | echo $ac_n "checking LDSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 2994 | echo "configure:2995: checking LDSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2995 | if test -z "$LDSHARED" |
| 2996 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2997 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 2998 | AIX*) |
| 2999 | BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" |
| 3000 | LDSHARED="\$(BINLIBDEST)/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/python.exp" |
| 3001 | ;; |
| 3002 | BeOS*) |
| 3003 | BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY" |
| 3004 | LDSHARED="\$(BINLIBDEST)/ld_so_beos \$(LIBDIR)/$LDLIBRARY" |
| 3005 | ;; |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3006 | IRIX/5*) LDSHARED="ld -shared";; |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 3007 | IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3008 | SunOS/4*) LDSHARED="ld";; |
Greg Ward | 57c9a66 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3009 | SunOS/5*) |
| 3010 | if test "$GCC" = "yes" |
Neil Schemenauer | 8ba9445 | 2001-02-19 18:18:48 +0000 | [diff] [blame] | 3011 | then LDSHARED='$(CC) -shared' |
Greg Ward | 57c9a66 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3012 | else LDSHARED="ld -G"; |
| 3013 | fi ;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3014 | hp*|HP*) LDSHARED="ld -b";; |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3015 | OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; |
| 3016 | DYNIX/ptx*) LDSHARED="ld -G";; |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3017 | Darwin/*) |
| 3018 | LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress' |
| 3019 | if test "$with_next_framework" ; then |
| 3020 | LDSHARED="$LDSHARED \$(LDLIBRARY)" |
| 3021 | fi ;; |
| 3022 | next/*) |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3023 | if test "$ns_dyld" |
Guido van Rossum | acb14c7 | 2001-01-10 21:41:16 +0000 | [diff] [blame] | 3024 | then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress' |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3025 | else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r'; |
| 3026 | fi |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 3027 | if test "$with_next_framework" ; then |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3028 | LDSHARED="$LDSHARED \$(LDLIBRARY)" |
| 3029 | fi ;; |
Guido van Rossum | 81652ab | 1996-07-21 02:53:27 +0000 | [diff] [blame] | 3030 | Linux*) LDSHARED="gcc -shared";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 3031 | dgux*) LDSHARED="ld -G";; |
Guido van Rossum | 458e7fa | 1999-09-17 15:40:40 +0000 | [diff] [blame] | 3032 | BSD/OS*/4*) LDSHARED="gcc -shared";; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3033 | OpenBSD*) LDSHARED="ld -Bshareable";; |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 3034 | NetBSD*) |
| 3035 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 3036 | then |
| 3037 | LDSHARED="cc -shared" |
| 3038 | else |
| 3039 | LDSHARED="ld -Bshareable" |
| 3040 | fi;; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3041 | FreeBSD*) |
Jeremy Hylton | 4bcc7c5 | 2000-08-31 17:45:35 +0000 | [diff] [blame] | 3042 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3043 | then |
| 3044 | LDSHARED="cc -shared ${LDFLAGS}" |
| 3045 | else |
| 3046 | LDSHARED="ld -Bshareable ${LDFLAGS}" |
| 3047 | fi;; |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3048 | UnixWare*) |
| 3049 | if test "$GCC" = "yes" |
| 3050 | then LDSHARED="$(CC) -shared" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3051 | else LDSHARED="$(CC) -G" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3052 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3053 | SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3054 | Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3055 | CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3056 | *) LDSHARED="ld";; |
| 3057 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3058 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3059 | echo "$ac_t""$LDSHARED" 1>&6 |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3060 | BLDSHARED=${BLDSHARED-$LDSHARED} |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3061 | # 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] | 3062 | # library (module) -- this is only needed for a few systems |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3063 | echo $ac_n "checking CCSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3064 | echo "configure:3065: checking CCSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3065 | if test -z "$CCSHARED" |
| 3066 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3067 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 3068 | SunOS*) if test "$GCC" = yes; |
| 3069 | then CCSHARED="-fPIC"; |
| 3070 | fi;; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3071 | hp*|HP*) if test "$GCC" = yes; |
| 3072 | then CCSHARED="-fpic"; |
| 3073 | else CCSHARED="+z"; |
| 3074 | fi;; |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3075 | Linux*) CCSHARED="-fPIC";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3076 | BSD/OS*/4*) CCSHARED="-fpic";; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3077 | OpenBSD*) CCSHARED="-fpic";; |
| 3078 | FreeBSD*|NetBSD*) CCSHARED="-fPIC";; |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3079 | UnixWare*) |
| 3080 | if test "$GCC" = "yes" |
| 3081 | then CCSHARED="-fPIC" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3082 | else CCSHARED="-KPIC" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3083 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3084 | SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3085 | Monterey*) CCSHARED="-G";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3086 | IRIX*/6*) case $CC in |
| 3087 | *gcc*) CCSHARED="-shared";; |
Guido van Rossum | ee21f41 | 1998-04-20 18:51:54 +0000 | [diff] [blame] | 3088 | *) CCSHARED="";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3089 | esac;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3090 | CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3091 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3092 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3093 | echo "$ac_t""$CCSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3094 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3095 | # the python executable -- this is only needed for a few systems |
| 3096 | echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3097 | echo "configure:3098: checking LINKFORSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3098 | if test -z "$LINKFORSHARED" |
| 3099 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3100 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3101 | AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 3102 | hp*|HP*) |
Guido van Rossum | 304dd2d | 1997-10-20 23:10:56 +0000 | [diff] [blame] | 3103 | LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3104 | BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 2d9feed | 1997-11-24 17:36:21 +0000 | [diff] [blame] | 3105 | Linux*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3106 | # -u libsys_s pulls in all symbols in libsys |
| 3107 | next/2*|next/3*) LINKFORSHARED="-u libsys_s";; |
| 3108 | # -u __dummy makes the linker aware of the objc runtime |
| 3109 | # in System.framework; otherwise, __objcInit (referenced in |
| 3110 | # crt1.o) gets erroneously defined as common, which breaks dynamic |
| 3111 | # loading of any modules which reference it in System.framework |
| 3112 | next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;; |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 3113 | Darwin/*) LINKFORSHARED="-u __dummy -u _PyMac_Error -framework System -framework Foundation -framework Carbon" ;; |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3114 | UnixWare*) LINKFORSHARED="-Wl,-Bexport";; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3115 | SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3116 | ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3117 | FreeBSD*|NetBSD*) |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 3118 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 3119 | then |
| 3120 | LINKFORSHARED="-Wl,--export-dynamic" |
| 3121 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3122 | SunOS/5*) case $CC in |
| 3123 | *gcc*) |
Guido van Rossum | ff48418 | 2000-02-03 13:50:24 +0000 | [diff] [blame] | 3124 | if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 3125 | then |
| 3126 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3127 | fi;; |
| 3128 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3129 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3130 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3131 | echo "$ac_t""$LINKFORSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3132 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3133 | |
| 3134 | echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3135 | echo "configure:3136: checking CFLAGSFORSHARED" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3136 | if test ! "$LIBRARY" = "$LDLIBRARY" |
| 3137 | then |
Neil Schemenauer | 0c6141f | 2001-01-27 21:40:54 +0000 | [diff] [blame] | 3138 | case $ac_sys_system in |
| 3139 | CYGWIN*) |
| 3140 | # Cygwin needs CCSHARED when building extension DLLs |
| 3141 | # but not when building the interpreter DLL. |
| 3142 | CFLAGSFORSHARED='';; |
| 3143 | *) |
| 3144 | CFLAGSFORSHARED='$(CCSHARED)' |
| 3145 | esac |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3146 | fi |
| 3147 | echo "$ac_t""$CFLAGSFORSHARED" 1>&6 |
| 3148 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3149 | # checks for libraries |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3150 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3151 | echo "configure:3152: checking for dlopen in -ldl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3152 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3153 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3154 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3155 | else |
| 3156 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3157 | LIBS="-ldl $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3158 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3159 | #line 3160 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3160 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3161 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3162 | /* We use char because int might match the return type of a gcc2 |
| 3163 | builtin and then its argument prototype would still apply. */ |
| 3164 | char dlopen(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3165 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3166 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3167 | dlopen() |
| 3168 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3169 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3170 | if { (eval echo configure:3171: \"$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] | 3171 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3172 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3173 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3174 | echo "configure: failed program was:" >&5 |
| 3175 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3176 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3177 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3178 | fi |
| 3179 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3180 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3181 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3182 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3183 | 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] | 3184 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3185 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3186 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3187 | cat >> confdefs.h <<EOF |
| 3188 | #define $ac_tr_lib 1 |
| 3189 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3190 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3191 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3192 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3193 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3194 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3195 | fi |
| 3196 | # Dynamic linking for SunOS/Solaris and SYSV |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3197 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3198 | echo "configure:3199: checking for shl_load in -ldld" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3199 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3200 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3201 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3202 | else |
| 3203 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3204 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3205 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3206 | #line 3207 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3207 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3208 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3209 | /* We use char because int might match the return type of a gcc2 |
| 3210 | builtin and then its argument prototype would still apply. */ |
| 3211 | char shl_load(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3212 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3213 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3214 | shl_load() |
| 3215 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3216 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3217 | if { (eval echo configure:3218: \"$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] | 3218 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3219 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3220 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3221 | echo "configure: failed program was:" >&5 |
| 3222 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3223 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3224 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3225 | fi |
| 3226 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3227 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3228 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3229 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3230 | 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] | 3231 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3232 | ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3233 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3234 | cat >> confdefs.h <<EOF |
| 3235 | #define $ac_tr_lib 1 |
| 3236 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3237 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3238 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3239 | |
| 3240 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3241 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3242 | fi |
| 3243 | # Dynamic linking for HP-UX |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3244 | |
| 3245 | # checks for system dependent C++ extensions support |
| 3246 | case "$ac_sys_system" in |
| 3247 | AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3248 | echo "configure:3249: checking for genuine AIX C++ extensions support" >&5 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3249 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3250 | #line 3251 "configure" |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3251 | #include "confdefs.h" |
| 3252 | #include "/usr/lpp/xlC/include/load.h" |
| 3253 | int main() { |
| 3254 | loadAndInit("", 0, "") |
| 3255 | ; return 0; } |
| 3256 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3257 | if { (eval echo configure:3258: \"$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] | 3258 | rm -rf conftest* |
| 3259 | cat >> confdefs.h <<\EOF |
| 3260 | #define AIX_GENUINE_CPLUSPLUS 1 |
| 3261 | EOF |
| 3262 | |
| 3263 | echo "$ac_t""yes" 1>&6 |
| 3264 | else |
| 3265 | echo "configure: failed program was:" >&5 |
| 3266 | cat conftest.$ac_ext >&5 |
| 3267 | rm -rf conftest* |
| 3268 | echo "$ac_t""no" 1>&6 |
| 3269 | fi |
| 3270 | rm -f conftest*;; |
| 3271 | *) ;; |
| 3272 | esac |
| 3273 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3274 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
| 3275 | # However on SGI IRIX, these exist but are broken. |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3276 | # BeOS' sockets are stashed in libnet. |
| 3277 | case "$ac_sys_system" in |
| 3278 | IRIX*) ;; |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3279 | *) |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3280 | echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3281 | echo "configure:3282: checking for t_open in -lnsl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3282 | ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3283 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3284 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3285 | else |
| 3286 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3287 | LIBS="-lnsl $LIBS" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3288 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3289 | #line 3290 "configure" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3290 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3291 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3292 | /* We use char because int might match the return type of a gcc2 |
| 3293 | builtin and then its argument prototype would still apply. */ |
| 3294 | char t_open(); |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3295 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3296 | int main() { |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3297 | t_open() |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3298 | ; return 0; } |
| 3299 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3300 | if { (eval echo configure:3301: \"$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] | 3301 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3302 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3303 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3304 | echo "configure: failed program was:" >&5 |
| 3305 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3306 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3307 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3308 | fi |
| 3309 | rm -f conftest* |
| 3310 | LIBS="$ac_save_LIBS" |
| 3311 | |
| 3312 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3313 | 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] | 3314 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3315 | LIBS="-lnsl $LIBS" |
| 3316 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3317 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3318 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3319 | # SVR4 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3320 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3321 | echo "configure:3322: checking for socket in -lsocket" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3322 | ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3323 | if eval "test \"`echo '$''{'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="-lsocket $LIBS $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3328 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3329 | #line 3330 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +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 socket(); |
| 3335 | |
| 3336 | int main() { |
| 3337 | socket() |
| 3338 | ; return 0; } |
| 3339 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3340 | if { (eval echo configure:3341: \"$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] | 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 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3355 | LIBS="-lsocket $LIBS" |
| 3356 | else |
| 3357 | echo "$ac_t""no" 1>&6 |
| 3358 | fi |
| 3359 | # SVR4 sockets |
Jeremy Hylton | cb25d5e | 2000-07-27 21:23:28 +0000 | [diff] [blame] | 3360 | ;; |
| 3361 | esac |
| 3362 | case "$ac_sys_system" in |
| 3363 | BeOS*) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3364 | echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3365 | echo "configure:3366: checking for socket in -lnet" >&5 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3366 | ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3367 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3368 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3369 | else |
| 3370 | ac_save_LIBS="$LIBS" |
| 3371 | LIBS="-lnet $LIBS $LIBS" |
| 3372 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3373 | #line 3374 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3374 | #include "confdefs.h" |
| 3375 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3376 | /* We use char because int might match the return type of a gcc2 |
| 3377 | builtin and then its argument prototype would still apply. */ |
| 3378 | char socket(); |
| 3379 | |
| 3380 | int main() { |
| 3381 | socket() |
| 3382 | ; return 0; } |
| 3383 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3384 | if { (eval echo configure:3385: \"$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] | 3385 | rm -rf conftest* |
| 3386 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3387 | else |
| 3388 | echo "configure: failed program was:" >&5 |
| 3389 | cat conftest.$ac_ext >&5 |
| 3390 | rm -rf conftest* |
| 3391 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3392 | fi |
| 3393 | rm -f conftest* |
| 3394 | LIBS="$ac_save_LIBS" |
| 3395 | |
| 3396 | fi |
| 3397 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3398 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3399 | LIBS="-lnet $LIBS" |
| 3400 | else |
| 3401 | echo "$ac_t""no" 1>&6 |
| 3402 | fi |
| 3403 | # BeOS |
| 3404 | ;; |
| 3405 | esac |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3406 | |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3407 | echo $ac_n "checking for --with-libs""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3408 | echo "configure:3409: checking for --with-libs" >&5 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3409 | # Check whether --with-libs or --without-libs was given. |
| 3410 | if test "${with_libs+set}" = set; then |
| 3411 | withval="$with_libs" |
| 3412 | |
| 3413 | echo "$ac_t""$withval" 1>&6 |
| 3414 | LIBS="$withval $LIBS" |
| 3415 | |
| 3416 | else |
| 3417 | echo "$ac_t""no" 1>&6 |
| 3418 | fi |
| 3419 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3420 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3421 | # Determine if signalmodule should be used. |
| 3422 | |
| 3423 | |
| 3424 | echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3425 | echo "configure:3426: checking for --with-signal-module" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3426 | # Check whether --with-signal-module or --without-signal-module was given. |
| 3427 | if test "${with_signal_module+set}" = set; then |
| 3428 | withval="$with_signal_module" |
| 3429 | : |
| 3430 | fi |
| 3431 | |
| 3432 | |
| 3433 | if test -z "$with_signal_module" |
| 3434 | then with_signal_module="yes" |
| 3435 | fi |
| 3436 | echo "$ac_t""$with_signal_module" 1>&6 |
| 3437 | |
| 3438 | if test "${with_signal_module}" = "yes"; then |
| 3439 | USE_SIGNAL_MODULE="" |
| 3440 | SIGNAL_OBJS="" |
| 3441 | else |
| 3442 | USE_SIGNAL_MODULE="#" |
| 3443 | SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o" |
| 3444 | fi |
| 3445 | |
Guido van Rossum | 3d15bd8 | 2001-01-10 18:53:48 +0000 | [diff] [blame] | 3446 | # This is used to generate Setup.config |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3447 | |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3448 | USE_THREAD_MODULE="" |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3449 | |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3450 | echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3451 | echo "configure:3452: checking for --with-dec-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3452 | |
| 3453 | # Check whether --with-dec-threads or --without-dec-threads was given. |
| 3454 | if test "${with_dec_threads+set}" = set; then |
| 3455 | withval="$with_dec_threads" |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3456 | |
| 3457 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3458 | LDLAST=-threads |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3459 | if test "${with_thread+set}" != set; then |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3460 | with_thread="$withval"; |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3461 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3462 | else |
| 3463 | echo "$ac_t""no" 1>&6 |
| 3464 | fi |
| 3465 | |
| 3466 | |
| 3467 | echo $ac_n "checking for --with-threads""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3468 | echo "configure:3469: checking for --with-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3469 | # Check whether --with-threads or --without-threads was given. |
| 3470 | if test "${with_threads+set}" = set; then |
| 3471 | withval="$with_threads" |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3472 | : |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3473 | fi |
| 3474 | |
| 3475 | |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3476 | # --with-thread is deprecated, but check for it anyway |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3477 | # Check whether --with-thread or --without-thread was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3478 | if test "${with_thread+set}" = set; then |
| 3479 | withval="$with_thread" |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 3480 | |
| 3481 | with_threads=$with_thread |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3482 | fi |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3483 | |
| 3484 | |
| 3485 | if test -z "$with_threads" |
| 3486 | then with_threads="yes" |
| 3487 | fi |
| 3488 | echo "$ac_t""$with_threads" 1>&6 |
| 3489 | |
| 3490 | if test "$with_threads" = "no" |
| 3491 | then |
| 3492 | USE_THREAD_MODULE="#" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3493 | elif test "$ac_cv_kpthread" = "yes" |
| 3494 | then |
| 3495 | CC="$CC -Kpthread" |
| 3496 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3497 | #define WITH_THREAD 1 |
| 3498 | EOF |
| 3499 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3500 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3501 | #define _POSIX_THREADS 1 |
| 3502 | EOF |
| 3503 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3504 | LIBOBJS="$LIBOBJS thread.o" |
| 3505 | else |
| 3506 | if test ! -z "$with_threads" -a -d "$with_threads" |
| 3507 | then LDFLAGS="$LDFLAGS -L$with_threads" |
| 3508 | fi |
| 3509 | if test ! -z "$withval" -a -d "$withval" |
| 3510 | then LDFLAGS="$LDFLAGS -L$withval" |
| 3511 | fi |
| 3512 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 3513 | #define _REENTRANT 1 |
| 3514 | EOF |
| 3515 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3516 | ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3517 | echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3518 | echo "configure:3519: checking for mach/cthreads.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3519 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3520 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3521 | else |
| 3522 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3523 | #line 3524 "configure" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3524 | #include "confdefs.h" |
| 3525 | #include <mach/cthreads.h> |
| 3526 | EOF |
| 3527 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3528 | { (eval echo configure:3529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3529 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3530 | if test -z "$ac_err"; then |
| 3531 | rm -rf conftest* |
| 3532 | eval "ac_cv_header_$ac_safe=yes" |
| 3533 | else |
| 3534 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3535 | echo "configure: failed program was:" >&5 |
| 3536 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3537 | rm -rf conftest* |
| 3538 | eval "ac_cv_header_$ac_safe=no" |
| 3539 | fi |
| 3540 | rm -f conftest* |
| 3541 | fi |
| 3542 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3543 | echo "$ac_t""yes" 1>&6 |
| 3544 | cat >> confdefs.h <<\EOF |
| 3545 | #define WITH_THREAD 1 |
| 3546 | EOF |
| 3547 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3548 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3549 | #define C_THREADS 1 |
| 3550 | EOF |
| 3551 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3552 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3553 | else |
| 3554 | echo "$ac_t""no" 1>&6 |
| 3555 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3556 | echo $ac_n "checking for --with-pth""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3557 | echo "configure:3558: checking for --with-pth" >&5 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3558 | # Check whether --with-pth or --without-pth was given. |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3559 | if test "${with_pth+set}" = set; then |
| 3560 | withval="$with_pth" |
| 3561 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3562 | echo "$ac_t""$withval" 1>&6 |
| 3563 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3564 | #define WITH_THREAD 1 |
| 3565 | EOF |
| 3566 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3567 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3568 | #define HAVE_PTH 1 |
| 3569 | EOF |
| 3570 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3571 | LIBS="-lpth $LIBS" |
| 3572 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3573 | else |
| 3574 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3575 | echo "$ac_t""no" 1>&6 |
| 3576 | echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3577 | echo "configure:3578: checking for pthread_create in -lpthread" >&5 |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3578 | ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3579 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3580 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3581 | else |
| 3582 | ac_save_LIBS="$LIBS" |
| 3583 | LIBS="-lpthread $LIBS" |
| 3584 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3585 | #line 3586 "configure" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3586 | #include "confdefs.h" |
| 3587 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3588 | /* We use char because int might match the return type of a gcc2 |
| 3589 | builtin and then its argument prototype would still apply. */ |
| 3590 | char pthread_create(); |
| 3591 | |
| 3592 | int main() { |
| 3593 | pthread_create() |
| 3594 | ; return 0; } |
| 3595 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3596 | if { (eval echo configure:3597: \"$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] | 3597 | rm -rf conftest* |
| 3598 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3599 | else |
| 3600 | echo "configure: failed program was:" >&5 |
| 3601 | cat conftest.$ac_ext >&5 |
| 3602 | rm -rf conftest* |
| 3603 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3604 | fi |
| 3605 | rm -f conftest* |
| 3606 | LIBS="$ac_save_LIBS" |
| 3607 | |
| 3608 | fi |
| 3609 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3610 | echo "$ac_t""yes" 1>&6 |
| 3611 | cat >> confdefs.h <<\EOF |
| 3612 | #define WITH_THREAD 1 |
| 3613 | EOF |
| 3614 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3615 | case $ac_sys_system in |
| 3616 | Darwin*) ;; |
| 3617 | *) cat >> confdefs.h <<\EOF |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3618 | #define _POSIX_THREADS 1 |
| 3619 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3620 | ;; |
| 3621 | esac |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3622 | LIBS="-lpthread $LIBS" |
| 3623 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3624 | else |
| 3625 | echo "$ac_t""no" 1>&6 |
| 3626 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3627 | echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3628 | echo "configure:3629: checking for pthread_detach" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3629 | if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3630 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3631 | else |
| 3632 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3633 | #line 3634 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3634 | #include "confdefs.h" |
| 3635 | /* System header to define __stub macros and hopefully few prototypes, |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3636 | which can conflict with char pthread_detach(); below. */ |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3637 | #include <assert.h> |
| 3638 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3639 | /* We use char because int might match the return type of a gcc2 |
| 3640 | builtin and then its argument prototype would still apply. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3641 | char pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3642 | |
| 3643 | int main() { |
| 3644 | |
| 3645 | /* The GNU C library defines this for functions which it implements |
| 3646 | to always fail with ENOSYS. Some functions are actually named |
| 3647 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3648 | #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3649 | choke me |
| 3650 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3651 | pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3652 | #endif |
| 3653 | |
| 3654 | ; return 0; } |
| 3655 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3656 | if { (eval echo configure:3657: \"$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] | 3657 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3658 | eval "ac_cv_func_pthread_detach=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3659 | else |
| 3660 | echo "configure: failed program was:" >&5 |
| 3661 | cat conftest.$ac_ext >&5 |
| 3662 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3663 | eval "ac_cv_func_pthread_detach=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3664 | fi |
| 3665 | rm -f conftest* |
| 3666 | fi |
| 3667 | |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3668 | if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3669 | echo "$ac_t""yes" 1>&6 |
| 3670 | cat >> confdefs.h <<\EOF |
| 3671 | #define WITH_THREAD 1 |
| 3672 | EOF |
| 3673 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3674 | case $ac_sys_system in |
| 3675 | Darwin*) ;; |
| 3676 | *) cat >> confdefs.h <<\EOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3677 | #define _POSIX_THREADS 1 |
| 3678 | EOF |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 3679 | ;; |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3680 | esac |
| 3681 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3682 | else |
| 3683 | echo "$ac_t""no" 1>&6 |
| 3684 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3685 | ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3686 | echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3687 | echo "configure:3688: checking for kernel/OS.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3688 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3689 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3690 | else |
| 3691 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3692 | #line 3693 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3693 | #include "confdefs.h" |
| 3694 | #include <kernel/OS.h> |
| 3695 | EOF |
| 3696 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3697 | { (eval echo configure:3698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3698 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3699 | if test -z "$ac_err"; then |
| 3700 | rm -rf conftest* |
| 3701 | eval "ac_cv_header_$ac_safe=yes" |
| 3702 | else |
| 3703 | echo "$ac_err" >&5 |
| 3704 | echo "configure: failed program was:" >&5 |
| 3705 | cat conftest.$ac_ext >&5 |
| 3706 | rm -rf conftest* |
| 3707 | eval "ac_cv_header_$ac_safe=no" |
| 3708 | fi |
| 3709 | rm -f conftest* |
| 3710 | fi |
| 3711 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3712 | echo "$ac_t""yes" 1>&6 |
| 3713 | cat >> confdefs.h <<\EOF |
| 3714 | #define WITH_THREAD 1 |
| 3715 | EOF |
| 3716 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3717 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3718 | #define BEOS_THREADS 1 |
| 3719 | EOF |
| 3720 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3721 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3722 | else |
| 3723 | echo "$ac_t""no" 1>&6 |
| 3724 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3725 | echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3726 | echo "configure:3727: checking for pthread_create in -lpthreads" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3727 | ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3728 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3729 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3730 | else |
| 3731 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3732 | LIBS="-lpthreads $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3733 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3734 | #line 3735 "configure" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3735 | #include "confdefs.h" |
| 3736 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3737 | /* We use char because int might match the return type of a gcc2 |
| 3738 | builtin and then its argument prototype would still apply. */ |
| 3739 | char pthread_create(); |
| 3740 | |
| 3741 | int main() { |
| 3742 | pthread_create() |
| 3743 | ; return 0; } |
| 3744 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3745 | if { (eval echo configure:3746: \"$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] | 3746 | rm -rf conftest* |
| 3747 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3748 | else |
| 3749 | echo "configure: failed program was:" >&5 |
| 3750 | cat conftest.$ac_ext >&5 |
| 3751 | rm -rf conftest* |
| 3752 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3753 | fi |
| 3754 | rm -f conftest* |
| 3755 | LIBS="$ac_save_LIBS" |
| 3756 | |
| 3757 | fi |
| 3758 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3759 | echo "$ac_t""yes" 1>&6 |
| 3760 | cat >> confdefs.h <<\EOF |
| 3761 | #define WITH_THREAD 1 |
| 3762 | EOF |
| 3763 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3764 | cat >> confdefs.h <<\EOF |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3765 | #define _POSIX_THREADS 1 |
| 3766 | EOF |
| 3767 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3768 | LIBS="$LIBS -lpthreads" |
| 3769 | LIBOBJS="$LIBOBJS thread.o" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3770 | else |
| 3771 | echo "$ac_t""no" 1>&6 |
| 3772 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3773 | echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3774 | echo "configure:3775: checking for pthread_create in -lc_r" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3775 | ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3776 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3777 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3778 | else |
| 3779 | ac_save_LIBS="$LIBS" |
| 3780 | LIBS="-lc_r $LIBS" |
| 3781 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3782 | #line 3783 "configure" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3783 | #include "confdefs.h" |
| 3784 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3785 | /* We use char because int might match the return type of a gcc2 |
| 3786 | builtin and then its argument prototype would still apply. */ |
| 3787 | char pthread_create(); |
| 3788 | |
| 3789 | int main() { |
| 3790 | pthread_create() |
| 3791 | ; return 0; } |
| 3792 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3793 | if { (eval echo configure:3794: \"$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] | 3794 | rm -rf conftest* |
| 3795 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3796 | else |
| 3797 | echo "configure: failed program was:" >&5 |
| 3798 | cat conftest.$ac_ext >&5 |
| 3799 | rm -rf conftest* |
| 3800 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3801 | fi |
| 3802 | rm -f conftest* |
| 3803 | LIBS="$ac_save_LIBS" |
| 3804 | |
| 3805 | fi |
| 3806 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3807 | echo "$ac_t""yes" 1>&6 |
| 3808 | cat >> confdefs.h <<\EOF |
| 3809 | #define WITH_THREAD 1 |
| 3810 | EOF |
| 3811 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3812 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3813 | #define _POSIX_THREADS 1 |
| 3814 | EOF |
| 3815 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3816 | LIBS="$LIBS -lc_r" |
| 3817 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3818 | else |
| 3819 | echo "$ac_t""no" 1>&6 |
| 3820 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3821 | echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3822 | echo "configure:3823: checking for __d6_pthread_create in -lthread" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3823 | ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3824 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3825 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3826 | else |
| 3827 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3828 | LIBS="-lthread $LIBS" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3829 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3830 | #line 3831 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3831 | #include "confdefs.h" |
| 3832 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3833 | /* We use char because int might match the return type of a gcc2 |
| 3834 | builtin and then its argument prototype would still apply. */ |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3835 | char __d6_pthread_create(); |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3836 | |
| 3837 | int main() { |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3838 | __d6_pthread_create() |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3839 | ; return 0; } |
| 3840 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3841 | if { (eval echo configure:3842: \"$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] | 3842 | rm -rf conftest* |
| 3843 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3844 | else |
| 3845 | echo "configure: failed program was:" >&5 |
| 3846 | cat conftest.$ac_ext >&5 |
| 3847 | rm -rf conftest* |
| 3848 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3849 | fi |
| 3850 | rm -f conftest* |
| 3851 | LIBS="$ac_save_LIBS" |
| 3852 | |
| 3853 | fi |
| 3854 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3855 | echo "$ac_t""yes" 1>&6 |
| 3856 | cat >> confdefs.h <<\EOF |
| 3857 | #define WITH_THREAD 1 |
| 3858 | EOF |
| 3859 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3860 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3861 | #define _POSIX_THREADS 1 |
| 3862 | EOF |
| 3863 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3864 | LIBS="$LIBS -lthread" |
| 3865 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3866 | else |
| 3867 | echo "$ac_t""no" 1>&6 |
| 3868 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3869 | echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3870 | echo "configure:3871: checking for __pthread_create_system in -lpthread" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3871 | ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` |
| 3872 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3873 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3874 | else |
| 3875 | ac_save_LIBS="$LIBS" |
| 3876 | LIBS="-lpthread $LIBS" |
| 3877 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3878 | #line 3879 "configure" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3879 | #include "confdefs.h" |
| 3880 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3881 | /* We use char because int might match the return type of a gcc2 |
| 3882 | builtin and then its argument prototype would still apply. */ |
| 3883 | char __pthread_create_system(); |
| 3884 | |
| 3885 | int main() { |
| 3886 | __pthread_create_system() |
| 3887 | ; return 0; } |
| 3888 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3889 | if { (eval echo configure:3890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3890 | rm -rf conftest* |
| 3891 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3892 | else |
| 3893 | echo "configure: failed program was:" >&5 |
| 3894 | cat conftest.$ac_ext >&5 |
| 3895 | rm -rf conftest* |
| 3896 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3897 | fi |
| 3898 | rm -f conftest* |
| 3899 | LIBS="$ac_save_LIBS" |
| 3900 | |
| 3901 | fi |
| 3902 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3903 | echo "$ac_t""yes" 1>&6 |
| 3904 | cat >> confdefs.h <<\EOF |
| 3905 | #define WITH_THREAD 1 |
| 3906 | EOF |
| 3907 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3908 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3909 | #define _POSIX_THREADS 1 |
| 3910 | EOF |
| 3911 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3912 | LIBS="$LIBS -lpthread" |
| 3913 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3914 | else |
| 3915 | echo "$ac_t""no" 1>&6 |
| 3916 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3917 | echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3918 | echo "configure:3919: checking for pthread_create in -lcma" >&5 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3919 | ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3920 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3921 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3922 | else |
| 3923 | ac_save_LIBS="$LIBS" |
| 3924 | LIBS="-lcma $LIBS" |
| 3925 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3926 | #line 3927 "configure" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3927 | #include "confdefs.h" |
| 3928 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3929 | /* We use char because int might match the return type of a gcc2 |
| 3930 | builtin and then its argument prototype would still apply. */ |
| 3931 | char pthread_create(); |
| 3932 | |
| 3933 | int main() { |
| 3934 | pthread_create() |
| 3935 | ; return 0; } |
| 3936 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3937 | if { (eval echo configure:3938: \"$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] | 3938 | rm -rf conftest* |
| 3939 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3940 | else |
| 3941 | echo "configure: failed program was:" >&5 |
| 3942 | cat conftest.$ac_ext >&5 |
| 3943 | rm -rf conftest* |
| 3944 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3945 | fi |
| 3946 | rm -f conftest* |
| 3947 | LIBS="$ac_save_LIBS" |
| 3948 | |
| 3949 | fi |
| 3950 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3951 | echo "$ac_t""yes" 1>&6 |
| 3952 | cat >> confdefs.h <<\EOF |
| 3953 | #define WITH_THREAD 1 |
| 3954 | EOF |
| 3955 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3956 | cat >> confdefs.h <<\EOF |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3957 | #define _POSIX_THREADS 1 |
| 3958 | EOF |
| 3959 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3960 | LIBS="$LIBS -lcma" |
| 3961 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3962 | else |
| 3963 | echo "$ac_t""no" 1>&6 |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 3964 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3965 | USE_THREAD_MODULE="#" |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 3966 | fi |
| 3967 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3968 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3969 | fi |
| 3970 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3971 | fi |
| 3972 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 3973 | fi |
| 3974 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3975 | fi |
| 3976 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3977 | fi |
| 3978 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3979 | fi |
| 3980 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3981 | fi |
| 3982 | |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3983 | fi |
| 3984 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3985 | fi |
| 3986 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 3987 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3988 | echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3989 | echo "configure:3990: checking for usconfig in -lmpc" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3990 | ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3991 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3992 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3993 | else |
| 3994 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3995 | LIBS="-lmpc $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3996 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 3997 | #line 3998 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3998 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3999 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4000 | /* We use char because int might match the return type of a gcc2 |
| 4001 | builtin and then its argument prototype would still apply. */ |
| 4002 | char usconfig(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4003 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4004 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4005 | usconfig() |
| 4006 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4007 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4008 | if { (eval echo configure:4009: \"$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] | 4009 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4010 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4011 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4012 | echo "configure: failed program was:" >&5 |
| 4013 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4014 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4015 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4016 | fi |
| 4017 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4018 | LIBS="$ac_save_LIBS" |
| 4019 | |
| 4020 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4021 | 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] | 4022 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4023 | cat >> confdefs.h <<\EOF |
| 4024 | #define WITH_THREAD 1 |
| 4025 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4026 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4027 | LIBS="$LIBS -lmpc" |
| 4028 | LIBOBJS="$LIBOBJS thread.o" |
| 4029 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4030 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4031 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4032 | fi |
| 4033 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4034 | echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4035 | echo "configure:4036: checking for thr_create in -lthread" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4036 | ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4037 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4038 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4039 | else |
| 4040 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4041 | LIBS="-lthread $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4042 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4043 | #line 4044 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4044 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4045 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4046 | /* We use char because int might match the return type of a gcc2 |
| 4047 | builtin and then its argument prototype would still apply. */ |
| 4048 | char thr_create(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4049 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4050 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4051 | thr_create() |
| 4052 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4053 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4054 | if { (eval echo configure:4055: \"$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] | 4055 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4056 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4057 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4058 | echo "configure: failed program was:" >&5 |
| 4059 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4060 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4061 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4062 | fi |
| 4063 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4064 | LIBS="$ac_save_LIBS" |
| 4065 | |
| 4066 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4067 | 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] | 4068 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4069 | cat >> confdefs.h <<\EOF |
| 4070 | #define WITH_THREAD 1 |
| 4071 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4072 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4073 | LIBS="$LIBS -lthread" |
| 4074 | LIBOBJS="$LIBOBJS thread.o" |
| 4075 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4076 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4077 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4078 | fi |
| 4079 | |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4080 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4081 | if test "$USE_THREAD_MODULE" != "#" |
| 4082 | then |
| 4083 | # If the above checks didn't disable threads, (at least) OSF1 |
| 4084 | # needs this '-threads' argument during linking. |
| 4085 | case $ac_sys_system in |
| 4086 | OSF1) LDLAST=-threads;; |
| 4087 | esac |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4088 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4089 | fi |
| 4090 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4091 | # Check for enable-ipv6 |
| 4092 | echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6 |
| 4093 | echo "configure:4094: checking whether to enable ipv6" >&5 |
| 4094 | # Check whether --enable-ipv6 or --disable-ipv6 was given. |
| 4095 | if test "${enable_ipv6+set}" = set; then |
| 4096 | enableval="$enable_ipv6" |
| 4097 | case "$enableval" in |
| 4098 | no) |
| 4099 | echo "$ac_t""no" 1>&6 |
| 4100 | ipv6=no |
| 4101 | ;; |
| 4102 | *) echo "$ac_t""yes" 1>&6 |
| 4103 | cat >> confdefs.h <<\EOF |
| 4104 | #define ENABLE_IPV6 1 |
| 4105 | EOF |
| 4106 | |
| 4107 | ipv6=yes |
| 4108 | ;; |
| 4109 | esac |
| 4110 | else |
| 4111 | if test "$cross_compiling" = yes; then |
| 4112 | echo "$ac_t""no" 1>&6 |
| 4113 | ipv6=no |
| 4114 | |
| 4115 | else |
| 4116 | cat > conftest.$ac_ext <<EOF |
| 4117 | #line 4118 "configure" |
| 4118 | #include "confdefs.h" |
| 4119 | /* AF_INET6 available check */ |
| 4120 | #include <sys/types.h> |
| 4121 | #include <sys/socket.h> |
| 4122 | main() |
| 4123 | { |
| 4124 | if (socket(AF_INET6, SOCK_STREAM, 0) < 0) |
| 4125 | exit(1); |
| 4126 | else |
| 4127 | exit(0); |
| 4128 | } |
| 4129 | |
| 4130 | EOF |
| 4131 | if { (eval echo configure:4132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 4132 | then |
| 4133 | echo "$ac_t""yes" 1>&6 |
| 4134 | cat >> confdefs.h <<\EOF |
| 4135 | #define ENABLE_IPV6 1 |
| 4136 | EOF |
| 4137 | |
| 4138 | ipv6=yes |
| 4139 | else |
| 4140 | echo "configure: failed program was:" >&5 |
| 4141 | cat conftest.$ac_ext >&5 |
| 4142 | rm -fr conftest* |
| 4143 | echo "$ac_t""no" 1>&6 |
| 4144 | ipv6=no |
| 4145 | fi |
| 4146 | rm -fr conftest* |
| 4147 | fi |
| 4148 | |
| 4149 | fi |
| 4150 | |
| 4151 | |
| 4152 | ipv6type=unknown |
| 4153 | ipv6lib=none |
| 4154 | ipv6trylibc=no |
| 4155 | |
| 4156 | if test "$ipv6" = "yes"; then |
| 4157 | echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 |
| 4158 | echo "configure:4159: checking ipv6 stack type" >&5 |
| 4159 | for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; do |
| 4160 | case $i in |
| 4161 | inria) |
| 4162 | cat > conftest.$ac_ext <<EOF |
| 4163 | #line 4164 "configure" |
| 4164 | #include "confdefs.h" |
| 4165 | dnl |
| 4166 | #include <netinet/in.h> |
| 4167 | #ifdef IPV6_INRIA_VERSION |
| 4168 | yes |
| 4169 | #endif |
| 4170 | EOF |
| 4171 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4172 | egrep "yes" >/dev/null 2>&1; then |
| 4173 | rm -rf conftest* |
| 4174 | ipv6type=$i; |
| 4175 | OPT="-DINET6 $OPT" |
| 4176 | fi |
| 4177 | rm -f conftest* |
| 4178 | |
| 4179 | ;; |
| 4180 | kame) |
| 4181 | cat > conftest.$ac_ext <<EOF |
| 4182 | #line 4183 "configure" |
| 4183 | #include "confdefs.h" |
| 4184 | dnl |
| 4185 | #include <netinet/in.h> |
| 4186 | #ifdef __KAME__ |
| 4187 | yes |
| 4188 | #endif |
| 4189 | EOF |
| 4190 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4191 | egrep "yes" >/dev/null 2>&1; then |
| 4192 | rm -rf conftest* |
| 4193 | ipv6type=$i; |
| 4194 | ipv6lib=inet6 |
| 4195 | ipv6libdir=/usr/local/v6/lib |
| 4196 | ipv6trylibc=yes |
| 4197 | OPT="-DINET6 $OPT" |
| 4198 | fi |
| 4199 | rm -f conftest* |
| 4200 | |
| 4201 | ;; |
| 4202 | linux-glibc) |
| 4203 | cat > conftest.$ac_ext <<EOF |
| 4204 | #line 4205 "configure" |
| 4205 | #include "confdefs.h" |
| 4206 | dnl |
| 4207 | #include <features.h> |
| 4208 | #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) |
| 4209 | yes |
| 4210 | #endif |
| 4211 | EOF |
| 4212 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4213 | egrep "yes" >/dev/null 2>&1; then |
| 4214 | rm -rf conftest* |
| 4215 | ipv6type=$i; |
| 4216 | ipv6trylibc=yes |
| 4217 | OPT="-DINET6 $OPT" |
| 4218 | fi |
| 4219 | rm -f conftest* |
| 4220 | |
| 4221 | ;; |
| 4222 | linux-inet6) |
| 4223 | if test -d /usr/inet6; then |
| 4224 | ipv6type=$i |
| 4225 | ipv6lib=inet6 |
| 4226 | ipv6libdir=/usr/inet6/lib |
| 4227 | OPT="-DINET6 -I/usr/inet6/include $OPT" |
| 4228 | fi |
| 4229 | ;; |
| 4230 | solaris) |
| 4231 | if test -f /etc/netconfig; then |
| 4232 | if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then |
| 4233 | ipv6type=$i |
| 4234 | ipv6trylibc=yes |
| 4235 | OPT="-DINET6 $OPT" |
| 4236 | fi |
| 4237 | fi |
| 4238 | ;; |
| 4239 | toshiba) |
| 4240 | cat > conftest.$ac_ext <<EOF |
| 4241 | #line 4242 "configure" |
| 4242 | #include "confdefs.h" |
| 4243 | dnl |
| 4244 | #include <sys/param.h> |
| 4245 | #ifdef _TOSHIBA_INET6 |
| 4246 | yes |
| 4247 | #endif |
| 4248 | EOF |
| 4249 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4250 | egrep "yes" >/dev/null 2>&1; then |
| 4251 | rm -rf conftest* |
| 4252 | ipv6type=$i; |
| 4253 | ipv6lib=inet6; |
| 4254 | ipv6libdir=/usr/local/v6/lib; |
| 4255 | OPT="-DINET6 $OPT" |
| 4256 | fi |
| 4257 | rm -f conftest* |
| 4258 | |
| 4259 | ;; |
| 4260 | v6d) |
| 4261 | cat > conftest.$ac_ext <<EOF |
| 4262 | #line 4263 "configure" |
| 4263 | #include "confdefs.h" |
| 4264 | dnl |
| 4265 | #include </usr/local/v6/include/sys/v6config.h> |
| 4266 | #ifdef __V6D__ |
| 4267 | yes |
| 4268 | #endif |
| 4269 | EOF |
| 4270 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4271 | egrep "yes" >/dev/null 2>&1; then |
| 4272 | rm -rf conftest* |
| 4273 | ipv6type=$i; |
| 4274 | ipv6lib=v6; |
| 4275 | ipv6libdir=/usr/local/v6/lib; |
| 4276 | OPT="-I/usr/local/v6/include $OPT" |
| 4277 | fi |
| 4278 | rm -f conftest* |
| 4279 | |
| 4280 | ;; |
| 4281 | zeta) |
| 4282 | cat > conftest.$ac_ext <<EOF |
| 4283 | #line 4284 "configure" |
| 4284 | #include "confdefs.h" |
| 4285 | dnl |
| 4286 | #include <sys/param.h> |
| 4287 | #ifdef _ZETA_MINAMI_INET6 |
| 4288 | yes |
| 4289 | #endif |
| 4290 | EOF |
| 4291 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4292 | egrep "yes" >/dev/null 2>&1; then |
| 4293 | rm -rf conftest* |
| 4294 | ipv6type=$i; |
| 4295 | ipv6lib=inet6; |
| 4296 | ipv6libdir=/usr/local/v6/lib; |
| 4297 | OPT="-DINET6 $OPT" |
| 4298 | fi |
| 4299 | rm -f conftest* |
| 4300 | |
| 4301 | ;; |
| 4302 | esac |
| 4303 | if test "$ipv6type" != "unknown"; then |
| 4304 | break |
| 4305 | fi |
| 4306 | done |
| 4307 | echo "$ac_t""$ipv6type" 1>&6 |
| 4308 | fi |
| 4309 | |
| 4310 | if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then |
| 4311 | if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then |
| 4312 | LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" |
| 4313 | echo "using lib$ipv6lib" |
| 4314 | else |
| 4315 | if test $ipv6trylibc = "yes"; then |
| 4316 | echo "using libc" |
| 4317 | else |
| 4318 | echo 'Fatal: no $ipv6lib library found. cannot continue.' |
| 4319 | echo "You need to fetch lib$ipv6lib.a from appropriate" |
| 4320 | echo 'ipv6 kit and compile beforehand.' |
| 4321 | exit 1 |
| 4322 | fi |
| 4323 | fi |
| 4324 | fi |
| 4325 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4326 | # Check for GC support |
| 4327 | |
| 4328 | USE_GC_MODULE="" |
| 4329 | echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4330 | echo "configure:4331: checking for --with-cycle-gc" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4331 | # Check whether --with-cycle-gc or --without-cycle-gc was given. |
| 4332 | if test "${with_cycle_gc+set}" = set; then |
| 4333 | withval="$with_cycle_gc" |
| 4334 | : |
| 4335 | fi |
| 4336 | |
| 4337 | |
| 4338 | if test -z "$with_cycle_gc" |
| 4339 | then with_cycle_gc="yes" |
| 4340 | fi |
| 4341 | if test "$with_cycle_gc" = "no" |
| 4342 | then |
| 4343 | USE_GC_MODULE="#" |
| 4344 | else |
| 4345 | cat >> confdefs.h <<\EOF |
| 4346 | #define WITH_CYCLE_GC 1 |
| 4347 | EOF |
| 4348 | |
| 4349 | fi |
| 4350 | echo "$ac_t""$with_cycle_gc" 1>&6 |
| 4351 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4352 | # Check for Python-specific malloc support |
| 4353 | echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4354 | echo "configure:4355: checking for --with-pymalloc" >&5 |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4355 | # Check whether --with-pymalloc or --without-pymalloc was given. |
| 4356 | if test "${with_pymalloc+set}" = set; then |
| 4357 | withval="$with_pymalloc" |
| 4358 | |
| 4359 | if test "$withval" != no |
| 4360 | then cat >> confdefs.h <<\EOF |
| 4361 | #define WITH_PYMALLOC 1 |
| 4362 | EOF |
| 4363 | echo "$ac_t""yes" 1>&6 |
| 4364 | else echo "$ac_t""no" 1>&6 |
| 4365 | fi |
| 4366 | else |
| 4367 | echo "$ac_t""no" 1>&6 |
| 4368 | fi |
| 4369 | |
| 4370 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4371 | # Check for --with-wctype-functions |
| 4372 | echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4373 | echo "configure:4374: checking for --with-wctype-functions" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4374 | # Check whether --with-wctype-functions or --without-wctype-functions was given. |
| 4375 | if test "${with_wctype_functions+set}" = set; then |
| 4376 | withval="$with_wctype_functions" |
| 4377 | |
| 4378 | if test "$withval" != no |
| 4379 | then cat >> confdefs.h <<\EOF |
| 4380 | #define WANT_WCTYPE_FUNCTIONS 1 |
| 4381 | EOF |
| 4382 | echo "$ac_t""yes" 1>&6 |
| 4383 | else echo "$ac_t""no" 1>&6 |
| 4384 | fi |
| 4385 | else |
| 4386 | echo "$ac_t""no" 1>&6 |
| 4387 | fi |
| 4388 | |
| 4389 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4390 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4391 | |
| 4392 | DLINCLDIR=/ |
| 4393 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4394 | echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4395 | echo "configure:4396: checking for --with-sgi-dl" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4396 | # Check whether --with-sgi-dl or --without-sgi-dl was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4397 | if test "${with_sgi_dl+set}" = set; then |
| 4398 | withval="$with_sgi_dl" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4399 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4400 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4401 | cat >> confdefs.h <<\EOF |
| 4402 | #define WITH_SGI_DL 1 |
| 4403 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4404 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4405 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4406 | dldir=$withval |
Guido van Rossum | 4095101 | 2000-10-07 16:21:27 +0000 | [diff] [blame] | 4407 | if test ! -z "$dldir" -a -d "$dldir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 4408 | then LDFLAGS="$LDFLAGS -L$dldir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4409 | 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] | 4410 | fi |
| 4411 | DLINCLDIR=${dldir} |
| 4412 | LIBS="$LIBS -ldl -lmld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4413 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4414 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4415 | fi |
| 4416 | |
| 4417 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4418 | echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4419 | echo "configure:4420: checking for --with-dl-dld" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4420 | # Check whether --with-dl-dld or --without-dl-dld was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4421 | if test "${with_dl_dld+set}" = set; then |
| 4422 | withval="$with_dl_dld" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4423 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4424 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4425 | cat >> confdefs.h <<\EOF |
| 4426 | #define WITH_DL_DLD 1 |
| 4427 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4428 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4429 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4430 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 4431 | dlddir=`echo "$withval" | sed 's/.*,//'` |
Barry Warsaw | 7d1219d | 2000-10-05 18:45:53 +0000 | [diff] [blame] | 4432 | 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] | 4433 | then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4434 | 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] | 4435 | fi |
| 4436 | DLINCLDIR=${dldir} |
| 4437 | LIBS="$LIBS -ldl -ldld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4438 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4439 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4440 | fi |
| 4441 | |
| 4442 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4443 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 4444 | # 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] | 4445 | for ac_func in dlopen |
| 4446 | do |
| 4447 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4448 | echo "configure:4449: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4449 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4450 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4451 | else |
| 4452 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4453 | #line 4454 "configure" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4454 | #include "confdefs.h" |
| 4455 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4456 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4457 | #include <assert.h> |
| 4458 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4459 | /* We use char because int might match the return type of a gcc2 |
| 4460 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4461 | char $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4462 | |
| 4463 | int main() { |
| 4464 | |
| 4465 | /* The GNU C library defines this for functions which it implements |
| 4466 | to always fail with ENOSYS. Some functions are actually named |
| 4467 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4468 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4469 | choke me |
| 4470 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4471 | $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4472 | #endif |
| 4473 | |
| 4474 | ; return 0; } |
| 4475 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4476 | if { (eval echo configure:4477: \"$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] | 4477 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4478 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4479 | else |
| 4480 | echo "configure: failed program was:" >&5 |
| 4481 | cat conftest.$ac_ext >&5 |
| 4482 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4483 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4484 | fi |
| 4485 | rm -f conftest* |
| 4486 | fi |
| 4487 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4488 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4489 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4490 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4491 | cat >> confdefs.h <<EOF |
| 4492 | #define $ac_tr_func 1 |
| 4493 | EOF |
| 4494 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4495 | else |
| 4496 | echo "$ac_t""no" 1>&6 |
| 4497 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4498 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4499 | |
| 4500 | |
| 4501 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 4502 | # loading of modules. |
| 4503 | |
| 4504 | echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4505 | echo "configure:4506: checking DYNLOADFILE" >&5 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4506 | if test -z "$DYNLOADFILE" |
| 4507 | then |
| 4508 | case $ac_sys_system/$ac_sys_release in |
| 4509 | AIX*) DYNLOADFILE="dynload_aix.o";; |
| 4510 | BeOS*) DYNLOADFILE="dynload_beos.o";; |
| 4511 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 4512 | Darwin/*|next/*) DYNLOADFILE="dynload_next.o";; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4513 | *) |
| 4514 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 4515 | # out any dynamic loading |
| 4516 | if test "$ac_cv_func_dlopen" = yes |
| 4517 | then DYNLOADFILE="dynload_shlib.o" |
| 4518 | else DYNLOADFILE="dynload_stub.o" |
| 4519 | fi |
| 4520 | ;; |
| 4521 | esac |
| 4522 | fi |
| 4523 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
| 4524 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 4525 | then |
| 4526 | cat >> confdefs.h <<\EOF |
| 4527 | #define HAVE_DYNAMIC_LOADING 1 |
| 4528 | EOF |
| 4529 | |
| 4530 | fi |
| 4531 | |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4532 | # MACHDEP_OBJS can be set to platform-specific object files needed by Python |
| 4533 | |
| 4534 | |
| 4535 | echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4536 | echo "configure:4537: checking MACHDEP_OBJS" >&5 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4537 | if test -z "$MACHDEP_OBJS" |
| 4538 | then |
| 4539 | case $ac_sys_system/$ac_sys_release in |
| 4540 | Darwin/*) |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4541 | MACHDEP_OBJS="Python/mactoolboxglue.o" |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4542 | cat >> confdefs.h <<\EOF |
| 4543 | #define USE_TOOLBOX_OBJECT_GLUE 1 |
| 4544 | EOF |
| 4545 | |
| 4546 | ;; |
| 4547 | *) MACHDEP_OBJS="";; |
| 4548 | esac |
| 4549 | fi |
| 4550 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
| 4551 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4552 | # checks for library functions |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4553 | for ac_func in alarm chown clock confstr ctermid ctermid_r execv \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4554 | flock fork fsync fdatasync fpathconf ftime ftruncate \ |
Andrew M. Kuchling | a9586c7 | 2001-01-08 17:58:56 +0000 | [diff] [blame] | 4555 | getgroups getlogin getpeername getpid getpwent getwd \ |
Martin v. Löwis | 864e9ff | 2001-08-04 22:32:03 +0000 | [diff] [blame] | 4556 | hstrerror inet_pton kill link lstat mkfifo mktime mremap \ |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 4557 | nice pathconf pause plock poll pthread_init \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4558 | putenv readlink \ |
Andrew M. Kuchling | 8d2f2b2 | 2000-07-13 01:26:58 +0000 | [diff] [blame] | 4559 | select setegid seteuid setgid \ |
Martin v. Löwis | 791bfda | 2001-07-24 06:33:08 +0000 | [diff] [blame] | 4560 | setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4561 | sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ |
Fred Drake | 89143df | 1999-12-09 22:03:25 +0000 | [diff] [blame] | 4562 | tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Thomas Wouters | c2c12dc | 2001-07-11 14:45:34 +0000 | [diff] [blame] | 4563 | truncate uname waitpid _getpty getpriority |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4564 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4565 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4566 | echo "configure:4567: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4567 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4568 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4569 | else |
| 4570 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4571 | #line 4572 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4572 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4573 | /* System header to define __stub macros and hopefully few prototypes, |
| 4574 | which can conflict with char $ac_func(); below. */ |
| 4575 | #include <assert.h> |
| 4576 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4577 | /* We use char because int might match the return type of a gcc2 |
| 4578 | builtin and then its argument prototype would still apply. */ |
| 4579 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4580 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4581 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4582 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4583 | /* The GNU C library defines this for functions which it implements |
| 4584 | to always fail with ENOSYS. Some functions are actually named |
| 4585 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4586 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4587 | choke me |
| 4588 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4589 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4590 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4591 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4592 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4593 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4594 | if { (eval echo configure:4595: \"$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] | 4595 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4596 | eval "ac_cv_func_$ac_func=yes" |
| 4597 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4598 | echo "configure: failed program was:" >&5 |
| 4599 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4600 | rm -rf conftest* |
| 4601 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4602 | fi |
| 4603 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4604 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4605 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4606 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4607 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4608 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4609 | cat >> confdefs.h <<EOF |
| 4610 | #define $ac_tr_func 1 |
| 4611 | EOF |
| 4612 | |
| 4613 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4614 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4615 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4616 | done |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 4617 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4618 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4619 | # check for openpty and forkpty |
| 4620 | |
| 4621 | for ac_func in openpty |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4622 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4623 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4624 | echo "configure:4625: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4625 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4626 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4627 | else |
| 4628 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4629 | #line 4630 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4630 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4631 | /* System header to define __stub macros and hopefully few prototypes, |
| 4632 | which can conflict with char $ac_func(); below. */ |
| 4633 | #include <assert.h> |
| 4634 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4635 | /* We use char because int might match the return type of a gcc2 |
| 4636 | builtin and then its argument prototype would still apply. */ |
| 4637 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4638 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4639 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4640 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4641 | /* The GNU C library defines this for functions which it implements |
| 4642 | to always fail with ENOSYS. Some functions are actually named |
| 4643 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4644 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4645 | choke me |
| 4646 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4647 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4648 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4649 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4650 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4651 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4652 | if { (eval echo configure:4653: \"$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] | 4653 | rm -rf conftest* |
| 4654 | eval "ac_cv_func_$ac_func=yes" |
| 4655 | else |
| 4656 | echo "configure: failed program was:" >&5 |
| 4657 | cat conftest.$ac_ext >&5 |
| 4658 | rm -rf conftest* |
| 4659 | eval "ac_cv_func_$ac_func=no" |
| 4660 | fi |
| 4661 | rm -f conftest* |
| 4662 | fi |
| 4663 | |
| 4664 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4665 | echo "$ac_t""yes" 1>&6 |
| 4666 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4667 | cat >> confdefs.h <<EOF |
| 4668 | #define $ac_tr_func 1 |
| 4669 | EOF |
| 4670 | |
| 4671 | else |
| 4672 | echo "$ac_t""no" 1>&6 |
| 4673 | echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4674 | echo "configure:4675: checking for openpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4675 | ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4676 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4677 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4678 | else |
| 4679 | ac_save_LIBS="$LIBS" |
| 4680 | LIBS="-lutil $LIBS" |
| 4681 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4682 | #line 4683 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4683 | #include "confdefs.h" |
| 4684 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4685 | /* We use char because int might match the return type of a gcc2 |
| 4686 | builtin and then its argument prototype would still apply. */ |
| 4687 | char openpty(); |
| 4688 | |
| 4689 | int main() { |
| 4690 | openpty() |
| 4691 | ; return 0; } |
| 4692 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4693 | if { (eval echo configure:4694: \"$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] | 4694 | rm -rf conftest* |
| 4695 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4696 | else |
| 4697 | echo "configure: failed program was:" >&5 |
| 4698 | cat conftest.$ac_ext >&5 |
| 4699 | rm -rf conftest* |
| 4700 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4701 | fi |
| 4702 | rm -f conftest* |
| 4703 | LIBS="$ac_save_LIBS" |
| 4704 | |
| 4705 | fi |
| 4706 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4707 | echo "$ac_t""yes" 1>&6 |
| 4708 | cat >> confdefs.h <<\EOF |
| 4709 | #define HAVE_OPENPTY 1 |
| 4710 | EOF |
| 4711 | LIBS="$LIBS -lutil" |
| 4712 | else |
| 4713 | echo "$ac_t""no" 1>&6 |
| 4714 | fi |
| 4715 | |
| 4716 | fi |
| 4717 | done |
| 4718 | |
| 4719 | for ac_func in forkpty |
| 4720 | do |
| 4721 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4722 | echo "configure:4723: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4723 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4724 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4725 | else |
| 4726 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4727 | #line 4728 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4728 | #include "confdefs.h" |
| 4729 | /* System header to define __stub macros and hopefully few prototypes, |
| 4730 | which can conflict with char $ac_func(); below. */ |
| 4731 | #include <assert.h> |
| 4732 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4733 | /* We use char because int might match the return type of a gcc2 |
| 4734 | builtin and then its argument prototype would still apply. */ |
| 4735 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4736 | |
| 4737 | int main() { |
| 4738 | |
| 4739 | /* The GNU C library defines this for functions which it implements |
| 4740 | to always fail with ENOSYS. Some functions are actually named |
| 4741 | something starting with __ and the normal name is an alias. */ |
| 4742 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4743 | choke me |
| 4744 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4745 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4746 | #endif |
| 4747 | |
| 4748 | ; return 0; } |
| 4749 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4750 | if { (eval echo configure:4751: \"$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] | 4751 | rm -rf conftest* |
| 4752 | eval "ac_cv_func_$ac_func=yes" |
| 4753 | else |
| 4754 | echo "configure: failed program was:" >&5 |
| 4755 | cat conftest.$ac_ext >&5 |
| 4756 | rm -rf conftest* |
| 4757 | eval "ac_cv_func_$ac_func=no" |
| 4758 | fi |
| 4759 | rm -f conftest* |
| 4760 | fi |
| 4761 | |
| 4762 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4763 | echo "$ac_t""yes" 1>&6 |
| 4764 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4765 | cat >> confdefs.h <<EOF |
| 4766 | #define $ac_tr_func 1 |
| 4767 | EOF |
| 4768 | |
| 4769 | else |
| 4770 | echo "$ac_t""no" 1>&6 |
| 4771 | echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4772 | echo "configure:4773: checking for forkpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4773 | ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4774 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4775 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4776 | else |
| 4777 | ac_save_LIBS="$LIBS" |
| 4778 | LIBS="-lutil $LIBS" |
| 4779 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4780 | #line 4781 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4781 | #include "confdefs.h" |
| 4782 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4783 | /* We use char because int might match the return type of a gcc2 |
| 4784 | builtin and then its argument prototype would still apply. */ |
| 4785 | char forkpty(); |
| 4786 | |
| 4787 | int main() { |
| 4788 | forkpty() |
| 4789 | ; return 0; } |
| 4790 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4791 | if { (eval echo configure:4792: \"$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] | 4792 | rm -rf conftest* |
| 4793 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4794 | else |
| 4795 | echo "configure: failed program was:" >&5 |
| 4796 | cat conftest.$ac_ext >&5 |
| 4797 | rm -rf conftest* |
| 4798 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4799 | fi |
| 4800 | rm -f conftest* |
| 4801 | LIBS="$ac_save_LIBS" |
| 4802 | |
| 4803 | fi |
| 4804 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4805 | echo "$ac_t""yes" 1>&6 |
| 4806 | cat >> confdefs.h <<\EOF |
| 4807 | #define HAVE_FORKPTY 1 |
| 4808 | EOF |
| 4809 | LIBS="$LIBS -lutil" |
| 4810 | else |
| 4811 | echo "$ac_t""no" 1>&6 |
| 4812 | fi |
| 4813 | |
| 4814 | fi |
| 4815 | done |
| 4816 | |
| 4817 | |
| 4818 | # check for long file support functions |
| 4819 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
| 4820 | do |
| 4821 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4822 | echo "configure:4823: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4823 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4824 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4825 | else |
| 4826 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4827 | #line 4828 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4828 | #include "confdefs.h" |
| 4829 | /* System header to define __stub macros and hopefully few prototypes, |
| 4830 | which can conflict with char $ac_func(); below. */ |
| 4831 | #include <assert.h> |
| 4832 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4833 | /* We use char because int might match the return type of a gcc2 |
| 4834 | builtin and then its argument prototype would still apply. */ |
| 4835 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4836 | |
| 4837 | int main() { |
| 4838 | |
| 4839 | /* The GNU C library defines this for functions which it implements |
| 4840 | to always fail with ENOSYS. Some functions are actually named |
| 4841 | something starting with __ and the normal name is an alias. */ |
| 4842 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4843 | choke me |
| 4844 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4845 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4846 | #endif |
| 4847 | |
| 4848 | ; return 0; } |
| 4849 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4850 | if { (eval echo configure:4851: \"$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] | 4851 | rm -rf conftest* |
| 4852 | eval "ac_cv_func_$ac_func=yes" |
| 4853 | else |
| 4854 | echo "configure: failed program was:" >&5 |
| 4855 | cat conftest.$ac_ext >&5 |
| 4856 | rm -rf conftest* |
| 4857 | eval "ac_cv_func_$ac_func=no" |
| 4858 | fi |
| 4859 | rm -f conftest* |
| 4860 | fi |
| 4861 | |
| 4862 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4863 | echo "$ac_t""yes" 1>&6 |
| 4864 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4865 | cat >> confdefs.h <<EOF |
| 4866 | #define $ac_tr_func 1 |
| 4867 | EOF |
| 4868 | |
| 4869 | else |
| 4870 | echo "$ac_t""no" 1>&6 |
| 4871 | fi |
| 4872 | done |
| 4873 | |
| 4874 | |
| 4875 | for ac_func in dup2 getcwd strdup strerror memmove |
| 4876 | do |
| 4877 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4878 | echo "configure:4879: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4879 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4880 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4881 | else |
| 4882 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4883 | #line 4884 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4884 | #include "confdefs.h" |
| 4885 | /* System header to define __stub macros and hopefully few prototypes, |
| 4886 | which can conflict with char $ac_func(); below. */ |
| 4887 | #include <assert.h> |
| 4888 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4889 | /* We use char because int might match the return type of a gcc2 |
| 4890 | builtin and then its argument prototype would still apply. */ |
| 4891 | char $ac_func(); |
| 4892 | |
| 4893 | int main() { |
| 4894 | |
| 4895 | /* The GNU C library defines this for functions which it implements |
| 4896 | to always fail with ENOSYS. Some functions are actually named |
| 4897 | something starting with __ and the normal name is an alias. */ |
| 4898 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4899 | choke me |
| 4900 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4901 | $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4902 | #endif |
| 4903 | |
| 4904 | ; return 0; } |
| 4905 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4906 | if { (eval echo configure:4907: \"$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] | 4907 | rm -rf conftest* |
| 4908 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4909 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4910 | echo "configure: failed program was:" >&5 |
| 4911 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4912 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4913 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4914 | fi |
| 4915 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4916 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4917 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4918 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4919 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4920 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4921 | cat >> confdefs.h <<EOF |
| 4922 | #define $ac_tr_func 1 |
| 4923 | EOF |
| 4924 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4925 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4926 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 4927 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4928 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4929 | done |
| 4930 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4931 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4932 | for ac_func in getpgrp |
| 4933 | do |
| 4934 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4935 | echo "configure:4936: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4936 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4937 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4938 | else |
| 4939 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4940 | #line 4941 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4941 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4942 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4943 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4944 | #include <assert.h> |
| 4945 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4946 | /* We use char because int might match the return type of a gcc2 |
| 4947 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4948 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4949 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4950 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4951 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4952 | /* The GNU C library defines this for functions which it implements |
| 4953 | to always fail with ENOSYS. Some functions are actually named |
| 4954 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4955 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4956 | choke me |
| 4957 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4958 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4959 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4960 | |
| 4961 | ; return 0; } |
| 4962 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4963 | if { (eval echo configure:4964: \"$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] | 4964 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4965 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4966 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4967 | echo "configure: failed program was:" >&5 |
| 4968 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4969 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4970 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4971 | fi |
| 4972 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4973 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4974 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4975 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4976 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4977 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4978 | cat >> confdefs.h <<EOF |
| 4979 | #define $ac_tr_func 1 |
| 4980 | EOF |
| 4981 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4982 | #line 4983 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4983 | #include "confdefs.h" |
| 4984 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4985 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4986 | getpgrp(0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4987 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4988 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4989 | if { (eval echo configure:4990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4990 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4991 | cat >> confdefs.h <<\EOF |
| 4992 | #define GETPGRP_HAVE_ARG 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4993 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4994 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4995 | else |
| 4996 | echo "configure: failed program was:" >&5 |
| 4997 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4998 | fi |
| 4999 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5000 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5001 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5002 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5003 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5004 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5005 | for ac_func in setpgrp |
| 5006 | do |
| 5007 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5008 | echo "configure:5009: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5009 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5010 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5011 | else |
| 5012 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5013 | #line 5014 "configure" |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5014 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5015 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5016 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5017 | #include <assert.h> |
| 5018 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5019 | /* We use char because int might match the return type of a gcc2 |
| 5020 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5021 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5022 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5023 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5024 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5025 | /* The GNU C library defines this for functions which it implements |
| 5026 | to always fail with ENOSYS. Some functions are actually named |
| 5027 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5028 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5029 | choke me |
| 5030 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5031 | $ac_func(); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5032 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5033 | |
| 5034 | ; return 0; } |
| 5035 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5036 | if { (eval echo configure:5037: \"$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] | 5037 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5038 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5039 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5040 | echo "configure: failed program was:" >&5 |
| 5041 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5042 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5043 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5044 | fi |
| 5045 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5046 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5047 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5048 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5049 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5050 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5051 | cat >> confdefs.h <<EOF |
| 5052 | #define $ac_tr_func 1 |
| 5053 | EOF |
| 5054 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5055 | #line 5056 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5056 | #include "confdefs.h" |
| 5057 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5058 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5059 | setpgrp(0,0); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5060 | ; return 0; } |
| 5061 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5062 | if { (eval echo configure:5063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5063 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5064 | cat >> confdefs.h <<\EOF |
| 5065 | #define SETPGRP_HAVE_ARG 1 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5066 | EOF |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5067 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5068 | else |
| 5069 | echo "configure: failed program was:" >&5 |
| 5070 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5071 | fi |
| 5072 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5073 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5074 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5075 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5076 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5077 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5078 | for ac_func in gettimeofday |
| 5079 | do |
| 5080 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5081 | echo "configure:5082: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5082 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5083 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5084 | else |
| 5085 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5086 | #line 5087 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5087 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5088 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5089 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5090 | #include <assert.h> |
| 5091 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5092 | /* We use char because int might match the return type of a gcc2 |
| 5093 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5094 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5095 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5096 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5097 | |
| 5098 | /* The GNU C library defines this for functions which it implements |
| 5099 | to always fail with ENOSYS. Some functions are actually named |
| 5100 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5101 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5102 | choke me |
| 5103 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5104 | $ac_func(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5105 | #endif |
| 5106 | |
| 5107 | ; return 0; } |
| 5108 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5109 | if { (eval echo configure:5110: \"$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] | 5110 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5111 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 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* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5116 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5117 | fi |
| 5118 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5119 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5120 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5121 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5122 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5123 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5124 | cat >> confdefs.h <<EOF |
| 5125 | #define $ac_tr_func 1 |
| 5126 | EOF |
| 5127 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5128 | #line 5129 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5129 | #include "confdefs.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5130 | #include <sys/time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5131 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5132 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
| 5133 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5134 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5135 | if { (eval echo configure:5136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5136 | : |
| 5137 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5138 | echo "configure: failed program was:" >&5 |
| 5139 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5140 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5141 | cat >> confdefs.h <<\EOF |
| 5142 | #define GETTIMEOFDAY_NO_TZ 1 |
| 5143 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5144 | |
| 5145 | fi |
| 5146 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5147 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5148 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5149 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5150 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5151 | |
| 5152 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5153 | for ac_func in getaddrinfo |
| 5154 | do |
| 5155 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5156 | echo "configure:5157: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5157 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5158 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5159 | else |
| 5160 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5161 | #line 5162 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5162 | #include "confdefs.h" |
| 5163 | /* System header to define __stub macros and hopefully few prototypes, |
| 5164 | which can conflict with char $ac_func(); below. */ |
| 5165 | #include <assert.h> |
| 5166 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5167 | /* We use char because int might match the return type of a gcc2 |
| 5168 | builtin and then its argument prototype would still apply. */ |
| 5169 | char $ac_func(); |
| 5170 | |
| 5171 | int main() { |
| 5172 | |
| 5173 | /* The GNU C library defines this for functions which it implements |
| 5174 | to always fail with ENOSYS. Some functions are actually named |
| 5175 | something starting with __ and the normal name is an alias. */ |
| 5176 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5177 | choke me |
| 5178 | #else |
| 5179 | $ac_func(); |
| 5180 | #endif |
| 5181 | |
| 5182 | ; return 0; } |
| 5183 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5184 | if { (eval echo configure:5185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5185 | rm -rf conftest* |
| 5186 | eval "ac_cv_func_$ac_func=yes" |
| 5187 | else |
| 5188 | echo "configure: failed program was:" >&5 |
| 5189 | cat conftest.$ac_ext >&5 |
| 5190 | rm -rf conftest* |
| 5191 | eval "ac_cv_func_$ac_func=no" |
| 5192 | fi |
| 5193 | rm -f conftest* |
| 5194 | fi |
| 5195 | |
| 5196 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5197 | echo "$ac_t""yes" 1>&6 |
| 5198 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5199 | cat >> confdefs.h <<EOF |
| 5200 | #define $ac_tr_func 1 |
| 5201 | EOF |
| 5202 | echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5203 | echo "configure:5204: checking getaddrinfo bug" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5204 | if test "$cross_compiling" = yes; then |
| 5205 | echo "$ac_t""buggy" 1>&6 |
| 5206 | buggygetaddrinfo=yes |
| 5207 | else |
| 5208 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5209 | #line 5210 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5210 | #include "confdefs.h" |
| 5211 | |
| 5212 | #include <sys/types.h> |
| 5213 | #include <netdb.h> |
| 5214 | #include <string.h> |
| 5215 | #include <sys/socket.h> |
| 5216 | #include <netinet/in.h> |
| 5217 | |
| 5218 | main() |
| 5219 | { |
| 5220 | int passive, gaierr, inet4 = 0, inet6 = 0; |
| 5221 | struct addrinfo hints, *ai, *aitop; |
| 5222 | char straddr[INET6_ADDRSTRLEN], strport[16]; |
| 5223 | |
| 5224 | for (passive = 0; passive <= 1; passive++) { |
| 5225 | memset(&hints, 0, sizeof(hints)); |
| 5226 | hints.ai_family = AF_UNSPEC; |
| 5227 | hints.ai_flags = passive ? AI_PASSIVE : 0; |
| 5228 | hints.ai_socktype = SOCK_STREAM; |
| 5229 | if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { |
| 5230 | (void)gai_strerror(gaierr); |
| 5231 | goto bad; |
| 5232 | } |
| 5233 | for (ai = aitop; ai; ai = ai->ai_next) { |
| 5234 | if (ai->ai_addr == NULL || |
| 5235 | ai->ai_addrlen == 0 || |
| 5236 | getnameinfo(ai->ai_addr, ai->ai_addrlen, |
| 5237 | straddr, sizeof(straddr), strport, sizeof(strport), |
| 5238 | NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
| 5239 | goto bad; |
| 5240 | } |
| 5241 | switch (ai->ai_family) { |
| 5242 | case AF_INET: |
| 5243 | if (strcmp(strport, "54321") != 0) { |
| 5244 | goto bad; |
| 5245 | } |
| 5246 | if (passive) { |
| 5247 | if (strcmp(straddr, "0.0.0.0") != 0) { |
| 5248 | goto bad; |
| 5249 | } |
| 5250 | } else { |
| 5251 | if (strcmp(straddr, "127.0.0.1") != 0) { |
| 5252 | goto bad; |
| 5253 | } |
| 5254 | } |
| 5255 | inet4++; |
| 5256 | break; |
| 5257 | case AF_INET6: |
| 5258 | if (strcmp(strport, "54321") != 0) { |
| 5259 | goto bad; |
| 5260 | } |
| 5261 | if (passive) { |
| 5262 | if (strcmp(straddr, "::") != 0) { |
| 5263 | goto bad; |
| 5264 | } |
| 5265 | } else { |
| 5266 | if (strcmp(straddr, "::1") != 0) { |
| 5267 | goto bad; |
| 5268 | } |
| 5269 | } |
| 5270 | inet6++; |
| 5271 | break; |
| 5272 | case AF_UNSPEC: |
| 5273 | goto bad; |
| 5274 | break; |
| 5275 | default: |
| 5276 | /* another family support? */ |
| 5277 | break; |
| 5278 | } |
| 5279 | } |
| 5280 | } |
| 5281 | |
| 5282 | if (!(inet4 == 0 || inet4 == 2)) |
| 5283 | goto bad; |
| 5284 | if (!(inet6 == 0 || inet6 == 2)) |
| 5285 | goto bad; |
| 5286 | |
| 5287 | if (aitop) |
| 5288 | freeaddrinfo(aitop); |
| 5289 | exit(0); |
| 5290 | |
| 5291 | bad: |
| 5292 | if (aitop) |
| 5293 | freeaddrinfo(aitop); |
| 5294 | exit(1); |
| 5295 | } |
| 5296 | |
| 5297 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5298 | if { (eval echo configure:5299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5299 | then |
| 5300 | echo "$ac_t""good" 1>&6 |
| 5301 | buggygetaddrinfo=no |
| 5302 | else |
| 5303 | echo "configure: failed program was:" >&5 |
| 5304 | cat conftest.$ac_ext >&5 |
| 5305 | rm -fr conftest* |
| 5306 | echo "$ac_t""buggy" 1>&6 |
| 5307 | buggygetaddrinfo=yes |
| 5308 | fi |
| 5309 | rm -fr conftest* |
| 5310 | fi |
| 5311 | |
| 5312 | else |
| 5313 | echo "$ac_t""no" 1>&6 |
| 5314 | buggygetaddrinfo=yes |
| 5315 | fi |
| 5316 | done |
| 5317 | |
| 5318 | |
| 5319 | if test "$buggygetaddrinfo" = "yes"; then |
| 5320 | if test "$ipv6" = "yes"; then |
| 5321 | echo 'Fatal: You must get working getaddrinfo() function.' |
| 5322 | echo ' or you can specify "--disable-ipv6"'. |
| 5323 | exit 1 |
| 5324 | fi |
| 5325 | fi |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5326 | for ac_func in getnameinfo |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5327 | do |
| 5328 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5329 | echo "configure:5330: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5330 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5331 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5332 | else |
| 5333 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5334 | #line 5335 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5335 | #include "confdefs.h" |
| 5336 | /* System header to define __stub macros and hopefully few prototypes, |
| 5337 | which can conflict with char $ac_func(); below. */ |
| 5338 | #include <assert.h> |
| 5339 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5340 | /* We use char because int might match the return type of a gcc2 |
| 5341 | builtin and then its argument prototype would still apply. */ |
| 5342 | char $ac_func(); |
| 5343 | |
| 5344 | int main() { |
| 5345 | |
| 5346 | /* The GNU C library defines this for functions which it implements |
| 5347 | to always fail with ENOSYS. Some functions are actually named |
| 5348 | something starting with __ and the normal name is an alias. */ |
| 5349 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5350 | choke me |
| 5351 | #else |
| 5352 | $ac_func(); |
| 5353 | #endif |
| 5354 | |
| 5355 | ; return 0; } |
| 5356 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5357 | if { (eval echo configure:5358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5358 | rm -rf conftest* |
| 5359 | eval "ac_cv_func_$ac_func=yes" |
| 5360 | else |
| 5361 | echo "configure: failed program was:" >&5 |
| 5362 | cat conftest.$ac_ext >&5 |
| 5363 | rm -rf conftest* |
| 5364 | eval "ac_cv_func_$ac_func=no" |
| 5365 | fi |
| 5366 | rm -f conftest* |
| 5367 | fi |
| 5368 | |
| 5369 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5370 | echo "$ac_t""yes" 1>&6 |
| 5371 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5372 | cat >> confdefs.h <<EOF |
| 5373 | #define $ac_tr_func 1 |
| 5374 | EOF |
| 5375 | |
| 5376 | else |
| 5377 | echo "$ac_t""no" 1>&6 |
| 5378 | fi |
| 5379 | done |
| 5380 | |
| 5381 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5382 | # checks for structures |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5383 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5384 | echo "configure:5385: checking whether time.h and sys/time.h may both be included" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5385 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5386 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5387 | else |
| 5388 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5389 | #line 5390 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5390 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5391 | #include <sys/types.h> |
| 5392 | #include <sys/time.h> |
| 5393 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5394 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5395 | struct tm *tp; |
| 5396 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5397 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5398 | if { (eval echo configure:5399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5399 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5400 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5401 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5402 | echo "configure: failed program was:" >&5 |
| 5403 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5404 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5405 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5406 | fi |
| 5407 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5408 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5409 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5410 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5411 | if test $ac_cv_header_time = yes; then |
| 5412 | cat >> confdefs.h <<\EOF |
| 5413 | #define TIME_WITH_SYS_TIME 1 |
| 5414 | EOF |
| 5415 | |
| 5416 | fi |
| 5417 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5418 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5419 | echo "configure:5420: checking whether struct tm is in sys/time.h or time.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5420 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5421 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5422 | else |
| 5423 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5424 | #line 5425 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5425 | #include "confdefs.h" |
| 5426 | #include <sys/types.h> |
| 5427 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5428 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5429 | struct tm *tp; tp->tm_sec; |
| 5430 | ; return 0; } |
| 5431 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5432 | if { (eval echo configure:5433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5433 | rm -rf conftest* |
| 5434 | ac_cv_struct_tm=time.h |
| 5435 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5436 | echo "configure: failed program was:" >&5 |
| 5437 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5438 | rm -rf conftest* |
| 5439 | ac_cv_struct_tm=sys/time.h |
| 5440 | fi |
| 5441 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5442 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5443 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5444 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5445 | if test $ac_cv_struct_tm = sys/time.h; then |
| 5446 | cat >> confdefs.h <<\EOF |
| 5447 | #define TM_IN_SYS_TIME 1 |
| 5448 | EOF |
| 5449 | |
| 5450 | fi |
| 5451 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5452 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5453 | echo "configure:5454: checking for tm_zone in struct tm" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5454 | if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5455 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5456 | else |
| 5457 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5458 | #line 5459 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5459 | #include "confdefs.h" |
| 5460 | #include <sys/types.h> |
| 5461 | #include <$ac_cv_struct_tm> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5462 | int main() { |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5463 | struct tm tm; tm.tm_zone; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5464 | ; return 0; } |
| 5465 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5466 | if { (eval echo configure:5467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5467 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5468 | ac_cv_struct_tm_zone=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5469 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5470 | echo "configure: failed program was:" >&5 |
| 5471 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5472 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5473 | ac_cv_struct_tm_zone=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5474 | fi |
| 5475 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5476 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5477 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5478 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 |
| 5479 | if test "$ac_cv_struct_tm_zone" = yes; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5480 | cat >> confdefs.h <<\EOF |
| 5481 | #define HAVE_TM_ZONE 1 |
| 5482 | EOF |
| 5483 | |
| 5484 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5485 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5486 | echo "configure:5487: checking for tzname" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5487 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5488 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5489 | else |
| 5490 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5491 | #line 5492 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5492 | #include "confdefs.h" |
| 5493 | #include <time.h> |
| 5494 | #ifndef tzname /* For SGI. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5495 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5496 | #endif |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5497 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5498 | atoi(*tzname); |
| 5499 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5500 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5501 | if { (eval echo configure:5502: \"$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] | 5502 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5503 | ac_cv_var_tzname=yes |
| 5504 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5505 | echo "configure: failed program was:" >&5 |
| 5506 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5507 | rm -rf conftest* |
| 5508 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5509 | fi |
| 5510 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5511 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5512 | |
| 5513 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5514 | if test $ac_cv_var_tzname = yes; then |
| 5515 | cat >> confdefs.h <<\EOF |
| 5516 | #define HAVE_TZNAME 1 |
| 5517 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5518 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5519 | fi |
| 5520 | fi |
| 5521 | |
| 5522 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5523 | echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5524 | echo "configure:5525: checking for time.h that defines altzone" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5525 | if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5526 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5527 | else |
| 5528 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5529 | #line 5530 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5530 | #include "confdefs.h" |
| 5531 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5532 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5533 | return altzone; |
| 5534 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5535 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5536 | if { (eval echo configure:5537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5537 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5538 | ac_cv_header_time_altzone=yes |
| 5539 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5540 | echo "configure: failed program was:" >&5 |
| 5541 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5542 | rm -rf conftest* |
| 5543 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5544 | fi |
| 5545 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5546 | fi |
| 5547 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5548 | echo "$ac_t""$ac_cv_header_time_altzone" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5549 | if test $ac_cv_header_time_altzone = yes; then |
| 5550 | cat >> confdefs.h <<\EOF |
| 5551 | #define HAVE_ALTZONE 1 |
| 5552 | EOF |
| 5553 | |
| 5554 | fi |
| 5555 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5556 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5557 | echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5558 | echo "configure:5559: 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] | 5559 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5560 | #line 5561 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5561 | #include "confdefs.h" |
| 5562 | |
| 5563 | #include <sys/types.h> |
| 5564 | #include <sys/select.h> |
| 5565 | #include <sys/time.h> |
| 5566 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5567 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5568 | ; |
| 5569 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5570 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5571 | if { (eval echo configure:5572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5572 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5573 | cat >> confdefs.h <<\EOF |
| 5574 | #define SYS_SELECT_WITH_SYS_TIME 1 |
| 5575 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5576 | was_it_defined=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5577 | else |
| 5578 | echo "configure: failed program was:" >&5 |
| 5579 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5580 | fi |
| 5581 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5582 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5583 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5584 | echo $ac_n "checking for addrinfo""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5585 | echo "configure:5586: checking for addrinfo" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5586 | if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then |
| 5587 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5588 | else |
| 5589 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5590 | #line 5591 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5591 | #include "confdefs.h" |
| 5592 | |
| 5593 | # include <netdb.h> |
| 5594 | int main() { |
| 5595 | struct addrinfo a |
| 5596 | ; return 0; } |
| 5597 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5598 | if { (eval echo configure:5599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5599 | rm -rf conftest* |
| 5600 | ac_cv_struct_addrinfo=yes |
| 5601 | else |
| 5602 | echo "configure: failed program was:" >&5 |
| 5603 | cat conftest.$ac_ext >&5 |
| 5604 | rm -rf conftest* |
| 5605 | ac_cv_struct_addrinfo=no |
| 5606 | fi |
| 5607 | rm -f conftest* |
| 5608 | fi |
| 5609 | |
| 5610 | echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6 |
| 5611 | if test $ac_cv_struct_addrinfo = yes; then |
| 5612 | cat >> confdefs.h <<\EOF |
| 5613 | #define HAVE_ADDRINFO 1 |
| 5614 | EOF |
| 5615 | |
| 5616 | fi |
| 5617 | |
| 5618 | echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5619 | echo "configure:5620: checking for sockaddr_storage" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5620 | if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then |
| 5621 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5622 | else |
| 5623 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5624 | #line 5625 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5625 | #include "confdefs.h" |
| 5626 | |
| 5627 | # include <sys/types.h> |
| 5628 | # include <sys/socket.h> |
| 5629 | int main() { |
| 5630 | struct sockaddr_storage s |
| 5631 | ; return 0; } |
| 5632 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5633 | if { (eval echo configure:5634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5634 | rm -rf conftest* |
| 5635 | ac_cv_struct_sockaddr_storage=yes |
| 5636 | else |
| 5637 | echo "configure: failed program was:" >&5 |
| 5638 | cat conftest.$ac_ext >&5 |
| 5639 | rm -rf conftest* |
| 5640 | ac_cv_struct_sockaddr_storage=no |
| 5641 | fi |
| 5642 | rm -f conftest* |
| 5643 | fi |
| 5644 | |
| 5645 | echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6 |
| 5646 | if test $ac_cv_struct_sockaddr_storage = yes; then |
| 5647 | cat >> confdefs.h <<\EOF |
| 5648 | #define HAVE_SOCKADDR_STORAGE 1 |
| 5649 | EOF |
| 5650 | |
| 5651 | fi |
| 5652 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5653 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5654 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5655 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5656 | echo "configure:5657: checking whether char is unsigned" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5657 | if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5658 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5659 | else |
| 5660 | if test "$GCC" = yes; then |
| 5661 | # GCC predefines this symbol on systems where it applies. |
| 5662 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5663 | #line 5664 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5664 | #include "confdefs.h" |
| 5665 | #ifdef __CHAR_UNSIGNED__ |
| 5666 | yes |
| 5667 | #endif |
| 5668 | |
| 5669 | EOF |
| 5670 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 5671 | egrep "yes" >/dev/null 2>&1; then |
| 5672 | rm -rf conftest* |
| 5673 | ac_cv_c_char_unsigned=yes |
| 5674 | else |
| 5675 | rm -rf conftest* |
| 5676 | ac_cv_c_char_unsigned=no |
| 5677 | fi |
| 5678 | rm -f conftest* |
| 5679 | |
| 5680 | else |
| 5681 | if test "$cross_compiling" = yes; then |
| 5682 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5683 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5684 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5685 | #line 5686 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5686 | #include "confdefs.h" |
| 5687 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5688 | #if !defined(__STDC__) || __STDC__ != 1 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5689 | #define volatile |
| 5690 | #endif |
| 5691 | main() { |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5692 | volatile char c = 255; exit(c < 0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5693 | } |
| 5694 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5695 | if { (eval echo configure:5696: \"$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] | 5696 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5697 | ac_cv_c_char_unsigned=yes |
| 5698 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5699 | echo "configure: failed program was:" >&5 |
| 5700 | cat conftest.$ac_ext >&5 |
| 5701 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5702 | ac_cv_c_char_unsigned=no |
| 5703 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5704 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5705 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5706 | |
| 5707 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5708 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5709 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5710 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5711 | if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then |
| 5712 | cat >> confdefs.h <<\EOF |
| 5713 | #define __CHAR_UNSIGNED__ 1 |
| 5714 | EOF |
| 5715 | |
| 5716 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5717 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5718 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5719 | echo "configure:5720: checking for working const" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5720 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5721 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5722 | else |
| 5723 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5724 | #line 5725 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5725 | #include "confdefs.h" |
| 5726 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5727 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5728 | |
| 5729 | /* Ultrix mips cc rejects this. */ |
Martin v. Löwis | 9db2f57 | 2001-07-23 01:30:10 +0000 | [diff] [blame] | 5730 | typedef int charset[2]; const charset x; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5731 | /* SunOS 4.1.1 cc rejects this. */ |
| 5732 | char const *const *ccp; |
| 5733 | char **p; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5734 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 5735 | struct point {int x, y;}; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5736 | static struct point const zero = {0,0}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5737 | /* AIX XL C 1.02.0.0 rejects this. |
| 5738 | It does not let you subtract one const X* pointer from another in an arm |
| 5739 | of an if-expression whose if-part is not a constant expression */ |
| 5740 | const char *g = "string"; |
| 5741 | ccp = &g + (g ? g-g : 0); |
| 5742 | /* HPUX 7.0 cc rejects these. */ |
| 5743 | ++ccp; |
| 5744 | p = (char**) ccp; |
| 5745 | ccp = (char const *const *) p; |
| 5746 | { /* SCO 3.2v4 cc rejects this. */ |
| 5747 | char *t; |
| 5748 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
| 5749 | |
| 5750 | *t++ = 0; |
| 5751 | } |
| 5752 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5753 | int x[] = {25, 17}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5754 | const int *foo = &x[0]; |
| 5755 | ++foo; |
| 5756 | } |
| 5757 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 5758 | typedef const int *iptr; |
| 5759 | iptr p = 0; |
| 5760 | ++p; |
| 5761 | } |
| 5762 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 5763 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 5764 | struct s { int j; const int *ap[3]; }; |
| 5765 | struct s *b; b->j = 5; |
| 5766 | } |
| 5767 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 5768 | const int foo = 10; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5769 | } |
| 5770 | |
| 5771 | ; return 0; } |
| 5772 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5773 | if { (eval echo configure:5774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5774 | rm -rf conftest* |
| 5775 | ac_cv_c_const=yes |
| 5776 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5777 | echo "configure: failed program was:" >&5 |
| 5778 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5779 | rm -rf conftest* |
| 5780 | ac_cv_c_const=no |
| 5781 | fi |
| 5782 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5783 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5784 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5785 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5786 | if test $ac_cv_c_const = no; then |
| 5787 | cat >> confdefs.h <<\EOF |
| 5788 | #define const |
| 5789 | EOF |
| 5790 | |
| 5791 | fi |
| 5792 | |
| 5793 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5794 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5795 | echo $ac_n "checking for working volatile""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5796 | echo "configure:5797: checking for working volatile" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5797 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5798 | #line 5799 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5799 | #include "confdefs.h" |
| 5800 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5801 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5802 | volatile int x; x = 0; |
| 5803 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5804 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5805 | if { (eval echo configure:5806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5806 | rm -rf conftest* |
| 5807 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5808 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5809 | echo "configure: failed program was:" >&5 |
| 5810 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5811 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5812 | cat >> confdefs.h <<\EOF |
| 5813 | #define volatile |
| 5814 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5815 | |
| 5816 | fi |
| 5817 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5818 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5819 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5820 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5821 | echo $ac_n "checking for working signed char""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5822 | echo "configure:5823: checking for working signed char" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5823 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5824 | #line 5825 "configure" |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5825 | #include "confdefs.h" |
| 5826 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5827 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5828 | signed char c; |
| 5829 | ; return 0; } |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5830 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5831 | if { (eval echo configure:5832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5832 | rm -rf conftest* |
| 5833 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5834 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5835 | echo "configure: failed program was:" >&5 |
| 5836 | cat conftest.$ac_ext >&5 |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5837 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5838 | cat >> confdefs.h <<\EOF |
| 5839 | #define signed |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5840 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5841 | |
| 5842 | fi |
| 5843 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5844 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5845 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5846 | have_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5847 | echo $ac_n "checking for prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5848 | echo "configure:5849: checking for prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5849 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5850 | #line 5851 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5851 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5852 | int foo(int x) { return 0; } |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5853 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5854 | return foo(10); |
| 5855 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5856 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5857 | if { (eval echo configure:5858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5858 | rm -rf conftest* |
| 5859 | cat >> confdefs.h <<\EOF |
| 5860 | #define HAVE_PROTOTYPES 1 |
| 5861 | EOF |
| 5862 | have_prototypes=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5863 | else |
| 5864 | echo "configure: failed program was:" >&5 |
| 5865 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5866 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5867 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5868 | echo "$ac_t""$have_prototypes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5869 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5870 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5871 | echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5872 | echo "configure:5873: checking for variable length prototypes and stdarg.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5873 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5874 | #line 5875 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5875 | #include "confdefs.h" |
| 5876 | |
| 5877 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 5878 | int foo(int x, ...) { |
| 5879 | va_list va; |
| 5880 | va_start(va, x); |
| 5881 | va_arg(va, int); |
| 5882 | va_arg(va, char *); |
| 5883 | va_arg(va, double); |
| 5884 | return 0; |
| 5885 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5886 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5887 | int main() { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 5888 | return foo(10, "", 3.14); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5889 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5890 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5891 | if { (eval echo configure:5892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5892 | rm -rf conftest* |
| 5893 | cat >> confdefs.h <<\EOF |
| 5894 | #define HAVE_STDARG_PROTOTYPES 1 |
| 5895 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5896 | works=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5897 | else |
| 5898 | echo "configure: failed program was:" >&5 |
| 5899 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5900 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5901 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5902 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5903 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5904 | if test "$have_prototypes" = yes; then |
| 5905 | bad_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5906 | echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5907 | echo "configure:5908: checking for bad exec* prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5908 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5909 | #line 5910 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5910 | #include "confdefs.h" |
| 5911 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5912 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5913 | char **t;execve("@",t,t); |
| 5914 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5915 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5916 | if { (eval echo configure:5917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5917 | : |
| 5918 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5919 | echo "configure: failed program was:" >&5 |
| 5920 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5921 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5922 | cat >> confdefs.h <<\EOF |
| 5923 | #define BAD_EXEC_PROTOTYPES 1 |
| 5924 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5925 | bad_prototypes=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5926 | fi |
| 5927 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5928 | echo "$ac_t""$bad_prototypes" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5929 | fi |
| 5930 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5931 | # check if sockaddr has sa_len member |
| 5932 | echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5933 | echo "configure:5934: checking if sockaddr has sa_len member" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5934 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5935 | #line 5936 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5936 | #include "confdefs.h" |
| 5937 | #include <sys/types.h> |
| 5938 | #include <sys/socket.h> |
| 5939 | int main() { |
| 5940 | struct sockaddr x; |
| 5941 | x.sa_len = 0; |
| 5942 | ; return 0; } |
| 5943 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5944 | if { (eval echo configure:5945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5945 | rm -rf conftest* |
| 5946 | echo "$ac_t""yes" 1>&6 |
| 5947 | cat >> confdefs.h <<\EOF |
| 5948 | #define HAVE_SOCKADDR_SA_LEN 1 |
| 5949 | EOF |
| 5950 | |
| 5951 | else |
| 5952 | echo "configure: failed program was:" >&5 |
| 5953 | cat conftest.$ac_ext >&5 |
| 5954 | rm -rf conftest* |
| 5955 | echo "$ac_t""no" 1>&6 |
| 5956 | fi |
| 5957 | rm -f conftest* |
| 5958 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5959 | echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5960 | echo "configure:5961: checking for bad static forward" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 5961 | if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then |
| 5962 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5963 | else |
| 5964 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5965 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5966 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5967 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5968 | #line 5969 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5969 | #include "confdefs.h" |
| 5970 | |
| 5971 | struct s { int a; int b; }; |
| 5972 | static struct s foo; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5973 | int foobar() { |
| 5974 | static int random; |
| 5975 | random = (int) &foo; |
| 5976 | return random; |
| 5977 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5978 | static struct s foo = { 1, 2 }; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5979 | main() { |
| 5980 | exit(!((int)&foo == foobar())); |
| 5981 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5982 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 5983 | if { (eval echo configure:5984: \"$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] | 5984 | then |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 5985 | ac_cv_bad_static_forward=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5986 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5987 | echo "configure: failed program was:" >&5 |
| 5988 | cat conftest.$ac_ext >&5 |
| 5989 | rm -fr conftest* |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 5990 | ac_cv_bad_static_forward=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5991 | fi |
| 5992 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5993 | fi |
| 5994 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 5995 | fi |
| 5996 | |
| 5997 | echo "$ac_t""$ac_cv_bad_static_forward" 1>&6 |
| 5998 | if test "$ac_cv_bad_static_forward" = yes |
| 5999 | then |
| 6000 | cat >> confdefs.h <<\EOF |
| 6001 | #define BAD_STATIC_FORWARD 1 |
| 6002 | EOF |
| 6003 | |
| 6004 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6005 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6006 | va_list_is_array=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6007 | echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6008 | echo "configure:6009: checking whether va_list is an array" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6009 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6010 | #line 6011 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6011 | #include "confdefs.h" |
| 6012 | |
| 6013 | #ifdef HAVE_STDARG_PROTOTYPES |
| 6014 | #include <stdarg.h> |
| 6015 | #else |
| 6016 | #include <varargs.h> |
| 6017 | #endif |
| 6018 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6019 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6020 | va_list list1, list2; list1 = list2; |
| 6021 | ; return 0; } |
| 6022 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6023 | if { (eval echo configure:6024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6024 | : |
| 6025 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6026 | echo "configure: failed program was:" >&5 |
| 6027 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6028 | rm -rf conftest* |
| 6029 | cat >> confdefs.h <<\EOF |
| 6030 | #define VA_LIST_IS_ARRAY 1 |
| 6031 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6032 | va_list_is_array=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6033 | fi |
| 6034 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6035 | echo "$ac_t""$va_list_is_array" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6036 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6037 | # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( |
| 6038 | echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6039 | echo "configure:6040: checking for gethostbyname_r" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6040 | if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6041 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6042 | else |
| 6043 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6044 | #line 6045 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6045 | #include "confdefs.h" |
| 6046 | /* System header to define __stub macros and hopefully few prototypes, |
| 6047 | which can conflict with char gethostbyname_r(); below. */ |
| 6048 | #include <assert.h> |
| 6049 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6050 | /* We use char because int might match the return type of a gcc2 |
| 6051 | builtin and then its argument prototype would still apply. */ |
| 6052 | char gethostbyname_r(); |
| 6053 | |
| 6054 | int main() { |
| 6055 | |
| 6056 | /* The GNU C library defines this for functions which it implements |
| 6057 | to always fail with ENOSYS. Some functions are actually named |
| 6058 | something starting with __ and the normal name is an alias. */ |
| 6059 | #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) |
| 6060 | choke me |
| 6061 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6062 | gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6063 | #endif |
| 6064 | |
| 6065 | ; return 0; } |
| 6066 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6067 | if { (eval echo configure:6068: \"$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] | 6068 | rm -rf conftest* |
| 6069 | eval "ac_cv_func_gethostbyname_r=yes" |
| 6070 | else |
| 6071 | echo "configure: failed program was:" >&5 |
| 6072 | cat conftest.$ac_ext >&5 |
| 6073 | rm -rf conftest* |
| 6074 | eval "ac_cv_func_gethostbyname_r=no" |
| 6075 | fi |
| 6076 | rm -f conftest* |
| 6077 | fi |
| 6078 | |
| 6079 | if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then |
| 6080 | echo "$ac_t""yes" 1>&6 |
| 6081 | |
| 6082 | cat >> confdefs.h <<\EOF |
| 6083 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6084 | EOF |
| 6085 | |
| 6086 | echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6087 | echo "configure:6088: checking gethostbyname_r with 6 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6088 | OLD_CFLAGS=$CFLAGS |
| 6089 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
| 6090 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6091 | #line 6092 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6092 | #include "confdefs.h" |
| 6093 | |
| 6094 | # include <netdb.h> |
| 6095 | |
| 6096 | int main() { |
| 6097 | |
| 6098 | char *name; |
| 6099 | struct hostent *he, *res; |
| 6100 | char buffer[2048]; |
| 6101 | int buflen = 2048; |
| 6102 | int h_errnop; |
| 6103 | |
| 6104 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
| 6105 | |
| 6106 | ; return 0; } |
| 6107 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6108 | if { (eval echo configure:6109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6109 | rm -rf conftest* |
| 6110 | |
| 6111 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6112 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6113 | EOF |
| 6114 | |
| 6115 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6116 | #define HAVE_GETHOSTBYNAME_R_6_ARG 1 |
| 6117 | EOF |
| 6118 | |
| 6119 | echo "$ac_t""yes" 1>&6 |
| 6120 | |
| 6121 | else |
| 6122 | echo "configure: failed program was:" >&5 |
| 6123 | cat conftest.$ac_ext >&5 |
| 6124 | rm -rf conftest* |
| 6125 | |
| 6126 | echo "$ac_t""no" 1>&6 |
| 6127 | echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6128 | echo "configure:6129: checking gethostbyname_r with 5 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6129 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6130 | #line 6131 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6131 | #include "confdefs.h" |
| 6132 | |
| 6133 | # include <netdb.h> |
| 6134 | |
| 6135 | int main() { |
| 6136 | |
| 6137 | char *name; |
| 6138 | struct hostent *he; |
| 6139 | char buffer[2048]; |
| 6140 | int buflen = 2048; |
| 6141 | int h_errnop; |
| 6142 | |
| 6143 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
| 6144 | |
| 6145 | ; return 0; } |
| 6146 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6147 | if { (eval echo configure:6148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6148 | rm -rf conftest* |
| 6149 | |
| 6150 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6151 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6152 | EOF |
| 6153 | |
| 6154 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6155 | #define HAVE_GETHOSTBYNAME_R_5_ARG 1 |
| 6156 | EOF |
| 6157 | |
| 6158 | echo "$ac_t""yes" 1>&6 |
| 6159 | |
| 6160 | else |
| 6161 | echo "configure: failed program was:" >&5 |
| 6162 | cat conftest.$ac_ext >&5 |
| 6163 | rm -rf conftest* |
| 6164 | |
| 6165 | echo "$ac_t""no" 1>&6 |
| 6166 | echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6167 | echo "configure:6168: checking gethostbyname_r with 3 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6168 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6169 | #line 6170 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6170 | #include "confdefs.h" |
| 6171 | |
| 6172 | # include <netdb.h> |
| 6173 | |
| 6174 | int main() { |
| 6175 | |
| 6176 | char *name; |
| 6177 | struct hostent *he; |
| 6178 | struct hostent_data data; |
| 6179 | |
| 6180 | (void) gethostbyname_r(name, he, &data); |
| 6181 | |
| 6182 | ; return 0; } |
| 6183 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6184 | if { (eval echo configure:6185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6185 | rm -rf conftest* |
| 6186 | |
| 6187 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6188 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6189 | EOF |
| 6190 | |
| 6191 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6192 | #define HAVE_GETHOSTBYNAME_R_3_ARG 1 |
| 6193 | EOF |
| 6194 | |
| 6195 | echo "$ac_t""yes" 1>&6 |
| 6196 | |
| 6197 | else |
| 6198 | echo "configure: failed program was:" >&5 |
| 6199 | cat conftest.$ac_ext >&5 |
| 6200 | rm -rf conftest* |
| 6201 | |
| 6202 | echo "$ac_t""no" 1>&6 |
| 6203 | |
| 6204 | fi |
| 6205 | rm -f conftest* |
| 6206 | |
| 6207 | fi |
| 6208 | rm -f conftest* |
| 6209 | |
| 6210 | fi |
| 6211 | rm -f conftest* |
| 6212 | CFLAGS=$OLD_CFLAGS |
| 6213 | |
| 6214 | else |
| 6215 | echo "$ac_t""no" 1>&6 |
| 6216 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6217 | for ac_func in gethostbyname |
| 6218 | do |
| 6219 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6220 | echo "configure:6221: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6221 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6222 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6223 | else |
| 6224 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6225 | #line 6226 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6226 | #include "confdefs.h" |
| 6227 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6228 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6229 | #include <assert.h> |
| 6230 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6231 | /* We use char because int might match the return type of a gcc2 |
| 6232 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6233 | char $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6234 | |
| 6235 | int main() { |
| 6236 | |
| 6237 | /* The GNU C library defines this for functions which it implements |
| 6238 | to always fail with ENOSYS. Some functions are actually named |
| 6239 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6240 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6241 | choke me |
| 6242 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6243 | $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6244 | #endif |
| 6245 | |
| 6246 | ; return 0; } |
| 6247 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6248 | if { (eval echo configure:6249: \"$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] | 6249 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6250 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6251 | else |
| 6252 | echo "configure: failed program was:" >&5 |
| 6253 | cat conftest.$ac_ext >&5 |
| 6254 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6255 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6256 | fi |
| 6257 | rm -f conftest* |
| 6258 | fi |
| 6259 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6260 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6261 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6262 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6263 | cat >> confdefs.h <<EOF |
| 6264 | #define $ac_tr_func 1 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6265 | EOF |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6266 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6267 | else |
| 6268 | echo "$ac_t""no" 1>&6 |
| 6269 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6270 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6271 | |
| 6272 | |
| 6273 | fi |
| 6274 | |
| 6275 | |
| 6276 | |
| 6277 | |
| 6278 | |
| 6279 | |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6280 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6281 | # checks for system services |
| 6282 | # (none yet) |
| 6283 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6284 | # Linux requires this for correct f.p. operations |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6285 | echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6286 | echo "configure:6287: checking for __fpu_control" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6287 | if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6288 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6289 | else |
| 6290 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6291 | #line 6292 "configure" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6292 | #include "confdefs.h" |
| 6293 | /* System header to define __stub macros and hopefully few prototypes, |
| 6294 | which can conflict with char __fpu_control(); below. */ |
| 6295 | #include <assert.h> |
| 6296 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6297 | /* We use char because int might match the return type of a gcc2 |
| 6298 | builtin and then its argument prototype would still apply. */ |
| 6299 | char __fpu_control(); |
| 6300 | |
| 6301 | int main() { |
| 6302 | |
| 6303 | /* The GNU C library defines this for functions which it implements |
| 6304 | to always fail with ENOSYS. Some functions are actually named |
| 6305 | something starting with __ and the normal name is an alias. */ |
| 6306 | #if defined (__stub___fpu_control) || defined (__stub_____fpu_control) |
| 6307 | choke me |
| 6308 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6309 | __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6310 | #endif |
| 6311 | |
| 6312 | ; return 0; } |
| 6313 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6314 | if { (eval echo configure:6315: \"$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] | 6315 | rm -rf conftest* |
| 6316 | eval "ac_cv_func___fpu_control=yes" |
| 6317 | else |
| 6318 | echo "configure: failed program was:" >&5 |
| 6319 | cat conftest.$ac_ext >&5 |
| 6320 | rm -rf conftest* |
| 6321 | eval "ac_cv_func___fpu_control=no" |
| 6322 | fi |
| 6323 | rm -f conftest* |
| 6324 | fi |
| 6325 | |
| 6326 | if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then |
| 6327 | echo "$ac_t""yes" 1>&6 |
| 6328 | : |
| 6329 | else |
| 6330 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6331 | echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6332 | echo "configure:6333: checking for __fpu_control in -lieee" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6333 | ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6334 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6335 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6336 | else |
| 6337 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6338 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6339 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6340 | #line 6341 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6341 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6342 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6343 | /* We use char because int might match the return type of a gcc2 |
| 6344 | builtin and then its argument prototype would still apply. */ |
| 6345 | char __fpu_control(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6346 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6347 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6348 | __fpu_control() |
| 6349 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6350 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6351 | if { (eval echo configure:6352: \"$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] | 6352 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6353 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6354 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6355 | echo "configure: failed program was:" >&5 |
| 6356 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6357 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6358 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6359 | fi |
| 6360 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6361 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6362 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6363 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6364 | 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] | 6365 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6366 | ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 6367 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6368 | cat >> confdefs.h <<EOF |
| 6369 | #define $ac_tr_lib 1 |
| 6370 | EOF |
| 6371 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6372 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6373 | |
| 6374 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6375 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6376 | fi |
| 6377 | |
| 6378 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6379 | fi |
| 6380 | |
| 6381 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6382 | # Check for --with-fpectl |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6383 | echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6384 | echo "configure:6385: checking for --with-fpectl" >&5 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6385 | # Check whether --with-fpectl or --without-fpectl was given. |
| 6386 | if test "${with_fpectl+set}" = set; then |
| 6387 | withval="$with_fpectl" |
| 6388 | |
| 6389 | if test "$withval" != no |
| 6390 | then cat >> confdefs.h <<\EOF |
| 6391 | #define WANT_SIGFPE_HANDLER 1 |
| 6392 | EOF |
| 6393 | echo "$ac_t""yes" 1>&6 |
| 6394 | else echo "$ac_t""no" 1>&6 |
| 6395 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6396 | else |
| 6397 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6398 | fi |
| 6399 | |
| 6400 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6401 | # check for --with-libm=... |
| 6402 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6403 | case $ac_sys_system in |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 6404 | Darwin) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6405 | next) ;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 6406 | BeOS) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6407 | *) LIBM=-lm |
| 6408 | esac |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6409 | echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6410 | echo "configure:6411: checking for --with-libm=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6411 | # Check whether --with-libm or --without-libm was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6412 | if test "${with_libm+set}" = set; then |
| 6413 | withval="$with_libm" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6414 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6415 | if test "$withval" = no |
| 6416 | then LIBM= |
| 6417 | echo "$ac_t""force LIBM empty" 1>&6 |
| 6418 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6419 | then LIBM=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6420 | echo "$ac_t""set LIBM=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6421 | 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] | 6422 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6423 | else |
| 6424 | echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6425 | fi |
| 6426 | |
| 6427 | |
| 6428 | # check for --with-libc=... |
| 6429 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6430 | echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6431 | echo "configure:6432: checking for --with-libc=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6432 | # Check whether --with-libc or --without-libc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6433 | if test "${with_libc+set}" = set; then |
| 6434 | withval="$with_libc" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6435 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6436 | if test "$withval" = no |
| 6437 | then LIBC= |
| 6438 | echo "$ac_t""force LIBC empty" 1>&6 |
| 6439 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6440 | then LIBC=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6441 | echo "$ac_t""set LIBC=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6442 | 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] | 6443 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6444 | else |
| 6445 | echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6446 | fi |
| 6447 | |
| 6448 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6449 | # check for hypot() in math library |
| 6450 | LIBS_SAVE=$LIBS |
| 6451 | LIBS="$LIBS $LIBM" |
| 6452 | for ac_func in hypot |
| 6453 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6454 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6455 | echo "configure:6456: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6456 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6457 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6458 | else |
| 6459 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6460 | #line 6461 "configure" |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6461 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6462 | /* System header to define __stub macros and hopefully few prototypes, |
| 6463 | which can conflict with char $ac_func(); below. */ |
| 6464 | #include <assert.h> |
| 6465 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6466 | /* We use char because int might match the return type of a gcc2 |
| 6467 | builtin and then its argument prototype would still apply. */ |
| 6468 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6469 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6470 | int main() { |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6471 | |
| 6472 | /* The GNU C library defines this for functions which it implements |
| 6473 | to always fail with ENOSYS. Some functions are actually named |
| 6474 | something starting with __ and the normal name is an alias. */ |
| 6475 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 6476 | choke me |
| 6477 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6478 | $ac_func(); |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6479 | #endif |
| 6480 | |
| 6481 | ; return 0; } |
| 6482 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6483 | if { (eval echo configure:6484: \"$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] | 6484 | rm -rf conftest* |
| 6485 | eval "ac_cv_func_$ac_func=yes" |
| 6486 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6487 | echo "configure: failed program was:" >&5 |
| 6488 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6489 | rm -rf conftest* |
| 6490 | eval "ac_cv_func_$ac_func=no" |
| 6491 | fi |
| 6492 | rm -f conftest* |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6493 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6494 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6495 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 6496 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6497 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6498 | cat >> confdefs.h <<EOF |
| 6499 | #define $ac_tr_func 1 |
| 6500 | EOF |
| 6501 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6502 | else |
| 6503 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 6504 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6505 | fi |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6506 | done |
| 6507 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6508 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6509 | LIBS=$LIBS_SAVE |
| 6510 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6511 | # check whether malloc(0) returns NULL or not |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6512 | echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6513 | echo "configure:6514: checking what malloc(0) returns" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6514 | if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6515 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6516 | else |
| 6517 | if test "$cross_compiling" = yes; then |
| 6518 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6519 | else |
| 6520 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6521 | #line 6522 "configure" |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6522 | #include "confdefs.h" |
| 6523 | #include <stdio.h> |
| 6524 | #ifdef HAVE_STDLIB |
| 6525 | #include <stdlib.h> |
| 6526 | #else |
| 6527 | char *malloc(), *realloc(); |
| 6528 | int *free(); |
| 6529 | #endif |
| 6530 | main() { |
| 6531 | char *p; |
| 6532 | p = malloc(0); |
| 6533 | if (p == NULL) exit(1); |
| 6534 | p = realloc(p, 0); |
| 6535 | if (p == NULL) exit(1); |
| 6536 | free(p); |
| 6537 | exit(0); |
| 6538 | } |
| 6539 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6540 | if { (eval echo configure:6541: \"$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] | 6541 | then |
| 6542 | ac_cv_malloc_zero=nonnull |
| 6543 | else |
| 6544 | echo "configure: failed program was:" >&5 |
| 6545 | cat conftest.$ac_ext >&5 |
| 6546 | rm -fr conftest* |
| 6547 | ac_cv_malloc_zero=null |
| 6548 | fi |
| 6549 | rm -fr conftest* |
| 6550 | fi |
| 6551 | |
| 6552 | fi |
| 6553 | |
| 6554 | echo "$ac_t""$ac_cv_malloc_zero" 1>&6 |
| 6555 | if test "$ac_cv_malloc_zero" = null |
| 6556 | then |
| 6557 | cat >> confdefs.h <<\EOF |
| 6558 | #define MALLOC_ZERO_RETURNS_NULL 1 |
| 6559 | EOF |
| 6560 | |
| 6561 | fi |
| 6562 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6563 | # check for wchar.h |
| 6564 | ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` |
| 6565 | echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6566 | echo "configure:6567: checking for wchar.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6567 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6568 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6569 | else |
| 6570 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6571 | #line 6572 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6572 | #include "confdefs.h" |
| 6573 | #include <wchar.h> |
| 6574 | EOF |
| 6575 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6576 | { (eval echo configure:6577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6577 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 6578 | if test -z "$ac_err"; then |
| 6579 | rm -rf conftest* |
| 6580 | eval "ac_cv_header_$ac_safe=yes" |
| 6581 | else |
| 6582 | echo "$ac_err" >&5 |
| 6583 | echo "configure: failed program was:" >&5 |
| 6584 | cat conftest.$ac_ext >&5 |
| 6585 | rm -rf conftest* |
| 6586 | eval "ac_cv_header_$ac_safe=no" |
| 6587 | fi |
| 6588 | rm -f conftest* |
| 6589 | fi |
| 6590 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 6591 | echo "$ac_t""yes" 1>&6 |
| 6592 | cat >> confdefs.h <<\EOF |
| 6593 | #define HAVE_WCHAR_H 1 |
| 6594 | EOF |
| 6595 | wchar_h="yes" |
| 6596 | else |
| 6597 | echo "$ac_t""no" 1>&6 |
| 6598 | wchar_h="no" |
| 6599 | |
| 6600 | fi |
| 6601 | |
| 6602 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6603 | # determine wchar_t size |
| 6604 | if test "$wchar_h" = yes |
| 6605 | then |
| 6606 | echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6607 | echo "configure:6608: checking size of wchar_t" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6608 | if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then |
| 6609 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6610 | else |
| 6611 | if test "$cross_compiling" = yes; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6612 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6613 | else |
| 6614 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6615 | #line 6616 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6616 | #include "confdefs.h" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6617 | #include <stdio.h> |
| 6618 | main() |
| 6619 | { |
| 6620 | FILE *f=fopen("conftestval", "w"); |
| 6621 | if (!f) exit(1); |
| 6622 | fprintf(f, "%d\n", sizeof(wchar_t)); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6623 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6624 | } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6625 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6626 | if { (eval echo configure:6627: \"$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] | 6627 | then |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6628 | ac_cv_sizeof_wchar_t=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6629 | else |
| 6630 | echo "configure: failed program was:" >&5 |
| 6631 | cat conftest.$ac_ext >&5 |
| 6632 | rm -fr conftest* |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6633 | ac_cv_sizeof_wchar_t=0 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6634 | fi |
| 6635 | rm -fr conftest* |
| 6636 | fi |
| 6637 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6638 | fi |
| 6639 | echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 |
| 6640 | cat >> confdefs.h <<EOF |
| 6641 | #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t |
| 6642 | EOF |
| 6643 | |
| 6644 | |
| 6645 | fi |
| 6646 | |
| 6647 | echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6648 | echo "configure:6649: checking what type to use for unicode" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6649 | # Check whether --enable-unicode or --disable-unicode was given. |
| 6650 | if test "${enable_unicode+set}" = set; then |
| 6651 | enableval="$enable_unicode" |
| 6652 | : |
| 6653 | else |
| 6654 | enable_unicode=yes |
| 6655 | fi |
| 6656 | |
| 6657 | |
| 6658 | if test $enable_unicode = yes |
| 6659 | then |
Martin v. Löwis | fd91779 | 2001-06-27 20:22:04 +0000 | [diff] [blame] | 6660 | # Without any arguments, Py_UNICODE defaults to two-byte mode |
| 6661 | enable_unicode="ucs2" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6662 | fi |
| 6663 | |
| 6664 | case "$enable_unicode" in |
| 6665 | ucs2) unicode_size="2" |
| 6666 | cat >> confdefs.h <<\EOF |
| 6667 | #define Py_UNICODE_SIZE 2 |
| 6668 | EOF |
| 6669 | |
| 6670 | ;; |
| 6671 | ucs4) unicode_size="4" |
| 6672 | cat >> confdefs.h <<\EOF |
| 6673 | #define Py_UNICODE_SIZE 4 |
| 6674 | EOF |
| 6675 | |
| 6676 | ;; |
| 6677 | esac |
| 6678 | |
| 6679 | if test "$enable_unicode" = "no" |
| 6680 | then |
| 6681 | echo "$ac_t""not used" 1>&6 |
| 6682 | else |
| 6683 | cat >> confdefs.h <<\EOF |
| 6684 | #define Py_USING_UNICODE 1 |
| 6685 | EOF |
| 6686 | |
| 6687 | if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" |
| 6688 | then |
| 6689 | PY_UNICODE_TYPE="wchar_t" |
| 6690 | cat >> confdefs.h <<\EOF |
| 6691 | #define HAVE_USABLE_WCHAR_T 1 |
| 6692 | EOF |
| 6693 | |
| 6694 | cat >> confdefs.h <<\EOF |
| 6695 | #define PY_UNICODE_TYPE wchar_t |
| 6696 | EOF |
| 6697 | |
| 6698 | elif test "$ac_cv_sizeof_short" = "$unicode_size" |
| 6699 | then |
| 6700 | PY_UNICODE_TYPE="unsigned short" |
| 6701 | cat >> confdefs.h <<\EOF |
| 6702 | #define PY_UNICODE_TYPE unsigned short |
| 6703 | EOF |
| 6704 | |
| 6705 | elif test "$ac_cv_sizeof_long" = "$unicode_size" |
| 6706 | then |
| 6707 | PY_UNICODE_TYPE="unsigned long" |
| 6708 | cat >> confdefs.h <<\EOF |
| 6709 | #define PY_UNICODE_TYPE unsigned long |
| 6710 | EOF |
| 6711 | |
| 6712 | else |
| 6713 | PY_UNICODE_TYPE="no type found" |
| 6714 | fi |
| 6715 | echo "$ac_t""$PY_UNICODE_TYPE" 1>&6 |
| 6716 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6717 | |
| 6718 | # check for endianness |
| 6719 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6720 | echo "configure:6721: checking whether byte ordering is bigendian" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6721 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6722 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6723 | else |
| 6724 | ac_cv_c_bigendian=unknown |
| 6725 | # See if sys/param.h defines the BYTE_ORDER macro. |
| 6726 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6727 | #line 6728 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6728 | #include "confdefs.h" |
| 6729 | #include <sys/types.h> |
| 6730 | #include <sys/param.h> |
| 6731 | int main() { |
| 6732 | |
| 6733 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 6734 | bogus endian macros |
| 6735 | #endif |
| 6736 | ; return 0; } |
| 6737 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6738 | if { (eval echo configure:6739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6739 | rm -rf conftest* |
| 6740 | # It does; now see whether it defined to BIG_ENDIAN or not. |
| 6741 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6742 | #line 6743 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6743 | #include "confdefs.h" |
| 6744 | #include <sys/types.h> |
| 6745 | #include <sys/param.h> |
| 6746 | int main() { |
| 6747 | |
| 6748 | #if BYTE_ORDER != BIG_ENDIAN |
| 6749 | not big endian |
| 6750 | #endif |
| 6751 | ; return 0; } |
| 6752 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6753 | if { (eval echo configure:6754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6754 | rm -rf conftest* |
| 6755 | ac_cv_c_bigendian=yes |
| 6756 | else |
| 6757 | echo "configure: failed program was:" >&5 |
| 6758 | cat conftest.$ac_ext >&5 |
| 6759 | rm -rf conftest* |
| 6760 | ac_cv_c_bigendian=no |
| 6761 | fi |
| 6762 | rm -f conftest* |
| 6763 | else |
| 6764 | echo "configure: failed program was:" >&5 |
| 6765 | cat conftest.$ac_ext >&5 |
| 6766 | fi |
| 6767 | rm -f conftest* |
| 6768 | if test $ac_cv_c_bigendian = unknown; then |
| 6769 | if test "$cross_compiling" = yes; then |
| 6770 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6771 | else |
| 6772 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6773 | #line 6774 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6774 | #include "confdefs.h" |
| 6775 | main () { |
| 6776 | /* Are we little or big endian? From Harbison&Steele. */ |
| 6777 | union |
| 6778 | { |
| 6779 | long l; |
| 6780 | char c[sizeof (long)]; |
| 6781 | } u; |
| 6782 | u.l = 1; |
| 6783 | exit (u.c[sizeof (long) - 1] == 1); |
| 6784 | } |
| 6785 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6786 | if { (eval echo configure:6787: \"$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] | 6787 | then |
| 6788 | ac_cv_c_bigendian=no |
| 6789 | else |
| 6790 | echo "configure: failed program was:" >&5 |
| 6791 | cat conftest.$ac_ext >&5 |
| 6792 | rm -fr conftest* |
| 6793 | ac_cv_c_bigendian=yes |
| 6794 | fi |
| 6795 | rm -fr conftest* |
| 6796 | fi |
| 6797 | |
| 6798 | fi |
| 6799 | fi |
| 6800 | |
| 6801 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 6802 | if test $ac_cv_c_bigendian = yes; then |
| 6803 | cat >> confdefs.h <<\EOF |
| 6804 | #define WORDS_BIGENDIAN 1 |
| 6805 | EOF |
| 6806 | |
| 6807 | fi |
| 6808 | |
| 6809 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6810 | # Check whether right shifting a negative integer extends the sign bit |
| 6811 | # or fills with zeros (like the Cray J90, according to Tim Peters). |
| 6812 | echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6813 | echo "configure:6814: checking whether right shift extends the sign bit" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6814 | if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 6815 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6816 | else |
| 6817 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6818 | if test "$cross_compiling" = yes; then |
| 6819 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6820 | else |
| 6821 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6822 | #line 6823 "configure" |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6823 | #include "confdefs.h" |
| 6824 | |
| 6825 | int main() |
| 6826 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 6827 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6828 | } |
| 6829 | |
| 6830 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6831 | if { (eval echo configure:6832: \"$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] | 6832 | then |
| 6833 | ac_cv_rshift_extends_sign=yes |
| 6834 | else |
| 6835 | echo "configure: failed program was:" >&5 |
| 6836 | cat conftest.$ac_ext >&5 |
| 6837 | rm -fr conftest* |
| 6838 | ac_cv_rshift_extends_sign=no |
| 6839 | fi |
| 6840 | rm -fr conftest* |
| 6841 | fi |
| 6842 | |
| 6843 | fi |
| 6844 | |
| 6845 | echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 |
| 6846 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6847 | then |
| 6848 | cat >> confdefs.h <<\EOF |
| 6849 | #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 |
| 6850 | EOF |
| 6851 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6852 | fi |
| 6853 | |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6854 | # check for getc_unlocked and related locking functions |
| 6855 | echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6856 | echo "configure:6857: checking for getc_unlocked() and friends" >&5 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6857 | if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then |
| 6858 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6859 | else |
| 6860 | |
| 6861 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6862 | #line 6863 "configure" |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6863 | #include "confdefs.h" |
| 6864 | #include <stdio.h> |
| 6865 | int main() { |
| 6866 | |
| 6867 | FILE *f = fopen("/dev/null", "r"); |
| 6868 | flockfile(f); |
| 6869 | getc_unlocked(f); |
| 6870 | funlockfile(f); |
| 6871 | |
| 6872 | ; return 0; } |
| 6873 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6874 | if { (eval echo configure:6875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6875 | rm -rf conftest* |
| 6876 | ac_cv_have_getc_unlocked=yes |
| 6877 | else |
| 6878 | echo "configure: failed program was:" >&5 |
| 6879 | cat conftest.$ac_ext >&5 |
| 6880 | rm -rf conftest* |
| 6881 | ac_cv_have_getc_unlocked=no |
| 6882 | fi |
| 6883 | rm -f conftest* |
| 6884 | fi |
| 6885 | |
| 6886 | echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6 |
| 6887 | if test "$ac_cv_have_getc_unlocked" = yes |
| 6888 | then |
| 6889 | cat >> confdefs.h <<\EOF |
| 6890 | #define HAVE_GETC_UNLOCKED 1 |
| 6891 | EOF |
| 6892 | |
| 6893 | fi |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6894 | |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 6895 | # check for readline 4.2 |
| 6896 | echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6897 | echo "configure:6898: checking for rl_completion_matches in -lreadline" >&5 |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 6898 | ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` |
| 6899 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 6900 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6901 | else |
| 6902 | ac_save_LIBS="$LIBS" |
| 6903 | LIBS="-lreadline -ltermcap $LIBS" |
| 6904 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6905 | #line 6906 "configure" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 6906 | #include "confdefs.h" |
| 6907 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6908 | /* We use char because int might match the return type of a gcc2 |
| 6909 | builtin and then its argument prototype would still apply. */ |
| 6910 | char rl_completion_matches(); |
| 6911 | |
| 6912 | int main() { |
| 6913 | rl_completion_matches() |
| 6914 | ; return 0; } |
| 6915 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6916 | if { (eval echo configure:6917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 6917 | rm -rf conftest* |
| 6918 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 6919 | else |
| 6920 | echo "configure: failed program was:" >&5 |
| 6921 | cat conftest.$ac_ext >&5 |
| 6922 | rm -rf conftest* |
| 6923 | eval "ac_cv_lib_$ac_lib_var=no" |
| 6924 | fi |
| 6925 | rm -f conftest* |
| 6926 | LIBS="$ac_save_LIBS" |
| 6927 | |
| 6928 | fi |
| 6929 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 6930 | echo "$ac_t""yes" 1>&6 |
| 6931 | cat >> confdefs.h <<\EOF |
| 6932 | #define HAVE_RL_COMPLETION_MATCHES 1 |
| 6933 | EOF |
| 6934 | |
| 6935 | else |
| 6936 | echo "$ac_t""no" 1>&6 |
| 6937 | fi |
| 6938 | |
| 6939 | |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 6940 | echo $ac_n "checking for broken nice()""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6941 | echo "configure:6942: checking for broken nice()" >&5 |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 6942 | if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then |
| 6943 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6944 | else |
| 6945 | |
| 6946 | if test "$cross_compiling" = yes; then |
| 6947 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6948 | else |
| 6949 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6950 | #line 6951 "configure" |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 6951 | #include "confdefs.h" |
| 6952 | |
| 6953 | int main() |
| 6954 | { |
| 6955 | int val1 = nice(1); |
| 6956 | if (val1 != -1 && val1 == nice(2)) |
| 6957 | exit(0); |
| 6958 | exit(1); |
| 6959 | } |
| 6960 | |
| 6961 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6962 | if { (eval echo configure:6963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 6963 | then |
| 6964 | ac_cv_broken_nice=yes |
| 6965 | else |
| 6966 | echo "configure: failed program was:" >&5 |
| 6967 | cat conftest.$ac_ext >&5 |
| 6968 | rm -fr conftest* |
| 6969 | ac_cv_broken_nice=no |
| 6970 | fi |
| 6971 | rm -fr conftest* |
| 6972 | fi |
| 6973 | |
| 6974 | fi |
| 6975 | |
| 6976 | echo "$ac_t""$ac_cv_broken_nice" 1>&6 |
| 6977 | if test "$ac_cv_broken_nice" = yes |
| 6978 | then |
| 6979 | cat >> confdefs.h <<\EOF |
| 6980 | #define HAVE_BROKEN_NICE 1 |
| 6981 | EOF |
| 6982 | |
| 6983 | fi |
| 6984 | |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 6985 | # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! |
| 6986 | # Add sys/socket.h to confdefs.h |
| 6987 | cat >> confdefs.h <<\EOF |
| 6988 | #ifdef HAVE_SYS_SOCKET_H |
| 6989 | #include <sys/socket.h> |
| 6990 | #endif |
| 6991 | EOF |
| 6992 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6993 | echo "configure:6994: checking for socklen_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6994 | if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 6995 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6996 | else |
| 6997 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 6998 | #line 6999 "configure" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 6999 | #include "confdefs.h" |
| 7000 | #include <sys/types.h> |
| 7001 | #if STDC_HEADERS |
| 7002 | #include <stdlib.h> |
| 7003 | #include <stddef.h> |
| 7004 | #endif |
| 7005 | EOF |
| 7006 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 7007 | egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 7008 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7009 | ac_cv_type_socklen_t=yes |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7010 | else |
| 7011 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7012 | ac_cv_type_socklen_t=no |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7013 | fi |
| 7014 | rm -f conftest* |
| 7015 | |
| 7016 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7017 | echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 |
| 7018 | if test $ac_cv_type_socklen_t = no; then |
| 7019 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7020 | #define socklen_t int |
| 7021 | EOF |
| 7022 | |
| 7023 | fi |
| 7024 | |
| 7025 | |
Neil Schemenauer | f25cf6c | 2001-03-04 06:39:33 +0000 | [diff] [blame] | 7026 | # Add Python/ prefix to LIBOBJS |
| 7027 | libobjs=$LIBOBJS |
| 7028 | LIBOBJS= |
| 7029 | for obj in $libobjs; do |
| 7030 | LIBOBJS="$LIBOBJS Python/$obj" |
| 7031 | done |
| 7032 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7033 | #AC_MSG_CHECKING(for Modules/Setup) |
| 7034 | #if test ! -f Modules/Setup ; then |
| 7035 | # if test ! -d Modules ; then |
| 7036 | # mkdir Modules |
| 7037 | # fi |
| 7038 | # cp "$srcdir/Modules/Setup.dist" Modules/Setup |
| 7039 | # AC_MSG_RESULT(creating) |
| 7040 | #else |
| 7041 | # AC_MSG_RESULT(already exists) |
| 7042 | #fi |
| 7043 | |
| 7044 | |
Neil Schemenauer | acbf9ef | 2001-02-27 02:15:14 +0000 | [diff] [blame] | 7045 | SRCDIRS="Parser Grammar Objects Python Modules" |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7046 | echo $ac_n "checking for build directories""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 7047 | echo "configure:7048: checking for build directories" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7048 | for dir in $SRCDIRS; do |
| 7049 | if test ! -d $dir; then |
| 7050 | mkdir $dir |
Guido van Rossum | 262cf20 | 2000-11-02 19:33:53 +0000 | [diff] [blame] | 7051 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7052 | done |
| 7053 | echo "$ac_t""done" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 7054 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7055 | # generate output files |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7056 | trap '' 1 2 15 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7057 | cat > confcache <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7058 | # This file is a shell script that caches the results of configure |
| 7059 | # tests run on this system so they can be shared between configure |
| 7060 | # scripts and configure runs. It is not useful on other systems. |
| 7061 | # If it contains results you don't want to keep, you may remove or edit it. |
| 7062 | # |
| 7063 | # By default, configure uses ./config.cache as the cache file, |
| 7064 | # creating it if it does not exist already. You can give configure |
| 7065 | # the --cache-file=FILE option to use a different cache file; that is |
| 7066 | # what configure does when it calls configure scripts in |
| 7067 | # subdirectories, so they share the cache. |
| 7068 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| 7069 | # config.status only pays attention to the cache file if you give it the |
| 7070 | # --recheck option to rerun configure. |
| 7071 | # |
| 7072 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7073 | # The following way of writing the cache mishandles newlines in values, |
| 7074 | # but we know of no workaround that is simple, portable, and efficient. |
| 7075 | # So, don't put newlines in cache variables' values. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7076 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 7077 | # 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] | 7078 | (set) 2>&1 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7079 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7080 | *ac_space=\ *) |
| 7081 | # `set' does not quote correctly, so add quotes (double-quote substitution |
| 7082 | # turns \\\\ into \\, and sed turns \\ into \). |
| 7083 | sed -n \ |
| 7084 | -e "s/'/'\\\\''/g" \ |
| 7085 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| 7086 | ;; |
| 7087 | *) |
| 7088 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 7089 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| 7090 | ;; |
| 7091 | esac >> confcache |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7092 | if cmp -s $cache_file confcache; then |
| 7093 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7094 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7095 | if test -w $cache_file; then |
| 7096 | echo "updating cache $cache_file" |
| 7097 | cat confcache > $cache_file |
| 7098 | else |
| 7099 | echo "not updating unwritable cache $cache_file" |
| 7100 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7101 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7102 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7103 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7104 | 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] | 7105 | |
| 7106 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 7107 | # Let make expand exec_prefix. |
| 7108 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7109 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7110 | # Any assignment to VPATH causes Sun make to only execute |
| 7111 | # the first set of double-colon rules, so remove it if not needed. |
| 7112 | # If there is a colon in the path, we need to keep it. |
| 7113 | if test "x$srcdir" = x.; then |
| 7114 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
| 7115 | fi |
| 7116 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7117 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7118 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7119 | DEFS=-DHAVE_CONFIG_H |
| 7120 | |
| 7121 | # Without the "./", some shells look in PATH for config.status. |
| 7122 | : ${CONFIG_STATUS=./config.status} |
| 7123 | |
| 7124 | echo creating $CONFIG_STATUS |
| 7125 | rm -f $CONFIG_STATUS |
| 7126 | cat > $CONFIG_STATUS <<EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7127 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7128 | # Generated automatically by configure. |
| 7129 | # Run this file to recreate the current configuration. |
| 7130 | # This directory was configured as follows, |
| 7131 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 7132 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7133 | # $0 $ac_configure_args |
| 7134 | # |
| 7135 | # Compiler output produced by configure, useful for debugging |
| 7136 | # configure, is in ./config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7137 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7138 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7139 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7140 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7141 | case "\$ac_option" in |
| 7142 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7143 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
| 7144 | 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] | 7145 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7146 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7147 | exit 0 ;; |
| 7148 | -help | --help | --hel | --he | --h) |
| 7149 | echo "\$ac_cs_usage"; exit 0 ;; |
| 7150 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7151 | esac |
| 7152 | done |
| 7153 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7154 | ac_given_srcdir=$srcdir |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7155 | ac_given_INSTALL="$INSTALL" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7156 | |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7157 | trap 'rm -fr `echo "Makefile.pre Modules/Setup.config pyconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7158 | EOF |
| 7159 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7160 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7161 | # Protect against being on the right side of a sed subst in config.status. |
| 7162 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 7163 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7164 | $ac_vpsub |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7165 | $extrasub |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7166 | s%@SHELL@%$SHELL%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7167 | s%@CFLAGS@%$CFLAGS%g |
| 7168 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 7169 | s%@CXXFLAGS@%$CXXFLAGS%g |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7170 | s%@FFLAGS@%$FFLAGS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7171 | s%@DEFS@%$DEFS%g |
| 7172 | s%@LDFLAGS@%$LDFLAGS%g |
| 7173 | s%@LIBS@%$LIBS%g |
| 7174 | s%@exec_prefix@%$exec_prefix%g |
| 7175 | s%@prefix@%$prefix%g |
| 7176 | s%@program_transform_name@%$program_transform_name%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7177 | s%@bindir@%$bindir%g |
| 7178 | s%@sbindir@%$sbindir%g |
| 7179 | s%@libexecdir@%$libexecdir%g |
| 7180 | s%@datadir@%$datadir%g |
| 7181 | s%@sysconfdir@%$sysconfdir%g |
| 7182 | s%@sharedstatedir@%$sharedstatedir%g |
| 7183 | s%@localstatedir@%$localstatedir%g |
| 7184 | s%@libdir@%$libdir%g |
| 7185 | s%@includedir@%$includedir%g |
| 7186 | s%@oldincludedir@%$oldincludedir%g |
| 7187 | s%@infodir@%$infodir%g |
| 7188 | s%@mandir@%$mandir%g |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 7189 | s%@VERSION@%$VERSION%g |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 7190 | s%@CONFIG_ARGS@%$CONFIG_ARGS%g |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 7191 | s%@MACHDEP@%$MACHDEP%g |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 7192 | s%@SGI_ABI@%$SGI_ABI%g |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 7193 | s%@CXX@%$CXX%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7194 | s%@MAINOBJ@%$MAINOBJ%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7195 | s%@CC@%$CC%g |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 7196 | s%@CPP@%$CPP%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7197 | s%@EXEEXT@%$EXEEXT%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7198 | s%@LIBRARY@%$LIBRARY%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7199 | s%@LDLIBRARY@%$LDLIBRARY%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7200 | s%@DLLLIBRARY@%$DLLLIBRARY%g |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 7201 | s%@LINKCC@%$LINKCC%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7202 | s%@RANLIB@%$RANLIB%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7203 | s%@AR@%$AR%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7204 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7205 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7206 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 7207 | s%@LN@%$LN%g |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 7208 | s%@OPT@%$OPT%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7209 | s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7210 | s%@SO@%$SO%g |
| 7211 | s%@LDSHARED@%$LDSHARED%g |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 7212 | s%@BLDSHARED@%$BLDSHARED%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7213 | s%@CCSHARED@%$CCSHARED%g |
| 7214 | s%@LINKFORSHARED@%$LINKFORSHARED%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7215 | s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7216 | s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g |
| 7217 | s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 7218 | s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 7219 | s%@LDLAST@%$LDLAST%g |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 7220 | s%@USE_GC_MODULE@%$USE_GC_MODULE%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7221 | s%@DLINCLDIR@%$DLINCLDIR%g |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 7222 | s%@DYNLOADFILE@%$DYNLOADFILE%g |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 7223 | s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7224 | s%@LIBOBJS@%$LIBOBJS%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7225 | s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g |
| 7226 | s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g |
| 7227 | 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] | 7228 | s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7229 | s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7230 | s%@LIBM@%$LIBM%g |
| 7231 | s%@LIBC@%$LIBC%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7232 | s%@SRCDIRS@%$SRCDIRS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7233 | |
| 7234 | CEOF |
| 7235 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7236 | |
| 7237 | cat >> $CONFIG_STATUS <<\EOF |
| 7238 | |
| 7239 | # Split the substitutions into bite-sized pieces for seds with |
| 7240 | # small command number limits, like on Digital OSF/1 and HP-UX. |
| 7241 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 7242 | ac_file=1 # Number of current file. |
| 7243 | ac_beg=1 # First line for current file. |
| 7244 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 7245 | ac_more_lines=: |
| 7246 | ac_sed_cmds="" |
| 7247 | while $ac_more_lines; do |
| 7248 | if test $ac_beg -gt 1; then |
| 7249 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7250 | else |
| 7251 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7252 | fi |
| 7253 | if test ! -s conftest.s$ac_file; then |
| 7254 | ac_more_lines=false |
| 7255 | rm -f conftest.s$ac_file |
| 7256 | else |
| 7257 | if test -z "$ac_sed_cmds"; then |
| 7258 | ac_sed_cmds="sed -f conftest.s$ac_file" |
| 7259 | else |
| 7260 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
| 7261 | fi |
| 7262 | ac_file=`expr $ac_file + 1` |
| 7263 | ac_beg=$ac_end |
| 7264 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
| 7265 | fi |
| 7266 | done |
| 7267 | if test -z "$ac_sed_cmds"; then |
| 7268 | ac_sed_cmds=cat |
| 7269 | fi |
| 7270 | EOF |
| 7271 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7272 | cat >> $CONFIG_STATUS <<EOF |
| 7273 | |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7274 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"} |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7275 | EOF |
| 7276 | cat >> $CONFIG_STATUS <<\EOF |
| 7277 | 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] | 7278 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7279 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7280 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7281 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7282 | *) ac_file_in="${ac_file}.in" ;; |
| 7283 | esac |
| 7284 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7285 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7286 | |
| 7287 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7288 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7289 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7290 | # The file is in a subdirectory. |
| 7291 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7292 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7293 | # A "../" for each directory in $ac_dir_suffix. |
| 7294 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
| 7295 | else |
| 7296 | ac_dir_suffix= ac_dots= |
| 7297 | fi |
| 7298 | |
| 7299 | case "$ac_given_srcdir" in |
| 7300 | .) srcdir=. |
| 7301 | if test -z "$ac_dots"; then top_srcdir=. |
| 7302 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
| 7303 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; |
| 7304 | *) # Relative path. |
| 7305 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 7306 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
| 7307 | esac |
| 7308 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7309 | case "$ac_given_INSTALL" in |
| 7310 | [/$]*) INSTALL="$ac_given_INSTALL" ;; |
| 7311 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
| 7312 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7313 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7314 | echo creating "$ac_file" |
| 7315 | rm -f "$ac_file" |
| 7316 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
| 7317 | case "$ac_file" in |
| 7318 | *Makefile*) ac_comsub="1i\\ |
| 7319 | # $configure_input" ;; |
| 7320 | *) ac_comsub= ;; |
| 7321 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7322 | |
| 7323 | 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] | 7324 | sed -e "$ac_comsub |
| 7325 | s%@configure_input@%$configure_input%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7326 | s%@srcdir@%$srcdir%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7327 | s%@top_srcdir@%$top_srcdir%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7328 | s%@INSTALL@%$INSTALL%g |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7329 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7330 | fi; done |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7331 | rm -f conftest.s* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7332 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7333 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
| 7334 | # 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] | 7335 | # |
| 7336 | # ac_d sets the value in "#define NAME VALUE" lines. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7337 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 7338 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7339 | ac_dC='\3' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7340 | ac_dD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7341 | # 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] | 7342 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7343 | ac_uB='\([ ]\)%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7344 | ac_uC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7345 | ac_uD='\4%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7346 | # 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] | 7347 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7348 | ac_eB='$%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7349 | ac_eC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7350 | ac_eD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7351 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7352 | if test "${CONFIG_HEADERS+set}" != set; then |
| 7353 | EOF |
| 7354 | cat >> $CONFIG_STATUS <<EOF |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7355 | CONFIG_HEADERS="pyconfig.h" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7356 | EOF |
| 7357 | cat >> $CONFIG_STATUS <<\EOF |
| 7358 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7359 | 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] | 7360 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7361 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7362 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7363 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7364 | *) ac_file_in="${ac_file}.in" ;; |
| 7365 | esac |
| 7366 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7367 | echo creating $ac_file |
| 7368 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7369 | rm -f conftest.frag conftest.in conftest.out |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7370 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 7371 | cat $ac_file_inputs > conftest.in |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7372 | |
| 7373 | EOF |
| 7374 | |
| 7375 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
| 7376 | # 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] | 7377 | # 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] | 7378 | # Protect against being in an unquoted here document in config.status. |
| 7379 | rm -f conftest.vals |
| 7380 | cat > conftest.hdr <<\EOF |
| 7381 | s/[\\&%]/\\&/g |
| 7382 | s%[\\$`]%\\&%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7383 | 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] | 7384 | s%ac_d%ac_u%gp |
| 7385 | s%ac_u%ac_e%gp |
| 7386 | EOF |
| 7387 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
| 7388 | rm -f conftest.hdr |
| 7389 | |
| 7390 | # This sed command replaces #undef with comments. This is necessary, for |
| 7391 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 7392 | # on some systems where configure will not decide to define it. |
| 7393 | cat >> conftest.vals <<\EOF |
| 7394 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
| 7395 | EOF |
| 7396 | |
| 7397 | # Break up conftest.vals because some shells have a limit on |
| 7398 | # 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] | 7399 | |
| 7400 | rm -f conftest.tail |
| 7401 | while : |
| 7402 | do |
| 7403 | ac_lines=`grep -c . conftest.vals` |
| 7404 | # grep -c gives empty output for an empty file on some AIX systems. |
| 7405 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 7406 | # Write a limited-size here document to conftest.frag. |
| 7407 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
| 7408 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
| 7409 | echo 'CEOF |
| 7410 | sed -f conftest.frag conftest.in > conftest.out |
| 7411 | rm -f conftest.in |
| 7412 | mv conftest.out conftest.in |
| 7413 | ' >> $CONFIG_STATUS |
| 7414 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
| 7415 | rm -f conftest.vals |
| 7416 | mv conftest.tail conftest.vals |
| 7417 | done |
| 7418 | rm -f conftest.vals |
| 7419 | |
| 7420 | cat >> $CONFIG_STATUS <<\EOF |
| 7421 | rm -f conftest.frag conftest.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7422 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7423 | cat conftest.in >> conftest.h |
| 7424 | rm -f conftest.in |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7425 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7426 | echo "$ac_file is unchanged" |
| 7427 | rm -f conftest.h |
| 7428 | else |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7429 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7430 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7431 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7432 | # The file is in a subdirectory. |
| 7433 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 7434 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7435 | rm -f $ac_file |
| 7436 | mv conftest.h $ac_file |
| 7437 | fi |
| 7438 | fi; done |
| 7439 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7440 | EOF |
| 7441 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7442 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7443 | EOF |
| 7444 | cat >> $CONFIG_STATUS <<\EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7445 | |
| 7446 | exit 0 |
| 7447 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7448 | chmod +x $CONFIG_STATUS |
| 7449 | rm -fr confdefs* $ac_clean_files |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7450 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7451 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7452 | |
| 7453 | echo "creating Setup" |
| 7454 | if test ! -f Modules/Setup |
| 7455 | then |
| 7456 | cp $srcdir/Modules/Setup.dist Modules/Setup |
| 7457 | fi |
| 7458 | |
| 7459 | echo "creating Setup.local" |
| 7460 | if test ! -f Modules/Setup.local |
| 7461 | then |
| 7462 | echo "# Edit this file for local setup changes" >Modules/Setup.local |
| 7463 | fi |
| 7464 | |
| 7465 | echo "creating Makefile" |
| 7466 | $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ |
| 7467 | -s Modules Modules/Setup.config \ |
Neil Schemenauer | f8b71c5 | 2001-04-21 17:41:16 +0000 | [diff] [blame] | 7468 | Modules/Setup.local Modules/Setup |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 7469 | mv config.c Modules |