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 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3 | # From configure.in Revision: 1.239 |
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 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 31 | --enable-ipv6 Enable ipv6 (with ipv4) support |
| 32 | --disable-ipv6 Disable ipv6 support" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 33 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 34 | --with-libs='lib1 ...' link against additional libs" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 35 | ac_help="$ac_help |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 36 | --with-signal-module disable/enable signal module" |
| 37 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 38 | --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries" |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 39 | ac_help="$ac_help |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 40 | --with(out)-threads[=DIRECTORY] disable/enable thread support" |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 41 | ac_help="$ac_help |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 42 | --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 43 | ac_help="$ac_help |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 44 | --with-pth use GNU pth threading libraries" |
| 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 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1071 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 1072 | echo "configure:1073: checking for Cygwin environment" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1073 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
| 1074 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1075 | else |
| 1076 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 1077 | #line 1078 "configure" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1078 | #include "confdefs.h" |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1079 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1080 | int main() { |
| 1081 | |
| 1082 | #ifndef __CYGWIN__ |
| 1083 | #define __CYGWIN__ __CYGWIN32__ |
| 1084 | #endif |
| 1085 | return __CYGWIN__; |
| 1086 | ; return 0; } |
| 1087 | EOF |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 1088 | if { (eval echo configure:1089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1089 | rm -rf conftest* |
| 1090 | ac_cv_cygwin=yes |
| 1091 | else |
| 1092 | echo "configure: failed program was:" >&5 |
| 1093 | cat conftest.$ac_ext >&5 |
| 1094 | rm -rf conftest* |
| 1095 | ac_cv_cygwin=no |
| 1096 | fi |
| 1097 | rm -f conftest* |
| 1098 | rm -f conftest* |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1099 | fi |
| 1100 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1101 | echo "$ac_t""$ac_cv_cygwin" 1>&6 |
| 1102 | CYGWIN= |
| 1103 | test "$ac_cv_cygwin" = yes && CYGWIN=yes |
| 1104 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 1105 | echo "configure:1106: checking for mingw32 environment" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1106 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
| 1107 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1108 | else |
| 1109 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 1110 | #line 1111 "configure" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1111 | #include "confdefs.h" |
| 1112 | |
| 1113 | int main() { |
| 1114 | return __MINGW32__; |
| 1115 | ; return 0; } |
| 1116 | EOF |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 1117 | if { (eval echo configure:1118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1118 | rm -rf conftest* |
| 1119 | ac_cv_mingw32=yes |
| 1120 | else |
| 1121 | echo "configure: failed program was:" >&5 |
| 1122 | cat conftest.$ac_ext >&5 |
| 1123 | rm -rf conftest* |
| 1124 | ac_cv_mingw32=no |
| 1125 | fi |
| 1126 | rm -f conftest* |
| 1127 | rm -f conftest* |
| 1128 | fi |
| 1129 | |
| 1130 | echo "$ac_t""$ac_cv_mingw32" 1>&6 |
| 1131 | MINGW32= |
| 1132 | test "$ac_cv_mingw32" = yes && MINGW32=yes |
| 1133 | |
| 1134 | |
| 1135 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 1136 | echo "configure:1137: checking for executable suffix" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1137 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
| 1138 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1139 | else |
| 1140 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then |
| 1141 | ac_cv_exeext=.exe |
| 1142 | else |
| 1143 | rm -f conftest* |
| 1144 | echo 'int main () { return 0; }' > conftest.$ac_ext |
| 1145 | ac_cv_exeext= |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 1146 | if { (eval echo configure:1147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1147 | for file in conftest.*; do |
| 1148 | case $file in |
| 1149 | *.c | *.o | *.obj) ;; |
| 1150 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
| 1151 | esac |
| 1152 | done |
| 1153 | else |
| 1154 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } |
| 1155 | fi |
| 1156 | rm -f conftest* |
| 1157 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no |
| 1158 | fi |
| 1159 | fi |
| 1160 | |
| 1161 | EXEEXT="" |
| 1162 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} |
| 1163 | echo "$ac_t""${ac_cv_exeext}" 1>&6 |
| 1164 | ac_exeext=$EXEEXT |
| 1165 | |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1166 | echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6 |
Martin v. Löwis | 784d3df | 2001-07-25 07:30:35 +0000 | [diff] [blame] | 1167 | echo "configure:1168: checking for --with-suffix" >&5 |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1168 | # Check whether --with-suffix or --without-suffix was given. |
| 1169 | if test "${with_suffix+set}" = set; then |
| 1170 | withval="$with_suffix" |
| 1171 | |
| 1172 | case $withval in |
| 1173 | no) EXEEXT=;; |
| 1174 | yes) EXEEXT=.exe;; |
| 1175 | *) EXEEXT=$withval;; |
| 1176 | esac |
| 1177 | fi |
| 1178 | |
| 1179 | echo "$ac_t""$EXEEXT" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1180 | # Test whether we're running on a non-case-sensitive system, in which |
| 1181 | # case we give a warning if no ext is given |
| 1182 | if test -d "python" -a -z "$EXEEXT" |
| 1183 | then |
| 1184 | echo "configure: warning: This filesystem is not case-sensitive so you should probably use --with-suffix" 1>&2 |
| 1185 | fi |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1186 | |
Guido van Rossum | dd997f7 | 1998-10-07 19:58:26 +0000 | [diff] [blame] | 1187 | case $MACHDEP in |
| 1188 | bsdos*) |
| 1189 | case $CC in |
| 1190 | gcc) CC="$CC -D_HAVE_BSDI";; |
| 1191 | esac;; |
| 1192 | esac |
| 1193 | |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1194 | case $ac_sys_system in |
| 1195 | hp*|HP*) |
| 1196 | case $CC in |
Guido van Rossum | cd5ff9f | 2000-09-22 16:15:54 +0000 | [diff] [blame] | 1197 | cc|*/cc) CC="$CC -Ae";; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1198 | esac;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1199 | Monterey*) |
| 1200 | case $CC in |
| 1201 | cc) CC="$CC -Wl,-Bexport";; |
| 1202 | esac;; |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1203 | SunOS*) |
| 1204 | # Some functions have a prototype only with that define, e.g. confstr |
| 1205 | cat >> confdefs.h <<\EOF |
| 1206 | #define __EXTENSIONS__ 1 |
| 1207 | EOF |
| 1208 | |
| 1209 | ;; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1210 | esac |
| 1211 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1212 | |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1213 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1214 | echo $ac_n "checking LIBRARY""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1215 | echo "configure:1216: checking LIBRARY" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1216 | if test -z "$LIBRARY" |
| 1217 | then |
| 1218 | LIBRARY='libpython$(VERSION).a' |
| 1219 | fi |
| 1220 | echo "$ac_t""$LIBRARY" 1>&6 |
| 1221 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1222 | # LDLIBRARY is the name of the library to link against (as opposed to the |
| 1223 | # name of the library into which to insert object files). On systems |
| 1224 | # without shared libraries, LDLIBRARY is the same as LIBRARY (defined in |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1225 | # the Makefiles). On Cygwin LDLIBRARY is the import library, DLLLIBRARY is the |
| 1226 | # shared (i.e., DLL) library. |
| 1227 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1228 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1229 | LDLIBRARY="$LIBRARY" |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 1230 | DLLLIBRARY='' |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1231 | |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1232 | # LINKCC is the command that links the python executable -- default is $(CC). |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1233 | # 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] | 1234 | # linking. |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1235 | |
| 1236 | echo $ac_n "checking LINKCC""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1237 | echo "configure:1238: checking LINKCC" >&5 |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1238 | if test -z "$LINKCC" |
| 1239 | then |
| 1240 | case $ac_sys_system in |
| 1241 | AIX*) |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 1242 | LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 1243 | dgux*) |
| 1244 | LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1245 | Monterey64*) |
| 1246 | LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";; |
Guido van Rossum | 25f9303 | 1997-08-18 16:00:04 +0000 | [diff] [blame] | 1247 | *) LINKCC="\$(PURIFY) \$(CC)";; |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1248 | esac |
| 1249 | fi |
| 1250 | echo "$ac_t""$LINKCC" 1>&6 |
| 1251 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1252 | echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1253 | echo "configure:1254: checking LDLIBRARY" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1254 | |
| 1255 | # NeXT framework builds require that the 'ar' library be converted into |
| 1256 | # a bundle using libtool. |
| 1257 | if test "$with_next_framework" |
| 1258 | then |
| 1259 | LDLIBRARY='libpython$(VERSION).dylib' |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 1260 | DLLLIBRARY=$LDLIBRARY |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1261 | fi |
| 1262 | |
| 1263 | # 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] | 1264 | case $MACHDEP in |
| 1265 | dguxR4) |
| 1266 | LDLIBRARY='libpython$(VERSION).so' |
| 1267 | OPT="$OPT -pic" |
| 1268 | ;; |
| 1269 | beos*) |
| 1270 | LDLIBRARY='libpython$(VERSION).so' |
| 1271 | ;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1272 | cygwin*) |
| 1273 | LDLIBRARY='libpython$(VERSION).dll.a' |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1274 | DLLLIBRARY='libpython$(VERSION).dll' |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1275 | ;; |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1276 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1277 | echo "$ac_t""$LDLIBRARY" 1>&6 |
| 1278 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1279 | # Extract the first word of "ranlib", so it can be a program name with args. |
| 1280 | set dummy ranlib; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1281 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1282 | echo "configure:1283: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1283 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1284 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1285 | else |
| 1286 | if test -n "$RANLIB"; then |
| 1287 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 1288 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1289 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1290 | ac_dummy="$PATH" |
| 1291 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1292 | test -z "$ac_dir" && ac_dir=. |
| 1293 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1294 | ac_cv_prog_RANLIB="ranlib" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1295 | break |
| 1296 | fi |
| 1297 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1298 | IFS="$ac_save_ifs" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1299 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1300 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1301 | fi |
| 1302 | RANLIB="$ac_cv_prog_RANLIB" |
| 1303 | if test -n "$RANLIB"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1304 | echo "$ac_t""$RANLIB" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1305 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1306 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1307 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1308 | |
| 1309 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1310 | for ac_prog in ar aal |
| 1311 | do |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1312 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 1313 | set dummy $ac_prog; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1314 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1315 | echo "configure:1316: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1316 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1317 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1318 | else |
| 1319 | if test -n "$AR"; then |
| 1320 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 1321 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1322 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1323 | ac_dummy="$PATH" |
| 1324 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1325 | test -z "$ac_dir" && ac_dir=. |
| 1326 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1327 | ac_cv_prog_AR="$ac_prog" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1328 | break |
| 1329 | fi |
| 1330 | done |
| 1331 | IFS="$ac_save_ifs" |
| 1332 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1333 | fi |
| 1334 | AR="$ac_cv_prog_AR" |
| 1335 | if test -n "$AR"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1336 | echo "$ac_t""$AR" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1337 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1338 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1339 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1340 | |
| 1341 | test -n "$AR" && break |
| 1342 | done |
| 1343 | test -n "$AR" || AR="ar" |
| 1344 | |
Neil Schemenauer | a42c827 | 2001-03-31 00:01:55 +0000 | [diff] [blame] | 1345 | |
| 1346 | case $MACHDEP in |
| 1347 | bsdos*) |
| 1348 | # install -d does not work on BSDI |
| 1349 | if test -z "$INSTALL" |
| 1350 | then |
| 1351 | INSTALL="${srcdir}/install-sh -c" |
| 1352 | fi |
| 1353 | esac |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1354 | ac_aux_dir= |
| 1355 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
| 1356 | if test -f $ac_dir/install-sh; then |
| 1357 | ac_aux_dir=$ac_dir |
| 1358 | ac_install_sh="$ac_aux_dir/install-sh -c" |
| 1359 | break |
| 1360 | elif test -f $ac_dir/install.sh; then |
| 1361 | ac_aux_dir=$ac_dir |
| 1362 | ac_install_sh="$ac_aux_dir/install.sh -c" |
| 1363 | break |
| 1364 | fi |
| 1365 | done |
| 1366 | if test -z "$ac_aux_dir"; then |
| 1367 | { 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] | 1368 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1369 | ac_config_guess=$ac_aux_dir/config.guess |
| 1370 | ac_config_sub=$ac_aux_dir/config.sub |
| 1371 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. |
| 1372 | |
| 1373 | # Find a good install program. We prefer a C program (faster), |
| 1374 | # so one script is as good as another. But avoid the broken or |
| 1375 | # incompatible versions: |
| 1376 | # SysV /etc/install, /usr/sbin/install |
| 1377 | # SunOS /usr/etc/install |
| 1378 | # IRIX /sbin/install |
| 1379 | # AIX /bin/install |
| 1380 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
| 1381 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
| 1382 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
| 1383 | # ./install, which can be erroneously created by make from ./install.sh. |
| 1384 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1385 | echo "configure:1386: checking for a BSD compatible install" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1386 | if test -z "$INSTALL"; then |
| 1387 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
| 1388 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1389 | else |
| 1390 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" |
| 1391 | for ac_dir in $PATH; do |
| 1392 | # Account for people who put trailing slashes in PATH elements. |
| 1393 | case "$ac_dir/" in |
| 1394 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; |
| 1395 | *) |
| 1396 | # OSF1 and SCO ODT 3.0 have their own names for install. |
| 1397 | # Don't use installbsd from OSF since it installs stuff as root |
| 1398 | # by default. |
| 1399 | for ac_prog in ginstall scoinst install; do |
| 1400 | if test -f $ac_dir/$ac_prog; then |
| 1401 | if test $ac_prog = install && |
| 1402 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then |
| 1403 | # AIX install. It has an incompatible calling convention. |
| 1404 | : |
| 1405 | else |
| 1406 | ac_cv_path_install="$ac_dir/$ac_prog -c" |
| 1407 | break 2 |
| 1408 | fi |
| 1409 | fi |
| 1410 | done |
| 1411 | ;; |
| 1412 | esac |
| 1413 | done |
| 1414 | IFS="$ac_save_IFS" |
| 1415 | |
| 1416 | fi |
| 1417 | if test "${ac_cv_path_install+set}" = set; then |
| 1418 | INSTALL="$ac_cv_path_install" |
| 1419 | else |
| 1420 | # As a last resort, use the slow shell script. We don't cache a |
| 1421 | # path for INSTALL within a source directory, because that will |
| 1422 | # break other packages using the cache if that directory is |
| 1423 | # removed, or if the path is relative. |
| 1424 | INSTALL="$ac_install_sh" |
| 1425 | fi |
| 1426 | fi |
| 1427 | echo "$ac_t""$INSTALL" 1>&6 |
| 1428 | |
| 1429 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
| 1430 | # It thinks the first close brace ends the variable substitution. |
| 1431 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' |
| 1432 | |
| 1433 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
| 1434 | |
| 1435 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
| 1436 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1437 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1438 | # Not every filesystem supports hard links |
| 1439 | |
| 1440 | if test -z "$LN" ; then |
| 1441 | case $ac_sys_system in |
| 1442 | BeOS*) LN="ln -s";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1443 | CYGWIN*) LN="ln -s";; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1444 | *) LN=ln;; |
| 1445 | esac |
| 1446 | fi |
| 1447 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1448 | # Check for --with-pydebug |
| 1449 | echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1450 | echo "configure:1451: checking for --with-pydebug" >&5 |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1451 | # Check whether --with-pydebug or --without-pydebug was given. |
| 1452 | if test "${with_pydebug+set}" = set; then |
| 1453 | withval="$with_pydebug" |
| 1454 | |
| 1455 | if test "$withval" != no |
| 1456 | then cat >> confdefs.h <<\EOF |
| 1457 | #define Py_DEBUG 1 |
| 1458 | EOF |
| 1459 | echo "$ac_t""yes" 1>&6; Py_DEBUG='true' |
| 1460 | else echo "$ac_t""no" 1>&6; Py_DEBUG='false' |
| 1461 | fi |
| 1462 | else |
| 1463 | echo "$ac_t""no" 1>&6 |
| 1464 | fi |
| 1465 | |
| 1466 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1467 | # Optimizer/debugger flags |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1468 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1469 | if test -z "$OPT" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1470 | then |
Guido van Rossum | edca74a | 1997-07-18 23:29:40 +0000 | [diff] [blame] | 1471 | case $GCC in |
| 1472 | yes) |
| 1473 | case $ac_cv_prog_cc_g in |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1474 | yes) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1475 | if test "$Py_DEBUG" = 'true' ; then |
| 1476 | # Optimization messes up debuggers, so turn it off for |
| 1477 | # debug builds. |
| 1478 | OPT="-g -Wall -Wstrict-prototypes" |
| 1479 | else |
| 1480 | OPT="-g -O3 -Wall -Wstrict-prototypes" |
| 1481 | fi;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1482 | *) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1483 | OPT="-O3 -Wall -Wstrict-prototypes";; |
| 1484 | esac |
| 1485 | ;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1486 | *) |
| 1487 | case $ac_sys_system in |
| 1488 | UnixWare*) |
| 1489 | OPT="-O -K pentium,host,inline,loop_unroll,alloca ";; |
| 1490 | *) |
| 1491 | OPT="-O";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1492 | esac |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1493 | esac |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 1494 | case $ac_sys_system in |
| 1495 | Darwin*) |
| 1496 | OPT="$OPT -no-cpp-precomp";; |
| 1497 | esac |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1498 | fi |
| 1499 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1500 | # The current (beta) Monterey compiler dies with optimizations |
| 1501 | case $ac_sys_system in |
| 1502 | Monterey*) OPT="";; |
| 1503 | esac |
| 1504 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 1505 | if test "$ac_arch_flags" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 1506 | then |
| 1507 | OPT="$OPT $ac_arch_flags" |
| 1508 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1509 | # checks for UNIX variants that set C preprocessor variables |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1510 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1511 | echo "configure:1512: checking how to run the C preprocessor" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1512 | # On Suns, sometimes $CPP names a directory. |
| 1513 | if test -n "$CPP" && test -d "$CPP"; then |
| 1514 | CPP= |
| 1515 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1516 | if test -z "$CPP"; then |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1517 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1518 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1519 | else |
| 1520 | # This must be in double quotes, not single quotes, because CPP may get |
| 1521 | # substituted into the Makefile and "${CC-cc}" will confuse make. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1522 | CPP="${CC-cc} -E" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1523 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 1524 | # not just through cpp. |
| 1525 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1526 | #line 1527 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1527 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1528 | #include <assert.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1529 | Syntax Error |
| 1530 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1531 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1532 | { (eval echo configure:1533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1533 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1534 | if test -z "$ac_err"; then |
| 1535 | : |
| 1536 | else |
| 1537 | echo "$ac_err" >&5 |
| 1538 | echo "configure: failed program was:" >&5 |
| 1539 | cat conftest.$ac_ext >&5 |
| 1540 | rm -rf conftest* |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1541 | CPP="${CC-cc} -E -traditional-cpp" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1542 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1543 | #line 1544 "configure" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1544 | #include "confdefs.h" |
| 1545 | #include <assert.h> |
| 1546 | Syntax Error |
| 1547 | EOF |
| 1548 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1549 | { (eval echo configure:1550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1550 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1551 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1552 | : |
| 1553 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1554 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1555 | echo "configure: failed program was:" >&5 |
| 1556 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1557 | rm -rf conftest* |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1558 | CPP="${CC-cc} -nologo -E" |
| 1559 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1560 | #line 1561 "configure" |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1561 | #include "confdefs.h" |
| 1562 | #include <assert.h> |
| 1563 | Syntax Error |
| 1564 | EOF |
| 1565 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1566 | { (eval echo configure:1567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1567 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1568 | if test -z "$ac_err"; then |
| 1569 | : |
| 1570 | else |
| 1571 | echo "$ac_err" >&5 |
| 1572 | echo "configure: failed program was:" >&5 |
| 1573 | cat conftest.$ac_ext >&5 |
| 1574 | rm -rf conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1575 | CPP=/lib/cpp |
| 1576 | fi |
| 1577 | rm -f conftest* |
| 1578 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1579 | rm -f conftest* |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1580 | fi |
| 1581 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1582 | ac_cv_prog_CPP="$CPP" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1583 | fi |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 1584 | CPP="$ac_cv_prog_CPP" |
| 1585 | else |
| 1586 | ac_cv_prog_CPP="$CPP" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1587 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1588 | echo "$ac_t""$CPP" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1589 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1590 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1591 | echo "configure:1592: checking for AIX" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1592 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1593 | #line 1594 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1594 | #include "confdefs.h" |
| 1595 | #ifdef _AIX |
| 1596 | yes |
| 1597 | #endif |
| 1598 | |
| 1599 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1600 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1601 | egrep "yes" >/dev/null 2>&1; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1602 | rm -rf conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1603 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1604 | #define _ALL_SOURCE 1 |
| 1605 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1606 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1607 | else |
| 1608 | rm -rf conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1609 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1610 | fi |
| 1611 | rm -f conftest* |
| 1612 | |
| 1613 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1614 | ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1615 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1616 | echo "configure:1617: checking for minix/config.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1617 | 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] | 1618 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1619 | else |
| 1620 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1621 | #line 1622 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1622 | #include "confdefs.h" |
| 1623 | #include <minix/config.h> |
| 1624 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1625 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1626 | { (eval echo configure:1627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1627 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1628 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1629 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1630 | eval "ac_cv_header_$ac_safe=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1631 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1632 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1633 | echo "configure: failed program was:" >&5 |
| 1634 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1635 | rm -rf conftest* |
| 1636 | eval "ac_cv_header_$ac_safe=no" |
| 1637 | fi |
| 1638 | rm -f conftest* |
| 1639 | fi |
| 1640 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1641 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1642 | MINIX=yes |
| 1643 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1644 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1645 | MINIX= |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1646 | fi |
| 1647 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1648 | if test "$MINIX" = yes; then |
| 1649 | cat >> confdefs.h <<\EOF |
| 1650 | #define _POSIX_SOURCE 1 |
| 1651 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1652 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1653 | cat >> confdefs.h <<\EOF |
| 1654 | #define _POSIX_1_SOURCE 2 |
| 1655 | EOF |
| 1656 | |
| 1657 | cat >> confdefs.h <<\EOF |
| 1658 | #define _MINIX 1 |
| 1659 | EOF |
| 1660 | |
| 1661 | fi |
| 1662 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1663 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1664 | echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1665 | echo "configure:1666: checking whether $CC accepts -OPT:Olimit=0" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1666 | 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] | 1667 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1668 | else |
| 1669 | ac_save_cc="$CC" |
| 1670 | CC="$CC -OPT:Olimit=0" |
| 1671 | if test "$cross_compiling" = yes; then |
| 1672 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1673 | else |
| 1674 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1675 | #line 1676 "configure" |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1676 | #include "confdefs.h" |
| 1677 | int main() { return 0; } |
| 1678 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1679 | if { (eval echo configure:1680: \"$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] | 1680 | then |
| 1681 | ac_cv_opt_olimit_ok=yes |
| 1682 | else |
| 1683 | echo "configure: failed program was:" >&5 |
| 1684 | cat conftest.$ac_ext >&5 |
| 1685 | rm -fr conftest* |
| 1686 | ac_cv_opt_olimit_ok=no |
| 1687 | fi |
| 1688 | rm -fr conftest* |
| 1689 | fi |
| 1690 | |
| 1691 | CC="$ac_save_cc" |
| 1692 | fi |
| 1693 | |
| 1694 | echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6 |
Guido van Rossum | 2efa34b | 1997-10-23 17:43:11 +0000 | [diff] [blame] | 1695 | if test $ac_cv_opt_olimit_ok = yes; then |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 1696 | case $ac_sys_system in |
| 1697 | Darwin*) OPT="$OPT" ;; |
| 1698 | *) OPT="$OPT -OPT:Olimit=0";; |
| 1699 | esac |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1700 | else |
| 1701 | echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1702 | echo "configure:1703: checking whether $CC accepts -Olimit 1500" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1703 | if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1704 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1705 | else |
| 1706 | ac_save_cc="$CC" |
| 1707 | CC="$CC -Olimit 1500" |
| 1708 | if test "$cross_compiling" = yes; then |
| 1709 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1710 | else |
| 1711 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1712 | #line 1713 "configure" |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1713 | #include "confdefs.h" |
| 1714 | int main() { return 0; } |
| 1715 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1716 | if { (eval echo configure:1717: \"$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] | 1717 | then |
| 1718 | ac_cv_olimit_ok=yes |
| 1719 | else |
| 1720 | echo "configure: failed program was:" >&5 |
| 1721 | cat conftest.$ac_ext >&5 |
| 1722 | rm -fr conftest* |
| 1723 | ac_cv_olimit_ok=no |
Guido van Rossum | 201afe5 | 1997-05-14 21:14:44 +0000 | [diff] [blame] | 1724 | fi |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1725 | rm -fr conftest* |
| 1726 | fi |
| 1727 | |
| 1728 | CC="$ac_save_cc" |
| 1729 | fi |
| 1730 | |
| 1731 | echo "$ac_t""$ac_cv_olimit_ok" 1>&6 |
| 1732 | if test $ac_cv_olimit_ok = yes; then |
| 1733 | OPT="$OPT -Olimit 1500" |
| 1734 | fi |
| 1735 | fi |
| 1736 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 1737 | # Check for enable-ipv6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 1738 | echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1739 | echo "configure:1740: checking whether to enable ipv6" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 1740 | # Check whether --enable-ipv6 or --disable-ipv6 was given. |
| 1741 | if test "${enable_ipv6+set}" = set; then |
| 1742 | enableval="$enable_ipv6" |
| 1743 | case "$enableval" in |
| 1744 | no) |
| 1745 | echo "$ac_t""no" 1>&6 |
| 1746 | ipv6=no |
| 1747 | ;; |
| 1748 | *) echo "$ac_t""yes" 1>&6 |
| 1749 | cat >> confdefs.h <<\EOF |
| 1750 | #define ENABLE_IPV6 1 |
| 1751 | EOF |
| 1752 | |
| 1753 | ipv6=yes |
| 1754 | ;; |
| 1755 | esac |
| 1756 | else |
| 1757 | if test "$cross_compiling" = yes; then |
| 1758 | echo "$ac_t""no" 1>&6 |
| 1759 | ipv6=no |
| 1760 | |
| 1761 | else |
| 1762 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1763 | #line 1764 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 1764 | #include "confdefs.h" |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1765 | /* AF_INET6 available check */ |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 1766 | #include <sys/types.h> |
| 1767 | #include <sys/socket.h> |
| 1768 | main() |
| 1769 | { |
| 1770 | if (socket(AF_INET6, SOCK_STREAM, 0) < 0) |
| 1771 | exit(1); |
| 1772 | else |
| 1773 | exit(0); |
| 1774 | } |
| 1775 | |
| 1776 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1777 | if { (eval echo configure:1778: \"$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] | 1778 | then |
| 1779 | echo "$ac_t""yes" 1>&6 |
| 1780 | cat >> confdefs.h <<\EOF |
| 1781 | #define ENABLE_IPV6 1 |
| 1782 | EOF |
| 1783 | |
| 1784 | ipv6=yes |
| 1785 | else |
| 1786 | echo "configure: failed program was:" >&5 |
| 1787 | cat conftest.$ac_ext >&5 |
| 1788 | rm -fr conftest* |
| 1789 | echo "$ac_t""no" 1>&6 |
| 1790 | ipv6=no |
| 1791 | fi |
| 1792 | rm -fr conftest* |
| 1793 | fi |
| 1794 | |
| 1795 | fi |
| 1796 | |
| 1797 | |
| 1798 | ipv6type=unknown |
| 1799 | ipv6lib=none |
| 1800 | ipv6trylibc=no |
| 1801 | |
| 1802 | if test "$ipv6" = "yes"; then |
| 1803 | echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1804 | echo "configure:1805: checking ipv6 stack type" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 1805 | for i in inria kame linux-glibc linux-inet6 toshiba v6d zeta; do |
| 1806 | case $i in |
| 1807 | inria) |
| 1808 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1809 | #line 1810 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 1810 | #include "confdefs.h" |
| 1811 | dnl |
| 1812 | #include <netinet/in.h> |
| 1813 | #ifdef IPV6_INRIA_VERSION |
| 1814 | yes |
| 1815 | #endif |
| 1816 | EOF |
| 1817 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1818 | egrep "yes" >/dev/null 2>&1; then |
| 1819 | rm -rf conftest* |
| 1820 | ipv6type=$i; |
| 1821 | OPT="-DINET6 $OPT" |
| 1822 | fi |
| 1823 | rm -f conftest* |
| 1824 | |
| 1825 | ;; |
| 1826 | kame) |
| 1827 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1828 | #line 1829 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 1829 | #include "confdefs.h" |
| 1830 | dnl |
| 1831 | #include <netinet/in.h> |
| 1832 | #ifdef __KAME__ |
| 1833 | yes |
| 1834 | #endif |
| 1835 | EOF |
| 1836 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1837 | egrep "yes" >/dev/null 2>&1; then |
| 1838 | rm -rf conftest* |
| 1839 | ipv6type=$i; |
| 1840 | ipv6lib=inet6 |
| 1841 | ipv6libdir=/usr/local/v6/lib |
| 1842 | ipv6trylibc=yes |
| 1843 | OPT="-DINET6 $OPT" |
| 1844 | fi |
| 1845 | rm -f conftest* |
| 1846 | |
| 1847 | ;; |
| 1848 | linux-glibc) |
| 1849 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1850 | #line 1851 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 1851 | #include "confdefs.h" |
| 1852 | dnl |
| 1853 | #include <features.h> |
| 1854 | #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) |
| 1855 | yes |
| 1856 | #endif |
| 1857 | EOF |
| 1858 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1859 | egrep "yes" >/dev/null 2>&1; then |
| 1860 | rm -rf conftest* |
| 1861 | ipv6type=$i; |
| 1862 | ipv6trylibc=yes |
| 1863 | OPT="-DINET6 $OPT" |
| 1864 | fi |
| 1865 | rm -f conftest* |
| 1866 | |
| 1867 | ;; |
| 1868 | linux-inet6) |
| 1869 | if test -d /usr/inet6; then |
| 1870 | ipv6type=$i |
| 1871 | ipv6lib=inet6 |
| 1872 | ipv6libdir=/usr/inet6/lib |
| 1873 | OPT="-DINET6 -I/usr/inet6/include $OPT" |
| 1874 | fi |
| 1875 | ;; |
| 1876 | toshiba) |
| 1877 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1878 | #line 1879 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 1879 | #include "confdefs.h" |
| 1880 | dnl |
| 1881 | #include <sys/param.h> |
| 1882 | #ifdef _TOSHIBA_INET6 |
| 1883 | yes |
| 1884 | #endif |
| 1885 | EOF |
| 1886 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1887 | egrep "yes" >/dev/null 2>&1; then |
| 1888 | rm -rf conftest* |
| 1889 | ipv6type=$i; |
| 1890 | ipv6lib=inet6; |
| 1891 | ipv6libdir=/usr/local/v6/lib; |
| 1892 | OPT="-DINET6 $OPT" |
| 1893 | fi |
| 1894 | rm -f conftest* |
| 1895 | |
| 1896 | ;; |
| 1897 | v6d) |
| 1898 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1899 | #line 1900 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 1900 | #include "confdefs.h" |
| 1901 | dnl |
| 1902 | #include </usr/local/v6/include/sys/v6config.h> |
| 1903 | #ifdef __V6D__ |
| 1904 | yes |
| 1905 | #endif |
| 1906 | EOF |
| 1907 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1908 | egrep "yes" >/dev/null 2>&1; then |
| 1909 | rm -rf conftest* |
| 1910 | ipv6type=$i; |
| 1911 | ipv6lib=v6; |
| 1912 | ipv6libdir=/usr/local/v6/lib; |
| 1913 | OPT="-I/usr/local/v6/include $OPT" |
| 1914 | fi |
| 1915 | rm -f conftest* |
| 1916 | |
| 1917 | ;; |
| 1918 | zeta) |
| 1919 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1920 | #line 1921 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 1921 | #include "confdefs.h" |
| 1922 | dnl |
| 1923 | #include <sys/param.h> |
| 1924 | #ifdef _ZETA_MINAMI_INET6 |
| 1925 | yes |
| 1926 | #endif |
| 1927 | EOF |
| 1928 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1929 | egrep "yes" >/dev/null 2>&1; then |
| 1930 | rm -rf conftest* |
| 1931 | ipv6type=$i; |
| 1932 | ipv6lib=inet6; |
| 1933 | ipv6libdir=/usr/local/v6/lib; |
| 1934 | OPT="-DINET6 $OPT" |
| 1935 | fi |
| 1936 | rm -f conftest* |
| 1937 | |
| 1938 | ;; |
| 1939 | esac |
| 1940 | if test "$ipv6type" != "unknown"; then |
| 1941 | break |
| 1942 | fi |
| 1943 | done |
| 1944 | echo "$ac_t""$ipv6type" 1>&6 |
| 1945 | fi |
| 1946 | |
| 1947 | if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then |
| 1948 | if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then |
| 1949 | LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" |
| 1950 | echo "using lib$ipv6lib" |
| 1951 | else |
| 1952 | if test $ipv6trylibc = "yes"; then |
| 1953 | echo "using libc" |
| 1954 | else |
| 1955 | echo 'Fatal: no $ipv6lib library found. cannot continue.' |
| 1956 | echo "You need to fetch lib$ipv6lib.a from appropriate" |
| 1957 | echo 'ipv6 kit and compile beforehand.' |
| 1958 | exit 1 |
| 1959 | fi |
| 1960 | fi |
| 1961 | fi |
| 1962 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1963 | # -Kpthread, if available, provides the right #defines |
| 1964 | # and linker options to make pthread_create available |
| 1965 | echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1966 | echo "configure:1967: checking whether $CC accepts -Kpthread" >&5 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1967 | if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then |
| 1968 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1969 | else |
| 1970 | ac_save_cc="$CC" |
| 1971 | CC="$CC -Kpthread" |
| 1972 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1973 | #line 1974 "configure" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1974 | #include "confdefs.h" |
| 1975 | #include <pthread.h> |
| 1976 | int main() { |
| 1977 | pthread_create(0,0,0,0) |
| 1978 | ; return 0; } |
| 1979 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1980 | if { (eval echo configure:1981: \"$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] | 1981 | rm -rf conftest* |
| 1982 | ac_cv_kpthread=yes |
| 1983 | else |
| 1984 | echo "configure: failed program was:" >&5 |
| 1985 | cat conftest.$ac_ext >&5 |
| 1986 | rm -rf conftest* |
| 1987 | ac_cv_kpthread=no |
| 1988 | fi |
| 1989 | rm -f conftest* |
| 1990 | CC="$ac_save_cc" |
| 1991 | fi |
| 1992 | |
| 1993 | |
| 1994 | # GCC does not reject -Kpthread as an illegal option, it merely complains that |
| 1995 | # it is unrecognized |
| 1996 | if test "$GCC" = "yes" |
| 1997 | then ac_cv_kpthread="no, we have gcc" |
| 1998 | fi |
| 1999 | echo "$ac_t""$ac_cv_kpthread" 1>&6 |
| 2000 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2001 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2002 | # checks for header files |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2003 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2004 | echo "configure:2005: checking for ANSI C header files" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2005 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2006 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2007 | else |
| 2008 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2009 | #line 2010 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2010 | #include "confdefs.h" |
| 2011 | #include <stdlib.h> |
| 2012 | #include <stdarg.h> |
| 2013 | #include <string.h> |
| 2014 | #include <float.h> |
| 2015 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2016 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2017 | { (eval echo configure:2018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2018 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2019 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2020 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2021 | ac_cv_header_stdc=yes |
| 2022 | else |
| 2023 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2024 | echo "configure: failed program was:" >&5 |
| 2025 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2026 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2027 | ac_cv_header_stdc=no |
| 2028 | fi |
| 2029 | rm -f conftest* |
| 2030 | |
| 2031 | if test $ac_cv_header_stdc = yes; then |
| 2032 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 2033 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2034 | #line 2035 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2035 | #include "confdefs.h" |
| 2036 | #include <string.h> |
| 2037 | EOF |
| 2038 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2039 | egrep "memchr" >/dev/null 2>&1; then |
| 2040 | : |
| 2041 | else |
| 2042 | rm -rf conftest* |
| 2043 | ac_cv_header_stdc=no |
| 2044 | fi |
| 2045 | rm -f conftest* |
| 2046 | |
| 2047 | fi |
| 2048 | |
| 2049 | if test $ac_cv_header_stdc = yes; then |
| 2050 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 2051 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2052 | #line 2053 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2053 | #include "confdefs.h" |
| 2054 | #include <stdlib.h> |
| 2055 | EOF |
| 2056 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2057 | egrep "free" >/dev/null 2>&1; then |
| 2058 | : |
| 2059 | else |
| 2060 | rm -rf conftest* |
| 2061 | ac_cv_header_stdc=no |
| 2062 | fi |
| 2063 | rm -f conftest* |
| 2064 | |
| 2065 | fi |
| 2066 | |
| 2067 | if test $ac_cv_header_stdc = yes; then |
| 2068 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| 2069 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2070 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2071 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2072 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2073 | #line 2074 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2074 | #include "confdefs.h" |
| 2075 | #include <ctype.h> |
| 2076 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 2077 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2078 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2079 | int main () { int i; for (i = 0; i < 256; i++) |
| 2080 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 2081 | exit (0); } |
| 2082 | |
| 2083 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2084 | if { (eval echo configure:2085: \"$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] | 2085 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2086 | : |
| 2087 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2088 | echo "configure: failed program was:" >&5 |
| 2089 | cat conftest.$ac_ext >&5 |
| 2090 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2091 | ac_cv_header_stdc=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2092 | fi |
| 2093 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2094 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2095 | |
| 2096 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2097 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2098 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2099 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2100 | if test $ac_cv_header_stdc = yes; then |
| 2101 | cat >> confdefs.h <<\EOF |
| 2102 | #define STDC_HEADERS 1 |
| 2103 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2104 | |
| 2105 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2106 | |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 2107 | 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] | 2108 | 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] | 2109 | 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] | 2110 | 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] | 2111 | 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] | 2112 | ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2113 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2114 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2115 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2116 | echo "configure:2117: checking for $ac_hdr" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2117 | 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] | 2118 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2119 | else |
| 2120 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2121 | #line 2122 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2122 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2123 | #include <$ac_hdr> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2124 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2125 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2126 | { (eval echo configure:2127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2127 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2128 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2129 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2130 | eval "ac_cv_header_$ac_safe=yes" |
| 2131 | else |
| 2132 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2133 | echo "configure: failed program was:" >&5 |
| 2134 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2135 | rm -rf conftest* |
| 2136 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2137 | fi |
| 2138 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2139 | fi |
| 2140 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2141 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2142 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2143 | cat >> confdefs.h <<EOF |
| 2144 | #define $ac_tr_hdr 1 |
| 2145 | EOF |
| 2146 | |
| 2147 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2148 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2149 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2150 | done |
| 2151 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2152 | ac_header_dirent=no |
| 2153 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h |
| 2154 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2155 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2156 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2157 | echo "configure:2158: checking for $ac_hdr that defines DIR" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2158 | 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] | 2159 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2160 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2161 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2162 | #line 2163 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2163 | #include "confdefs.h" |
| 2164 | #include <sys/types.h> |
| 2165 | #include <$ac_hdr> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2166 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2167 | DIR *dirp = 0; |
| 2168 | ; return 0; } |
| 2169 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2170 | if { (eval echo configure:2171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2171 | rm -rf conftest* |
| 2172 | eval "ac_cv_header_dirent_$ac_safe=yes" |
| 2173 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2174 | echo "configure: failed program was:" >&5 |
| 2175 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2176 | rm -rf conftest* |
| 2177 | eval "ac_cv_header_dirent_$ac_safe=no" |
| 2178 | fi |
| 2179 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2180 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2181 | 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] | 2182 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2183 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2184 | cat >> confdefs.h <<EOF |
| 2185 | #define $ac_tr_hdr 1 |
| 2186 | EOF |
| 2187 | ac_header_dirent=$ac_hdr; break |
| 2188 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2189 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2190 | fi |
| 2191 | done |
| 2192 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| 2193 | if test $ac_header_dirent = dirent.h; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2194 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2195 | echo "configure:2196: checking for opendir in -ldir" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2196 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2197 | 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] | 2198 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2199 | else |
| 2200 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2201 | LIBS="-ldir $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2202 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2203 | #line 2204 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2204 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2205 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2206 | /* We use char because int might match the return type of a gcc2 |
| 2207 | builtin and then its argument prototype would still apply. */ |
| 2208 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2209 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2210 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2211 | opendir() |
| 2212 | ; return 0; } |
| 2213 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2214 | if { (eval echo configure:2215: \"$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] | 2215 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2216 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2217 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2218 | echo "configure: failed program was:" >&5 |
| 2219 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2220 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2221 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2222 | fi |
| 2223 | rm -f conftest* |
| 2224 | LIBS="$ac_save_LIBS" |
| 2225 | |
| 2226 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2227 | 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] | 2228 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2229 | LIBS="$LIBS -ldir" |
| 2230 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2231 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2232 | fi |
| 2233 | |
| 2234 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2235 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2236 | echo "configure:2237: checking for opendir in -lx" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2237 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2238 | 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] | 2239 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2240 | else |
| 2241 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2242 | LIBS="-lx $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2243 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2244 | #line 2245 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2245 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2246 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2247 | /* We use char because int might match the return type of a gcc2 |
| 2248 | builtin and then its argument prototype would still apply. */ |
| 2249 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2250 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2251 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2252 | opendir() |
| 2253 | ; return 0; } |
| 2254 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2255 | if { (eval echo configure:2256: \"$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] | 2256 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2257 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2258 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2259 | echo "configure: failed program was:" >&5 |
| 2260 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2261 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2262 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2263 | fi |
| 2264 | rm -f conftest* |
| 2265 | LIBS="$ac_save_LIBS" |
| 2266 | |
| 2267 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2268 | 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] | 2269 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2270 | LIBS="$LIBS -lx" |
| 2271 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2272 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2273 | fi |
| 2274 | |
| 2275 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2276 | |
| 2277 | |
| 2278 | # checks for typedefs |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2279 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2280 | echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2281 | echo "configure:2282: checking for clock_t in time.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2282 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2283 | #line 2284 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2284 | #include "confdefs.h" |
| 2285 | #include <time.h> |
| 2286 | EOF |
| 2287 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2288 | egrep "clock_t" >/dev/null 2>&1; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2289 | rm -rf conftest* |
| 2290 | was_it_defined=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2291 | else |
| 2292 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2293 | cat >> confdefs.h <<\EOF |
| 2294 | #define clock_t long |
| 2295 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2296 | |
| 2297 | fi |
| 2298 | rm -f conftest* |
| 2299 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2300 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2301 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2302 | # Add some code to confdefs.h so that the test for off_t works on SCO |
| 2303 | cat >> confdefs.h <<\EOF |
| 2304 | #if defined(SCO_DS) |
| 2305 | #undef _OFF_T |
| 2306 | #endif |
| 2307 | EOF |
| 2308 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2309 | # Type availability checks |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2310 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2311 | echo "configure:2312: checking for mode_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2312 | 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] | 2313 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2314 | else |
| 2315 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2316 | #line 2317 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2317 | #include "confdefs.h" |
| 2318 | #include <sys/types.h> |
| 2319 | #if STDC_HEADERS |
| 2320 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2321 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2322 | #endif |
| 2323 | EOF |
| 2324 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2325 | 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] | 2326 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2327 | ac_cv_type_mode_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2328 | else |
| 2329 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2330 | ac_cv_type_mode_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2331 | fi |
| 2332 | rm -f conftest* |
| 2333 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2334 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2335 | echo "$ac_t""$ac_cv_type_mode_t" 1>&6 |
| 2336 | if test $ac_cv_type_mode_t = no; then |
| 2337 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2338 | #define mode_t int |
| 2339 | EOF |
| 2340 | |
| 2341 | fi |
| 2342 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2343 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2344 | echo "configure:2345: checking for off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2345 | 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] | 2346 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2347 | else |
| 2348 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2349 | #line 2350 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2350 | #include "confdefs.h" |
| 2351 | #include <sys/types.h> |
| 2352 | #if STDC_HEADERS |
| 2353 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2354 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2355 | #endif |
| 2356 | EOF |
| 2357 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2358 | 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] | 2359 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2360 | ac_cv_type_off_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2361 | else |
| 2362 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2363 | ac_cv_type_off_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2364 | fi |
| 2365 | rm -f conftest* |
| 2366 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2367 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2368 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
| 2369 | if test $ac_cv_type_off_t = no; then |
| 2370 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2371 | #define off_t long |
| 2372 | EOF |
| 2373 | |
| 2374 | fi |
| 2375 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2376 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2377 | echo "configure:2378: checking for pid_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2378 | 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] | 2379 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2380 | else |
| 2381 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2382 | #line 2383 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2383 | #include "confdefs.h" |
| 2384 | #include <sys/types.h> |
| 2385 | #if STDC_HEADERS |
| 2386 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2387 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2388 | #endif |
| 2389 | EOF |
| 2390 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2391 | 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] | 2392 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2393 | ac_cv_type_pid_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2394 | else |
| 2395 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2396 | ac_cv_type_pid_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2397 | fi |
| 2398 | rm -f conftest* |
| 2399 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2400 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2401 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
| 2402 | if test $ac_cv_type_pid_t = no; then |
| 2403 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2404 | #define pid_t int |
| 2405 | EOF |
| 2406 | |
| 2407 | fi |
| 2408 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2409 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2410 | echo "configure:2411: checking return type of signal handlers" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2411 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2412 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2413 | else |
| 2414 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2415 | #line 2416 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2416 | #include "confdefs.h" |
| 2417 | #include <sys/types.h> |
| 2418 | #include <signal.h> |
| 2419 | #ifdef signal |
| 2420 | #undef signal |
| 2421 | #endif |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2422 | #ifdef __cplusplus |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2423 | extern "C" void (*signal (int, void (*)(int)))(int); |
| 2424 | #else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2425 | void (*signal ()) (); |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2426 | #endif |
| 2427 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2428 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2429 | int i; |
| 2430 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2431 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2432 | if { (eval echo configure:2433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2433 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2434 | ac_cv_type_signal=void |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2435 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2436 | echo "configure: failed program was:" >&5 |
| 2437 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2438 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2439 | ac_cv_type_signal=int |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2440 | fi |
| 2441 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2442 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2443 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2444 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2445 | cat >> confdefs.h <<EOF |
| 2446 | #define RETSIGTYPE $ac_cv_type_signal |
| 2447 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2448 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2449 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2450 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2451 | echo "configure:2452: checking for size_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2452 | 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] | 2453 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2454 | else |
| 2455 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2456 | #line 2457 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2457 | #include "confdefs.h" |
| 2458 | #include <sys/types.h> |
| 2459 | #if STDC_HEADERS |
| 2460 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2461 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2462 | #endif |
| 2463 | EOF |
| 2464 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2465 | 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] | 2466 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2467 | ac_cv_type_size_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2468 | else |
| 2469 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2470 | ac_cv_type_size_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2471 | fi |
| 2472 | rm -f conftest* |
| 2473 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2474 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2475 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
| 2476 | if test $ac_cv_type_size_t = no; then |
| 2477 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2478 | #define size_t unsigned |
| 2479 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2480 | |
| 2481 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2482 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2483 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2484 | echo "configure:2485: checking for uid_t in sys/types.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2485 | 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] | 2486 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2487 | else |
| 2488 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2489 | #line 2490 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2490 | #include "confdefs.h" |
| 2491 | #include <sys/types.h> |
| 2492 | EOF |
| 2493 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2494 | egrep "uid_t" >/dev/null 2>&1; then |
| 2495 | rm -rf conftest* |
| 2496 | ac_cv_type_uid_t=yes |
| 2497 | else |
| 2498 | rm -rf conftest* |
| 2499 | ac_cv_type_uid_t=no |
| 2500 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2501 | rm -f conftest* |
| 2502 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2503 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2504 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2505 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2506 | if test $ac_cv_type_uid_t = no; then |
| 2507 | cat >> confdefs.h <<\EOF |
| 2508 | #define uid_t int |
| 2509 | EOF |
| 2510 | |
| 2511 | cat >> confdefs.h <<\EOF |
| 2512 | #define gid_t int |
| 2513 | EOF |
| 2514 | |
| 2515 | fi |
| 2516 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2517 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2518 | # Sizes of various common basic types |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2519 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2520 | echo "configure:2521: checking size of int" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2521 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2522 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2523 | else |
| 2524 | if test "$cross_compiling" = yes; then |
| 2525 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2526 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2527 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2528 | #line 2529 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2529 | #include "confdefs.h" |
| 2530 | #include <stdio.h> |
| 2531 | main() |
| 2532 | { |
| 2533 | FILE *f=fopen("conftestval", "w"); |
| 2534 | if (!f) exit(1); |
| 2535 | fprintf(f, "%d\n", sizeof(int)); |
| 2536 | exit(0); |
| 2537 | } |
| 2538 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2539 | if { (eval echo configure:2540: \"$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] | 2540 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2541 | ac_cv_sizeof_int=`cat conftestval` |
| 2542 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2543 | echo "configure: failed program was:" >&5 |
| 2544 | cat conftest.$ac_ext >&5 |
| 2545 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2546 | ac_cv_sizeof_int=0 |
| 2547 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2548 | rm -fr conftest* |
| 2549 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2550 | |
| 2551 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2552 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
| 2553 | cat >> confdefs.h <<EOF |
| 2554 | #define SIZEOF_INT $ac_cv_sizeof_int |
| 2555 | EOF |
| 2556 | |
| 2557 | |
| 2558 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2559 | echo "configure:2560: checking size of long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2560 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2561 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2562 | else |
| 2563 | if test "$cross_compiling" = yes; then |
| 2564 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2565 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2566 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2567 | #line 2568 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2568 | #include "confdefs.h" |
| 2569 | #include <stdio.h> |
| 2570 | main() |
| 2571 | { |
| 2572 | FILE *f=fopen("conftestval", "w"); |
| 2573 | if (!f) exit(1); |
| 2574 | fprintf(f, "%d\n", sizeof(long)); |
| 2575 | exit(0); |
| 2576 | } |
| 2577 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2578 | if { (eval echo configure:2579: \"$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] | 2579 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2580 | ac_cv_sizeof_long=`cat conftestval` |
| 2581 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2582 | echo "configure: failed program was:" >&5 |
| 2583 | cat conftest.$ac_ext >&5 |
| 2584 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2585 | ac_cv_sizeof_long=0 |
| 2586 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2587 | rm -fr conftest* |
| 2588 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2589 | |
| 2590 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2591 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
| 2592 | cat >> confdefs.h <<EOF |
| 2593 | #define SIZEOF_LONG $ac_cv_sizeof_long |
| 2594 | EOF |
| 2595 | |
| 2596 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2597 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2598 | echo "configure:2599: checking size of void *" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2599 | 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] | 2600 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2601 | else |
| 2602 | if test "$cross_compiling" = yes; then |
| 2603 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2604 | else |
| 2605 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2606 | #line 2607 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2607 | #include "confdefs.h" |
| 2608 | #include <stdio.h> |
| 2609 | main() |
| 2610 | { |
| 2611 | FILE *f=fopen("conftestval", "w"); |
| 2612 | if (!f) exit(1); |
| 2613 | fprintf(f, "%d\n", sizeof(void *)); |
| 2614 | exit(0); |
| 2615 | } |
| 2616 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2617 | if { (eval echo configure:2618: \"$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] | 2618 | then |
| 2619 | ac_cv_sizeof_void_p=`cat conftestval` |
| 2620 | else |
| 2621 | echo "configure: failed program was:" >&5 |
| 2622 | cat conftest.$ac_ext >&5 |
| 2623 | rm -fr conftest* |
| 2624 | ac_cv_sizeof_void_p=0 |
| 2625 | fi |
| 2626 | rm -fr conftest* |
| 2627 | fi |
| 2628 | |
| 2629 | fi |
| 2630 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 |
| 2631 | cat >> confdefs.h <<EOF |
| 2632 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
| 2633 | EOF |
| 2634 | |
| 2635 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2636 | echo $ac_n "checking size of char""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2637 | echo "configure:2638: checking size of char" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2638 | if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2639 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2640 | else |
| 2641 | if test "$cross_compiling" = yes; then |
| 2642 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2643 | else |
| 2644 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2645 | #line 2646 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2646 | #include "confdefs.h" |
| 2647 | #include <stdio.h> |
| 2648 | main() |
| 2649 | { |
| 2650 | FILE *f=fopen("conftestval", "w"); |
| 2651 | if (!f) exit(1); |
| 2652 | fprintf(f, "%d\n", sizeof(char)); |
| 2653 | exit(0); |
| 2654 | } |
| 2655 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2656 | if { (eval echo configure:2657: \"$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] | 2657 | then |
| 2658 | ac_cv_sizeof_char=`cat conftestval` |
| 2659 | else |
| 2660 | echo "configure: failed program was:" >&5 |
| 2661 | cat conftest.$ac_ext >&5 |
| 2662 | rm -fr conftest* |
| 2663 | ac_cv_sizeof_char=0 |
| 2664 | fi |
| 2665 | rm -fr conftest* |
| 2666 | fi |
| 2667 | |
| 2668 | fi |
| 2669 | echo "$ac_t""$ac_cv_sizeof_char" 1>&6 |
| 2670 | cat >> confdefs.h <<EOF |
| 2671 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
| 2672 | EOF |
| 2673 | |
| 2674 | |
| 2675 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2676 | echo "configure:2677: checking size of short" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2677 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2678 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2679 | else |
| 2680 | if test "$cross_compiling" = yes; then |
| 2681 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2682 | else |
| 2683 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2684 | #line 2685 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2685 | #include "confdefs.h" |
| 2686 | #include <stdio.h> |
| 2687 | main() |
| 2688 | { |
| 2689 | FILE *f=fopen("conftestval", "w"); |
| 2690 | if (!f) exit(1); |
| 2691 | fprintf(f, "%d\n", sizeof(short)); |
| 2692 | exit(0); |
| 2693 | } |
| 2694 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2695 | if { (eval echo configure:2696: \"$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] | 2696 | then |
| 2697 | ac_cv_sizeof_short=`cat conftestval` |
| 2698 | else |
| 2699 | echo "configure: failed program was:" >&5 |
| 2700 | cat conftest.$ac_ext >&5 |
| 2701 | rm -fr conftest* |
| 2702 | ac_cv_sizeof_short=0 |
| 2703 | fi |
| 2704 | rm -fr conftest* |
| 2705 | fi |
| 2706 | |
| 2707 | fi |
| 2708 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
| 2709 | cat >> confdefs.h <<EOF |
| 2710 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
| 2711 | EOF |
| 2712 | |
| 2713 | |
| 2714 | echo $ac_n "checking size of float""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2715 | echo "configure:2716: checking size of float" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2716 | if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2717 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2718 | else |
| 2719 | if test "$cross_compiling" = yes; then |
| 2720 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2721 | else |
| 2722 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2723 | #line 2724 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2724 | #include "confdefs.h" |
| 2725 | #include <stdio.h> |
| 2726 | main() |
| 2727 | { |
| 2728 | FILE *f=fopen("conftestval", "w"); |
| 2729 | if (!f) exit(1); |
| 2730 | fprintf(f, "%d\n", sizeof(float)); |
| 2731 | exit(0); |
| 2732 | } |
| 2733 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2734 | if { (eval echo configure:2735: \"$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] | 2735 | then |
| 2736 | ac_cv_sizeof_float=`cat conftestval` |
| 2737 | else |
| 2738 | echo "configure: failed program was:" >&5 |
| 2739 | cat conftest.$ac_ext >&5 |
| 2740 | rm -fr conftest* |
| 2741 | ac_cv_sizeof_float=0 |
| 2742 | fi |
| 2743 | rm -fr conftest* |
| 2744 | fi |
| 2745 | |
| 2746 | fi |
| 2747 | echo "$ac_t""$ac_cv_sizeof_float" 1>&6 |
| 2748 | cat >> confdefs.h <<EOF |
| 2749 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
| 2750 | EOF |
| 2751 | |
| 2752 | |
| 2753 | echo $ac_n "checking size of double""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2754 | echo "configure:2755: checking size of double" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2755 | if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2756 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2757 | else |
| 2758 | if test "$cross_compiling" = yes; then |
| 2759 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2760 | else |
| 2761 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2762 | #line 2763 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2763 | #include "confdefs.h" |
| 2764 | #include <stdio.h> |
| 2765 | main() |
| 2766 | { |
| 2767 | FILE *f=fopen("conftestval", "w"); |
| 2768 | if (!f) exit(1); |
| 2769 | fprintf(f, "%d\n", sizeof(double)); |
| 2770 | exit(0); |
| 2771 | } |
| 2772 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2773 | if { (eval echo configure:2774: \"$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] | 2774 | then |
| 2775 | ac_cv_sizeof_double=`cat conftestval` |
| 2776 | else |
| 2777 | echo "configure: failed program was:" >&5 |
| 2778 | cat conftest.$ac_ext >&5 |
| 2779 | rm -fr conftest* |
| 2780 | ac_cv_sizeof_double=0 |
| 2781 | fi |
| 2782 | rm -fr conftest* |
| 2783 | fi |
| 2784 | |
| 2785 | fi |
| 2786 | echo "$ac_t""$ac_cv_sizeof_double" 1>&6 |
| 2787 | cat >> confdefs.h <<EOF |
| 2788 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
| 2789 | EOF |
| 2790 | |
| 2791 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2792 | echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2793 | echo "configure:2794: checking size of fpos_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2794 | 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] | 2795 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2796 | else |
| 2797 | if test "$cross_compiling" = yes; then |
| 2798 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2799 | else |
| 2800 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2801 | #line 2802 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2802 | #include "confdefs.h" |
| 2803 | #include <stdio.h> |
| 2804 | main() |
| 2805 | { |
| 2806 | FILE *f=fopen("conftestval", "w"); |
| 2807 | if (!f) exit(1); |
| 2808 | fprintf(f, "%d\n", sizeof(fpos_t)); |
| 2809 | exit(0); |
| 2810 | } |
| 2811 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2812 | if { (eval echo configure:2813: \"$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] | 2813 | then |
| 2814 | ac_cv_sizeof_fpos_t=`cat conftestval` |
| 2815 | else |
| 2816 | echo "configure: failed program was:" >&5 |
| 2817 | cat conftest.$ac_ext >&5 |
| 2818 | rm -fr conftest* |
| 2819 | ac_cv_sizeof_fpos_t=0 |
| 2820 | fi |
| 2821 | rm -fr conftest* |
| 2822 | fi |
| 2823 | |
| 2824 | fi |
| 2825 | echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6 |
| 2826 | cat >> confdefs.h <<EOF |
| 2827 | #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t |
| 2828 | EOF |
| 2829 | |
| 2830 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2831 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2832 | echo $ac_n "checking for long long support""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2833 | echo "configure:2834: checking for long long support" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2834 | have_long_long=no |
| 2835 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2836 | #line 2837 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2837 | #include "confdefs.h" |
| 2838 | |
| 2839 | int main() { |
| 2840 | long long x; x = (long long)0; |
| 2841 | ; return 0; } |
| 2842 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2843 | if { (eval echo configure:2844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2844 | rm -rf conftest* |
| 2845 | cat >> confdefs.h <<\EOF |
| 2846 | #define HAVE_LONG_LONG 1 |
| 2847 | EOF |
| 2848 | have_long_long=yes |
| 2849 | else |
| 2850 | echo "configure: failed program was:" >&5 |
| 2851 | cat conftest.$ac_ext >&5 |
| 2852 | fi |
| 2853 | rm -f conftest* |
| 2854 | echo "$ac_t""$have_long_long" 1>&6 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2855 | if test "$have_long_long" = yes ; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2856 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2857 | echo "configure:2858: checking size of long long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2858 | 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] | 2859 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2860 | else |
| 2861 | if test "$cross_compiling" = yes; then |
| 2862 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2863 | else |
| 2864 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2865 | #line 2866 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2866 | #include "confdefs.h" |
| 2867 | #include <stdio.h> |
| 2868 | main() |
| 2869 | { |
| 2870 | FILE *f=fopen("conftestval", "w"); |
| 2871 | if (!f) exit(1); |
| 2872 | fprintf(f, "%d\n", sizeof(long long)); |
| 2873 | exit(0); |
| 2874 | } |
| 2875 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2876 | if { (eval echo configure:2877: \"$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] | 2877 | then |
| 2878 | ac_cv_sizeof_long_long=`cat conftestval` |
| 2879 | else |
| 2880 | echo "configure: failed program was:" >&5 |
| 2881 | cat conftest.$ac_ext >&5 |
| 2882 | rm -fr conftest* |
| 2883 | ac_cv_sizeof_long_long=0 |
| 2884 | fi |
| 2885 | rm -fr conftest* |
| 2886 | fi |
| 2887 | |
| 2888 | fi |
| 2889 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
| 2890 | cat >> confdefs.h <<EOF |
| 2891 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 2892 | EOF |
| 2893 | |
| 2894 | |
| 2895 | fi |
| 2896 | |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2897 | echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2898 | echo "configure:2899: checking for uintptr_t support" >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2899 | have_uintptr_t=no |
| 2900 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2901 | #line 2902 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2902 | #include "confdefs.h" |
| 2903 | |
| 2904 | int main() { |
| 2905 | uintptr_t x; x = (uintptr_t)0; |
| 2906 | ; return 0; } |
| 2907 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2908 | if { (eval echo configure:2909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2909 | rm -rf conftest* |
| 2910 | cat >> confdefs.h <<\EOF |
| 2911 | #define HAVE_UINTPTR_T 1 |
| 2912 | EOF |
| 2913 | have_uintptr_t=yes |
| 2914 | else |
| 2915 | echo "configure: failed program was:" >&5 |
| 2916 | cat conftest.$ac_ext >&5 |
| 2917 | fi |
| 2918 | rm -f conftest* |
| 2919 | echo "$ac_t""$have_uintptr_t" 1>&6 |
| 2920 | if test "$have_uintptr_t" = yes ; then |
| 2921 | echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2922 | echo "configure:2923: checking size of uintptr_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2923 | if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2924 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2925 | else |
| 2926 | if test "$cross_compiling" = yes; then |
| 2927 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2928 | else |
| 2929 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2930 | #line 2931 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2931 | #include "confdefs.h" |
| 2932 | #include <stdio.h> |
| 2933 | main() |
| 2934 | { |
| 2935 | FILE *f=fopen("conftestval", "w"); |
| 2936 | if (!f) exit(1); |
| 2937 | fprintf(f, "%d\n", sizeof(uintptr_t)); |
| 2938 | exit(0); |
| 2939 | } |
| 2940 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2941 | if { (eval echo configure:2942: \"$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] | 2942 | then |
| 2943 | ac_cv_sizeof_uintptr_t=`cat conftestval` |
| 2944 | else |
| 2945 | echo "configure: failed program was:" >&5 |
| 2946 | cat conftest.$ac_ext >&5 |
| 2947 | rm -fr conftest* |
| 2948 | ac_cv_sizeof_uintptr_t=0 |
| 2949 | fi |
| 2950 | rm -fr conftest* |
| 2951 | fi |
| 2952 | |
| 2953 | fi |
| 2954 | echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6 |
| 2955 | cat >> confdefs.h <<EOF |
| 2956 | #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t |
| 2957 | EOF |
| 2958 | |
| 2959 | |
| 2960 | fi |
| 2961 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2962 | # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>. |
| 2963 | echo $ac_n "checking size of off_t""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2964 | echo "configure:2965: checking size of off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2965 | 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] | 2966 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2967 | else |
| 2968 | if test "$cross_compiling" = yes; then |
| 2969 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2970 | else |
| 2971 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2972 | #line 2973 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2973 | #include "confdefs.h" |
| 2974 | #include <stdio.h> |
| 2975 | #include <sys/types.h> |
| 2976 | main() |
| 2977 | { |
| 2978 | FILE *f=fopen("conftestval", "w"); |
| 2979 | if (!f) exit(1); |
| 2980 | fprintf(f, "%d\n", sizeof(off_t)); |
| 2981 | exit(0); |
| 2982 | } |
| 2983 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2984 | if { (eval echo configure:2985: \"$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] | 2985 | then |
| 2986 | ac_cv_sizeof_off_t=`cat conftestval` |
| 2987 | else |
| 2988 | echo "configure: failed program was:" >&5 |
| 2989 | cat conftest.$ac_ext >&5 |
| 2990 | rm -fr conftest* |
| 2991 | ac_cv_sizeof_off_t=0 |
| 2992 | fi |
| 2993 | rm -fr conftest* |
| 2994 | fi |
| 2995 | |
| 2996 | |
| 2997 | fi |
| 2998 | |
| 2999 | echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6 |
| 3000 | cat >> confdefs.h <<EOF |
| 3001 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
| 3002 | EOF |
| 3003 | |
| 3004 | |
| 3005 | echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3006 | echo "configure:3007: checking whether to enable large file support" >&5 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 3007 | if test "$have_long_long" = yes -a \ |
| 3008 | "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ |
| 3009 | "$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] | 3010 | cat >> confdefs.h <<\EOF |
| 3011 | #define HAVE_LARGEFILE_SUPPORT 1 |
| 3012 | EOF |
| 3013 | |
| 3014 | echo "$ac_t""yes" 1>&6 |
| 3015 | else |
| 3016 | echo "$ac_t""no" 1>&6 |
| 3017 | fi |
| 3018 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 3019 | # AC_CHECK_SIZEOF() doesn't include <time.h>. |
| 3020 | echo $ac_n "checking size of time_t""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3021 | echo "configure:3022: checking size of time_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3022 | 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] | 3023 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3024 | else |
| 3025 | if test "$cross_compiling" = yes; then |
| 3026 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 3027 | else |
| 3028 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3029 | #line 3030 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 3030 | #include "confdefs.h" |
| 3031 | #include <stdio.h> |
| 3032 | #include <time.h> |
| 3033 | main() |
| 3034 | { |
| 3035 | FILE *f=fopen("conftestval", "w"); |
| 3036 | if (!f) exit(1); |
| 3037 | fprintf(f, "%d\n", sizeof(time_t)); |
| 3038 | exit(0); |
| 3039 | } |
| 3040 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3041 | if { (eval echo configure:3042: \"$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] | 3042 | then |
| 3043 | ac_cv_sizeof_time_t=`cat conftestval` |
| 3044 | else |
| 3045 | echo "configure: failed program was:" >&5 |
| 3046 | cat conftest.$ac_ext >&5 |
| 3047 | rm -fr conftest* |
| 3048 | ac_cv_sizeof_time_t=0 |
| 3049 | fi |
| 3050 | rm -fr conftest* |
| 3051 | fi |
| 3052 | |
| 3053 | |
| 3054 | fi |
| 3055 | |
| 3056 | echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 |
| 3057 | cat >> confdefs.h <<EOF |
| 3058 | #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
| 3059 | EOF |
| 3060 | |
| 3061 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 3062 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3063 | # if have pthread_t then define SIZEOF_PTHREAD_T |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 3064 | ac_save_cc="$CC" |
| 3065 | if test "$ac_cv_kpthread" = "yes" |
| 3066 | then CC="$CC -Kpthread" |
| 3067 | fi |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3068 | echo $ac_n "checking for pthread_t""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3069 | echo "configure:3070: checking for pthread_t" >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3070 | have_pthread_t=no |
| 3071 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3072 | #line 3073 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3073 | #include "confdefs.h" |
| 3074 | #include <pthread.h> |
| 3075 | int main() { |
Guido van Rossum | 1258049 | 2000-09-24 16:47:19 +0000 | [diff] [blame] | 3076 | pthread_t x; x = *(pthread_t*)0; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3077 | ; return 0; } |
| 3078 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3079 | if { (eval echo configure:3080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3080 | rm -rf conftest* |
| 3081 | have_pthread_t=yes |
| 3082 | else |
| 3083 | echo "configure: failed program was:" >&5 |
| 3084 | cat conftest.$ac_ext >&5 |
| 3085 | fi |
| 3086 | rm -f conftest* |
| 3087 | echo "$ac_t""$have_pthread_t" 1>&6 |
| 3088 | if test "$have_pthread_t" = yes ; then |
| 3089 | # AC_CHECK_SIZEOF() doesn't include <pthread.h>. |
| 3090 | echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3091 | echo "configure:3092: checking size of pthread_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3092 | if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3093 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3094 | else |
| 3095 | if test "$cross_compiling" = yes; then |
| 3096 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 3097 | else |
| 3098 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3099 | #line 3100 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3100 | #include "confdefs.h" |
| 3101 | #include <stdio.h> |
| 3102 | #include <pthread.h> |
| 3103 | main() |
| 3104 | { |
| 3105 | FILE *f=fopen("conftestval", "w"); |
| 3106 | if (!f) exit(1); |
| 3107 | fprintf(f, "%d\n", sizeof(pthread_t)); |
| 3108 | exit(0); |
| 3109 | } |
| 3110 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3111 | if { (eval echo configure:3112: \"$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] | 3112 | then |
| 3113 | ac_cv_sizeof_pthread_t=`cat conftestval` |
| 3114 | else |
| 3115 | echo "configure: failed program was:" >&5 |
| 3116 | cat conftest.$ac_ext >&5 |
| 3117 | rm -fr conftest* |
| 3118 | ac_cv_sizeof_pthread_t=0 |
| 3119 | fi |
| 3120 | rm -fr conftest* |
| 3121 | fi |
| 3122 | |
| 3123 | |
| 3124 | fi |
| 3125 | |
| 3126 | echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6 |
| 3127 | cat >> confdefs.h <<EOF |
| 3128 | #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t |
| 3129 | EOF |
| 3130 | |
| 3131 | fi |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 3132 | CC="$ac_save_cc" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3133 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3134 | # Minor variations in building a framework between NextStep versions 4 and 5 |
| 3135 | |
| 3136 | case $ac_sys_system/$ac_sys_release in |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 3137 | Darwin/*) |
| 3138 | ns_undef_sym='_environ' |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 3139 | 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] | 3140 | next/4*) |
| 3141 | ns_undef_sym='__environ' |
| 3142 | LIBTOOL_CRUFT="-U $ns_undef_sym" ;; |
| 3143 | next/5*) |
| 3144 | ns_undef_sym='_environ' |
| 3145 | LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;; |
| 3146 | esac |
| 3147 | |
| 3148 | echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3149 | echo "configure:3150: checking for --with-next-framework" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3150 | if test "$with_next_framework" |
| 3151 | then |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 3152 | OPT="$OPT -fno-common -dynamic" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3153 | # -U __environ is needed since bundles don't have access |
| 3154 | # to crt0 when built but will always be linked against it |
| 3155 | LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym" |
| 3156 | cat >> confdefs.h <<\EOF |
| 3157 | #define WITH_NEXT_FRAMEWORK 1 |
| 3158 | EOF |
| 3159 | |
| 3160 | echo "$ac_t""yes" 1>&6 |
| 3161 | else |
| 3162 | echo "$ac_t""no" 1>&6 |
| 3163 | fi |
| 3164 | |
| 3165 | echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3166 | echo "configure:3167: checking for --with-dyld" >&5 |
| 3167 | case $ac_sys_system/$ac_sys_release in |
| 3168 | Darwin/*) |
| 3169 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3170 | #define WITH_DYLD 1 |
| 3171 | EOF |
| 3172 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3173 | echo "$ac_t""always on for Darwin" 1>&6 |
| 3174 | ;; |
| 3175 | *) |
| 3176 | if test "$with_next_framework" -o "$with_dyld" |
| 3177 | then |
| 3178 | if test "$with_dyld" |
| 3179 | then |
| 3180 | echo "$ac_t""yes" 1>&6 |
| 3181 | else |
| 3182 | echo "$ac_t""required for framework build" 1>&6 |
| 3183 | fi |
| 3184 | cat >> confdefs.h <<\EOF |
| 3185 | #define WITH_DYLD 1 |
| 3186 | EOF |
| 3187 | |
| 3188 | ns_dyld='set' |
| 3189 | else |
| 3190 | echo "$ac_t""no" 1>&6 |
| 3191 | fi ;; |
| 3192 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3193 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3194 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3195 | |
| 3196 | |
| 3197 | |
| 3198 | |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3199 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3200 | # SO is the extension of shared libraries `(including the dot!) |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3201 | # -- usually .so, .sl on HP-UX, .dll on Cygwin |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3202 | echo $ac_n "checking SO""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3203 | echo "configure:3204: checking SO" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3204 | if test -z "$SO" |
| 3205 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3206 | case $ac_sys_system in |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3207 | hp*|HP*) SO=.sl;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3208 | CYGWIN*) SO=.dll;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3209 | *) SO=.so;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3210 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3211 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3212 | echo "$ac_t""$SO" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3213 | # LDSHARED is the ld *command* used to create shared library |
| 3214 | # -- "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] | 3215 | # (Shared libraries in this instance are shared modules to be loaded into |
| 3216 | # Python, as opposed to building Python itself as a shared library.) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3217 | echo $ac_n "checking LDSHARED""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3218 | echo "configure:3219: checking LDSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3219 | if test -z "$LDSHARED" |
| 3220 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3221 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3222 | AIX*) |
| 3223 | BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" |
| 3224 | LDSHARED="\$(BINLIBDEST)/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/python.exp" |
| 3225 | ;; |
| 3226 | BeOS*) |
| 3227 | BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY" |
| 3228 | LDSHARED="\$(BINLIBDEST)/ld_so_beos \$(LIBDIR)/$LDLIBRARY" |
| 3229 | ;; |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3230 | IRIX/5*) LDSHARED="ld -shared";; |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 3231 | IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3232 | SunOS/4*) LDSHARED="ld";; |
Greg Ward | 57c9a66 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3233 | SunOS/5*) |
| 3234 | if test "$GCC" = "yes" |
Neil Schemenauer | 8ba9445 | 2001-02-19 18:18:48 +0000 | [diff] [blame] | 3235 | then LDSHARED='$(CC) -shared' |
Greg Ward | 57c9a66 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3236 | else LDSHARED="ld -G"; |
| 3237 | fi ;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3238 | hp*|HP*) LDSHARED="ld -b";; |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3239 | OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; |
| 3240 | DYNIX/ptx*) LDSHARED="ld -G";; |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3241 | Darwin/*) |
| 3242 | LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress' |
| 3243 | if test "$with_next_framework" ; then |
| 3244 | LDSHARED="$LDSHARED \$(LDLIBRARY)" |
| 3245 | fi ;; |
| 3246 | next/*) |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3247 | if test "$ns_dyld" |
Guido van Rossum | acb14c7 | 2001-01-10 21:41:16 +0000 | [diff] [blame] | 3248 | then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress' |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3249 | else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r'; |
| 3250 | fi |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 3251 | if test "$with_next_framework" ; then |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3252 | LDSHARED="$LDSHARED \$(LDLIBRARY)" |
| 3253 | fi ;; |
Guido van Rossum | 81652ab | 1996-07-21 02:53:27 +0000 | [diff] [blame] | 3254 | Linux*) LDSHARED="gcc -shared";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 3255 | dgux*) LDSHARED="ld -G";; |
Guido van Rossum | 458e7fa | 1999-09-17 15:40:40 +0000 | [diff] [blame] | 3256 | BSD/OS*/4*) LDSHARED="gcc -shared";; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3257 | OpenBSD*) LDSHARED="ld -Bshareable";; |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 3258 | NetBSD*) |
| 3259 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 3260 | then |
| 3261 | LDSHARED="cc -shared" |
| 3262 | else |
| 3263 | LDSHARED="ld -Bshareable" |
| 3264 | fi;; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3265 | FreeBSD*) |
Jeremy Hylton | 4bcc7c5 | 2000-08-31 17:45:35 +0000 | [diff] [blame] | 3266 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3267 | then |
| 3268 | LDSHARED="cc -shared ${LDFLAGS}" |
| 3269 | else |
| 3270 | LDSHARED="ld -Bshareable ${LDFLAGS}" |
| 3271 | fi;; |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3272 | UnixWare*) |
| 3273 | if test "$GCC" = "yes" |
| 3274 | then LDSHARED="$(CC) -shared" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3275 | else LDSHARED="$(CC) -G" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3276 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3277 | SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3278 | Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3279 | CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3280 | *) LDSHARED="ld";; |
| 3281 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3282 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3283 | echo "$ac_t""$LDSHARED" 1>&6 |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3284 | BLDSHARED=${BLDSHARED-$LDSHARED} |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3285 | # 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] | 3286 | # library (module) -- this is only needed for a few systems |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3287 | echo $ac_n "checking CCSHARED""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3288 | echo "configure:3289: checking CCSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3289 | if test -z "$CCSHARED" |
| 3290 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3291 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 3292 | SunOS*) if test "$GCC" = yes; |
| 3293 | then CCSHARED="-fPIC"; |
| 3294 | fi;; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3295 | hp*|HP*) if test "$GCC" = yes; |
| 3296 | then CCSHARED="-fpic"; |
| 3297 | else CCSHARED="+z"; |
| 3298 | fi;; |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3299 | Linux*) CCSHARED="-fPIC";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3300 | BSD/OS*/4*) CCSHARED="-fpic";; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3301 | OpenBSD*) CCSHARED="-fpic";; |
| 3302 | FreeBSD*|NetBSD*) CCSHARED="-fPIC";; |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3303 | UnixWare*) |
| 3304 | if test "$GCC" = "yes" |
| 3305 | then CCSHARED="-fPIC" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3306 | else CCSHARED="-KPIC" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3307 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3308 | SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3309 | Monterey*) CCSHARED="-G";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3310 | IRIX*/6*) case $CC in |
| 3311 | *gcc*) CCSHARED="-shared";; |
Guido van Rossum | ee21f41 | 1998-04-20 18:51:54 +0000 | [diff] [blame] | 3312 | *) CCSHARED="";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3313 | esac;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3314 | CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3315 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3316 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3317 | echo "$ac_t""$CCSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3318 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3319 | # the python executable -- this is only needed for a few systems |
| 3320 | echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3321 | echo "configure:3322: checking LINKFORSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3322 | if test -z "$LINKFORSHARED" |
| 3323 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3324 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3325 | AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 3326 | hp*|HP*) |
Guido van Rossum | 304dd2d | 1997-10-20 23:10:56 +0000 | [diff] [blame] | 3327 | LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3328 | BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 2d9feed | 1997-11-24 17:36:21 +0000 | [diff] [blame] | 3329 | Linux*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3330 | # -u libsys_s pulls in all symbols in libsys |
| 3331 | next/2*|next/3*) LINKFORSHARED="-u libsys_s";; |
| 3332 | # -u __dummy makes the linker aware of the objc runtime |
| 3333 | # in System.framework; otherwise, __objcInit (referenced in |
| 3334 | # crt1.o) gets erroneously defined as common, which breaks dynamic |
| 3335 | # loading of any modules which reference it in System.framework |
| 3336 | next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;; |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 3337 | 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] | 3338 | UnixWare*) LINKFORSHARED="-Wl,-Bexport";; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3339 | SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3340 | ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3341 | FreeBSD*|NetBSD*) |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 3342 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 3343 | then |
| 3344 | LINKFORSHARED="-Wl,--export-dynamic" |
| 3345 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3346 | SunOS/5*) case $CC in |
| 3347 | *gcc*) |
Guido van Rossum | ff48418 | 2000-02-03 13:50:24 +0000 | [diff] [blame] | 3348 | if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 3349 | then |
| 3350 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3351 | fi;; |
| 3352 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3353 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3354 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3355 | echo "$ac_t""$LINKFORSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3356 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3357 | |
| 3358 | echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3359 | echo "configure:3360: checking CFLAGSFORSHARED" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3360 | if test ! "$LIBRARY" = "$LDLIBRARY" |
| 3361 | then |
Neil Schemenauer | 0c6141f | 2001-01-27 21:40:54 +0000 | [diff] [blame] | 3362 | case $ac_sys_system in |
| 3363 | CYGWIN*) |
| 3364 | # Cygwin needs CCSHARED when building extension DLLs |
| 3365 | # but not when building the interpreter DLL. |
| 3366 | CFLAGSFORSHARED='';; |
| 3367 | *) |
| 3368 | CFLAGSFORSHARED='$(CCSHARED)' |
| 3369 | esac |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3370 | fi |
| 3371 | echo "$ac_t""$CFLAGSFORSHARED" 1>&6 |
| 3372 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3373 | # checks for libraries |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3374 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3375 | echo "configure:3376: checking for dlopen in -ldl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3376 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3377 | 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] | 3378 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3379 | else |
| 3380 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3381 | LIBS="-ldl $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3382 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3383 | #line 3384 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3384 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3385 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3386 | /* We use char because int might match the return type of a gcc2 |
| 3387 | builtin and then its argument prototype would still apply. */ |
| 3388 | char dlopen(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3389 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3390 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3391 | dlopen() |
| 3392 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3393 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3394 | if { (eval echo configure:3395: \"$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] | 3395 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3396 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3397 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3398 | echo "configure: failed program was:" >&5 |
| 3399 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3400 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3401 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3402 | fi |
| 3403 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3404 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3405 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3406 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3407 | 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] | 3408 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3409 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3410 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3411 | cat >> confdefs.h <<EOF |
| 3412 | #define $ac_tr_lib 1 |
| 3413 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3414 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3415 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3416 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3417 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3418 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3419 | fi |
| 3420 | # Dynamic linking for SunOS/Solaris and SYSV |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3421 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3422 | echo "configure:3423: checking for shl_load in -ldld" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3423 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3424 | 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] | 3425 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3426 | else |
| 3427 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3428 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3429 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3430 | #line 3431 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3431 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3432 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3433 | /* We use char because int might match the return type of a gcc2 |
| 3434 | builtin and then its argument prototype would still apply. */ |
| 3435 | char shl_load(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3436 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3437 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3438 | shl_load() |
| 3439 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3440 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3441 | if { (eval echo configure:3442: \"$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] | 3442 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3443 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3444 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3445 | echo "configure: failed program was:" >&5 |
| 3446 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3447 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3448 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3449 | fi |
| 3450 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3451 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3452 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3453 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3454 | 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] | 3455 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3456 | ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3457 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3458 | cat >> confdefs.h <<EOF |
| 3459 | #define $ac_tr_lib 1 |
| 3460 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3461 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3462 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3463 | |
| 3464 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3465 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3466 | fi |
| 3467 | # Dynamic linking for HP-UX |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3468 | |
| 3469 | # checks for system dependent C++ extensions support |
| 3470 | case "$ac_sys_system" in |
| 3471 | AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3472 | echo "configure:3473: checking for genuine AIX C++ extensions support" >&5 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3473 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3474 | #line 3475 "configure" |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3475 | #include "confdefs.h" |
| 3476 | #include "/usr/lpp/xlC/include/load.h" |
| 3477 | int main() { |
| 3478 | loadAndInit("", 0, "") |
| 3479 | ; return 0; } |
| 3480 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3481 | if { (eval echo configure:3482: \"$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] | 3482 | rm -rf conftest* |
| 3483 | cat >> confdefs.h <<\EOF |
| 3484 | #define AIX_GENUINE_CPLUSPLUS 1 |
| 3485 | EOF |
| 3486 | |
| 3487 | echo "$ac_t""yes" 1>&6 |
| 3488 | else |
| 3489 | echo "configure: failed program was:" >&5 |
| 3490 | cat conftest.$ac_ext >&5 |
| 3491 | rm -rf conftest* |
| 3492 | echo "$ac_t""no" 1>&6 |
| 3493 | fi |
| 3494 | rm -f conftest*;; |
| 3495 | *) ;; |
| 3496 | esac |
| 3497 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3498 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
| 3499 | # However on SGI IRIX, these exist but are broken. |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3500 | # BeOS' sockets are stashed in libnet. |
| 3501 | case "$ac_sys_system" in |
| 3502 | IRIX*) ;; |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3503 | *) |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3504 | echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3505 | echo "configure:3506: checking for t_open in -lnsl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3506 | ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3507 | 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] | 3508 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3509 | else |
| 3510 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3511 | LIBS="-lnsl $LIBS" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3512 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3513 | #line 3514 "configure" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3514 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3515 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3516 | /* We use char because int might match the return type of a gcc2 |
| 3517 | builtin and then its argument prototype would still apply. */ |
| 3518 | char t_open(); |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3519 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3520 | int main() { |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3521 | t_open() |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3522 | ; return 0; } |
| 3523 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3524 | if { (eval echo configure:3525: \"$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] | 3525 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3526 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3527 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3528 | echo "configure: failed program was:" >&5 |
| 3529 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3530 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3531 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3532 | fi |
| 3533 | rm -f conftest* |
| 3534 | LIBS="$ac_save_LIBS" |
| 3535 | |
| 3536 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3537 | 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] | 3538 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3539 | LIBS="-lnsl $LIBS" |
| 3540 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3541 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3542 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3543 | # SVR4 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3544 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3545 | echo "configure:3546: checking for socket in -lsocket" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3546 | ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3547 | 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] | 3548 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3549 | else |
| 3550 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3551 | LIBS="-lsocket $LIBS $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3552 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3553 | #line 3554 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3554 | #include "confdefs.h" |
| 3555 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3556 | /* We use char because int might match the return type of a gcc2 |
| 3557 | builtin and then its argument prototype would still apply. */ |
| 3558 | char socket(); |
| 3559 | |
| 3560 | int main() { |
| 3561 | socket() |
| 3562 | ; return 0; } |
| 3563 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3564 | if { (eval echo configure:3565: \"$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] | 3565 | rm -rf conftest* |
| 3566 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3567 | else |
| 3568 | echo "configure: failed program was:" >&5 |
| 3569 | cat conftest.$ac_ext >&5 |
| 3570 | rm -rf conftest* |
| 3571 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3572 | fi |
| 3573 | rm -f conftest* |
| 3574 | LIBS="$ac_save_LIBS" |
| 3575 | |
| 3576 | fi |
| 3577 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3578 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3579 | LIBS="-lsocket $LIBS" |
| 3580 | else |
| 3581 | echo "$ac_t""no" 1>&6 |
| 3582 | fi |
| 3583 | # SVR4 sockets |
Jeremy Hylton | cb25d5e | 2000-07-27 21:23:28 +0000 | [diff] [blame] | 3584 | ;; |
| 3585 | esac |
| 3586 | case "$ac_sys_system" in |
| 3587 | BeOS*) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3588 | echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3589 | echo "configure:3590: checking for socket in -lnet" >&5 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3590 | ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3591 | 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] | 3592 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3593 | else |
| 3594 | ac_save_LIBS="$LIBS" |
| 3595 | LIBS="-lnet $LIBS $LIBS" |
| 3596 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3597 | #line 3598 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3598 | #include "confdefs.h" |
| 3599 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3600 | /* We use char because int might match the return type of a gcc2 |
| 3601 | builtin and then its argument prototype would still apply. */ |
| 3602 | char socket(); |
| 3603 | |
| 3604 | int main() { |
| 3605 | socket() |
| 3606 | ; return 0; } |
| 3607 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3608 | if { (eval echo configure:3609: \"$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] | 3609 | rm -rf conftest* |
| 3610 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3611 | else |
| 3612 | echo "configure: failed program was:" >&5 |
| 3613 | cat conftest.$ac_ext >&5 |
| 3614 | rm -rf conftest* |
| 3615 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3616 | fi |
| 3617 | rm -f conftest* |
| 3618 | LIBS="$ac_save_LIBS" |
| 3619 | |
| 3620 | fi |
| 3621 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3622 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3623 | LIBS="-lnet $LIBS" |
| 3624 | else |
| 3625 | echo "$ac_t""no" 1>&6 |
| 3626 | fi |
| 3627 | # BeOS |
| 3628 | ;; |
| 3629 | esac |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3630 | |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3631 | echo $ac_n "checking for --with-libs""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3632 | echo "configure:3633: checking for --with-libs" >&5 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3633 | # Check whether --with-libs or --without-libs was given. |
| 3634 | if test "${with_libs+set}" = set; then |
| 3635 | withval="$with_libs" |
| 3636 | |
| 3637 | echo "$ac_t""$withval" 1>&6 |
| 3638 | LIBS="$withval $LIBS" |
| 3639 | |
| 3640 | else |
| 3641 | echo "$ac_t""no" 1>&6 |
| 3642 | fi |
| 3643 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3644 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3645 | # Determine if signalmodule should be used. |
| 3646 | |
| 3647 | |
| 3648 | echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3649 | echo "configure:3650: checking for --with-signal-module" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3650 | # Check whether --with-signal-module or --without-signal-module was given. |
| 3651 | if test "${with_signal_module+set}" = set; then |
| 3652 | withval="$with_signal_module" |
| 3653 | : |
| 3654 | fi |
| 3655 | |
| 3656 | |
| 3657 | if test -z "$with_signal_module" |
| 3658 | then with_signal_module="yes" |
| 3659 | fi |
| 3660 | echo "$ac_t""$with_signal_module" 1>&6 |
| 3661 | |
| 3662 | if test "${with_signal_module}" = "yes"; then |
| 3663 | USE_SIGNAL_MODULE="" |
| 3664 | SIGNAL_OBJS="" |
| 3665 | else |
| 3666 | USE_SIGNAL_MODULE="#" |
| 3667 | SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o" |
| 3668 | fi |
| 3669 | |
Guido van Rossum | 3d15bd8 | 2001-01-10 18:53:48 +0000 | [diff] [blame] | 3670 | # This is used to generate Setup.config |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3671 | |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3672 | USE_THREAD_MODULE="" |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3673 | |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3674 | echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3675 | echo "configure:3676: checking for --with-dec-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3676 | |
| 3677 | # Check whether --with-dec-threads or --without-dec-threads was given. |
| 3678 | if test "${with_dec_threads+set}" = set; then |
| 3679 | withval="$with_dec_threads" |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3680 | |
| 3681 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3682 | LDLAST=-threads |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3683 | if test "${with_thread+set}" != set; then |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3684 | with_thread="$withval"; |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3685 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3686 | else |
| 3687 | echo "$ac_t""no" 1>&6 |
| 3688 | fi |
| 3689 | |
| 3690 | |
| 3691 | echo $ac_n "checking for --with-threads""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3692 | echo "configure:3693: checking for --with-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3693 | # Check whether --with-threads or --without-threads was given. |
| 3694 | if test "${with_threads+set}" = set; then |
| 3695 | withval="$with_threads" |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3696 | : |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3697 | fi |
| 3698 | |
| 3699 | |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3700 | # --with-thread is deprecated, but check for it anyway |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3701 | # Check whether --with-thread or --without-thread was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3702 | if test "${with_thread+set}" = set; then |
| 3703 | withval="$with_thread" |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 3704 | |
| 3705 | with_threads=$with_thread |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3706 | fi |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3707 | |
| 3708 | |
| 3709 | if test -z "$with_threads" |
| 3710 | then with_threads="yes" |
| 3711 | fi |
| 3712 | echo "$ac_t""$with_threads" 1>&6 |
| 3713 | |
| 3714 | if test "$with_threads" = "no" |
| 3715 | then |
| 3716 | USE_THREAD_MODULE="#" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3717 | elif test "$ac_cv_kpthread" = "yes" |
| 3718 | then |
| 3719 | CC="$CC -Kpthread" |
| 3720 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3721 | #define WITH_THREAD 1 |
| 3722 | EOF |
| 3723 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3724 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3725 | #define _POSIX_THREADS 1 |
| 3726 | EOF |
| 3727 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3728 | LIBOBJS="$LIBOBJS thread.o" |
| 3729 | else |
| 3730 | if test ! -z "$with_threads" -a -d "$with_threads" |
| 3731 | then LDFLAGS="$LDFLAGS -L$with_threads" |
| 3732 | fi |
| 3733 | if test ! -z "$withval" -a -d "$withval" |
| 3734 | then LDFLAGS="$LDFLAGS -L$withval" |
| 3735 | fi |
| 3736 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 3737 | #define _REENTRANT 1 |
| 3738 | EOF |
| 3739 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3740 | ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3741 | echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3742 | echo "configure:3743: checking for mach/cthreads.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3743 | 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] | 3744 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3745 | else |
| 3746 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3747 | #line 3748 "configure" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3748 | #include "confdefs.h" |
| 3749 | #include <mach/cthreads.h> |
| 3750 | EOF |
| 3751 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3752 | { (eval echo configure:3753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3753 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3754 | if test -z "$ac_err"; then |
| 3755 | rm -rf conftest* |
| 3756 | eval "ac_cv_header_$ac_safe=yes" |
| 3757 | else |
| 3758 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3759 | echo "configure: failed program was:" >&5 |
| 3760 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3761 | rm -rf conftest* |
| 3762 | eval "ac_cv_header_$ac_safe=no" |
| 3763 | fi |
| 3764 | rm -f conftest* |
| 3765 | fi |
| 3766 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3767 | echo "$ac_t""yes" 1>&6 |
| 3768 | cat >> confdefs.h <<\EOF |
| 3769 | #define WITH_THREAD 1 |
| 3770 | EOF |
| 3771 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3772 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3773 | #define C_THREADS 1 |
| 3774 | EOF |
| 3775 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3776 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3777 | else |
| 3778 | echo "$ac_t""no" 1>&6 |
| 3779 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3780 | echo $ac_n "checking for --with-pth""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3781 | echo "configure:3782: checking for --with-pth" >&5 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3782 | # Check whether --with-pth or --without-pth was given. |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3783 | if test "${with_pth+set}" = set; then |
| 3784 | withval="$with_pth" |
| 3785 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3786 | echo "$ac_t""$withval" 1>&6 |
| 3787 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3788 | #define WITH_THREAD 1 |
| 3789 | EOF |
| 3790 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3791 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3792 | #define HAVE_PTH 1 |
| 3793 | EOF |
| 3794 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3795 | LIBS="-lpth $LIBS" |
| 3796 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3797 | else |
| 3798 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3799 | echo "$ac_t""no" 1>&6 |
| 3800 | echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3801 | echo "configure:3802: checking for pthread_create in -lpthread" >&5 |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3802 | ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3803 | 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] | 3804 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3805 | else |
| 3806 | ac_save_LIBS="$LIBS" |
| 3807 | LIBS="-lpthread $LIBS" |
| 3808 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3809 | #line 3810 "configure" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3810 | #include "confdefs.h" |
| 3811 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3812 | /* We use char because int might match the return type of a gcc2 |
| 3813 | builtin and then its argument prototype would still apply. */ |
| 3814 | char pthread_create(); |
| 3815 | |
| 3816 | int main() { |
| 3817 | pthread_create() |
| 3818 | ; return 0; } |
| 3819 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3820 | if { (eval echo configure:3821: \"$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] | 3821 | rm -rf conftest* |
| 3822 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3823 | else |
| 3824 | echo "configure: failed program was:" >&5 |
| 3825 | cat conftest.$ac_ext >&5 |
| 3826 | rm -rf conftest* |
| 3827 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3828 | fi |
| 3829 | rm -f conftest* |
| 3830 | LIBS="$ac_save_LIBS" |
| 3831 | |
| 3832 | fi |
| 3833 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3834 | echo "$ac_t""yes" 1>&6 |
| 3835 | cat >> confdefs.h <<\EOF |
| 3836 | #define WITH_THREAD 1 |
| 3837 | EOF |
| 3838 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3839 | case $ac_sys_system in |
| 3840 | Darwin*) ;; |
| 3841 | *) cat >> confdefs.h <<\EOF |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3842 | #define _POSIX_THREADS 1 |
| 3843 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3844 | ;; |
| 3845 | esac |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3846 | LIBS="-lpthread $LIBS" |
| 3847 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3848 | else |
| 3849 | echo "$ac_t""no" 1>&6 |
| 3850 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3851 | echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3852 | echo "configure:3853: checking for pthread_detach" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3853 | 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] | 3854 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3855 | else |
| 3856 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3857 | #line 3858 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3858 | #include "confdefs.h" |
| 3859 | /* System header to define __stub macros and hopefully few prototypes, |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3860 | which can conflict with char pthread_detach(); below. */ |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3861 | #include <assert.h> |
| 3862 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3863 | /* We use char because int might match the return type of a gcc2 |
| 3864 | builtin and then its argument prototype would still apply. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3865 | char pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3866 | |
| 3867 | int main() { |
| 3868 | |
| 3869 | /* The GNU C library defines this for functions which it implements |
| 3870 | to always fail with ENOSYS. Some functions are actually named |
| 3871 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3872 | #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3873 | choke me |
| 3874 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3875 | pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3876 | #endif |
| 3877 | |
| 3878 | ; return 0; } |
| 3879 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3880 | if { (eval echo configure:3881: \"$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] | 3881 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3882 | eval "ac_cv_func_pthread_detach=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3883 | else |
| 3884 | echo "configure: failed program was:" >&5 |
| 3885 | cat conftest.$ac_ext >&5 |
| 3886 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3887 | eval "ac_cv_func_pthread_detach=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3888 | fi |
| 3889 | rm -f conftest* |
| 3890 | fi |
| 3891 | |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3892 | if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3893 | echo "$ac_t""yes" 1>&6 |
| 3894 | cat >> confdefs.h <<\EOF |
| 3895 | #define WITH_THREAD 1 |
| 3896 | EOF |
| 3897 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3898 | case $ac_sys_system in |
| 3899 | Darwin*) ;; |
| 3900 | *) cat >> confdefs.h <<\EOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3901 | #define _POSIX_THREADS 1 |
| 3902 | EOF |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 3903 | ;; |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3904 | esac |
| 3905 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3906 | else |
| 3907 | echo "$ac_t""no" 1>&6 |
| 3908 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3909 | ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3910 | echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3911 | echo "configure:3912: checking for kernel/OS.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3912 | 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] | 3913 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3914 | else |
| 3915 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3916 | #line 3917 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3917 | #include "confdefs.h" |
| 3918 | #include <kernel/OS.h> |
| 3919 | EOF |
| 3920 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3921 | { (eval echo configure:3922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3922 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3923 | if test -z "$ac_err"; then |
| 3924 | rm -rf conftest* |
| 3925 | eval "ac_cv_header_$ac_safe=yes" |
| 3926 | else |
| 3927 | echo "$ac_err" >&5 |
| 3928 | echo "configure: failed program was:" >&5 |
| 3929 | cat conftest.$ac_ext >&5 |
| 3930 | rm -rf conftest* |
| 3931 | eval "ac_cv_header_$ac_safe=no" |
| 3932 | fi |
| 3933 | rm -f conftest* |
| 3934 | fi |
| 3935 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3936 | echo "$ac_t""yes" 1>&6 |
| 3937 | cat >> confdefs.h <<\EOF |
| 3938 | #define WITH_THREAD 1 |
| 3939 | EOF |
| 3940 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3941 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3942 | #define BEOS_THREADS 1 |
| 3943 | EOF |
| 3944 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3945 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3946 | else |
| 3947 | echo "$ac_t""no" 1>&6 |
| 3948 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3949 | echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3950 | echo "configure:3951: checking for pthread_create in -lpthreads" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3951 | ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3952 | 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] | 3953 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3954 | else |
| 3955 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3956 | LIBS="-lpthreads $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3957 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3958 | #line 3959 "configure" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3959 | #include "confdefs.h" |
| 3960 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3961 | /* We use char because int might match the return type of a gcc2 |
| 3962 | builtin and then its argument prototype would still apply. */ |
| 3963 | char pthread_create(); |
| 3964 | |
| 3965 | int main() { |
| 3966 | pthread_create() |
| 3967 | ; return 0; } |
| 3968 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3969 | if { (eval echo configure:3970: \"$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] | 3970 | rm -rf conftest* |
| 3971 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3972 | else |
| 3973 | echo "configure: failed program was:" >&5 |
| 3974 | cat conftest.$ac_ext >&5 |
| 3975 | rm -rf conftest* |
| 3976 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3977 | fi |
| 3978 | rm -f conftest* |
| 3979 | LIBS="$ac_save_LIBS" |
| 3980 | |
| 3981 | fi |
| 3982 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3983 | echo "$ac_t""yes" 1>&6 |
| 3984 | cat >> confdefs.h <<\EOF |
| 3985 | #define WITH_THREAD 1 |
| 3986 | EOF |
| 3987 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3988 | cat >> confdefs.h <<\EOF |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3989 | #define _POSIX_THREADS 1 |
| 3990 | EOF |
| 3991 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3992 | LIBS="$LIBS -lpthreads" |
| 3993 | LIBOBJS="$LIBOBJS thread.o" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3994 | else |
| 3995 | echo "$ac_t""no" 1>&6 |
| 3996 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3997 | echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3998 | echo "configure:3999: checking for pthread_create in -lc_r" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3999 | ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4000 | 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] | 4001 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4002 | else |
| 4003 | ac_save_LIBS="$LIBS" |
| 4004 | LIBS="-lc_r $LIBS" |
| 4005 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4006 | #line 4007 "configure" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4007 | #include "confdefs.h" |
| 4008 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4009 | /* We use char because int might match the return type of a gcc2 |
| 4010 | builtin and then its argument prototype would still apply. */ |
| 4011 | char pthread_create(); |
| 4012 | |
| 4013 | int main() { |
| 4014 | pthread_create() |
| 4015 | ; return 0; } |
| 4016 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4017 | if { (eval echo configure:4018: \"$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] | 4018 | rm -rf conftest* |
| 4019 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4020 | else |
| 4021 | echo "configure: failed program was:" >&5 |
| 4022 | cat conftest.$ac_ext >&5 |
| 4023 | rm -rf conftest* |
| 4024 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4025 | fi |
| 4026 | rm -f conftest* |
| 4027 | LIBS="$ac_save_LIBS" |
| 4028 | |
| 4029 | fi |
| 4030 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4031 | echo "$ac_t""yes" 1>&6 |
| 4032 | cat >> confdefs.h <<\EOF |
| 4033 | #define WITH_THREAD 1 |
| 4034 | EOF |
| 4035 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4036 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4037 | #define _POSIX_THREADS 1 |
| 4038 | EOF |
| 4039 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4040 | LIBS="$LIBS -lc_r" |
| 4041 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4042 | else |
| 4043 | echo "$ac_t""no" 1>&6 |
| 4044 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4045 | echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4046 | echo "configure:4047: checking for __d6_pthread_create in -lthread" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4047 | ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4048 | 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] | 4049 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4050 | else |
| 4051 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4052 | LIBS="-lthread $LIBS" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4053 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4054 | #line 4055 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4055 | #include "confdefs.h" |
| 4056 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4057 | /* We use char because int might match the return type of a gcc2 |
| 4058 | builtin and then its argument prototype would still apply. */ |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4059 | char __d6_pthread_create(); |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4060 | |
| 4061 | int main() { |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 4062 | __d6_pthread_create() |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4063 | ; return 0; } |
| 4064 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4065 | if { (eval echo configure:4066: \"$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] | 4066 | rm -rf conftest* |
| 4067 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4068 | else |
| 4069 | echo "configure: failed program was:" >&5 |
| 4070 | cat conftest.$ac_ext >&5 |
| 4071 | rm -rf conftest* |
| 4072 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4073 | fi |
| 4074 | rm -f conftest* |
| 4075 | LIBS="$ac_save_LIBS" |
| 4076 | |
| 4077 | fi |
| 4078 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4079 | echo "$ac_t""yes" 1>&6 |
| 4080 | cat >> confdefs.h <<\EOF |
| 4081 | #define WITH_THREAD 1 |
| 4082 | EOF |
| 4083 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4084 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4085 | #define _POSIX_THREADS 1 |
| 4086 | EOF |
| 4087 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4088 | LIBS="$LIBS -lthread" |
| 4089 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4090 | else |
| 4091 | echo "$ac_t""no" 1>&6 |
| 4092 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4093 | echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4094 | echo "configure:4095: checking for __pthread_create_system in -lpthread" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4095 | ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` |
| 4096 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4097 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4098 | else |
| 4099 | ac_save_LIBS="$LIBS" |
| 4100 | LIBS="-lpthread $LIBS" |
| 4101 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4102 | #line 4103 "configure" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4103 | #include "confdefs.h" |
| 4104 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4105 | /* We use char because int might match the return type of a gcc2 |
| 4106 | builtin and then its argument prototype would still apply. */ |
| 4107 | char __pthread_create_system(); |
| 4108 | |
| 4109 | int main() { |
| 4110 | __pthread_create_system() |
| 4111 | ; return 0; } |
| 4112 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4113 | if { (eval echo configure:4114: \"$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] | 4114 | rm -rf conftest* |
| 4115 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4116 | else |
| 4117 | echo "configure: failed program was:" >&5 |
| 4118 | cat conftest.$ac_ext >&5 |
| 4119 | rm -rf conftest* |
| 4120 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4121 | fi |
| 4122 | rm -f conftest* |
| 4123 | LIBS="$ac_save_LIBS" |
| 4124 | |
| 4125 | fi |
| 4126 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4127 | echo "$ac_t""yes" 1>&6 |
| 4128 | cat >> confdefs.h <<\EOF |
| 4129 | #define WITH_THREAD 1 |
| 4130 | EOF |
| 4131 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4132 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4133 | #define _POSIX_THREADS 1 |
| 4134 | EOF |
| 4135 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4136 | LIBS="$LIBS -lpthread" |
| 4137 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4138 | else |
| 4139 | echo "$ac_t""no" 1>&6 |
| 4140 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4141 | echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4142 | echo "configure:4143: checking for pthread_create in -lcma" >&5 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4143 | ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4144 | 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] | 4145 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4146 | else |
| 4147 | ac_save_LIBS="$LIBS" |
| 4148 | LIBS="-lcma $LIBS" |
| 4149 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4150 | #line 4151 "configure" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4151 | #include "confdefs.h" |
| 4152 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4153 | /* We use char because int might match the return type of a gcc2 |
| 4154 | builtin and then its argument prototype would still apply. */ |
| 4155 | char pthread_create(); |
| 4156 | |
| 4157 | int main() { |
| 4158 | pthread_create() |
| 4159 | ; return 0; } |
| 4160 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4161 | if { (eval echo configure:4162: \"$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] | 4162 | rm -rf conftest* |
| 4163 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4164 | else |
| 4165 | echo "configure: failed program was:" >&5 |
| 4166 | cat conftest.$ac_ext >&5 |
| 4167 | rm -rf conftest* |
| 4168 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4169 | fi |
| 4170 | rm -f conftest* |
| 4171 | LIBS="$ac_save_LIBS" |
| 4172 | |
| 4173 | fi |
| 4174 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4175 | echo "$ac_t""yes" 1>&6 |
| 4176 | cat >> confdefs.h <<\EOF |
| 4177 | #define WITH_THREAD 1 |
| 4178 | EOF |
| 4179 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4180 | cat >> confdefs.h <<\EOF |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4181 | #define _POSIX_THREADS 1 |
| 4182 | EOF |
| 4183 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4184 | LIBS="$LIBS -lcma" |
| 4185 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4186 | else |
| 4187 | echo "$ac_t""no" 1>&6 |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 4188 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4189 | USE_THREAD_MODULE="#" |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 4190 | fi |
| 4191 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4192 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4193 | fi |
| 4194 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 4195 | fi |
| 4196 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4197 | fi |
| 4198 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4199 | fi |
| 4200 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4201 | fi |
| 4202 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4203 | fi |
| 4204 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4205 | fi |
| 4206 | |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4207 | fi |
| 4208 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4209 | fi |
| 4210 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4211 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4212 | echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4213 | echo "configure:4214: checking for usconfig in -lmpc" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4214 | ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4215 | 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] | 4216 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4217 | else |
| 4218 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4219 | LIBS="-lmpc $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4220 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4221 | #line 4222 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4222 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4223 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4224 | /* We use char because int might match the return type of a gcc2 |
| 4225 | builtin and then its argument prototype would still apply. */ |
| 4226 | char usconfig(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4227 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4228 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4229 | usconfig() |
| 4230 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4231 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4232 | if { (eval echo configure:4233: \"$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] | 4233 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4234 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4235 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4236 | echo "configure: failed program was:" >&5 |
| 4237 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4238 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4239 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4240 | fi |
| 4241 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4242 | LIBS="$ac_save_LIBS" |
| 4243 | |
| 4244 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4245 | 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] | 4246 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4247 | cat >> confdefs.h <<\EOF |
| 4248 | #define WITH_THREAD 1 |
| 4249 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4250 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4251 | LIBS="$LIBS -lmpc" |
| 4252 | LIBOBJS="$LIBOBJS thread.o" |
| 4253 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4254 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4255 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4256 | fi |
| 4257 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4258 | echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4259 | echo "configure:4260: checking for thr_create in -lthread" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4260 | ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4261 | 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] | 4262 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4263 | else |
| 4264 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4265 | LIBS="-lthread $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4266 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4267 | #line 4268 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4268 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4269 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4270 | /* We use char because int might match the return type of a gcc2 |
| 4271 | builtin and then its argument prototype would still apply. */ |
| 4272 | char thr_create(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4273 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4274 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4275 | thr_create() |
| 4276 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4277 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4278 | if { (eval echo configure:4279: \"$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] | 4279 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4280 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4281 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4282 | echo "configure: failed program was:" >&5 |
| 4283 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4284 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4285 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4286 | fi |
| 4287 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4288 | LIBS="$ac_save_LIBS" |
| 4289 | |
| 4290 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4291 | 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] | 4292 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4293 | cat >> confdefs.h <<\EOF |
| 4294 | #define WITH_THREAD 1 |
| 4295 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4296 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4297 | LIBS="$LIBS -lthread" |
| 4298 | LIBOBJS="$LIBOBJS thread.o" |
| 4299 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4300 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4301 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4302 | fi |
| 4303 | |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4304 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4305 | if test "$USE_THREAD_MODULE" != "#" |
| 4306 | then |
| 4307 | # If the above checks didn't disable threads, (at least) OSF1 |
| 4308 | # needs this '-threads' argument during linking. |
| 4309 | case $ac_sys_system in |
| 4310 | OSF1) LDLAST=-threads;; |
| 4311 | esac |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4312 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4313 | fi |
| 4314 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4315 | # Check for GC support |
| 4316 | |
| 4317 | USE_GC_MODULE="" |
| 4318 | echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4319 | echo "configure:4320: checking for --with-cycle-gc" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4320 | # Check whether --with-cycle-gc or --without-cycle-gc was given. |
| 4321 | if test "${with_cycle_gc+set}" = set; then |
| 4322 | withval="$with_cycle_gc" |
| 4323 | : |
| 4324 | fi |
| 4325 | |
| 4326 | |
| 4327 | if test -z "$with_cycle_gc" |
| 4328 | then with_cycle_gc="yes" |
| 4329 | fi |
| 4330 | if test "$with_cycle_gc" = "no" |
| 4331 | then |
| 4332 | USE_GC_MODULE="#" |
| 4333 | else |
| 4334 | cat >> confdefs.h <<\EOF |
| 4335 | #define WITH_CYCLE_GC 1 |
| 4336 | EOF |
| 4337 | |
| 4338 | fi |
| 4339 | echo "$ac_t""$with_cycle_gc" 1>&6 |
| 4340 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4341 | # Check for Python-specific malloc support |
| 4342 | echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4343 | echo "configure:4344: checking for --with-pymalloc" >&5 |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4344 | # Check whether --with-pymalloc or --without-pymalloc was given. |
| 4345 | if test "${with_pymalloc+set}" = set; then |
| 4346 | withval="$with_pymalloc" |
| 4347 | |
| 4348 | if test "$withval" != no |
| 4349 | then cat >> confdefs.h <<\EOF |
| 4350 | #define WITH_PYMALLOC 1 |
| 4351 | EOF |
| 4352 | echo "$ac_t""yes" 1>&6 |
| 4353 | else echo "$ac_t""no" 1>&6 |
| 4354 | fi |
| 4355 | else |
| 4356 | echo "$ac_t""no" 1>&6 |
| 4357 | fi |
| 4358 | |
| 4359 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4360 | # Check for --with-wctype-functions |
| 4361 | echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4362 | echo "configure:4363: checking for --with-wctype-functions" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4363 | # Check whether --with-wctype-functions or --without-wctype-functions was given. |
| 4364 | if test "${with_wctype_functions+set}" = set; then |
| 4365 | withval="$with_wctype_functions" |
| 4366 | |
| 4367 | if test "$withval" != no |
| 4368 | then cat >> confdefs.h <<\EOF |
| 4369 | #define WANT_WCTYPE_FUNCTIONS 1 |
| 4370 | EOF |
| 4371 | echo "$ac_t""yes" 1>&6 |
| 4372 | else echo "$ac_t""no" 1>&6 |
| 4373 | fi |
| 4374 | else |
| 4375 | echo "$ac_t""no" 1>&6 |
| 4376 | fi |
| 4377 | |
| 4378 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4379 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4380 | |
| 4381 | DLINCLDIR=/ |
| 4382 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4383 | echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4384 | echo "configure:4385: checking for --with-sgi-dl" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4385 | # Check whether --with-sgi-dl or --without-sgi-dl was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4386 | if test "${with_sgi_dl+set}" = set; then |
| 4387 | withval="$with_sgi_dl" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4388 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4389 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4390 | cat >> confdefs.h <<\EOF |
| 4391 | #define WITH_SGI_DL 1 |
| 4392 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4393 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4394 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4395 | dldir=$withval |
Guido van Rossum | 4095101 | 2000-10-07 16:21:27 +0000 | [diff] [blame] | 4396 | if test ! -z "$dldir" -a -d "$dldir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 4397 | then LDFLAGS="$LDFLAGS -L$dldir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4398 | 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] | 4399 | fi |
| 4400 | DLINCLDIR=${dldir} |
| 4401 | LIBS="$LIBS -ldl -lmld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4402 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4403 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4404 | fi |
| 4405 | |
| 4406 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4407 | echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4408 | echo "configure:4409: checking for --with-dl-dld" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4409 | # Check whether --with-dl-dld or --without-dl-dld was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4410 | if test "${with_dl_dld+set}" = set; then |
| 4411 | withval="$with_dl_dld" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4412 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4413 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4414 | cat >> confdefs.h <<\EOF |
| 4415 | #define WITH_DL_DLD 1 |
| 4416 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4417 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4418 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4419 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 4420 | dlddir=`echo "$withval" | sed 's/.*,//'` |
Barry Warsaw | 7d1219d | 2000-10-05 18:45:53 +0000 | [diff] [blame] | 4421 | 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] | 4422 | then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4423 | 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] | 4424 | fi |
| 4425 | DLINCLDIR=${dldir} |
| 4426 | LIBS="$LIBS -ldl -ldld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4427 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4428 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4429 | fi |
| 4430 | |
| 4431 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4432 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 4433 | # 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] | 4434 | for ac_func in dlopen |
| 4435 | do |
| 4436 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4437 | echo "configure:4438: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4438 | 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] | 4439 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4440 | else |
| 4441 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4442 | #line 4443 "configure" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4443 | #include "confdefs.h" |
| 4444 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4445 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4446 | #include <assert.h> |
| 4447 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4448 | /* We use char because int might match the return type of a gcc2 |
| 4449 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4450 | char $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4451 | |
| 4452 | int main() { |
| 4453 | |
| 4454 | /* The GNU C library defines this for functions which it implements |
| 4455 | to always fail with ENOSYS. Some functions are actually named |
| 4456 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4457 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4458 | choke me |
| 4459 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4460 | $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4461 | #endif |
| 4462 | |
| 4463 | ; return 0; } |
| 4464 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4465 | if { (eval echo configure:4466: \"$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] | 4466 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4467 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4468 | else |
| 4469 | echo "configure: failed program was:" >&5 |
| 4470 | cat conftest.$ac_ext >&5 |
| 4471 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4472 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4473 | fi |
| 4474 | rm -f conftest* |
| 4475 | fi |
| 4476 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4477 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4478 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4479 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4480 | cat >> confdefs.h <<EOF |
| 4481 | #define $ac_tr_func 1 |
| 4482 | EOF |
| 4483 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4484 | else |
| 4485 | echo "$ac_t""no" 1>&6 |
| 4486 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4487 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4488 | |
| 4489 | |
| 4490 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 4491 | # loading of modules. |
| 4492 | |
| 4493 | echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4494 | echo "configure:4495: checking DYNLOADFILE" >&5 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4495 | if test -z "$DYNLOADFILE" |
| 4496 | then |
| 4497 | case $ac_sys_system/$ac_sys_release in |
| 4498 | AIX*) DYNLOADFILE="dynload_aix.o";; |
| 4499 | BeOS*) DYNLOADFILE="dynload_beos.o";; |
| 4500 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 4501 | Darwin/*|next/*) DYNLOADFILE="dynload_next.o";; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4502 | *) |
| 4503 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 4504 | # out any dynamic loading |
| 4505 | if test "$ac_cv_func_dlopen" = yes |
| 4506 | then DYNLOADFILE="dynload_shlib.o" |
| 4507 | else DYNLOADFILE="dynload_stub.o" |
| 4508 | fi |
| 4509 | ;; |
| 4510 | esac |
| 4511 | fi |
| 4512 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
| 4513 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 4514 | then |
| 4515 | cat >> confdefs.h <<\EOF |
| 4516 | #define HAVE_DYNAMIC_LOADING 1 |
| 4517 | EOF |
| 4518 | |
| 4519 | fi |
| 4520 | |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4521 | # MACHDEP_OBJS can be set to platform-specific object files needed by Python |
| 4522 | |
| 4523 | |
| 4524 | echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4525 | echo "configure:4526: checking MACHDEP_OBJS" >&5 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4526 | if test -z "$MACHDEP_OBJS" |
| 4527 | then |
| 4528 | case $ac_sys_system/$ac_sys_release in |
| 4529 | Darwin/*) |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4530 | MACHDEP_OBJS="Python/mactoolboxglue.o" |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4531 | cat >> confdefs.h <<\EOF |
| 4532 | #define USE_TOOLBOX_OBJECT_GLUE 1 |
| 4533 | EOF |
| 4534 | |
| 4535 | ;; |
| 4536 | *) MACHDEP_OBJS="";; |
| 4537 | esac |
| 4538 | fi |
| 4539 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
| 4540 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4541 | # checks for library functions |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4542 | for ac_func in alarm chown clock confstr ctermid ctermid_r execv \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4543 | flock fork fsync fdatasync fpathconf ftime ftruncate \ |
Andrew M. Kuchling | a9586c7 | 2001-01-08 17:58:56 +0000 | [diff] [blame] | 4544 | getgroups getlogin getpeername getpid getpwent getwd \ |
Martin v. Löwis | 864e9ff | 2001-08-04 22:32:03 +0000 | [diff] [blame] | 4545 | hstrerror inet_pton kill link lstat mkfifo mktime mremap \ |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 4546 | nice pathconf pause plock poll pthread_init \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4547 | putenv readlink \ |
Andrew M. Kuchling | 8d2f2b2 | 2000-07-13 01:26:58 +0000 | [diff] [blame] | 4548 | select setegid seteuid setgid \ |
Martin v. Löwis | 791bfda | 2001-07-24 06:33:08 +0000 | [diff] [blame] | 4549 | setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4550 | sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ |
Fred Drake | 89143df | 1999-12-09 22:03:25 +0000 | [diff] [blame] | 4551 | tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Thomas Wouters | c2c12dc | 2001-07-11 14:45:34 +0000 | [diff] [blame] | 4552 | truncate uname waitpid _getpty getpriority |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4553 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4554 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4555 | echo "configure:4556: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4556 | 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] | 4557 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4558 | else |
| 4559 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4560 | #line 4561 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4561 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4562 | /* System header to define __stub macros and hopefully few prototypes, |
| 4563 | which can conflict with char $ac_func(); below. */ |
| 4564 | #include <assert.h> |
| 4565 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4566 | /* We use char because int might match the return type of a gcc2 |
| 4567 | builtin and then its argument prototype would still apply. */ |
| 4568 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4569 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4570 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4571 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4572 | /* The GNU C library defines this for functions which it implements |
| 4573 | to always fail with ENOSYS. Some functions are actually named |
| 4574 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4575 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4576 | choke me |
| 4577 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4578 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4579 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4580 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4581 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4582 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4583 | if { (eval echo configure:4584: \"$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] | 4584 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4585 | eval "ac_cv_func_$ac_func=yes" |
| 4586 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4587 | echo "configure: failed program was:" >&5 |
| 4588 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4589 | rm -rf conftest* |
| 4590 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4591 | fi |
| 4592 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4593 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4594 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4595 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4596 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4597 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4598 | cat >> confdefs.h <<EOF |
| 4599 | #define $ac_tr_func 1 |
| 4600 | EOF |
| 4601 | |
| 4602 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4603 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4604 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4605 | done |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 4606 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4607 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4608 | # check for openpty and forkpty |
| 4609 | |
| 4610 | for ac_func in openpty |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4611 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4612 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4613 | echo "configure:4614: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4614 | 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] | 4615 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4616 | else |
| 4617 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4618 | #line 4619 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4619 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4620 | /* System header to define __stub macros and hopefully few prototypes, |
| 4621 | which can conflict with char $ac_func(); below. */ |
| 4622 | #include <assert.h> |
| 4623 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4624 | /* We use char because int might match the return type of a gcc2 |
| 4625 | builtin and then its argument prototype would still apply. */ |
| 4626 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4627 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4628 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4629 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4630 | /* The GNU C library defines this for functions which it implements |
| 4631 | to always fail with ENOSYS. Some functions are actually named |
| 4632 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4633 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4634 | choke me |
| 4635 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4636 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4637 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4638 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4639 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4640 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4641 | if { (eval echo configure:4642: \"$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] | 4642 | rm -rf conftest* |
| 4643 | eval "ac_cv_func_$ac_func=yes" |
| 4644 | else |
| 4645 | echo "configure: failed program was:" >&5 |
| 4646 | cat conftest.$ac_ext >&5 |
| 4647 | rm -rf conftest* |
| 4648 | eval "ac_cv_func_$ac_func=no" |
| 4649 | fi |
| 4650 | rm -f conftest* |
| 4651 | fi |
| 4652 | |
| 4653 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4654 | echo "$ac_t""yes" 1>&6 |
| 4655 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4656 | cat >> confdefs.h <<EOF |
| 4657 | #define $ac_tr_func 1 |
| 4658 | EOF |
| 4659 | |
| 4660 | else |
| 4661 | echo "$ac_t""no" 1>&6 |
| 4662 | echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4663 | echo "configure:4664: checking for openpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4664 | ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4665 | 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] | 4666 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4667 | else |
| 4668 | ac_save_LIBS="$LIBS" |
| 4669 | LIBS="-lutil $LIBS" |
| 4670 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4671 | #line 4672 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4672 | #include "confdefs.h" |
| 4673 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4674 | /* We use char because int might match the return type of a gcc2 |
| 4675 | builtin and then its argument prototype would still apply. */ |
| 4676 | char openpty(); |
| 4677 | |
| 4678 | int main() { |
| 4679 | openpty() |
| 4680 | ; return 0; } |
| 4681 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4682 | if { (eval echo configure:4683: \"$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] | 4683 | rm -rf conftest* |
| 4684 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4685 | else |
| 4686 | echo "configure: failed program was:" >&5 |
| 4687 | cat conftest.$ac_ext >&5 |
| 4688 | rm -rf conftest* |
| 4689 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4690 | fi |
| 4691 | rm -f conftest* |
| 4692 | LIBS="$ac_save_LIBS" |
| 4693 | |
| 4694 | fi |
| 4695 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4696 | echo "$ac_t""yes" 1>&6 |
| 4697 | cat >> confdefs.h <<\EOF |
| 4698 | #define HAVE_OPENPTY 1 |
| 4699 | EOF |
| 4700 | LIBS="$LIBS -lutil" |
| 4701 | else |
| 4702 | echo "$ac_t""no" 1>&6 |
| 4703 | fi |
| 4704 | |
| 4705 | fi |
| 4706 | done |
| 4707 | |
| 4708 | for ac_func in forkpty |
| 4709 | do |
| 4710 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4711 | echo "configure:4712: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4712 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4713 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4714 | else |
| 4715 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4716 | #line 4717 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4717 | #include "confdefs.h" |
| 4718 | /* System header to define __stub macros and hopefully few prototypes, |
| 4719 | which can conflict with char $ac_func(); below. */ |
| 4720 | #include <assert.h> |
| 4721 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4722 | /* We use char because int might match the return type of a gcc2 |
| 4723 | builtin and then its argument prototype would still apply. */ |
| 4724 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4725 | |
| 4726 | int main() { |
| 4727 | |
| 4728 | /* The GNU C library defines this for functions which it implements |
| 4729 | to always fail with ENOSYS. Some functions are actually named |
| 4730 | something starting with __ and the normal name is an alias. */ |
| 4731 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4732 | choke me |
| 4733 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4734 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4735 | #endif |
| 4736 | |
| 4737 | ; return 0; } |
| 4738 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4739 | if { (eval echo configure:4740: \"$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] | 4740 | rm -rf conftest* |
| 4741 | eval "ac_cv_func_$ac_func=yes" |
| 4742 | else |
| 4743 | echo "configure: failed program was:" >&5 |
| 4744 | cat conftest.$ac_ext >&5 |
| 4745 | rm -rf conftest* |
| 4746 | eval "ac_cv_func_$ac_func=no" |
| 4747 | fi |
| 4748 | rm -f conftest* |
| 4749 | fi |
| 4750 | |
| 4751 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4752 | echo "$ac_t""yes" 1>&6 |
| 4753 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4754 | cat >> confdefs.h <<EOF |
| 4755 | #define $ac_tr_func 1 |
| 4756 | EOF |
| 4757 | |
| 4758 | else |
| 4759 | echo "$ac_t""no" 1>&6 |
| 4760 | echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4761 | echo "configure:4762: checking for forkpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4762 | ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4763 | 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] | 4764 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4765 | else |
| 4766 | ac_save_LIBS="$LIBS" |
| 4767 | LIBS="-lutil $LIBS" |
| 4768 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4769 | #line 4770 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4770 | #include "confdefs.h" |
| 4771 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4772 | /* We use char because int might match the return type of a gcc2 |
| 4773 | builtin and then its argument prototype would still apply. */ |
| 4774 | char forkpty(); |
| 4775 | |
| 4776 | int main() { |
| 4777 | forkpty() |
| 4778 | ; return 0; } |
| 4779 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4780 | if { (eval echo configure:4781: \"$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] | 4781 | rm -rf conftest* |
| 4782 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4783 | else |
| 4784 | echo "configure: failed program was:" >&5 |
| 4785 | cat conftest.$ac_ext >&5 |
| 4786 | rm -rf conftest* |
| 4787 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4788 | fi |
| 4789 | rm -f conftest* |
| 4790 | LIBS="$ac_save_LIBS" |
| 4791 | |
| 4792 | fi |
| 4793 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4794 | echo "$ac_t""yes" 1>&6 |
| 4795 | cat >> confdefs.h <<\EOF |
| 4796 | #define HAVE_FORKPTY 1 |
| 4797 | EOF |
| 4798 | LIBS="$LIBS -lutil" |
| 4799 | else |
| 4800 | echo "$ac_t""no" 1>&6 |
| 4801 | fi |
| 4802 | |
| 4803 | fi |
| 4804 | done |
| 4805 | |
| 4806 | |
| 4807 | # check for long file support functions |
| 4808 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
| 4809 | do |
| 4810 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4811 | echo "configure:4812: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4812 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4813 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4814 | else |
| 4815 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4816 | #line 4817 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4817 | #include "confdefs.h" |
| 4818 | /* System header to define __stub macros and hopefully few prototypes, |
| 4819 | which can conflict with char $ac_func(); below. */ |
| 4820 | #include <assert.h> |
| 4821 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4822 | /* We use char because int might match the return type of a gcc2 |
| 4823 | builtin and then its argument prototype would still apply. */ |
| 4824 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4825 | |
| 4826 | int main() { |
| 4827 | |
| 4828 | /* The GNU C library defines this for functions which it implements |
| 4829 | to always fail with ENOSYS. Some functions are actually named |
| 4830 | something starting with __ and the normal name is an alias. */ |
| 4831 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4832 | choke me |
| 4833 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4834 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4835 | #endif |
| 4836 | |
| 4837 | ; return 0; } |
| 4838 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4839 | if { (eval echo configure:4840: \"$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] | 4840 | rm -rf conftest* |
| 4841 | eval "ac_cv_func_$ac_func=yes" |
| 4842 | else |
| 4843 | echo "configure: failed program was:" >&5 |
| 4844 | cat conftest.$ac_ext >&5 |
| 4845 | rm -rf conftest* |
| 4846 | eval "ac_cv_func_$ac_func=no" |
| 4847 | fi |
| 4848 | rm -f conftest* |
| 4849 | fi |
| 4850 | |
| 4851 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4852 | echo "$ac_t""yes" 1>&6 |
| 4853 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4854 | cat >> confdefs.h <<EOF |
| 4855 | #define $ac_tr_func 1 |
| 4856 | EOF |
| 4857 | |
| 4858 | else |
| 4859 | echo "$ac_t""no" 1>&6 |
| 4860 | fi |
| 4861 | done |
| 4862 | |
| 4863 | |
| 4864 | for ac_func in dup2 getcwd strdup strerror memmove |
| 4865 | do |
| 4866 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4867 | echo "configure:4868: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4868 | 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] | 4869 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4870 | else |
| 4871 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4872 | #line 4873 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4873 | #include "confdefs.h" |
| 4874 | /* System header to define __stub macros and hopefully few prototypes, |
| 4875 | which can conflict with char $ac_func(); below. */ |
| 4876 | #include <assert.h> |
| 4877 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4878 | /* We use char because int might match the return type of a gcc2 |
| 4879 | builtin and then its argument prototype would still apply. */ |
| 4880 | char $ac_func(); |
| 4881 | |
| 4882 | int main() { |
| 4883 | |
| 4884 | /* The GNU C library defines this for functions which it implements |
| 4885 | to always fail with ENOSYS. Some functions are actually named |
| 4886 | something starting with __ and the normal name is an alias. */ |
| 4887 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4888 | choke me |
| 4889 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4890 | $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4891 | #endif |
| 4892 | |
| 4893 | ; return 0; } |
| 4894 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4895 | if { (eval echo configure:4896: \"$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] | 4896 | rm -rf conftest* |
| 4897 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4898 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4899 | echo "configure: failed program was:" >&5 |
| 4900 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4901 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4902 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4903 | fi |
| 4904 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4905 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4906 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4907 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4908 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4909 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4910 | cat >> confdefs.h <<EOF |
| 4911 | #define $ac_tr_func 1 |
| 4912 | EOF |
| 4913 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4914 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4915 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 4916 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4917 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4918 | done |
| 4919 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4920 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4921 | for ac_func in getpgrp |
| 4922 | do |
| 4923 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4924 | echo "configure:4925: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4925 | 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] | 4926 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4927 | else |
| 4928 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4929 | #line 4930 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4930 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4931 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4932 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4933 | #include <assert.h> |
| 4934 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4935 | /* We use char because int might match the return type of a gcc2 |
| 4936 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4937 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4938 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4939 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4940 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4941 | /* The GNU C library defines this for functions which it implements |
| 4942 | to always fail with ENOSYS. Some functions are actually named |
| 4943 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4944 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4945 | choke me |
| 4946 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4947 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4948 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4949 | |
| 4950 | ; return 0; } |
| 4951 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4952 | if { (eval echo configure:4953: \"$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] | 4953 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4954 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4955 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4956 | echo "configure: failed program was:" >&5 |
| 4957 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4958 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4959 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4960 | fi |
| 4961 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4962 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4963 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4964 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4965 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4966 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4967 | cat >> confdefs.h <<EOF |
| 4968 | #define $ac_tr_func 1 |
| 4969 | EOF |
| 4970 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4971 | #line 4972 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4972 | #include "confdefs.h" |
| 4973 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4974 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4975 | getpgrp(0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4976 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4977 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4978 | if { (eval echo configure:4979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4979 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4980 | cat >> confdefs.h <<\EOF |
| 4981 | #define GETPGRP_HAVE_ARG 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4982 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4983 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4984 | else |
| 4985 | echo "configure: failed program was:" >&5 |
| 4986 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4987 | fi |
| 4988 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4989 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4990 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4991 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4992 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4993 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4994 | for ac_func in setpgrp |
| 4995 | do |
| 4996 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 4997 | echo "configure:4998: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4998 | 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] | 4999 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5000 | else |
| 5001 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5002 | #line 5003 "configure" |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5003 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5004 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5005 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5006 | #include <assert.h> |
| 5007 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5008 | /* We use char because int might match the return type of a gcc2 |
| 5009 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5010 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5011 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5012 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5013 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5014 | /* The GNU C library defines this for functions which it implements |
| 5015 | to always fail with ENOSYS. Some functions are actually named |
| 5016 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5017 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5018 | choke me |
| 5019 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5020 | $ac_func(); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5021 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5022 | |
| 5023 | ; return 0; } |
| 5024 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5025 | if { (eval echo configure:5026: \"$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] | 5026 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5027 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5028 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5029 | echo "configure: failed program was:" >&5 |
| 5030 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5031 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5032 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5033 | fi |
| 5034 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5035 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5036 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5037 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5038 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5039 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5040 | cat >> confdefs.h <<EOF |
| 5041 | #define $ac_tr_func 1 |
| 5042 | EOF |
| 5043 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5044 | #line 5045 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5045 | #include "confdefs.h" |
| 5046 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5047 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5048 | setpgrp(0,0); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5049 | ; return 0; } |
| 5050 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5051 | if { (eval echo configure:5052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5052 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5053 | cat >> confdefs.h <<\EOF |
| 5054 | #define SETPGRP_HAVE_ARG 1 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5055 | EOF |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5056 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5057 | else |
| 5058 | echo "configure: failed program was:" >&5 |
| 5059 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5060 | fi |
| 5061 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5062 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5063 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5064 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5065 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5066 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5067 | for ac_func in gettimeofday |
| 5068 | do |
| 5069 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5070 | echo "configure:5071: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5071 | 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] | 5072 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5073 | else |
| 5074 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5075 | #line 5076 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5076 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5077 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5078 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5079 | #include <assert.h> |
| 5080 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5081 | /* We use char because int might match the return type of a gcc2 |
| 5082 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5083 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5084 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5085 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5086 | |
| 5087 | /* The GNU C library defines this for functions which it implements |
| 5088 | to always fail with ENOSYS. Some functions are actually named |
| 5089 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5090 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5091 | choke me |
| 5092 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5093 | $ac_func(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5094 | #endif |
| 5095 | |
| 5096 | ; return 0; } |
| 5097 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5098 | if { (eval echo configure:5099: \"$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] | 5099 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5100 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5101 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5102 | echo "configure: failed program was:" >&5 |
| 5103 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5104 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5105 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5106 | fi |
| 5107 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5108 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5109 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5110 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5111 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5112 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5113 | cat >> confdefs.h <<EOF |
| 5114 | #define $ac_tr_func 1 |
| 5115 | EOF |
| 5116 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5117 | #line 5118 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5118 | #include "confdefs.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5119 | #include <sys/time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5120 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5121 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
| 5122 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5123 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5124 | if { (eval echo configure:5125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5125 | : |
| 5126 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5127 | echo "configure: failed program was:" >&5 |
| 5128 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5129 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5130 | cat >> confdefs.h <<\EOF |
| 5131 | #define GETTIMEOFDAY_NO_TZ 1 |
| 5132 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5133 | |
| 5134 | fi |
| 5135 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5136 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5137 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5138 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5139 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5140 | |
| 5141 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5142 | for ac_func in getaddrinfo |
| 5143 | do |
| 5144 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5145 | echo "configure:5146: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5146 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5147 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5148 | else |
| 5149 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5150 | #line 5151 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5151 | #include "confdefs.h" |
| 5152 | /* System header to define __stub macros and hopefully few prototypes, |
| 5153 | which can conflict with char $ac_func(); below. */ |
| 5154 | #include <assert.h> |
| 5155 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5156 | /* We use char because int might match the return type of a gcc2 |
| 5157 | builtin and then its argument prototype would still apply. */ |
| 5158 | char $ac_func(); |
| 5159 | |
| 5160 | int main() { |
| 5161 | |
| 5162 | /* The GNU C library defines this for functions which it implements |
| 5163 | to always fail with ENOSYS. Some functions are actually named |
| 5164 | something starting with __ and the normal name is an alias. */ |
| 5165 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5166 | choke me |
| 5167 | #else |
| 5168 | $ac_func(); |
| 5169 | #endif |
| 5170 | |
| 5171 | ; return 0; } |
| 5172 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5173 | if { (eval echo configure:5174: \"$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] | 5174 | rm -rf conftest* |
| 5175 | eval "ac_cv_func_$ac_func=yes" |
| 5176 | else |
| 5177 | echo "configure: failed program was:" >&5 |
| 5178 | cat conftest.$ac_ext >&5 |
| 5179 | rm -rf conftest* |
| 5180 | eval "ac_cv_func_$ac_func=no" |
| 5181 | fi |
| 5182 | rm -f conftest* |
| 5183 | fi |
| 5184 | |
| 5185 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5186 | echo "$ac_t""yes" 1>&6 |
| 5187 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5188 | cat >> confdefs.h <<EOF |
| 5189 | #define $ac_tr_func 1 |
| 5190 | EOF |
| 5191 | echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5192 | echo "configure:5193: checking getaddrinfo bug" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5193 | if test "$cross_compiling" = yes; then |
| 5194 | echo "$ac_t""buggy" 1>&6 |
| 5195 | buggygetaddrinfo=yes |
| 5196 | else |
| 5197 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5198 | #line 5199 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5199 | #include "confdefs.h" |
| 5200 | |
| 5201 | #include <sys/types.h> |
| 5202 | #include <netdb.h> |
| 5203 | #include <string.h> |
| 5204 | #include <sys/socket.h> |
| 5205 | #include <netinet/in.h> |
| 5206 | |
| 5207 | main() |
| 5208 | { |
| 5209 | int passive, gaierr, inet4 = 0, inet6 = 0; |
| 5210 | struct addrinfo hints, *ai, *aitop; |
| 5211 | char straddr[INET6_ADDRSTRLEN], strport[16]; |
| 5212 | |
| 5213 | for (passive = 0; passive <= 1; passive++) { |
| 5214 | memset(&hints, 0, sizeof(hints)); |
| 5215 | hints.ai_family = AF_UNSPEC; |
| 5216 | hints.ai_flags = passive ? AI_PASSIVE : 0; |
| 5217 | hints.ai_socktype = SOCK_STREAM; |
| 5218 | if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { |
| 5219 | (void)gai_strerror(gaierr); |
| 5220 | goto bad; |
| 5221 | } |
| 5222 | for (ai = aitop; ai; ai = ai->ai_next) { |
| 5223 | if (ai->ai_addr == NULL || |
| 5224 | ai->ai_addrlen == 0 || |
| 5225 | getnameinfo(ai->ai_addr, ai->ai_addrlen, |
| 5226 | straddr, sizeof(straddr), strport, sizeof(strport), |
| 5227 | NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
| 5228 | goto bad; |
| 5229 | } |
| 5230 | switch (ai->ai_family) { |
| 5231 | case AF_INET: |
| 5232 | if (strcmp(strport, "54321") != 0) { |
| 5233 | goto bad; |
| 5234 | } |
| 5235 | if (passive) { |
| 5236 | if (strcmp(straddr, "0.0.0.0") != 0) { |
| 5237 | goto bad; |
| 5238 | } |
| 5239 | } else { |
| 5240 | if (strcmp(straddr, "127.0.0.1") != 0) { |
| 5241 | goto bad; |
| 5242 | } |
| 5243 | } |
| 5244 | inet4++; |
| 5245 | break; |
| 5246 | case AF_INET6: |
| 5247 | if (strcmp(strport, "54321") != 0) { |
| 5248 | goto bad; |
| 5249 | } |
| 5250 | if (passive) { |
| 5251 | if (strcmp(straddr, "::") != 0) { |
| 5252 | goto bad; |
| 5253 | } |
| 5254 | } else { |
| 5255 | if (strcmp(straddr, "::1") != 0) { |
| 5256 | goto bad; |
| 5257 | } |
| 5258 | } |
| 5259 | inet6++; |
| 5260 | break; |
| 5261 | case AF_UNSPEC: |
| 5262 | goto bad; |
| 5263 | break; |
| 5264 | default: |
| 5265 | /* another family support? */ |
| 5266 | break; |
| 5267 | } |
| 5268 | } |
| 5269 | } |
| 5270 | |
| 5271 | if (!(inet4 == 0 || inet4 == 2)) |
| 5272 | goto bad; |
| 5273 | if (!(inet6 == 0 || inet6 == 2)) |
| 5274 | goto bad; |
| 5275 | |
| 5276 | if (aitop) |
| 5277 | freeaddrinfo(aitop); |
| 5278 | exit(0); |
| 5279 | |
| 5280 | bad: |
| 5281 | if (aitop) |
| 5282 | freeaddrinfo(aitop); |
| 5283 | exit(1); |
| 5284 | } |
| 5285 | |
| 5286 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5287 | if { (eval echo configure:5288: \"$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] | 5288 | then |
| 5289 | echo "$ac_t""good" 1>&6 |
| 5290 | buggygetaddrinfo=no |
| 5291 | else |
| 5292 | echo "configure: failed program was:" >&5 |
| 5293 | cat conftest.$ac_ext >&5 |
| 5294 | rm -fr conftest* |
| 5295 | echo "$ac_t""buggy" 1>&6 |
| 5296 | buggygetaddrinfo=yes |
| 5297 | fi |
| 5298 | rm -fr conftest* |
| 5299 | fi |
| 5300 | |
| 5301 | else |
| 5302 | echo "$ac_t""no" 1>&6 |
| 5303 | buggygetaddrinfo=yes |
| 5304 | fi |
| 5305 | done |
| 5306 | |
| 5307 | |
| 5308 | if test "$buggygetaddrinfo" = "yes"; then |
| 5309 | if test "$ipv6" = "yes"; then |
| 5310 | echo 'Fatal: You must get working getaddrinfo() function.' |
| 5311 | echo ' or you can specify "--disable-ipv6"'. |
| 5312 | exit 1 |
| 5313 | fi |
| 5314 | fi |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5315 | for ac_func in getnameinfo |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5316 | do |
| 5317 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5318 | echo "configure:5319: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5319 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5320 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5321 | else |
| 5322 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5323 | #line 5324 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5324 | #include "confdefs.h" |
| 5325 | /* System header to define __stub macros and hopefully few prototypes, |
| 5326 | which can conflict with char $ac_func(); below. */ |
| 5327 | #include <assert.h> |
| 5328 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5329 | /* We use char because int might match the return type of a gcc2 |
| 5330 | builtin and then its argument prototype would still apply. */ |
| 5331 | char $ac_func(); |
| 5332 | |
| 5333 | int main() { |
| 5334 | |
| 5335 | /* The GNU C library defines this for functions which it implements |
| 5336 | to always fail with ENOSYS. Some functions are actually named |
| 5337 | something starting with __ and the normal name is an alias. */ |
| 5338 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5339 | choke me |
| 5340 | #else |
| 5341 | $ac_func(); |
| 5342 | #endif |
| 5343 | |
| 5344 | ; return 0; } |
| 5345 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5346 | if { (eval echo configure:5347: \"$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] | 5347 | rm -rf conftest* |
| 5348 | eval "ac_cv_func_$ac_func=yes" |
| 5349 | else |
| 5350 | echo "configure: failed program was:" >&5 |
| 5351 | cat conftest.$ac_ext >&5 |
| 5352 | rm -rf conftest* |
| 5353 | eval "ac_cv_func_$ac_func=no" |
| 5354 | fi |
| 5355 | rm -f conftest* |
| 5356 | fi |
| 5357 | |
| 5358 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5359 | echo "$ac_t""yes" 1>&6 |
| 5360 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5361 | cat >> confdefs.h <<EOF |
| 5362 | #define $ac_tr_func 1 |
| 5363 | EOF |
| 5364 | |
| 5365 | else |
| 5366 | echo "$ac_t""no" 1>&6 |
| 5367 | fi |
| 5368 | done |
| 5369 | |
| 5370 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5371 | # checks for structures |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5372 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5373 | echo "configure:5374: 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] | 5374 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5375 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5376 | else |
| 5377 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5378 | #line 5379 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5379 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5380 | #include <sys/types.h> |
| 5381 | #include <sys/time.h> |
| 5382 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5383 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5384 | struct tm *tp; |
| 5385 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5386 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5387 | if { (eval echo configure:5388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5388 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5389 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5390 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5391 | echo "configure: failed program was:" >&5 |
| 5392 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5393 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5394 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5395 | fi |
| 5396 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5397 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5398 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5399 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5400 | if test $ac_cv_header_time = yes; then |
| 5401 | cat >> confdefs.h <<\EOF |
| 5402 | #define TIME_WITH_SYS_TIME 1 |
| 5403 | EOF |
| 5404 | |
| 5405 | fi |
| 5406 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5407 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5408 | echo "configure:5409: 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] | 5409 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5410 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5411 | else |
| 5412 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5413 | #line 5414 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5414 | #include "confdefs.h" |
| 5415 | #include <sys/types.h> |
| 5416 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5417 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5418 | struct tm *tp; tp->tm_sec; |
| 5419 | ; return 0; } |
| 5420 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5421 | if { (eval echo configure:5422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5422 | rm -rf conftest* |
| 5423 | ac_cv_struct_tm=time.h |
| 5424 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5425 | echo "configure: failed program was:" >&5 |
| 5426 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5427 | rm -rf conftest* |
| 5428 | ac_cv_struct_tm=sys/time.h |
| 5429 | fi |
| 5430 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5431 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5432 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5433 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5434 | if test $ac_cv_struct_tm = sys/time.h; then |
| 5435 | cat >> confdefs.h <<\EOF |
| 5436 | #define TM_IN_SYS_TIME 1 |
| 5437 | EOF |
| 5438 | |
| 5439 | fi |
| 5440 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5441 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5442 | echo "configure:5443: checking for tm_zone in struct tm" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5443 | 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] | 5444 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5445 | else |
| 5446 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5447 | #line 5448 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5448 | #include "confdefs.h" |
| 5449 | #include <sys/types.h> |
| 5450 | #include <$ac_cv_struct_tm> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5451 | int main() { |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5452 | struct tm tm; tm.tm_zone; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5453 | ; return 0; } |
| 5454 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5455 | if { (eval echo configure:5456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5456 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5457 | ac_cv_struct_tm_zone=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5458 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5459 | echo "configure: failed program was:" >&5 |
| 5460 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5461 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5462 | ac_cv_struct_tm_zone=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5463 | fi |
| 5464 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5465 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5466 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5467 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 |
| 5468 | if test "$ac_cv_struct_tm_zone" = yes; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5469 | cat >> confdefs.h <<\EOF |
| 5470 | #define HAVE_TM_ZONE 1 |
| 5471 | EOF |
| 5472 | |
| 5473 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5474 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5475 | echo "configure:5476: checking for tzname" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5476 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5477 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5478 | else |
| 5479 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5480 | #line 5481 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5481 | #include "confdefs.h" |
| 5482 | #include <time.h> |
| 5483 | #ifndef tzname /* For SGI. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5484 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5485 | #endif |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5486 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5487 | atoi(*tzname); |
| 5488 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5489 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5490 | if { (eval echo configure:5491: \"$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] | 5491 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5492 | ac_cv_var_tzname=yes |
| 5493 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5494 | echo "configure: failed program was:" >&5 |
| 5495 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5496 | rm -rf conftest* |
| 5497 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5498 | fi |
| 5499 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5500 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5501 | |
| 5502 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5503 | if test $ac_cv_var_tzname = yes; then |
| 5504 | cat >> confdefs.h <<\EOF |
| 5505 | #define HAVE_TZNAME 1 |
| 5506 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5507 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5508 | fi |
| 5509 | fi |
| 5510 | |
| 5511 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5512 | echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5513 | echo "configure:5514: checking for time.h that defines altzone" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5514 | 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] | 5515 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5516 | else |
| 5517 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5518 | #line 5519 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5519 | #include "confdefs.h" |
| 5520 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5521 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5522 | return altzone; |
| 5523 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5524 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5525 | if { (eval echo configure:5526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5526 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5527 | ac_cv_header_time_altzone=yes |
| 5528 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5529 | echo "configure: failed program was:" >&5 |
| 5530 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5531 | rm -rf conftest* |
| 5532 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5533 | fi |
| 5534 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5535 | fi |
| 5536 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5537 | echo "$ac_t""$ac_cv_header_time_altzone" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5538 | if test $ac_cv_header_time_altzone = yes; then |
| 5539 | cat >> confdefs.h <<\EOF |
| 5540 | #define HAVE_ALTZONE 1 |
| 5541 | EOF |
| 5542 | |
| 5543 | fi |
| 5544 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5545 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5546 | echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5547 | echo "configure:5548: 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] | 5548 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5549 | #line 5550 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5550 | #include "confdefs.h" |
| 5551 | |
| 5552 | #include <sys/types.h> |
| 5553 | #include <sys/select.h> |
| 5554 | #include <sys/time.h> |
| 5555 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5556 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5557 | ; |
| 5558 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5559 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5560 | if { (eval echo configure:5561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5561 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5562 | cat >> confdefs.h <<\EOF |
| 5563 | #define SYS_SELECT_WITH_SYS_TIME 1 |
| 5564 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5565 | was_it_defined=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5566 | else |
| 5567 | echo "configure: failed program was:" >&5 |
| 5568 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5569 | fi |
| 5570 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5571 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5572 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5573 | echo $ac_n "checking for addrinfo""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5574 | echo "configure:5575: checking for addrinfo" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5575 | if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then |
| 5576 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5577 | else |
| 5578 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5579 | #line 5580 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5580 | #include "confdefs.h" |
| 5581 | |
| 5582 | # include <netdb.h> |
| 5583 | int main() { |
| 5584 | struct addrinfo a |
| 5585 | ; return 0; } |
| 5586 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5587 | if { (eval echo configure:5588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5588 | rm -rf conftest* |
| 5589 | ac_cv_struct_addrinfo=yes |
| 5590 | else |
| 5591 | echo "configure: failed program was:" >&5 |
| 5592 | cat conftest.$ac_ext >&5 |
| 5593 | rm -rf conftest* |
| 5594 | ac_cv_struct_addrinfo=no |
| 5595 | fi |
| 5596 | rm -f conftest* |
| 5597 | fi |
| 5598 | |
| 5599 | echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6 |
| 5600 | if test $ac_cv_struct_addrinfo = yes; then |
| 5601 | cat >> confdefs.h <<\EOF |
| 5602 | #define HAVE_ADDRINFO 1 |
| 5603 | EOF |
| 5604 | |
| 5605 | fi |
| 5606 | |
| 5607 | echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5608 | echo "configure:5609: checking for sockaddr_storage" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5609 | if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then |
| 5610 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5611 | else |
| 5612 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5613 | #line 5614 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5614 | #include "confdefs.h" |
| 5615 | |
| 5616 | # include <sys/types.h> |
| 5617 | # include <sys/socket.h> |
| 5618 | int main() { |
| 5619 | struct sockaddr_storage s |
| 5620 | ; return 0; } |
| 5621 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5622 | if { (eval echo configure:5623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5623 | rm -rf conftest* |
| 5624 | ac_cv_struct_sockaddr_storage=yes |
| 5625 | else |
| 5626 | echo "configure: failed program was:" >&5 |
| 5627 | cat conftest.$ac_ext >&5 |
| 5628 | rm -rf conftest* |
| 5629 | ac_cv_struct_sockaddr_storage=no |
| 5630 | fi |
| 5631 | rm -f conftest* |
| 5632 | fi |
| 5633 | |
| 5634 | echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6 |
| 5635 | if test $ac_cv_struct_sockaddr_storage = yes; then |
| 5636 | cat >> confdefs.h <<\EOF |
| 5637 | #define HAVE_SOCKADDR_STORAGE 1 |
| 5638 | EOF |
| 5639 | |
| 5640 | fi |
| 5641 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5642 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5643 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5644 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5645 | echo "configure:5646: checking whether char is unsigned" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5646 | 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] | 5647 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5648 | else |
| 5649 | if test "$GCC" = yes; then |
| 5650 | # GCC predefines this symbol on systems where it applies. |
| 5651 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5652 | #line 5653 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5653 | #include "confdefs.h" |
| 5654 | #ifdef __CHAR_UNSIGNED__ |
| 5655 | yes |
| 5656 | #endif |
| 5657 | |
| 5658 | EOF |
| 5659 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 5660 | egrep "yes" >/dev/null 2>&1; then |
| 5661 | rm -rf conftest* |
| 5662 | ac_cv_c_char_unsigned=yes |
| 5663 | else |
| 5664 | rm -rf conftest* |
| 5665 | ac_cv_c_char_unsigned=no |
| 5666 | fi |
| 5667 | rm -f conftest* |
| 5668 | |
| 5669 | else |
| 5670 | if test "$cross_compiling" = yes; then |
| 5671 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5672 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5673 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5674 | #line 5675 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5675 | #include "confdefs.h" |
| 5676 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5677 | #if !defined(__STDC__) || __STDC__ != 1 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5678 | #define volatile |
| 5679 | #endif |
| 5680 | main() { |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5681 | volatile char c = 255; exit(c < 0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5682 | } |
| 5683 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5684 | if { (eval echo configure:5685: \"$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] | 5685 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5686 | ac_cv_c_char_unsigned=yes |
| 5687 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5688 | echo "configure: failed program was:" >&5 |
| 5689 | cat conftest.$ac_ext >&5 |
| 5690 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5691 | ac_cv_c_char_unsigned=no |
| 5692 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5693 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5694 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5695 | |
| 5696 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5697 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5698 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5699 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5700 | if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then |
| 5701 | cat >> confdefs.h <<\EOF |
| 5702 | #define __CHAR_UNSIGNED__ 1 |
| 5703 | EOF |
| 5704 | |
| 5705 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5706 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5707 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5708 | echo "configure:5709: checking for working const" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5709 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5710 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5711 | else |
| 5712 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5713 | #line 5714 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5714 | #include "confdefs.h" |
| 5715 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5716 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5717 | |
| 5718 | /* Ultrix mips cc rejects this. */ |
Martin v. Löwis | 9db2f57 | 2001-07-23 01:30:10 +0000 | [diff] [blame] | 5719 | typedef int charset[2]; const charset x; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5720 | /* SunOS 4.1.1 cc rejects this. */ |
| 5721 | char const *const *ccp; |
| 5722 | char **p; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5723 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 5724 | struct point {int x, y;}; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5725 | static struct point const zero = {0,0}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5726 | /* AIX XL C 1.02.0.0 rejects this. |
| 5727 | It does not let you subtract one const X* pointer from another in an arm |
| 5728 | of an if-expression whose if-part is not a constant expression */ |
| 5729 | const char *g = "string"; |
| 5730 | ccp = &g + (g ? g-g : 0); |
| 5731 | /* HPUX 7.0 cc rejects these. */ |
| 5732 | ++ccp; |
| 5733 | p = (char**) ccp; |
| 5734 | ccp = (char const *const *) p; |
| 5735 | { /* SCO 3.2v4 cc rejects this. */ |
| 5736 | char *t; |
| 5737 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
| 5738 | |
| 5739 | *t++ = 0; |
| 5740 | } |
| 5741 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5742 | int x[] = {25, 17}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5743 | const int *foo = &x[0]; |
| 5744 | ++foo; |
| 5745 | } |
| 5746 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 5747 | typedef const int *iptr; |
| 5748 | iptr p = 0; |
| 5749 | ++p; |
| 5750 | } |
| 5751 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 5752 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 5753 | struct s { int j; const int *ap[3]; }; |
| 5754 | struct s *b; b->j = 5; |
| 5755 | } |
| 5756 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 5757 | const int foo = 10; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5758 | } |
| 5759 | |
| 5760 | ; return 0; } |
| 5761 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5762 | if { (eval echo configure:5763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5763 | rm -rf conftest* |
| 5764 | ac_cv_c_const=yes |
| 5765 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5766 | echo "configure: failed program was:" >&5 |
| 5767 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5768 | rm -rf conftest* |
| 5769 | ac_cv_c_const=no |
| 5770 | fi |
| 5771 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5772 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5773 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5774 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5775 | if test $ac_cv_c_const = no; then |
| 5776 | cat >> confdefs.h <<\EOF |
| 5777 | #define const |
| 5778 | EOF |
| 5779 | |
| 5780 | fi |
| 5781 | |
| 5782 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5783 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5784 | echo $ac_n "checking for working volatile""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5785 | echo "configure:5786: checking for working volatile" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5786 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5787 | #line 5788 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5788 | #include "confdefs.h" |
| 5789 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5790 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5791 | volatile int x; x = 0; |
| 5792 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5793 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5794 | if { (eval echo configure:5795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5795 | rm -rf conftest* |
| 5796 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5797 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5798 | echo "configure: failed program was:" >&5 |
| 5799 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5800 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5801 | cat >> confdefs.h <<\EOF |
| 5802 | #define volatile |
| 5803 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5804 | |
| 5805 | fi |
| 5806 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5807 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5808 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5809 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5810 | echo $ac_n "checking for working signed char""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5811 | echo "configure:5812: checking for working signed char" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5812 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5813 | #line 5814 "configure" |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5814 | #include "confdefs.h" |
| 5815 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5816 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5817 | signed char c; |
| 5818 | ; return 0; } |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5819 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5820 | if { (eval echo configure:5821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5821 | rm -rf conftest* |
| 5822 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5823 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5824 | echo "configure: failed program was:" >&5 |
| 5825 | cat conftest.$ac_ext >&5 |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5826 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5827 | cat >> confdefs.h <<\EOF |
| 5828 | #define signed |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5829 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5830 | |
| 5831 | fi |
| 5832 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5833 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5834 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5835 | have_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5836 | echo $ac_n "checking for prototypes""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5837 | echo "configure:5838: checking for prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5838 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5839 | #line 5840 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5840 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5841 | int foo(int x) { return 0; } |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5842 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5843 | return foo(10); |
| 5844 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5845 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5846 | if { (eval echo configure:5847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5847 | rm -rf conftest* |
| 5848 | cat >> confdefs.h <<\EOF |
| 5849 | #define HAVE_PROTOTYPES 1 |
| 5850 | EOF |
| 5851 | have_prototypes=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5852 | else |
| 5853 | echo "configure: failed program was:" >&5 |
| 5854 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5855 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5856 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5857 | echo "$ac_t""$have_prototypes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5858 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5859 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5860 | echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5861 | echo "configure:5862: checking for variable length prototypes and stdarg.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5862 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5863 | #line 5864 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5864 | #include "confdefs.h" |
| 5865 | |
| 5866 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 5867 | int foo(int x, ...) { |
| 5868 | va_list va; |
| 5869 | va_start(va, x); |
| 5870 | va_arg(va, int); |
| 5871 | va_arg(va, char *); |
| 5872 | va_arg(va, double); |
| 5873 | return 0; |
| 5874 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5875 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5876 | int main() { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 5877 | return foo(10, "", 3.14); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5878 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5879 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5880 | if { (eval echo configure:5881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5881 | rm -rf conftest* |
| 5882 | cat >> confdefs.h <<\EOF |
| 5883 | #define HAVE_STDARG_PROTOTYPES 1 |
| 5884 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5885 | works=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5886 | else |
| 5887 | echo "configure: failed program was:" >&5 |
| 5888 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5889 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5890 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5891 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5892 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5893 | if test "$have_prototypes" = yes; then |
| 5894 | bad_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5895 | echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5896 | echo "configure:5897: checking for bad exec* prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5897 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5898 | #line 5899 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5899 | #include "confdefs.h" |
| 5900 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5901 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5902 | char **t;execve("@",t,t); |
| 5903 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5904 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5905 | if { (eval echo configure:5906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5906 | : |
| 5907 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5908 | echo "configure: failed program was:" >&5 |
| 5909 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5910 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5911 | cat >> confdefs.h <<\EOF |
| 5912 | #define BAD_EXEC_PROTOTYPES 1 |
| 5913 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5914 | bad_prototypes=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5915 | fi |
| 5916 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5917 | echo "$ac_t""$bad_prototypes" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5918 | fi |
| 5919 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5920 | # check if sockaddr has sa_len member |
| 5921 | echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5922 | echo "configure:5923: checking if sockaddr has sa_len member" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5923 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5924 | #line 5925 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5925 | #include "confdefs.h" |
| 5926 | #include <sys/types.h> |
| 5927 | #include <sys/socket.h> |
| 5928 | int main() { |
| 5929 | struct sockaddr x; |
| 5930 | x.sa_len = 0; |
| 5931 | ; return 0; } |
| 5932 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5933 | if { (eval echo configure:5934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5934 | rm -rf conftest* |
| 5935 | echo "$ac_t""yes" 1>&6 |
| 5936 | cat >> confdefs.h <<\EOF |
| 5937 | #define HAVE_SOCKADDR_SA_LEN 1 |
| 5938 | EOF |
| 5939 | |
| 5940 | else |
| 5941 | echo "configure: failed program was:" >&5 |
| 5942 | cat conftest.$ac_ext >&5 |
| 5943 | rm -rf conftest* |
| 5944 | echo "$ac_t""no" 1>&6 |
| 5945 | fi |
| 5946 | rm -f conftest* |
| 5947 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5948 | bad_forward=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5949 | echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5950 | echo "configure:5951: checking for bad static forward" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5951 | if test "$cross_compiling" = yes; then |
| 5952 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5953 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5954 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5955 | #line 5956 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5956 | #include "confdefs.h" |
| 5957 | |
| 5958 | struct s { int a; int b; }; |
| 5959 | static struct s foo; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5960 | int foobar() { |
| 5961 | static int random; |
| 5962 | random = (int) &foo; |
| 5963 | return random; |
| 5964 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5965 | static struct s foo = { 1, 2 }; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5966 | main() { |
| 5967 | exit(!((int)&foo == foobar())); |
| 5968 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5969 | |
| 5970 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5971 | if { (eval echo configure:5972: \"$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] | 5972 | then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5973 | : |
| 5974 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5975 | echo "configure: failed program was:" >&5 |
| 5976 | cat conftest.$ac_ext >&5 |
| 5977 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5978 | cat >> confdefs.h <<\EOF |
| 5979 | #define BAD_STATIC_FORWARD 1 |
| 5980 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5981 | bad_forward=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5982 | fi |
| 5983 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5984 | fi |
| 5985 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5986 | echo "$ac_t""$bad_forward" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5987 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5988 | va_list_is_array=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5989 | echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5990 | echo "configure:5991: checking whether va_list is an array" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5991 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5992 | #line 5993 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5993 | #include "confdefs.h" |
| 5994 | |
| 5995 | #ifdef HAVE_STDARG_PROTOTYPES |
| 5996 | #include <stdarg.h> |
| 5997 | #else |
| 5998 | #include <varargs.h> |
| 5999 | #endif |
| 6000 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6001 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6002 | va_list list1, list2; list1 = list2; |
| 6003 | ; return 0; } |
| 6004 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6005 | if { (eval echo configure:6006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6006 | : |
| 6007 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6008 | echo "configure: failed program was:" >&5 |
| 6009 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6010 | rm -rf conftest* |
| 6011 | cat >> confdefs.h <<\EOF |
| 6012 | #define VA_LIST_IS_ARRAY 1 |
| 6013 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6014 | va_list_is_array=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6015 | fi |
| 6016 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6017 | echo "$ac_t""$va_list_is_array" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6018 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6019 | # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( |
| 6020 | echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6021 | echo "configure:6022: checking for gethostbyname_r" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6022 | 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] | 6023 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6024 | else |
| 6025 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6026 | #line 6027 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6027 | #include "confdefs.h" |
| 6028 | /* System header to define __stub macros and hopefully few prototypes, |
| 6029 | which can conflict with char gethostbyname_r(); below. */ |
| 6030 | #include <assert.h> |
| 6031 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6032 | /* We use char because int might match the return type of a gcc2 |
| 6033 | builtin and then its argument prototype would still apply. */ |
| 6034 | char gethostbyname_r(); |
| 6035 | |
| 6036 | int main() { |
| 6037 | |
| 6038 | /* The GNU C library defines this for functions which it implements |
| 6039 | to always fail with ENOSYS. Some functions are actually named |
| 6040 | something starting with __ and the normal name is an alias. */ |
| 6041 | #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) |
| 6042 | choke me |
| 6043 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6044 | gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6045 | #endif |
| 6046 | |
| 6047 | ; return 0; } |
| 6048 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6049 | if { (eval echo configure:6050: \"$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] | 6050 | rm -rf conftest* |
| 6051 | eval "ac_cv_func_gethostbyname_r=yes" |
| 6052 | else |
| 6053 | echo "configure: failed program was:" >&5 |
| 6054 | cat conftest.$ac_ext >&5 |
| 6055 | rm -rf conftest* |
| 6056 | eval "ac_cv_func_gethostbyname_r=no" |
| 6057 | fi |
| 6058 | rm -f conftest* |
| 6059 | fi |
| 6060 | |
| 6061 | if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then |
| 6062 | echo "$ac_t""yes" 1>&6 |
| 6063 | |
| 6064 | cat >> confdefs.h <<\EOF |
| 6065 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6066 | EOF |
| 6067 | |
| 6068 | echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6069 | echo "configure:6070: checking gethostbyname_r with 6 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6070 | OLD_CFLAGS=$CFLAGS |
| 6071 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
| 6072 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6073 | #line 6074 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6074 | #include "confdefs.h" |
| 6075 | |
| 6076 | # include <netdb.h> |
| 6077 | |
| 6078 | int main() { |
| 6079 | |
| 6080 | char *name; |
| 6081 | struct hostent *he, *res; |
| 6082 | char buffer[2048]; |
| 6083 | int buflen = 2048; |
| 6084 | int h_errnop; |
| 6085 | |
| 6086 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
| 6087 | |
| 6088 | ; return 0; } |
| 6089 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6090 | if { (eval echo configure:6091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6091 | rm -rf conftest* |
| 6092 | |
| 6093 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6094 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6095 | EOF |
| 6096 | |
| 6097 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6098 | #define HAVE_GETHOSTBYNAME_R_6_ARG 1 |
| 6099 | EOF |
| 6100 | |
| 6101 | echo "$ac_t""yes" 1>&6 |
| 6102 | |
| 6103 | else |
| 6104 | echo "configure: failed program was:" >&5 |
| 6105 | cat conftest.$ac_ext >&5 |
| 6106 | rm -rf conftest* |
| 6107 | |
| 6108 | echo "$ac_t""no" 1>&6 |
| 6109 | echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6110 | echo "configure:6111: checking gethostbyname_r with 5 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6111 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6112 | #line 6113 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6113 | #include "confdefs.h" |
| 6114 | |
| 6115 | # include <netdb.h> |
| 6116 | |
| 6117 | int main() { |
| 6118 | |
| 6119 | char *name; |
| 6120 | struct hostent *he; |
| 6121 | char buffer[2048]; |
| 6122 | int buflen = 2048; |
| 6123 | int h_errnop; |
| 6124 | |
| 6125 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
| 6126 | |
| 6127 | ; return 0; } |
| 6128 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6129 | if { (eval echo configure:6130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6130 | rm -rf conftest* |
| 6131 | |
| 6132 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6133 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6134 | EOF |
| 6135 | |
| 6136 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6137 | #define HAVE_GETHOSTBYNAME_R_5_ARG 1 |
| 6138 | EOF |
| 6139 | |
| 6140 | echo "$ac_t""yes" 1>&6 |
| 6141 | |
| 6142 | else |
| 6143 | echo "configure: failed program was:" >&5 |
| 6144 | cat conftest.$ac_ext >&5 |
| 6145 | rm -rf conftest* |
| 6146 | |
| 6147 | echo "$ac_t""no" 1>&6 |
| 6148 | echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6149 | echo "configure:6150: checking gethostbyname_r with 3 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6150 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6151 | #line 6152 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6152 | #include "confdefs.h" |
| 6153 | |
| 6154 | # include <netdb.h> |
| 6155 | |
| 6156 | int main() { |
| 6157 | |
| 6158 | char *name; |
| 6159 | struct hostent *he; |
| 6160 | struct hostent_data data; |
| 6161 | |
| 6162 | (void) gethostbyname_r(name, he, &data); |
| 6163 | |
| 6164 | ; return 0; } |
| 6165 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6166 | if { (eval echo configure:6167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6167 | rm -rf conftest* |
| 6168 | |
| 6169 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6170 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6171 | EOF |
| 6172 | |
| 6173 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6174 | #define HAVE_GETHOSTBYNAME_R_3_ARG 1 |
| 6175 | EOF |
| 6176 | |
| 6177 | echo "$ac_t""yes" 1>&6 |
| 6178 | |
| 6179 | else |
| 6180 | echo "configure: failed program was:" >&5 |
| 6181 | cat conftest.$ac_ext >&5 |
| 6182 | rm -rf conftest* |
| 6183 | |
| 6184 | echo "$ac_t""no" 1>&6 |
| 6185 | |
| 6186 | fi |
| 6187 | rm -f conftest* |
| 6188 | |
| 6189 | fi |
| 6190 | rm -f conftest* |
| 6191 | |
| 6192 | fi |
| 6193 | rm -f conftest* |
| 6194 | CFLAGS=$OLD_CFLAGS |
| 6195 | |
| 6196 | else |
| 6197 | echo "$ac_t""no" 1>&6 |
| 6198 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6199 | for ac_func in gethostbyname |
| 6200 | do |
| 6201 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6202 | echo "configure:6203: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6203 | 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] | 6204 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6205 | else |
| 6206 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6207 | #line 6208 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6208 | #include "confdefs.h" |
| 6209 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6210 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6211 | #include <assert.h> |
| 6212 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6213 | /* We use char because int might match the return type of a gcc2 |
| 6214 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6215 | char $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6216 | |
| 6217 | int main() { |
| 6218 | |
| 6219 | /* The GNU C library defines this for functions which it implements |
| 6220 | to always fail with ENOSYS. Some functions are actually named |
| 6221 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6222 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6223 | choke me |
| 6224 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6225 | $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6226 | #endif |
| 6227 | |
| 6228 | ; return 0; } |
| 6229 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6230 | if { (eval echo configure:6231: \"$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] | 6231 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6232 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6233 | else |
| 6234 | echo "configure: failed program was:" >&5 |
| 6235 | cat conftest.$ac_ext >&5 |
| 6236 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6237 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6238 | fi |
| 6239 | rm -f conftest* |
| 6240 | fi |
| 6241 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6242 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6243 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6244 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6245 | cat >> confdefs.h <<EOF |
| 6246 | #define $ac_tr_func 1 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6247 | EOF |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6248 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6249 | else |
| 6250 | echo "$ac_t""no" 1>&6 |
| 6251 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6252 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6253 | |
| 6254 | |
| 6255 | fi |
| 6256 | |
| 6257 | |
| 6258 | |
| 6259 | |
| 6260 | |
| 6261 | |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6262 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6263 | # checks for system services |
| 6264 | # (none yet) |
| 6265 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6266 | # Linux requires this for correct f.p. operations |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6267 | echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6268 | echo "configure:6269: checking for __fpu_control" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6269 | if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6270 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6271 | else |
| 6272 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6273 | #line 6274 "configure" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6274 | #include "confdefs.h" |
| 6275 | /* System header to define __stub macros and hopefully few prototypes, |
| 6276 | which can conflict with char __fpu_control(); below. */ |
| 6277 | #include <assert.h> |
| 6278 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6279 | /* We use char because int might match the return type of a gcc2 |
| 6280 | builtin and then its argument prototype would still apply. */ |
| 6281 | char __fpu_control(); |
| 6282 | |
| 6283 | int main() { |
| 6284 | |
| 6285 | /* The GNU C library defines this for functions which it implements |
| 6286 | to always fail with ENOSYS. Some functions are actually named |
| 6287 | something starting with __ and the normal name is an alias. */ |
| 6288 | #if defined (__stub___fpu_control) || defined (__stub_____fpu_control) |
| 6289 | choke me |
| 6290 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6291 | __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6292 | #endif |
| 6293 | |
| 6294 | ; return 0; } |
| 6295 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6296 | if { (eval echo configure:6297: \"$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] | 6297 | rm -rf conftest* |
| 6298 | eval "ac_cv_func___fpu_control=yes" |
| 6299 | else |
| 6300 | echo "configure: failed program was:" >&5 |
| 6301 | cat conftest.$ac_ext >&5 |
| 6302 | rm -rf conftest* |
| 6303 | eval "ac_cv_func___fpu_control=no" |
| 6304 | fi |
| 6305 | rm -f conftest* |
| 6306 | fi |
| 6307 | |
| 6308 | if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then |
| 6309 | echo "$ac_t""yes" 1>&6 |
| 6310 | : |
| 6311 | else |
| 6312 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6313 | echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6314 | echo "configure:6315: checking for __fpu_control in -lieee" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6315 | ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6316 | 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] | 6317 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6318 | else |
| 6319 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6320 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6321 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6322 | #line 6323 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6323 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6324 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6325 | /* We use char because int might match the return type of a gcc2 |
| 6326 | builtin and then its argument prototype would still apply. */ |
| 6327 | char __fpu_control(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6328 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6329 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6330 | __fpu_control() |
| 6331 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6332 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6333 | if { (eval echo configure:6334: \"$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] | 6334 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6335 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6336 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6337 | echo "configure: failed program was:" >&5 |
| 6338 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6339 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6340 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6341 | fi |
| 6342 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6343 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6344 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6345 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6346 | 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] | 6347 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6348 | ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 6349 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6350 | cat >> confdefs.h <<EOF |
| 6351 | #define $ac_tr_lib 1 |
| 6352 | EOF |
| 6353 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6354 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6355 | |
| 6356 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6357 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6358 | fi |
| 6359 | |
| 6360 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6361 | fi |
| 6362 | |
| 6363 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6364 | # Check for --with-fpectl |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6365 | echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6366 | echo "configure:6367: checking for --with-fpectl" >&5 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6367 | # Check whether --with-fpectl or --without-fpectl was given. |
| 6368 | if test "${with_fpectl+set}" = set; then |
| 6369 | withval="$with_fpectl" |
| 6370 | |
| 6371 | if test "$withval" != no |
| 6372 | then cat >> confdefs.h <<\EOF |
| 6373 | #define WANT_SIGFPE_HANDLER 1 |
| 6374 | EOF |
| 6375 | echo "$ac_t""yes" 1>&6 |
| 6376 | else echo "$ac_t""no" 1>&6 |
| 6377 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6378 | else |
| 6379 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6380 | fi |
| 6381 | |
| 6382 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6383 | # check for --with-libm=... |
| 6384 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6385 | case $ac_sys_system in |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 6386 | Darwin) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6387 | next) ;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 6388 | BeOS) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6389 | *) LIBM=-lm |
| 6390 | esac |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6391 | echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6392 | echo "configure:6393: checking for --with-libm=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6393 | # Check whether --with-libm or --without-libm was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6394 | if test "${with_libm+set}" = set; then |
| 6395 | withval="$with_libm" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6396 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6397 | if test "$withval" = no |
| 6398 | then LIBM= |
| 6399 | echo "$ac_t""force LIBM empty" 1>&6 |
| 6400 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6401 | then LIBM=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6402 | echo "$ac_t""set LIBM=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6403 | 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] | 6404 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6405 | else |
| 6406 | echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6407 | fi |
| 6408 | |
| 6409 | |
| 6410 | # check for --with-libc=... |
| 6411 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6412 | echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6413 | echo "configure:6414: checking for --with-libc=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6414 | # Check whether --with-libc or --without-libc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6415 | if test "${with_libc+set}" = set; then |
| 6416 | withval="$with_libc" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6417 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6418 | if test "$withval" = no |
| 6419 | then LIBC= |
| 6420 | echo "$ac_t""force LIBC empty" 1>&6 |
| 6421 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6422 | then LIBC=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6423 | echo "$ac_t""set LIBC=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6424 | 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] | 6425 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6426 | else |
| 6427 | echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6428 | fi |
| 6429 | |
| 6430 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6431 | # check for hypot() in math library |
| 6432 | LIBS_SAVE=$LIBS |
| 6433 | LIBS="$LIBS $LIBM" |
| 6434 | for ac_func in hypot |
| 6435 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6436 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6437 | echo "configure:6438: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6438 | 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] | 6439 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6440 | else |
| 6441 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6442 | #line 6443 "configure" |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6443 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6444 | /* System header to define __stub macros and hopefully few prototypes, |
| 6445 | which can conflict with char $ac_func(); below. */ |
| 6446 | #include <assert.h> |
| 6447 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6448 | /* We use char because int might match the return type of a gcc2 |
| 6449 | builtin and then its argument prototype would still apply. */ |
| 6450 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6451 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6452 | int main() { |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6453 | |
| 6454 | /* The GNU C library defines this for functions which it implements |
| 6455 | to always fail with ENOSYS. Some functions are actually named |
| 6456 | something starting with __ and the normal name is an alias. */ |
| 6457 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 6458 | choke me |
| 6459 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6460 | $ac_func(); |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6461 | #endif |
| 6462 | |
| 6463 | ; return 0; } |
| 6464 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6465 | if { (eval echo configure:6466: \"$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] | 6466 | rm -rf conftest* |
| 6467 | eval "ac_cv_func_$ac_func=yes" |
| 6468 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6469 | echo "configure: failed program was:" >&5 |
| 6470 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6471 | rm -rf conftest* |
| 6472 | eval "ac_cv_func_$ac_func=no" |
| 6473 | fi |
| 6474 | rm -f conftest* |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6475 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6476 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6477 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 6478 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6479 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6480 | cat >> confdefs.h <<EOF |
| 6481 | #define $ac_tr_func 1 |
| 6482 | EOF |
| 6483 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6484 | else |
| 6485 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 6486 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6487 | fi |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6488 | done |
| 6489 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6490 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6491 | LIBS=$LIBS_SAVE |
| 6492 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6493 | # check whether malloc(0) returns NULL or not |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6494 | echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6495 | echo "configure:6496: checking what malloc(0) returns" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6496 | if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6497 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6498 | else |
| 6499 | if test "$cross_compiling" = yes; then |
| 6500 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6501 | else |
| 6502 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6503 | #line 6504 "configure" |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6504 | #include "confdefs.h" |
| 6505 | #include <stdio.h> |
| 6506 | #ifdef HAVE_STDLIB |
| 6507 | #include <stdlib.h> |
| 6508 | #else |
| 6509 | char *malloc(), *realloc(); |
| 6510 | int *free(); |
| 6511 | #endif |
| 6512 | main() { |
| 6513 | char *p; |
| 6514 | p = malloc(0); |
| 6515 | if (p == NULL) exit(1); |
| 6516 | p = realloc(p, 0); |
| 6517 | if (p == NULL) exit(1); |
| 6518 | free(p); |
| 6519 | exit(0); |
| 6520 | } |
| 6521 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6522 | if { (eval echo configure:6523: \"$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] | 6523 | then |
| 6524 | ac_cv_malloc_zero=nonnull |
| 6525 | else |
| 6526 | echo "configure: failed program was:" >&5 |
| 6527 | cat conftest.$ac_ext >&5 |
| 6528 | rm -fr conftest* |
| 6529 | ac_cv_malloc_zero=null |
| 6530 | fi |
| 6531 | rm -fr conftest* |
| 6532 | fi |
| 6533 | |
| 6534 | fi |
| 6535 | |
| 6536 | echo "$ac_t""$ac_cv_malloc_zero" 1>&6 |
| 6537 | if test "$ac_cv_malloc_zero" = null |
| 6538 | then |
| 6539 | cat >> confdefs.h <<\EOF |
| 6540 | #define MALLOC_ZERO_RETURNS_NULL 1 |
| 6541 | EOF |
| 6542 | |
| 6543 | fi |
| 6544 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6545 | # check for wchar.h |
| 6546 | ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` |
| 6547 | echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6548 | echo "configure:6549: checking for wchar.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6549 | 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] | 6550 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6551 | else |
| 6552 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6553 | #line 6554 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6554 | #include "confdefs.h" |
| 6555 | #include <wchar.h> |
| 6556 | EOF |
| 6557 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6558 | { (eval echo configure:6559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6559 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 6560 | if test -z "$ac_err"; then |
| 6561 | rm -rf conftest* |
| 6562 | eval "ac_cv_header_$ac_safe=yes" |
| 6563 | else |
| 6564 | echo "$ac_err" >&5 |
| 6565 | echo "configure: failed program was:" >&5 |
| 6566 | cat conftest.$ac_ext >&5 |
| 6567 | rm -rf conftest* |
| 6568 | eval "ac_cv_header_$ac_safe=no" |
| 6569 | fi |
| 6570 | rm -f conftest* |
| 6571 | fi |
| 6572 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 6573 | echo "$ac_t""yes" 1>&6 |
| 6574 | cat >> confdefs.h <<\EOF |
| 6575 | #define HAVE_WCHAR_H 1 |
| 6576 | EOF |
| 6577 | wchar_h="yes" |
| 6578 | else |
| 6579 | echo "$ac_t""no" 1>&6 |
| 6580 | wchar_h="no" |
| 6581 | |
| 6582 | fi |
| 6583 | |
| 6584 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6585 | # determine wchar_t size |
| 6586 | if test "$wchar_h" = yes |
| 6587 | then |
| 6588 | echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6589 | echo "configure:6590: checking size of wchar_t" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6590 | if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then |
| 6591 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6592 | else |
| 6593 | if test "$cross_compiling" = yes; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6594 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6595 | else |
| 6596 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6597 | #line 6598 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6598 | #include "confdefs.h" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6599 | #include <stdio.h> |
| 6600 | main() |
| 6601 | { |
| 6602 | FILE *f=fopen("conftestval", "w"); |
| 6603 | if (!f) exit(1); |
| 6604 | fprintf(f, "%d\n", sizeof(wchar_t)); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6605 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6606 | } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6607 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6608 | if { (eval echo configure:6609: \"$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] | 6609 | then |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6610 | ac_cv_sizeof_wchar_t=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6611 | else |
| 6612 | echo "configure: failed program was:" >&5 |
| 6613 | cat conftest.$ac_ext >&5 |
| 6614 | rm -fr conftest* |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6615 | ac_cv_sizeof_wchar_t=0 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6616 | fi |
| 6617 | rm -fr conftest* |
| 6618 | fi |
| 6619 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6620 | fi |
| 6621 | echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 |
| 6622 | cat >> confdefs.h <<EOF |
| 6623 | #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t |
| 6624 | EOF |
| 6625 | |
| 6626 | |
| 6627 | fi |
| 6628 | |
| 6629 | echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6630 | echo "configure:6631: checking what type to use for unicode" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6631 | # Check whether --enable-unicode or --disable-unicode was given. |
| 6632 | if test "${enable_unicode+set}" = set; then |
| 6633 | enableval="$enable_unicode" |
| 6634 | : |
| 6635 | else |
| 6636 | enable_unicode=yes |
| 6637 | fi |
| 6638 | |
| 6639 | |
| 6640 | if test $enable_unicode = yes |
| 6641 | then |
Martin v. Löwis | fd91779 | 2001-06-27 20:22:04 +0000 | [diff] [blame] | 6642 | # Without any arguments, Py_UNICODE defaults to two-byte mode |
| 6643 | enable_unicode="ucs2" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6644 | fi |
| 6645 | |
| 6646 | case "$enable_unicode" in |
| 6647 | ucs2) unicode_size="2" |
| 6648 | cat >> confdefs.h <<\EOF |
| 6649 | #define Py_UNICODE_SIZE 2 |
| 6650 | EOF |
| 6651 | |
| 6652 | ;; |
| 6653 | ucs4) unicode_size="4" |
| 6654 | cat >> confdefs.h <<\EOF |
| 6655 | #define Py_UNICODE_SIZE 4 |
| 6656 | EOF |
| 6657 | |
| 6658 | ;; |
| 6659 | esac |
| 6660 | |
| 6661 | if test "$enable_unicode" = "no" |
| 6662 | then |
| 6663 | echo "$ac_t""not used" 1>&6 |
| 6664 | else |
| 6665 | cat >> confdefs.h <<\EOF |
| 6666 | #define Py_USING_UNICODE 1 |
| 6667 | EOF |
| 6668 | |
| 6669 | if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" |
| 6670 | then |
| 6671 | PY_UNICODE_TYPE="wchar_t" |
| 6672 | cat >> confdefs.h <<\EOF |
| 6673 | #define HAVE_USABLE_WCHAR_T 1 |
| 6674 | EOF |
| 6675 | |
| 6676 | cat >> confdefs.h <<\EOF |
| 6677 | #define PY_UNICODE_TYPE wchar_t |
| 6678 | EOF |
| 6679 | |
| 6680 | elif test "$ac_cv_sizeof_short" = "$unicode_size" |
| 6681 | then |
| 6682 | PY_UNICODE_TYPE="unsigned short" |
| 6683 | cat >> confdefs.h <<\EOF |
| 6684 | #define PY_UNICODE_TYPE unsigned short |
| 6685 | EOF |
| 6686 | |
| 6687 | elif test "$ac_cv_sizeof_long" = "$unicode_size" |
| 6688 | then |
| 6689 | PY_UNICODE_TYPE="unsigned long" |
| 6690 | cat >> confdefs.h <<\EOF |
| 6691 | #define PY_UNICODE_TYPE unsigned long |
| 6692 | EOF |
| 6693 | |
| 6694 | else |
| 6695 | PY_UNICODE_TYPE="no type found" |
| 6696 | fi |
| 6697 | echo "$ac_t""$PY_UNICODE_TYPE" 1>&6 |
| 6698 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6699 | |
| 6700 | # check for endianness |
| 6701 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6702 | echo "configure:6703: checking whether byte ordering is bigendian" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6703 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6704 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6705 | else |
| 6706 | ac_cv_c_bigendian=unknown |
| 6707 | # See if sys/param.h defines the BYTE_ORDER macro. |
| 6708 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6709 | #line 6710 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6710 | #include "confdefs.h" |
| 6711 | #include <sys/types.h> |
| 6712 | #include <sys/param.h> |
| 6713 | int main() { |
| 6714 | |
| 6715 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 6716 | bogus endian macros |
| 6717 | #endif |
| 6718 | ; return 0; } |
| 6719 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6720 | if { (eval echo configure:6721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6721 | rm -rf conftest* |
| 6722 | # It does; now see whether it defined to BIG_ENDIAN or not. |
| 6723 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6724 | #line 6725 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6725 | #include "confdefs.h" |
| 6726 | #include <sys/types.h> |
| 6727 | #include <sys/param.h> |
| 6728 | int main() { |
| 6729 | |
| 6730 | #if BYTE_ORDER != BIG_ENDIAN |
| 6731 | not big endian |
| 6732 | #endif |
| 6733 | ; return 0; } |
| 6734 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6735 | if { (eval echo configure:6736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6736 | rm -rf conftest* |
| 6737 | ac_cv_c_bigendian=yes |
| 6738 | else |
| 6739 | echo "configure: failed program was:" >&5 |
| 6740 | cat conftest.$ac_ext >&5 |
| 6741 | rm -rf conftest* |
| 6742 | ac_cv_c_bigendian=no |
| 6743 | fi |
| 6744 | rm -f conftest* |
| 6745 | else |
| 6746 | echo "configure: failed program was:" >&5 |
| 6747 | cat conftest.$ac_ext >&5 |
| 6748 | fi |
| 6749 | rm -f conftest* |
| 6750 | if test $ac_cv_c_bigendian = unknown; then |
| 6751 | if test "$cross_compiling" = yes; then |
| 6752 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6753 | else |
| 6754 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6755 | #line 6756 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6756 | #include "confdefs.h" |
| 6757 | main () { |
| 6758 | /* Are we little or big endian? From Harbison&Steele. */ |
| 6759 | union |
| 6760 | { |
| 6761 | long l; |
| 6762 | char c[sizeof (long)]; |
| 6763 | } u; |
| 6764 | u.l = 1; |
| 6765 | exit (u.c[sizeof (long) - 1] == 1); |
| 6766 | } |
| 6767 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6768 | if { (eval echo configure:6769: \"$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] | 6769 | then |
| 6770 | ac_cv_c_bigendian=no |
| 6771 | else |
| 6772 | echo "configure: failed program was:" >&5 |
| 6773 | cat conftest.$ac_ext >&5 |
| 6774 | rm -fr conftest* |
| 6775 | ac_cv_c_bigendian=yes |
| 6776 | fi |
| 6777 | rm -fr conftest* |
| 6778 | fi |
| 6779 | |
| 6780 | fi |
| 6781 | fi |
| 6782 | |
| 6783 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 6784 | if test $ac_cv_c_bigendian = yes; then |
| 6785 | cat >> confdefs.h <<\EOF |
| 6786 | #define WORDS_BIGENDIAN 1 |
| 6787 | EOF |
| 6788 | |
| 6789 | fi |
| 6790 | |
| 6791 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6792 | # Check whether right shifting a negative integer extends the sign bit |
| 6793 | # or fills with zeros (like the Cray J90, according to Tim Peters). |
| 6794 | echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6795 | echo "configure:6796: checking whether right shift extends the sign bit" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6796 | if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 6797 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6798 | else |
| 6799 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6800 | if test "$cross_compiling" = yes; then |
| 6801 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6802 | else |
| 6803 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6804 | #line 6805 "configure" |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6805 | #include "confdefs.h" |
| 6806 | |
| 6807 | int main() |
| 6808 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 6809 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6810 | } |
| 6811 | |
| 6812 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6813 | if { (eval echo configure:6814: \"$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] | 6814 | then |
| 6815 | ac_cv_rshift_extends_sign=yes |
| 6816 | else |
| 6817 | echo "configure: failed program was:" >&5 |
| 6818 | cat conftest.$ac_ext >&5 |
| 6819 | rm -fr conftest* |
| 6820 | ac_cv_rshift_extends_sign=no |
| 6821 | fi |
| 6822 | rm -fr conftest* |
| 6823 | fi |
| 6824 | |
| 6825 | fi |
| 6826 | |
| 6827 | echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 |
| 6828 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6829 | then |
| 6830 | cat >> confdefs.h <<\EOF |
| 6831 | #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 |
| 6832 | EOF |
| 6833 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6834 | fi |
| 6835 | |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6836 | # check for getc_unlocked and related locking functions |
| 6837 | echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6838 | echo "configure:6839: checking for getc_unlocked() and friends" >&5 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6839 | if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then |
| 6840 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6841 | else |
| 6842 | |
| 6843 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6844 | #line 6845 "configure" |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6845 | #include "confdefs.h" |
| 6846 | #include <stdio.h> |
| 6847 | int main() { |
| 6848 | |
| 6849 | FILE *f = fopen("/dev/null", "r"); |
| 6850 | flockfile(f); |
| 6851 | getc_unlocked(f); |
| 6852 | funlockfile(f); |
| 6853 | |
| 6854 | ; return 0; } |
| 6855 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6856 | if { (eval echo configure:6857: \"$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] | 6857 | rm -rf conftest* |
| 6858 | ac_cv_have_getc_unlocked=yes |
| 6859 | else |
| 6860 | echo "configure: failed program was:" >&5 |
| 6861 | cat conftest.$ac_ext >&5 |
| 6862 | rm -rf conftest* |
| 6863 | ac_cv_have_getc_unlocked=no |
| 6864 | fi |
| 6865 | rm -f conftest* |
| 6866 | fi |
| 6867 | |
| 6868 | echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6 |
| 6869 | if test "$ac_cv_have_getc_unlocked" = yes |
| 6870 | then |
| 6871 | cat >> confdefs.h <<\EOF |
| 6872 | #define HAVE_GETC_UNLOCKED 1 |
| 6873 | EOF |
| 6874 | |
| 6875 | fi |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6876 | |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 6877 | # check for readline 4.2 |
| 6878 | echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6879 | echo "configure:6880: checking for rl_completion_matches in -lreadline" >&5 |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 6880 | ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` |
| 6881 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 6882 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6883 | else |
| 6884 | ac_save_LIBS="$LIBS" |
| 6885 | LIBS="-lreadline -ltermcap $LIBS" |
| 6886 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6887 | #line 6888 "configure" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 6888 | #include "confdefs.h" |
| 6889 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6890 | /* We use char because int might match the return type of a gcc2 |
| 6891 | builtin and then its argument prototype would still apply. */ |
| 6892 | char rl_completion_matches(); |
| 6893 | |
| 6894 | int main() { |
| 6895 | rl_completion_matches() |
| 6896 | ; return 0; } |
| 6897 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6898 | if { (eval echo configure:6899: \"$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] | 6899 | rm -rf conftest* |
| 6900 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 6901 | else |
| 6902 | echo "configure: failed program was:" >&5 |
| 6903 | cat conftest.$ac_ext >&5 |
| 6904 | rm -rf conftest* |
| 6905 | eval "ac_cv_lib_$ac_lib_var=no" |
| 6906 | fi |
| 6907 | rm -f conftest* |
| 6908 | LIBS="$ac_save_LIBS" |
| 6909 | |
| 6910 | fi |
| 6911 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 6912 | echo "$ac_t""yes" 1>&6 |
| 6913 | cat >> confdefs.h <<\EOF |
| 6914 | #define HAVE_RL_COMPLETION_MATCHES 1 |
| 6915 | EOF |
| 6916 | |
| 6917 | else |
| 6918 | echo "$ac_t""no" 1>&6 |
| 6919 | fi |
| 6920 | |
| 6921 | |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 6922 | echo $ac_n "checking for broken nice()""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6923 | echo "configure:6924: checking for broken nice()" >&5 |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 6924 | if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then |
| 6925 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6926 | else |
| 6927 | |
| 6928 | if test "$cross_compiling" = yes; then |
| 6929 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6930 | else |
| 6931 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6932 | #line 6933 "configure" |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 6933 | #include "confdefs.h" |
| 6934 | |
| 6935 | int main() |
| 6936 | { |
| 6937 | int val1 = nice(1); |
| 6938 | if (val1 != -1 && val1 == nice(2)) |
| 6939 | exit(0); |
| 6940 | exit(1); |
| 6941 | } |
| 6942 | |
| 6943 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6944 | if { (eval echo configure:6945: \"$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] | 6945 | then |
| 6946 | ac_cv_broken_nice=yes |
| 6947 | else |
| 6948 | echo "configure: failed program was:" >&5 |
| 6949 | cat conftest.$ac_ext >&5 |
| 6950 | rm -fr conftest* |
| 6951 | ac_cv_broken_nice=no |
| 6952 | fi |
| 6953 | rm -fr conftest* |
| 6954 | fi |
| 6955 | |
| 6956 | fi |
| 6957 | |
| 6958 | echo "$ac_t""$ac_cv_broken_nice" 1>&6 |
| 6959 | if test "$ac_cv_broken_nice" = yes |
| 6960 | then |
| 6961 | cat >> confdefs.h <<\EOF |
| 6962 | #define HAVE_BROKEN_NICE 1 |
| 6963 | EOF |
| 6964 | |
| 6965 | fi |
| 6966 | |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 6967 | # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! |
| 6968 | # Add sys/socket.h to confdefs.h |
| 6969 | cat >> confdefs.h <<\EOF |
| 6970 | #ifdef HAVE_SYS_SOCKET_H |
| 6971 | #include <sys/socket.h> |
| 6972 | #endif |
| 6973 | EOF |
| 6974 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6975 | echo "configure:6976: checking for socklen_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6976 | 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] | 6977 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6978 | else |
| 6979 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 6980 | #line 6981 "configure" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 6981 | #include "confdefs.h" |
| 6982 | #include <sys/types.h> |
| 6983 | #if STDC_HEADERS |
| 6984 | #include <stdlib.h> |
| 6985 | #include <stddef.h> |
| 6986 | #endif |
| 6987 | EOF |
| 6988 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 6989 | egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 6990 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6991 | ac_cv_type_socklen_t=yes |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 6992 | else |
| 6993 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6994 | ac_cv_type_socklen_t=no |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 6995 | fi |
| 6996 | rm -f conftest* |
| 6997 | |
| 6998 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6999 | echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 |
| 7000 | if test $ac_cv_type_socklen_t = no; then |
| 7001 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7002 | #define socklen_t int |
| 7003 | EOF |
| 7004 | |
| 7005 | fi |
| 7006 | |
| 7007 | |
Neil Schemenauer | f25cf6c | 2001-03-04 06:39:33 +0000 | [diff] [blame] | 7008 | # Add Python/ prefix to LIBOBJS |
| 7009 | libobjs=$LIBOBJS |
| 7010 | LIBOBJS= |
| 7011 | for obj in $libobjs; do |
| 7012 | LIBOBJS="$LIBOBJS Python/$obj" |
| 7013 | done |
| 7014 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7015 | #AC_MSG_CHECKING(for Modules/Setup) |
| 7016 | #if test ! -f Modules/Setup ; then |
| 7017 | # if test ! -d Modules ; then |
| 7018 | # mkdir Modules |
| 7019 | # fi |
| 7020 | # cp "$srcdir/Modules/Setup.dist" Modules/Setup |
| 7021 | # AC_MSG_RESULT(creating) |
| 7022 | #else |
| 7023 | # AC_MSG_RESULT(already exists) |
| 7024 | #fi |
| 7025 | |
| 7026 | |
Neil Schemenauer | acbf9ef | 2001-02-27 02:15:14 +0000 | [diff] [blame] | 7027 | SRCDIRS="Parser Grammar Objects Python Modules" |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7028 | echo $ac_n "checking for build directories""... $ac_c" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 7029 | echo "configure:7030: checking for build directories" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7030 | for dir in $SRCDIRS; do |
| 7031 | if test ! -d $dir; then |
| 7032 | mkdir $dir |
Guido van Rossum | 262cf20 | 2000-11-02 19:33:53 +0000 | [diff] [blame] | 7033 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7034 | done |
| 7035 | echo "$ac_t""done" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 7036 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7037 | # generate output files |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7038 | trap '' 1 2 15 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7039 | cat > confcache <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7040 | # This file is a shell script that caches the results of configure |
| 7041 | # tests run on this system so they can be shared between configure |
| 7042 | # scripts and configure runs. It is not useful on other systems. |
| 7043 | # If it contains results you don't want to keep, you may remove or edit it. |
| 7044 | # |
| 7045 | # By default, configure uses ./config.cache as the cache file, |
| 7046 | # creating it if it does not exist already. You can give configure |
| 7047 | # the --cache-file=FILE option to use a different cache file; that is |
| 7048 | # what configure does when it calls configure scripts in |
| 7049 | # subdirectories, so they share the cache. |
| 7050 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| 7051 | # config.status only pays attention to the cache file if you give it the |
| 7052 | # --recheck option to rerun configure. |
| 7053 | # |
| 7054 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7055 | # The following way of writing the cache mishandles newlines in values, |
| 7056 | # but we know of no workaround that is simple, portable, and efficient. |
| 7057 | # So, don't put newlines in cache variables' values. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7058 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 7059 | # 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] | 7060 | (set) 2>&1 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7061 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7062 | *ac_space=\ *) |
| 7063 | # `set' does not quote correctly, so add quotes (double-quote substitution |
| 7064 | # turns \\\\ into \\, and sed turns \\ into \). |
| 7065 | sed -n \ |
| 7066 | -e "s/'/'\\\\''/g" \ |
| 7067 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| 7068 | ;; |
| 7069 | *) |
| 7070 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 7071 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| 7072 | ;; |
| 7073 | esac >> confcache |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7074 | if cmp -s $cache_file confcache; then |
| 7075 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7076 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7077 | if test -w $cache_file; then |
| 7078 | echo "updating cache $cache_file" |
| 7079 | cat confcache > $cache_file |
| 7080 | else |
| 7081 | echo "not updating unwritable cache $cache_file" |
| 7082 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7083 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7084 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7085 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7086 | 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] | 7087 | |
| 7088 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 7089 | # Let make expand exec_prefix. |
| 7090 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7091 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7092 | # Any assignment to VPATH causes Sun make to only execute |
| 7093 | # the first set of double-colon rules, so remove it if not needed. |
| 7094 | # If there is a colon in the path, we need to keep it. |
| 7095 | if test "x$srcdir" = x.; then |
| 7096 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
| 7097 | fi |
| 7098 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7099 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7100 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7101 | DEFS=-DHAVE_CONFIG_H |
| 7102 | |
| 7103 | # Without the "./", some shells look in PATH for config.status. |
| 7104 | : ${CONFIG_STATUS=./config.status} |
| 7105 | |
| 7106 | echo creating $CONFIG_STATUS |
| 7107 | rm -f $CONFIG_STATUS |
| 7108 | cat > $CONFIG_STATUS <<EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7109 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7110 | # Generated automatically by configure. |
| 7111 | # Run this file to recreate the current configuration. |
| 7112 | # This directory was configured as follows, |
| 7113 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 7114 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7115 | # $0 $ac_configure_args |
| 7116 | # |
| 7117 | # Compiler output produced by configure, useful for debugging |
| 7118 | # configure, is in ./config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7119 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7120 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7121 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7122 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7123 | case "\$ac_option" in |
| 7124 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7125 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
| 7126 | 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] | 7127 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7128 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7129 | exit 0 ;; |
| 7130 | -help | --help | --hel | --he | --h) |
| 7131 | echo "\$ac_cs_usage"; exit 0 ;; |
| 7132 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7133 | esac |
| 7134 | done |
| 7135 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7136 | ac_given_srcdir=$srcdir |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7137 | ac_given_INSTALL="$INSTALL" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7138 | |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7139 | 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] | 7140 | EOF |
| 7141 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7142 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7143 | # Protect against being on the right side of a sed subst in config.status. |
| 7144 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 7145 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7146 | $ac_vpsub |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7147 | $extrasub |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7148 | s%@SHELL@%$SHELL%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7149 | s%@CFLAGS@%$CFLAGS%g |
| 7150 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 7151 | s%@CXXFLAGS@%$CXXFLAGS%g |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7152 | s%@FFLAGS@%$FFLAGS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7153 | s%@DEFS@%$DEFS%g |
| 7154 | s%@LDFLAGS@%$LDFLAGS%g |
| 7155 | s%@LIBS@%$LIBS%g |
| 7156 | s%@exec_prefix@%$exec_prefix%g |
| 7157 | s%@prefix@%$prefix%g |
| 7158 | s%@program_transform_name@%$program_transform_name%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7159 | s%@bindir@%$bindir%g |
| 7160 | s%@sbindir@%$sbindir%g |
| 7161 | s%@libexecdir@%$libexecdir%g |
| 7162 | s%@datadir@%$datadir%g |
| 7163 | s%@sysconfdir@%$sysconfdir%g |
| 7164 | s%@sharedstatedir@%$sharedstatedir%g |
| 7165 | s%@localstatedir@%$localstatedir%g |
| 7166 | s%@libdir@%$libdir%g |
| 7167 | s%@includedir@%$includedir%g |
| 7168 | s%@oldincludedir@%$oldincludedir%g |
| 7169 | s%@infodir@%$infodir%g |
| 7170 | s%@mandir@%$mandir%g |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 7171 | s%@VERSION@%$VERSION%g |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 7172 | s%@CONFIG_ARGS@%$CONFIG_ARGS%g |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 7173 | s%@MACHDEP@%$MACHDEP%g |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 7174 | s%@SGI_ABI@%$SGI_ABI%g |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 7175 | s%@CXX@%$CXX%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7176 | s%@MAINOBJ@%$MAINOBJ%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7177 | s%@CC@%$CC%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7178 | s%@EXEEXT@%$EXEEXT%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7179 | s%@LIBRARY@%$LIBRARY%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7180 | s%@LDLIBRARY@%$LDLIBRARY%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7181 | s%@DLLLIBRARY@%$DLLLIBRARY%g |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 7182 | s%@LINKCC@%$LINKCC%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7183 | s%@RANLIB@%$RANLIB%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7184 | s%@AR@%$AR%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7185 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7186 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7187 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 7188 | s%@LN@%$LN%g |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 7189 | s%@OPT@%$OPT%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7190 | s%@CPP@%$CPP%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7191 | s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7192 | s%@SO@%$SO%g |
| 7193 | s%@LDSHARED@%$LDSHARED%g |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 7194 | s%@BLDSHARED@%$BLDSHARED%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7195 | s%@CCSHARED@%$CCSHARED%g |
| 7196 | s%@LINKFORSHARED@%$LINKFORSHARED%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7197 | s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7198 | s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g |
| 7199 | s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 7200 | s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 7201 | s%@LDLAST@%$LDLAST%g |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 7202 | s%@USE_GC_MODULE@%$USE_GC_MODULE%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7203 | s%@DLINCLDIR@%$DLINCLDIR%g |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 7204 | s%@DYNLOADFILE@%$DYNLOADFILE%g |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 7205 | s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7206 | s%@LIBOBJS@%$LIBOBJS%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7207 | s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g |
| 7208 | s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g |
| 7209 | 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] | 7210 | s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7211 | s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7212 | s%@LIBM@%$LIBM%g |
| 7213 | s%@LIBC@%$LIBC%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7214 | s%@SRCDIRS@%$SRCDIRS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7215 | |
| 7216 | CEOF |
| 7217 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7218 | |
| 7219 | cat >> $CONFIG_STATUS <<\EOF |
| 7220 | |
| 7221 | # Split the substitutions into bite-sized pieces for seds with |
| 7222 | # small command number limits, like on Digital OSF/1 and HP-UX. |
| 7223 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 7224 | ac_file=1 # Number of current file. |
| 7225 | ac_beg=1 # First line for current file. |
| 7226 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 7227 | ac_more_lines=: |
| 7228 | ac_sed_cmds="" |
| 7229 | while $ac_more_lines; do |
| 7230 | if test $ac_beg -gt 1; then |
| 7231 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7232 | else |
| 7233 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7234 | fi |
| 7235 | if test ! -s conftest.s$ac_file; then |
| 7236 | ac_more_lines=false |
| 7237 | rm -f conftest.s$ac_file |
| 7238 | else |
| 7239 | if test -z "$ac_sed_cmds"; then |
| 7240 | ac_sed_cmds="sed -f conftest.s$ac_file" |
| 7241 | else |
| 7242 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
| 7243 | fi |
| 7244 | ac_file=`expr $ac_file + 1` |
| 7245 | ac_beg=$ac_end |
| 7246 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
| 7247 | fi |
| 7248 | done |
| 7249 | if test -z "$ac_sed_cmds"; then |
| 7250 | ac_sed_cmds=cat |
| 7251 | fi |
| 7252 | EOF |
| 7253 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7254 | cat >> $CONFIG_STATUS <<EOF |
| 7255 | |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7256 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"} |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7257 | EOF |
| 7258 | cat >> $CONFIG_STATUS <<\EOF |
| 7259 | 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] | 7260 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7261 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7262 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7263 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7264 | *) ac_file_in="${ac_file}.in" ;; |
| 7265 | esac |
| 7266 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7267 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7268 | |
| 7269 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7270 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7271 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7272 | # The file is in a subdirectory. |
| 7273 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7274 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7275 | # A "../" for each directory in $ac_dir_suffix. |
| 7276 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
| 7277 | else |
| 7278 | ac_dir_suffix= ac_dots= |
| 7279 | fi |
| 7280 | |
| 7281 | case "$ac_given_srcdir" in |
| 7282 | .) srcdir=. |
| 7283 | if test -z "$ac_dots"; then top_srcdir=. |
| 7284 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
| 7285 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; |
| 7286 | *) # Relative path. |
| 7287 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 7288 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
| 7289 | esac |
| 7290 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7291 | case "$ac_given_INSTALL" in |
| 7292 | [/$]*) INSTALL="$ac_given_INSTALL" ;; |
| 7293 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
| 7294 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7295 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7296 | echo creating "$ac_file" |
| 7297 | rm -f "$ac_file" |
| 7298 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
| 7299 | case "$ac_file" in |
| 7300 | *Makefile*) ac_comsub="1i\\ |
| 7301 | # $configure_input" ;; |
| 7302 | *) ac_comsub= ;; |
| 7303 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7304 | |
| 7305 | 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] | 7306 | sed -e "$ac_comsub |
| 7307 | s%@configure_input@%$configure_input%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7308 | s%@srcdir@%$srcdir%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7309 | s%@top_srcdir@%$top_srcdir%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7310 | s%@INSTALL@%$INSTALL%g |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7311 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7312 | fi; done |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7313 | rm -f conftest.s* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7314 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7315 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
| 7316 | # 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] | 7317 | # |
| 7318 | # ac_d sets the value in "#define NAME VALUE" lines. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7319 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 7320 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7321 | ac_dC='\3' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7322 | ac_dD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7323 | # 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] | 7324 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7325 | ac_uB='\([ ]\)%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7326 | ac_uC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7327 | ac_uD='\4%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7328 | # 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] | 7329 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7330 | ac_eB='$%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7331 | ac_eC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7332 | ac_eD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7333 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7334 | if test "${CONFIG_HEADERS+set}" != set; then |
| 7335 | EOF |
| 7336 | cat >> $CONFIG_STATUS <<EOF |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7337 | CONFIG_HEADERS="pyconfig.h" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7338 | EOF |
| 7339 | cat >> $CONFIG_STATUS <<\EOF |
| 7340 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7341 | 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] | 7342 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7343 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7344 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7345 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7346 | *) ac_file_in="${ac_file}.in" ;; |
| 7347 | esac |
| 7348 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7349 | echo creating $ac_file |
| 7350 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7351 | rm -f conftest.frag conftest.in conftest.out |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7352 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 7353 | cat $ac_file_inputs > conftest.in |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7354 | |
| 7355 | EOF |
| 7356 | |
| 7357 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
| 7358 | # 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] | 7359 | # 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] | 7360 | # Protect against being in an unquoted here document in config.status. |
| 7361 | rm -f conftest.vals |
| 7362 | cat > conftest.hdr <<\EOF |
| 7363 | s/[\\&%]/\\&/g |
| 7364 | s%[\\$`]%\\&%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7365 | 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] | 7366 | s%ac_d%ac_u%gp |
| 7367 | s%ac_u%ac_e%gp |
| 7368 | EOF |
| 7369 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
| 7370 | rm -f conftest.hdr |
| 7371 | |
| 7372 | # This sed command replaces #undef with comments. This is necessary, for |
| 7373 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 7374 | # on some systems where configure will not decide to define it. |
| 7375 | cat >> conftest.vals <<\EOF |
| 7376 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
| 7377 | EOF |
| 7378 | |
| 7379 | # Break up conftest.vals because some shells have a limit on |
| 7380 | # 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] | 7381 | |
| 7382 | rm -f conftest.tail |
| 7383 | while : |
| 7384 | do |
| 7385 | ac_lines=`grep -c . conftest.vals` |
| 7386 | # grep -c gives empty output for an empty file on some AIX systems. |
| 7387 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 7388 | # Write a limited-size here document to conftest.frag. |
| 7389 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
| 7390 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
| 7391 | echo 'CEOF |
| 7392 | sed -f conftest.frag conftest.in > conftest.out |
| 7393 | rm -f conftest.in |
| 7394 | mv conftest.out conftest.in |
| 7395 | ' >> $CONFIG_STATUS |
| 7396 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
| 7397 | rm -f conftest.vals |
| 7398 | mv conftest.tail conftest.vals |
| 7399 | done |
| 7400 | rm -f conftest.vals |
| 7401 | |
| 7402 | cat >> $CONFIG_STATUS <<\EOF |
| 7403 | rm -f conftest.frag conftest.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7404 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7405 | cat conftest.in >> conftest.h |
| 7406 | rm -f conftest.in |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7407 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7408 | echo "$ac_file is unchanged" |
| 7409 | rm -f conftest.h |
| 7410 | else |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7411 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7412 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7413 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7414 | # The file is in a subdirectory. |
| 7415 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 7416 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7417 | rm -f $ac_file |
| 7418 | mv conftest.h $ac_file |
| 7419 | fi |
| 7420 | fi; done |
| 7421 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7422 | EOF |
| 7423 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7424 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7425 | EOF |
| 7426 | cat >> $CONFIG_STATUS <<\EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7427 | |
| 7428 | exit 0 |
| 7429 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7430 | chmod +x $CONFIG_STATUS |
| 7431 | rm -fr confdefs* $ac_clean_files |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7432 | 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] | 7433 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7434 | |
| 7435 | echo "creating Setup" |
| 7436 | if test ! -f Modules/Setup |
| 7437 | then |
| 7438 | cp $srcdir/Modules/Setup.dist Modules/Setup |
| 7439 | fi |
| 7440 | |
| 7441 | echo "creating Setup.local" |
| 7442 | if test ! -f Modules/Setup.local |
| 7443 | then |
| 7444 | echo "# Edit this file for local setup changes" >Modules/Setup.local |
| 7445 | fi |
| 7446 | |
| 7447 | echo "creating Makefile" |
| 7448 | $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ |
| 7449 | -s Modules Modules/Setup.config \ |
Neil Schemenauer | f8b71c5 | 2001-04-21 17:41:16 +0000 | [diff] [blame] | 7450 | Modules/Setup.local Modules/Setup |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 7451 | mv config.c Modules |