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 | |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 3 | # From configure.in Revision: 1.260 |
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 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 17 | --enable-framework[=INSTALLDIR] Build (MacOSX|Darwin) framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 18 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 19 | --without-gcc never use gcc" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 20 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 21 | --with-cxx=<compiler> enable C++ support" |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 22 | ac_help="$ac_help |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 23 | --with-suffix=.exe set executable suffix" |
| 24 | ac_help="$ac_help |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 25 | --with-pydebug build with Py_DEBUG defined" |
| 26 | ac_help="$ac_help |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 27 | --enable-toolbox-glue disable/enable MacOSX glue code for extensions" |
| 28 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 29 | --with-libs='lib1 ...' link against additional libs" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 30 | ac_help="$ac_help |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 31 | --with-signal-module disable/enable signal module" |
| 32 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 33 | --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries" |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 34 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 35 | --with(out)-threads[=DIRECTORY] disable/enable thread support" |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 36 | ac_help="$ac_help |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 37 | --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 38 | ac_help="$ac_help |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 39 | --with-pth use GNU pth threading libraries" |
| 40 | ac_help="$ac_help |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 41 | --enable-ipv6 Enable ipv6 (with ipv4) support |
| 42 | --disable-ipv6 Disable ipv6 support" |
| 43 | ac_help="$ac_help |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 44 | --with(out)-cycle-gc disable/enable garbage collection" |
| 45 | ac_help="$ac_help |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 46 | --with(out)-pymalloc disable/enable specialized mallocs" |
| 47 | ac_help="$ac_help |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 48 | --with-wctype-functions use wctype.h functions" |
| 49 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 50 | --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 51 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 52 | --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 53 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 54 | --with-fpectl enable SIGFPE catching" |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 55 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 56 | --with-libm=STRING math library" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 57 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 58 | --with-libc=STRING C library" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 59 | ac_help="$ac_help |
| 60 | --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 61 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 62 | # Initialize some variables set by options. |
| 63 | # The variables have the same names as the options, with |
| 64 | # dashes changed to underlines. |
| 65 | build=NONE |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 66 | cache_file=./config.cache |
| 67 | exec_prefix=NONE |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 68 | host=NONE |
| 69 | no_create= |
| 70 | nonopt=NONE |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 71 | no_recursion= |
| 72 | prefix=NONE |
| 73 | program_prefix=NONE |
| 74 | program_suffix=NONE |
| 75 | program_transform_name=s,x,x, |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 76 | silent= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 77 | site= |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 78 | srcdir= |
| 79 | target=NONE |
| 80 | verbose= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 81 | x_includes=NONE |
| 82 | x_libraries=NONE |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 83 | bindir='${exec_prefix}/bin' |
| 84 | sbindir='${exec_prefix}/sbin' |
| 85 | libexecdir='${exec_prefix}/libexec' |
| 86 | datadir='${prefix}/share' |
| 87 | sysconfdir='${prefix}/etc' |
| 88 | sharedstatedir='${prefix}/com' |
| 89 | localstatedir='${prefix}/var' |
| 90 | libdir='${exec_prefix}/lib' |
| 91 | includedir='${prefix}/include' |
| 92 | oldincludedir='/usr/include' |
| 93 | infodir='${prefix}/info' |
| 94 | mandir='${prefix}/man' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 95 | |
| 96 | # Initialize some other variables. |
| 97 | subdirs= |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 98 | MFLAGS= MAKEFLAGS= |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 99 | SHELL=${CONFIG_SHELL-/bin/sh} |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 100 | # Maximum number of lines to put in a shell here document. |
| 101 | ac_max_here_lines=12 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 102 | |
| 103 | ac_prev= |
| 104 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 105 | do |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 106 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 107 | # If the previous option needs an argument, assign it. |
| 108 | if test -n "$ac_prev"; then |
| 109 | eval "$ac_prev=\$ac_option" |
| 110 | ac_prev= |
| 111 | continue |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 112 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 113 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 114 | case "$ac_option" in |
| 115 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
| 116 | *) ac_optarg= ;; |
| 117 | esac |
| 118 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 119 | # Accept the important Cygnus configure options, so we can diagnose typos. |
| 120 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 121 | case "$ac_option" in |
| 122 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 123 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
| 124 | ac_prev=bindir ;; |
| 125 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) |
| 126 | bindir="$ac_optarg" ;; |
| 127 | |
| 128 | -build | --build | --buil | --bui | --bu) |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 129 | ac_prev=build ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 130 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 131 | build="$ac_optarg" ;; |
| 132 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 133 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
| 134 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) |
| 135 | ac_prev=cache_file ;; |
| 136 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ |
| 137 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) |
| 138 | cache_file="$ac_optarg" ;; |
| 139 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 140 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
| 141 | ac_prev=datadir ;; |
| 142 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ |
| 143 | | --da=*) |
| 144 | datadir="$ac_optarg" ;; |
| 145 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 146 | -disable-* | --disable-*) |
| 147 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 148 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 149 | 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] | 150 | { 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] | 151 | fi |
| 152 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 153 | eval "enable_${ac_feature}=no" ;; |
| 154 | |
| 155 | -enable-* | --enable-*) |
| 156 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 157 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 158 | 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] | 159 | { 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] | 160 | fi |
| 161 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 162 | case "$ac_option" in |
| 163 | *=*) ;; |
| 164 | *) ac_optarg=yes ;; |
| 165 | esac |
| 166 | eval "enable_${ac_feature}='$ac_optarg'" ;; |
| 167 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 168 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ |
| 169 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ |
| 170 | | --exec | --exe | --ex) |
| 171 | ac_prev=exec_prefix ;; |
| 172 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ |
| 173 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ |
| 174 | | --exec=* | --exe=* | --ex=*) |
| 175 | exec_prefix="$ac_optarg" ;; |
| 176 | |
| 177 | -gas | --gas | --ga | --g) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 178 | # Obsolete; use --with-gas. |
| 179 | with_gas=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 180 | |
| 181 | -help | --help | --hel | --he) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 182 | # Omit some internal or obsolete options to make the list less imposing. |
| 183 | # 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] | 184 | cat << EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 185 | Usage: configure [options] [host] |
| 186 | Options: [defaults in brackets after descriptions] |
| 187 | Configuration: |
| 188 | --cache-file=FILE cache test results in FILE |
| 189 | --help print this message |
| 190 | --no-create do not create output files |
| 191 | --quiet, --silent do not print \`checking...' messages |
| 192 | --version print the version of autoconf that created configure |
| 193 | Directory and file names: |
| 194 | --prefix=PREFIX install architecture-independent files in PREFIX |
| 195 | [$ac_default_prefix] |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 196 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 197 | [same as prefix] |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 198 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
| 199 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] |
| 200 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] |
| 201 | --datadir=DIR read-only architecture-independent data in DIR |
| 202 | [PREFIX/share] |
| 203 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] |
| 204 | --sharedstatedir=DIR modifiable architecture-independent data in DIR |
| 205 | [PREFIX/com] |
| 206 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] |
| 207 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] |
| 208 | --includedir=DIR C header files in DIR [PREFIX/include] |
| 209 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] |
| 210 | --infodir=DIR info documentation in DIR [PREFIX/info] |
| 211 | --mandir=DIR man documentation in DIR [PREFIX/man] |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 212 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
| 213 | --program-prefix=PREFIX prepend PREFIX to installed program names |
| 214 | --program-suffix=SUFFIX append SUFFIX to installed program names |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 215 | --program-transform-name=PROGRAM |
| 216 | run sed PROGRAM on installed program names |
| 217 | EOF |
| 218 | cat << EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 219 | Host type: |
| 220 | --build=BUILD configure for building on BUILD [BUILD=HOST] |
| 221 | --host=HOST configure for HOST [guessed] |
| 222 | --target=TARGET configure for TARGET [TARGET=HOST] |
| 223 | Features and packages: |
| 224 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
| 225 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
| 226 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
| 227 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
| 228 | --x-includes=DIR X include files are in DIR |
| 229 | --x-libraries=DIR X library files are in DIR |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 230 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 231 | if test -n "$ac_help"; then |
| 232 | echo "--enable and --with options recognized:$ac_help" |
| 233 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 234 | exit 0 ;; |
| 235 | |
| 236 | -host | --host | --hos | --ho) |
| 237 | ac_prev=host ;; |
| 238 | -host=* | --host=* | --hos=* | --ho=*) |
| 239 | host="$ac_optarg" ;; |
| 240 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 241 | -includedir | --includedir | --includedi | --included | --include \ |
| 242 | | --includ | --inclu | --incl | --inc) |
| 243 | ac_prev=includedir ;; |
| 244 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ |
| 245 | | --includ=* | --inclu=* | --incl=* | --inc=*) |
| 246 | includedir="$ac_optarg" ;; |
| 247 | |
| 248 | -infodir | --infodir | --infodi | --infod | --info | --inf) |
| 249 | ac_prev=infodir ;; |
| 250 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) |
| 251 | infodir="$ac_optarg" ;; |
| 252 | |
| 253 | -libdir | --libdir | --libdi | --libd) |
| 254 | ac_prev=libdir ;; |
| 255 | -libdir=* | --libdir=* | --libdi=* | --libd=*) |
| 256 | libdir="$ac_optarg" ;; |
| 257 | |
| 258 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ |
| 259 | | --libexe | --libex | --libe) |
| 260 | ac_prev=libexecdir ;; |
| 261 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ |
| 262 | | --libexe=* | --libex=* | --libe=*) |
| 263 | libexecdir="$ac_optarg" ;; |
| 264 | |
| 265 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
| 266 | | --localstate | --localstat | --localsta | --localst \ |
| 267 | | --locals | --local | --loca | --loc | --lo) |
| 268 | ac_prev=localstatedir ;; |
| 269 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ |
| 270 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ |
| 271 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) |
| 272 | localstatedir="$ac_optarg" ;; |
| 273 | |
| 274 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) |
| 275 | ac_prev=mandir ;; |
| 276 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) |
| 277 | mandir="$ac_optarg" ;; |
| 278 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 279 | -nfp | --nfp | --nf) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 280 | # Obsolete; use --without-fp. |
| 281 | with_fp=no ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 282 | |
| 283 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 284 | | --no-cr | --no-c) |
| 285 | no_create=yes ;; |
| 286 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 287 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 288 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) |
| 289 | no_recursion=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 290 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 291 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
| 292 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ |
| 293 | | --oldin | --oldi | --old | --ol | --o) |
| 294 | ac_prev=oldincludedir ;; |
| 295 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ |
| 296 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ |
| 297 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) |
| 298 | oldincludedir="$ac_optarg" ;; |
| 299 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 300 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
| 301 | ac_prev=prefix ;; |
| 302 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) |
| 303 | prefix="$ac_optarg" ;; |
| 304 | |
| 305 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ |
| 306 | | --program-pre | --program-pr | --program-p) |
| 307 | ac_prev=program_prefix ;; |
| 308 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ |
| 309 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) |
| 310 | program_prefix="$ac_optarg" ;; |
| 311 | |
| 312 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ |
| 313 | | --program-suf | --program-su | --program-s) |
| 314 | ac_prev=program_suffix ;; |
| 315 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ |
| 316 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) |
| 317 | program_suffix="$ac_optarg" ;; |
| 318 | |
| 319 | -program-transform-name | --program-transform-name \ |
| 320 | | --program-transform-nam | --program-transform-na \ |
| 321 | | --program-transform-n | --program-transform- \ |
| 322 | | --program-transform | --program-transfor \ |
| 323 | | --program-transfo | --program-transf \ |
| 324 | | --program-trans | --program-tran \ |
| 325 | | --progr-tra | --program-tr | --program-t) |
| 326 | ac_prev=program_transform_name ;; |
| 327 | -program-transform-name=* | --program-transform-name=* \ |
| 328 | | --program-transform-nam=* | --program-transform-na=* \ |
| 329 | | --program-transform-n=* | --program-transform-=* \ |
| 330 | | --program-transform=* | --program-transfor=* \ |
| 331 | | --program-transfo=* | --program-transf=* \ |
| 332 | | --program-trans=* | --program-tran=* \ |
| 333 | | --progr-tra=* | --program-tr=* | --program-t=*) |
| 334 | program_transform_name="$ac_optarg" ;; |
| 335 | |
| 336 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 337 | | -silent | --silent | --silen | --sile | --sil) |
| 338 | silent=yes ;; |
| 339 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 340 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
| 341 | ac_prev=sbindir ;; |
| 342 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ |
| 343 | | --sbi=* | --sb=*) |
| 344 | sbindir="$ac_optarg" ;; |
| 345 | |
| 346 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ |
| 347 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ |
| 348 | | --sharedst | --shareds | --shared | --share | --shar \ |
| 349 | | --sha | --sh) |
| 350 | ac_prev=sharedstatedir ;; |
| 351 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ |
| 352 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ |
| 353 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ |
| 354 | | --sha=* | --sh=*) |
| 355 | sharedstatedir="$ac_optarg" ;; |
| 356 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 357 | -site | --site | --sit) |
| 358 | ac_prev=site ;; |
| 359 | -site=* | --site=* | --sit=*) |
| 360 | site="$ac_optarg" ;; |
| 361 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 362 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
| 363 | ac_prev=srcdir ;; |
| 364 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
| 365 | srcdir="$ac_optarg" ;; |
| 366 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 367 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
| 368 | | --syscon | --sysco | --sysc | --sys | --sy) |
| 369 | ac_prev=sysconfdir ;; |
| 370 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ |
| 371 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) |
| 372 | sysconfdir="$ac_optarg" ;; |
| 373 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 374 | -target | --target | --targe | --targ | --tar | --ta | --t) |
| 375 | ac_prev=target ;; |
| 376 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
| 377 | target="$ac_optarg" ;; |
| 378 | |
| 379 | -v | -verbose | --verbose | --verbos | --verbo | --verb) |
| 380 | verbose=yes ;; |
| 381 | |
| 382 | -version | --version | --versio | --versi | --vers) |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 383 | echo "configure generated by autoconf version 2.13" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 384 | exit 0 ;; |
| 385 | |
| 386 | -with-* | --with-*) |
| 387 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 388 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 389 | 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] | 390 | { 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] | 391 | fi |
| 392 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 393 | case "$ac_option" in |
| 394 | *=*) ;; |
| 395 | *) ac_optarg=yes ;; |
| 396 | esac |
| 397 | eval "with_${ac_package}='$ac_optarg'" ;; |
| 398 | |
| 399 | -without-* | --without-*) |
| 400 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 401 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 402 | 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] | 403 | { 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] | 404 | fi |
| 405 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 406 | eval "with_${ac_package}=no" ;; |
| 407 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 408 | --x) |
| 409 | # Obsolete; use --with-x. |
| 410 | with_x=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 411 | |
| 412 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ |
| 413 | | --x-incl | --x-inc | --x-in | --x-i) |
| 414 | ac_prev=x_includes ;; |
| 415 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ |
| 416 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) |
| 417 | x_includes="$ac_optarg" ;; |
| 418 | |
| 419 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ |
| 420 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) |
| 421 | ac_prev=x_libraries ;; |
| 422 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ |
| 423 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) |
| 424 | x_libraries="$ac_optarg" ;; |
| 425 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 426 | -*) { 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] | 427 | ;; |
| 428 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 429 | *) |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 430 | 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] | 431 | echo "configure: warning: $ac_option: invalid host type" 1>&2 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 432 | fi |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 433 | if test "x$nonopt" != xNONE; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 434 | { 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] | 435 | fi |
| 436 | nonopt="$ac_option" |
| 437 | ;; |
| 438 | |
| 439 | esac |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 440 | done |
| 441 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 442 | if test -n "$ac_prev"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 443 | { 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] | 444 | fi |
| 445 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 446 | 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] | 447 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 448 | # File descriptor usage: |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 449 | # 0 standard input |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 450 | # 1 file creation |
| 451 | # 2 errors and warnings |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 452 | # 3 some systems may open it to /dev/tty |
| 453 | # 4 used on the Kubota Titan |
| 454 | # 6 checking for... messages and results |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 455 | # 5 compiler messages saved in config.log |
| 456 | if test "$silent" = yes; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 457 | exec 6>/dev/null |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 458 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 459 | exec 6>&1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 460 | fi |
| 461 | exec 5>./config.log |
| 462 | |
| 463 | echo "\ |
| 464 | This file contains any messages produced by compilers while |
| 465 | running configure, to aid debugging if configure makes a mistake. |
| 466 | " 1>&5 |
| 467 | |
| 468 | # Strip out --no-create and --no-recursion so they do not pile up. |
| 469 | # Also quote any args containing shell metacharacters. |
| 470 | ac_configure_args= |
| 471 | for ac_arg |
| 472 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 473 | case "$ac_arg" in |
| 474 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 475 | | --no-cr | --no-c) ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 476 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 477 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; |
| 478 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) |
| 479 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; |
| 480 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 481 | esac |
| 482 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 483 | |
| 484 | # NLS nuisances. |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 485 | # Only set these to C if already set. These must not be set unconditionally |
| 486 | # because not all systems understand e.g. LANG=C (notably SCO). |
| 487 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! |
| 488 | # Non-C LC_CTYPE values break the ctype check. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 489 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 490 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
| 491 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi |
| 492 | 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] | 493 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 494 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
| 495 | rm -rf conftest* confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 496 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. |
| 497 | echo > confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 498 | |
| 499 | # A filename unique to this package, relative to the directory that |
| 500 | # 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] | 501 | ac_unique_file=Include/object.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 502 | |
| 503 | # Find the source files, if location was not specified. |
| 504 | if test -z "$srcdir"; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 505 | ac_srcdir_defaulted=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 506 | # Try the directory containing this script, then its parent. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 507 | ac_prog=$0 |
| 508 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` |
| 509 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. |
| 510 | srcdir=$ac_confdir |
| 511 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 512 | srcdir=.. |
| 513 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 514 | else |
| 515 | ac_srcdir_defaulted=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 516 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 517 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 518 | if test "$ac_srcdir_defaulted" = yes; then |
| 519 | { 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] | 520 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 521 | { 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] | 522 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 523 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 524 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
| 525 | |
| 526 | # Prefer explicitly selected file to automatically selected ones. |
| 527 | if test -z "$CONFIG_SITE"; then |
| 528 | if test "x$prefix" != xNONE; then |
| 529 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" |
| 530 | else |
| 531 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" |
| 532 | fi |
| 533 | fi |
| 534 | for ac_site_file in $CONFIG_SITE; do |
| 535 | if test -r "$ac_site_file"; then |
| 536 | echo "loading site script $ac_site_file" |
| 537 | . "$ac_site_file" |
| 538 | fi |
| 539 | done |
| 540 | |
| 541 | if test -r "$cache_file"; then |
| 542 | echo "loading cache $cache_file" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 543 | . $cache_file |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 544 | else |
| 545 | echo "creating cache $cache_file" |
| 546 | > $cache_file |
| 547 | fi |
| 548 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 549 | ac_ext=c |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 550 | # 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] | 551 | ac_cpp='$CPP $CPPFLAGS' |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 552 | 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] | 553 | 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] | 554 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 555 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 556 | ac_exeext= |
| 557 | ac_objext=o |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 558 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
| 559 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. |
| 560 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then |
| 561 | ac_n= ac_c=' |
| 562 | ' ac_t=' ' |
| 563 | else |
| 564 | ac_n=-n ac_c= ac_t= |
| 565 | fi |
| 566 | else |
| 567 | ac_n= ac_c='\c' ac_t= |
| 568 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 569 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 570 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 571 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 572 | |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 573 | # Set VERSION so we only need to edit in one place (i.e., here) |
| 574 | |
Guido van Rossum | 6db412b | 2001-04-18 04:37:57 +0000 | [diff] [blame] | 575 | VERSION=2.2 |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 576 | |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 577 | # Arguments passed to configure. |
| 578 | |
| 579 | CONFIG_ARGS="$ac_configure_args" |
| 580 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 581 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 582 | # Check whether --enable-framework or --disable-framework was given. |
| 583 | if test "${enable_framework+set}" = set; then |
| 584 | enableval="$enable_framework" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 585 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 586 | case $enableval in |
| 587 | yes) |
| 588 | enableval=/Library/Frameworks |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 589 | esac |
| 590 | case $enableval in |
| 591 | no) |
| 592 | PYTHONFRAMEWORK= |
| 593 | PYTHONFRAMEWORKDIR=no-framework |
| 594 | PYTHONFRAMEWORKPREFIX= |
| 595 | PYTHONFRAMEWORKINSTALLDIR= |
| 596 | enable_framework= |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 597 | ;; |
| 598 | *) |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 599 | PYTHONFRAMEWORK=Python |
| 600 | PYTHONFRAMEWORKDIR=Python.framework |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 601 | PYTHONFRAMEWORKPREFIX=$enableval |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 602 | PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR |
| 603 | prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 604 | esac |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 605 | |
| 606 | else |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 607 | |
| 608 | PYTHONFRAMEWORK= |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 609 | PYTHONFRAMEWORKDIR=no-framework |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 610 | PYTHONFRAMEWORKPREFIX= |
| 611 | PYTHONFRAMEWORKINSTALLDIR= |
| 612 | enable_framework= |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 613 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 614 | fi |
| 615 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 616 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 617 | |
| 618 | |
| 619 | |
| 620 | |
| 621 | ##AC_ARG_WITH(dyld, |
| 622 | ##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,) |
| 623 | ## |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 624 | # Set name for machine-dependent library files |
| 625 | |
| 626 | echo $ac_n "checking MACHDEP""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 627 | echo "configure:628: checking MACHDEP" >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 628 | if test -z "$MACHDEP" |
| 629 | then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 630 | ac_sys_system=`uname -s` |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 631 | 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] | 632 | ac_sys_release=`uname -v` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 633 | else |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 634 | ac_sys_release=`uname -r` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 635 | fi |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 636 | ac_md_system=`echo $ac_sys_system | |
| 637 | tr -d '/ ' | tr '[A-Z]' '[a-z]'` |
| 638 | ac_md_release=`echo $ac_sys_release | |
| 639 | tr -d '/ ' | sed 's/\..*//'` |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 640 | MACHDEP="$ac_md_system$ac_md_release" |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 641 | |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 642 | case $MACHDEP in |
Andrew M. Kuchling | 5a3e4cb | 2001-07-20 19:29:04 +0000 | [diff] [blame] | 643 | cygwin*) MACHDEP="cygwin";; |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 644 | '') MACHDEP="unknown";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 645 | esac |
| 646 | fi |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 647 | |
| 648 | # |
| 649 | # SGI compilers allow the specification of the both the ABI and the |
| 650 | # ISA on the command line. Depending on the values of these switches, |
| 651 | # different and often incompatable code will be generated. |
| 652 | # |
| 653 | # The SGI_ABI variable can be used to modify the CC and LDFLAGS and |
| 654 | # thus supply support for various ABI/ISA combinations. The MACHDEP |
| 655 | # variable is also adjusted. |
| 656 | # |
| 657 | |
| 658 | if test ! -z "$SGI_ABI" |
| 659 | then |
| 660 | CC="cc $SGI_ABI" |
| 661 | LDFLAGS="$SGI_ABI $LDFLAGS" |
| 662 | MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'` |
| 663 | fi |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 664 | echo "$ac_t""$MACHDEP" 1>&6 |
| 665 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 666 | # checks for alternative programs |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 667 | echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 668 | echo "configure:669: checking for --without-gcc" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 669 | # Check whether --with-gcc or --without-gcc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 670 | if test "${with_gcc+set}" = set; then |
| 671 | withval="$with_gcc" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 672 | |
| 673 | case $withval in |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 674 | no) CC=cc |
| 675 | without_gcc=yes;; |
| 676 | yes) CC=gcc |
| 677 | without_gcc=no;; |
| 678 | *) CC=$withval |
| 679 | without_gcc=$withval;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 680 | esac |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 681 | else |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 682 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 683 | case $ac_sys_system in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 684 | AIX*) CC=cc_r |
| 685 | without_gcc=;; |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 686 | BeOS*) |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 687 | case $BE_HOST_CPU in |
| 688 | ppc) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 689 | CC=mwcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 690 | without_gcc=yes |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 691 | 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] | 692 | CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 693 | LDFLAGS="$LDFLAGS -nodup" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 694 | ;; |
| 695 | x86) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 696 | CC=gcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 697 | without_gcc=no |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 698 | OPT=-O |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 699 | ;; |
| 700 | *) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 701 | { 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] | 702 | ;; |
| 703 | esac |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 704 | AR="\$(srcdir)/Modules/ar_beos" |
| 705 | RANLIB=: |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 706 | ;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 707 | Monterey*) |
| 708 | RANLIB=: |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 709 | without_gcc=;; |
| 710 | *) without_gcc=no;; |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 711 | esac |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 712 | fi |
| 713 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 714 | echo "$ac_t""$without_gcc" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 715 | |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 716 | |
| 717 | |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 718 | MAINOBJ=python.o |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 719 | echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 720 | echo "configure:721: checking for --with-cxx=<compiler>" >&5 |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 721 | # Check whether --with-cxx or --without-cxx was given. |
| 722 | if test "${with_cxx+set}" = set; then |
| 723 | withval="$with_cxx" |
| 724 | |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 725 | check_cxx=no |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 726 | case $withval in |
| 727 | no) CXX= |
| 728 | with_cxx=no;; |
| 729 | *) CXX=$withval |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 730 | MAINOBJ=ccpython.o |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 731 | with_cxx=$withval;; |
| 732 | esac |
| 733 | else |
| 734 | |
| 735 | with_cxx=no |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 736 | check_cxx=yes |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 737 | |
| 738 | fi |
| 739 | |
| 740 | echo "$ac_t""$with_cxx" 1>&6 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 741 | |
| 742 | |
| 743 | if test "$check_cxx" = "yes" |
| 744 | then |
| 745 | for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl |
| 746 | do |
| 747 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 748 | set dummy $ac_prog; ac_word=$2 |
| 749 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 750 | echo "configure:751: checking for $ac_word" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 751 | if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then |
| 752 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 753 | else |
| 754 | if test -n "$CXX"; then |
| 755 | ac_cv_prog_CXX="$CXX" # Let the user override the test. |
| 756 | else |
| 757 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 758 | ac_dummy="$PATH" |
| 759 | for ac_dir in $ac_dummy; do |
| 760 | test -z "$ac_dir" && ac_dir=. |
| 761 | if test -f $ac_dir/$ac_word; then |
| 762 | ac_cv_prog_CXX="$ac_prog" |
| 763 | break |
| 764 | fi |
| 765 | done |
| 766 | IFS="$ac_save_ifs" |
| 767 | fi |
| 768 | fi |
| 769 | CXX="$ac_cv_prog_CXX" |
| 770 | if test -n "$CXX"; then |
| 771 | echo "$ac_t""$CXX" 1>&6 |
| 772 | else |
| 773 | echo "$ac_t""no" 1>&6 |
| 774 | fi |
| 775 | |
| 776 | test -n "$CXX" && break |
| 777 | done |
| 778 | test -n "$CXX" || CXX="notfound" |
| 779 | |
| 780 | if test "$CXX" = "notfound" |
| 781 | then |
| 782 | CXX= |
| 783 | else |
| 784 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 785 | echo "configure:786: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 786 | |
| 787 | ac_ext=C |
| 788 | # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 789 | ac_cpp='$CXXCPP $CPPFLAGS' |
| 790 | ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 791 | ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 792 | cross_compiling=$ac_cv_prog_cxx_cross |
| 793 | |
| 794 | cat > conftest.$ac_ext << EOF |
| 795 | |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 796 | #line 797 "configure" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 797 | #include "confdefs.h" |
| 798 | |
| 799 | int main(){return(0);} |
| 800 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 801 | if { (eval echo configure:802: \"$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] | 802 | ac_cv_prog_cxx_works=yes |
| 803 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 804 | if (./conftest; exit) 2>/dev/null; then |
| 805 | ac_cv_prog_cxx_cross=no |
| 806 | else |
| 807 | ac_cv_prog_cxx_cross=yes |
| 808 | fi |
| 809 | else |
| 810 | echo "configure: failed program was:" >&5 |
| 811 | cat conftest.$ac_ext >&5 |
| 812 | ac_cv_prog_cxx_works=no |
| 813 | fi |
| 814 | rm -fr conftest* |
| 815 | ac_ext=c |
| 816 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 817 | ac_cpp='$CPP $CPPFLAGS' |
| 818 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 819 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 820 | cross_compiling=$ac_cv_prog_cc_cross |
| 821 | |
| 822 | echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 |
| 823 | if test $ac_cv_prog_cxx_works = no; then |
| 824 | { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } |
| 825 | fi |
| 826 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 827 | echo "configure:828: 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] | 828 | echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 |
| 829 | cross_compiling=$ac_cv_prog_cxx_cross |
| 830 | |
| 831 | fi |
| 832 | fi |
| 833 | |
Guido van Rossum | 8b131c5 | 1995-03-09 14:10:13 +0000 | [diff] [blame] | 834 | # If the user switches compilers, we can't believe the cache |
| 835 | if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" |
| 836 | then |
| 837 | { echo "configure: error: cached CC is different -- throw away $cache_file |
| 838 | (it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; } |
| 839 | fi |
| 840 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 841 | # Extract the first word of "gcc", so it can be a program name with args. |
| 842 | set dummy gcc; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 843 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 844 | echo "configure:845: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 845 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 846 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 847 | else |
| 848 | if test -n "$CC"; then |
| 849 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 850 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 851 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 852 | ac_dummy="$PATH" |
| 853 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 854 | test -z "$ac_dir" && ac_dir=. |
| 855 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 856 | ac_cv_prog_CC="gcc" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 857 | break |
| 858 | fi |
| 859 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 860 | IFS="$ac_save_ifs" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 861 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 862 | fi |
| 863 | CC="$ac_cv_prog_CC" |
| 864 | if test -n "$CC"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 865 | echo "$ac_t""$CC" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 866 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 867 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 868 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 869 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 870 | if test -z "$CC"; then |
| 871 | # Extract the first word of "cc", so it can be a program name with args. |
| 872 | set dummy cc; ac_word=$2 |
| 873 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 874 | echo "configure:875: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 875 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 876 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 877 | else |
| 878 | if test -n "$CC"; then |
| 879 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 880 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 881 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 882 | ac_prog_rejected=no |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 883 | ac_dummy="$PATH" |
| 884 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 885 | test -z "$ac_dir" && ac_dir=. |
| 886 | if test -f $ac_dir/$ac_word; then |
| 887 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then |
| 888 | ac_prog_rejected=yes |
| 889 | continue |
| 890 | fi |
| 891 | ac_cv_prog_CC="cc" |
| 892 | break |
| 893 | fi |
| 894 | done |
| 895 | IFS="$ac_save_ifs" |
| 896 | if test $ac_prog_rejected = yes; then |
| 897 | # We found a bogon in the path, so make sure we never use it. |
| 898 | set dummy $ac_cv_prog_CC |
| 899 | shift |
| 900 | if test $# -gt 0; then |
| 901 | # We chose a different compiler from the bogus one. |
| 902 | # However, it has the same basename, so the bogon will be chosen |
| 903 | # first if we set CC to just the basename; use the full file name. |
| 904 | shift |
| 905 | set dummy "$ac_dir/$ac_word" "$@" |
| 906 | shift |
| 907 | ac_cv_prog_CC="$@" |
| 908 | fi |
| 909 | fi |
| 910 | fi |
| 911 | fi |
| 912 | CC="$ac_cv_prog_CC" |
| 913 | if test -n "$CC"; then |
| 914 | echo "$ac_t""$CC" 1>&6 |
| 915 | else |
| 916 | echo "$ac_t""no" 1>&6 |
| 917 | fi |
| 918 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 919 | if test -z "$CC"; then |
| 920 | case "`uname -s`" in |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 921 | *win32* | *WIN32*) |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 922 | # Extract the first word of "cl", so it can be a program name with args. |
| 923 | set dummy cl; ac_word=$2 |
| 924 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 925 | echo "configure:926: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 926 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 927 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 928 | else |
| 929 | if test -n "$CC"; then |
| 930 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 931 | else |
| 932 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 933 | ac_dummy="$PATH" |
| 934 | for ac_dir in $ac_dummy; do |
| 935 | test -z "$ac_dir" && ac_dir=. |
| 936 | if test -f $ac_dir/$ac_word; then |
| 937 | ac_cv_prog_CC="cl" |
| 938 | break |
| 939 | fi |
| 940 | done |
| 941 | IFS="$ac_save_ifs" |
| 942 | fi |
| 943 | fi |
| 944 | CC="$ac_cv_prog_CC" |
| 945 | if test -n "$CC"; then |
| 946 | echo "$ac_t""$CC" 1>&6 |
| 947 | else |
| 948 | echo "$ac_t""no" 1>&6 |
| 949 | fi |
| 950 | ;; |
| 951 | esac |
| 952 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 953 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
| 954 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 955 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 956 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 957 | echo "configure:958: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 958 | |
| 959 | ac_ext=c |
| 960 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 961 | ac_cpp='$CPP $CPPFLAGS' |
| 962 | 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] | 963 | 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] | 964 | cross_compiling=$ac_cv_prog_cc_cross |
| 965 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 966 | cat > conftest.$ac_ext << EOF |
| 967 | |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 968 | #line 969 "configure" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 969 | #include "confdefs.h" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 970 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 971 | main(){return(0);} |
| 972 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 973 | if { (eval echo configure:974: \"$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] | 974 | ac_cv_prog_cc_works=yes |
| 975 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 976 | if (./conftest; exit) 2>/dev/null; then |
| 977 | ac_cv_prog_cc_cross=no |
| 978 | else |
| 979 | ac_cv_prog_cc_cross=yes |
| 980 | fi |
| 981 | else |
| 982 | echo "configure: failed program was:" >&5 |
| 983 | cat conftest.$ac_ext >&5 |
| 984 | ac_cv_prog_cc_works=no |
| 985 | fi |
| 986 | rm -fr conftest* |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 987 | ac_ext=c |
| 988 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 989 | ac_cpp='$CPP $CPPFLAGS' |
| 990 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 991 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 992 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 993 | |
| 994 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
| 995 | if test $ac_cv_prog_cc_works = no; then |
| 996 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } |
| 997 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 998 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 999 | echo "configure:1000: 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] | 1000 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
| 1001 | cross_compiling=$ac_cv_prog_cc_cross |
| 1002 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1003 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1004 | echo "configure:1005: checking whether we are using GNU C" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1005 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1006 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1007 | else |
| 1008 | cat > conftest.c <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1009 | #ifdef __GNUC__ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1010 | yes; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1011 | #endif |
| 1012 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1013 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1014: \"$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] | 1014 | ac_cv_prog_gcc=yes |
| 1015 | else |
| 1016 | ac_cv_prog_gcc=no |
| 1017 | fi |
| 1018 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1019 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1020 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1021 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1022 | if test $ac_cv_prog_gcc = yes; then |
| 1023 | GCC=yes |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1024 | else |
| 1025 | GCC= |
| 1026 | fi |
| 1027 | |
| 1028 | ac_test_CFLAGS="${CFLAGS+set}" |
| 1029 | ac_save_CFLAGS="$CFLAGS" |
| 1030 | CFLAGS= |
| 1031 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1032 | echo "configure:1033: checking whether ${CC-cc} accepts -g" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1033 | 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] | 1034 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1035 | else |
| 1036 | echo 'void f(){}' > conftest.c |
| 1037 | 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] | 1038 | ac_cv_prog_cc_g=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1039 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1040 | ac_cv_prog_cc_g=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1041 | fi |
| 1042 | rm -f conftest* |
| 1043 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1044 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1045 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1046 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1047 | if test "$ac_test_CFLAGS" = set; then |
| 1048 | CFLAGS="$ac_save_CFLAGS" |
| 1049 | elif test $ac_cv_prog_cc_g = yes; then |
| 1050 | if test "$GCC" = yes; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1051 | CFLAGS="-g -O2" |
| 1052 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1053 | CFLAGS="-g" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1054 | fi |
| 1055 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1056 | if test "$GCC" = yes; then |
| 1057 | CFLAGS="-O2" |
| 1058 | else |
| 1059 | CFLAGS= |
| 1060 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1061 | fi |
| 1062 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1063 | |
| 1064 | # checks for UNIX variants that set C preprocessor variables |
| 1065 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1066 | echo "configure:1067: checking how to run the C preprocessor" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1067 | # On Suns, sometimes $CPP names a directory. |
| 1068 | if test -n "$CPP" && test -d "$CPP"; then |
| 1069 | CPP= |
| 1070 | fi |
| 1071 | if test -z "$CPP"; then |
| 1072 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
| 1073 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1074 | else |
| 1075 | # This must be in double quotes, not single quotes, because CPP may get |
| 1076 | # substituted into the Makefile and "${CC-cc}" will confuse make. |
| 1077 | CPP="${CC-cc} -E" |
| 1078 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 1079 | # not just through cpp. |
| 1080 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1081 | #line 1082 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1082 | #include "confdefs.h" |
| 1083 | #include <assert.h> |
| 1084 | Syntax Error |
| 1085 | EOF |
| 1086 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1087 | { (eval echo configure:1088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1088 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1089 | if test -z "$ac_err"; then |
| 1090 | : |
| 1091 | else |
| 1092 | echo "$ac_err" >&5 |
| 1093 | echo "configure: failed program was:" >&5 |
| 1094 | cat conftest.$ac_ext >&5 |
| 1095 | rm -rf conftest* |
| 1096 | CPP="${CC-cc} -E -traditional-cpp" |
| 1097 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1098 | #line 1099 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1099 | #include "confdefs.h" |
| 1100 | #include <assert.h> |
| 1101 | Syntax Error |
| 1102 | EOF |
| 1103 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1104 | { (eval echo configure:1105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1105 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1106 | if test -z "$ac_err"; then |
| 1107 | : |
| 1108 | else |
| 1109 | echo "$ac_err" >&5 |
| 1110 | echo "configure: failed program was:" >&5 |
| 1111 | cat conftest.$ac_ext >&5 |
| 1112 | rm -rf conftest* |
| 1113 | CPP="${CC-cc} -nologo -E" |
| 1114 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1115 | #line 1116 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1116 | #include "confdefs.h" |
| 1117 | #include <assert.h> |
| 1118 | Syntax Error |
| 1119 | EOF |
| 1120 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1121 | { (eval echo configure:1122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1122 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1123 | if test -z "$ac_err"; then |
| 1124 | : |
| 1125 | else |
| 1126 | echo "$ac_err" >&5 |
| 1127 | echo "configure: failed program was:" >&5 |
| 1128 | cat conftest.$ac_ext >&5 |
| 1129 | rm -rf conftest* |
| 1130 | CPP=/lib/cpp |
| 1131 | fi |
| 1132 | rm -f conftest* |
| 1133 | fi |
| 1134 | rm -f conftest* |
| 1135 | fi |
| 1136 | rm -f conftest* |
| 1137 | ac_cv_prog_CPP="$CPP" |
| 1138 | fi |
| 1139 | CPP="$ac_cv_prog_CPP" |
| 1140 | else |
| 1141 | ac_cv_prog_CPP="$CPP" |
| 1142 | fi |
| 1143 | echo "$ac_t""$CPP" 1>&6 |
| 1144 | |
| 1145 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1146 | echo "configure:1147: checking for AIX" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1147 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1148 | #line 1149 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1149 | #include "confdefs.h" |
| 1150 | #ifdef _AIX |
| 1151 | yes |
| 1152 | #endif |
| 1153 | |
| 1154 | EOF |
| 1155 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1156 | egrep "yes" >/dev/null 2>&1; then |
| 1157 | rm -rf conftest* |
| 1158 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF |
| 1159 | #define _ALL_SOURCE 1 |
| 1160 | EOF |
| 1161 | |
| 1162 | else |
| 1163 | rm -rf conftest* |
| 1164 | echo "$ac_t""no" 1>&6 |
| 1165 | fi |
| 1166 | rm -f conftest* |
| 1167 | |
| 1168 | |
| 1169 | ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` |
| 1170 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1171 | echo "configure:1172: checking for minix/config.h" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1172 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 1173 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1174 | else |
| 1175 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1176 | #line 1177 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1177 | #include "confdefs.h" |
| 1178 | #include <minix/config.h> |
| 1179 | EOF |
| 1180 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1181 | { (eval echo configure:1182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1182 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1183 | if test -z "$ac_err"; then |
| 1184 | rm -rf conftest* |
| 1185 | eval "ac_cv_header_$ac_safe=yes" |
| 1186 | else |
| 1187 | echo "$ac_err" >&5 |
| 1188 | echo "configure: failed program was:" >&5 |
| 1189 | cat conftest.$ac_ext >&5 |
| 1190 | rm -rf conftest* |
| 1191 | eval "ac_cv_header_$ac_safe=no" |
| 1192 | fi |
| 1193 | rm -f conftest* |
| 1194 | fi |
| 1195 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 1196 | echo "$ac_t""yes" 1>&6 |
| 1197 | MINIX=yes |
| 1198 | else |
| 1199 | echo "$ac_t""no" 1>&6 |
| 1200 | MINIX= |
| 1201 | fi |
| 1202 | |
| 1203 | if test "$MINIX" = yes; then |
| 1204 | cat >> confdefs.h <<\EOF |
| 1205 | #define _POSIX_SOURCE 1 |
| 1206 | EOF |
| 1207 | |
| 1208 | cat >> confdefs.h <<\EOF |
| 1209 | #define _POSIX_1_SOURCE 2 |
| 1210 | EOF |
| 1211 | |
| 1212 | cat >> confdefs.h <<\EOF |
| 1213 | #define _MINIX 1 |
| 1214 | EOF |
| 1215 | |
| 1216 | fi |
| 1217 | |
| 1218 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1219 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1220 | echo "configure:1221: checking for Cygwin environment" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1221 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
| 1222 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1223 | else |
| 1224 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1225 | #line 1226 "configure" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1226 | #include "confdefs.h" |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1227 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1228 | int main() { |
| 1229 | |
| 1230 | #ifndef __CYGWIN__ |
| 1231 | #define __CYGWIN__ __CYGWIN32__ |
| 1232 | #endif |
| 1233 | return __CYGWIN__; |
| 1234 | ; return 0; } |
| 1235 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1236 | if { (eval echo configure:1237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1237 | rm -rf conftest* |
| 1238 | ac_cv_cygwin=yes |
| 1239 | else |
| 1240 | echo "configure: failed program was:" >&5 |
| 1241 | cat conftest.$ac_ext >&5 |
| 1242 | rm -rf conftest* |
| 1243 | ac_cv_cygwin=no |
| 1244 | fi |
| 1245 | rm -f conftest* |
| 1246 | rm -f conftest* |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1247 | fi |
| 1248 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1249 | echo "$ac_t""$ac_cv_cygwin" 1>&6 |
| 1250 | CYGWIN= |
| 1251 | test "$ac_cv_cygwin" = yes && CYGWIN=yes |
| 1252 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1253 | echo "configure:1254: checking for mingw32 environment" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1254 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
| 1255 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1256 | else |
| 1257 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1258 | #line 1259 "configure" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1259 | #include "confdefs.h" |
| 1260 | |
| 1261 | int main() { |
| 1262 | return __MINGW32__; |
| 1263 | ; return 0; } |
| 1264 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1265 | if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1266 | rm -rf conftest* |
| 1267 | ac_cv_mingw32=yes |
| 1268 | else |
| 1269 | echo "configure: failed program was:" >&5 |
| 1270 | cat conftest.$ac_ext >&5 |
| 1271 | rm -rf conftest* |
| 1272 | ac_cv_mingw32=no |
| 1273 | fi |
| 1274 | rm -f conftest* |
| 1275 | rm -f conftest* |
| 1276 | fi |
| 1277 | |
| 1278 | echo "$ac_t""$ac_cv_mingw32" 1>&6 |
| 1279 | MINGW32= |
| 1280 | test "$ac_cv_mingw32" = yes && MINGW32=yes |
| 1281 | |
| 1282 | |
| 1283 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1284 | echo "configure:1285: checking for executable suffix" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1285 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
| 1286 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1287 | else |
| 1288 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then |
| 1289 | ac_cv_exeext=.exe |
| 1290 | else |
| 1291 | rm -f conftest* |
| 1292 | echo 'int main () { return 0; }' > conftest.$ac_ext |
| 1293 | ac_cv_exeext= |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1294 | if { (eval echo configure:1295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1295 | for file in conftest.*; do |
| 1296 | case $file in |
| 1297 | *.c | *.o | *.obj) ;; |
| 1298 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
| 1299 | esac |
| 1300 | done |
| 1301 | else |
| 1302 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } |
| 1303 | fi |
| 1304 | rm -f conftest* |
| 1305 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no |
| 1306 | fi |
| 1307 | fi |
| 1308 | |
| 1309 | EXEEXT="" |
| 1310 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} |
| 1311 | echo "$ac_t""${ac_cv_exeext}" 1>&6 |
| 1312 | ac_exeext=$EXEEXT |
| 1313 | |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1314 | echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1315 | echo "configure:1316: checking for --with-suffix" >&5 |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1316 | # Check whether --with-suffix or --without-suffix was given. |
| 1317 | if test "${with_suffix+set}" = set; then |
| 1318 | withval="$with_suffix" |
| 1319 | |
| 1320 | case $withval in |
| 1321 | no) EXEEXT=;; |
| 1322 | yes) EXEEXT=.exe;; |
| 1323 | *) EXEEXT=$withval;; |
| 1324 | esac |
| 1325 | fi |
| 1326 | |
| 1327 | echo "$ac_t""$EXEEXT" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1328 | # Test whether we're running on a non-case-sensitive system, in which |
| 1329 | # case we give a warning if no ext is given |
| 1330 | if test -d "python" -a -z "$EXEEXT" |
| 1331 | then |
| 1332 | echo "configure: warning: This filesystem is not case-sensitive so you should probably use --with-suffix" 1>&2 |
| 1333 | fi |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1334 | |
Guido van Rossum | dd997f7 | 1998-10-07 19:58:26 +0000 | [diff] [blame] | 1335 | case $MACHDEP in |
| 1336 | bsdos*) |
| 1337 | case $CC in |
| 1338 | gcc) CC="$CC -D_HAVE_BSDI";; |
| 1339 | esac;; |
| 1340 | esac |
| 1341 | |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1342 | case $ac_sys_system in |
| 1343 | hp*|HP*) |
| 1344 | case $CC in |
Guido van Rossum | cd5ff9f | 2000-09-22 16:15:54 +0000 | [diff] [blame] | 1345 | cc|*/cc) CC="$CC -Ae";; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1346 | esac;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1347 | Monterey*) |
| 1348 | case $CC in |
| 1349 | cc) CC="$CC -Wl,-Bexport";; |
| 1350 | esac;; |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1351 | SunOS*) |
| 1352 | # Some functions have a prototype only with that define, e.g. confstr |
| 1353 | cat >> confdefs.h <<\EOF |
| 1354 | #define __EXTENSIONS__ 1 |
| 1355 | EOF |
| 1356 | |
| 1357 | ;; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1358 | esac |
| 1359 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1360 | |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1361 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1362 | echo $ac_n "checking LIBRARY""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1363 | echo "configure:1364: checking LIBRARY" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1364 | if test -z "$LIBRARY" |
| 1365 | then |
| 1366 | LIBRARY='libpython$(VERSION).a' |
| 1367 | fi |
| 1368 | echo "$ac_t""$LIBRARY" 1>&6 |
| 1369 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1370 | # LDLIBRARY is the name of the library to link against (as opposed to the |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1371 | # name of the library into which to insert object files). BLDLIBRARY is also |
| 1372 | # the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY |
| 1373 | # is blank as the main program is not linked directly against LDLIBRARY. |
| 1374 | # LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On |
| 1375 | # systems without shared libraries, LDLIBRARY is the same as LIBRARY |
| 1376 | # (defined in the Makefiles). On Cygwin LDLIBRARY is the import library, |
| 1377 | # DLLLIBRARY is the shared (i.e., DLL) library. |
| 1378 | # |
| 1379 | |
| 1380 | |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1381 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1382 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1383 | LDLIBRARY="$LIBRARY" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1384 | BLDLIBRARY='$(LDLIBRARY)' |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 1385 | DLLLIBRARY='' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1386 | LDLIBRARYDIR='' |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1387 | |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1388 | # LINKCC is the command that links the python executable -- default is $(CC). |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1389 | # This is altered for AIX in order to build the export list before |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1390 | # linking. |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1391 | |
| 1392 | echo $ac_n "checking LINKCC""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1393 | echo "configure:1394: checking LINKCC" >&5 |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1394 | if test -z "$LINKCC" |
| 1395 | then |
| 1396 | case $ac_sys_system in |
| 1397 | AIX*) |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 1398 | LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 1399 | dgux*) |
| 1400 | LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1401 | Monterey64*) |
| 1402 | LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";; |
Guido van Rossum | 25f9303 | 1997-08-18 16:00:04 +0000 | [diff] [blame] | 1403 | *) LINKCC="\$(PURIFY) \$(CC)";; |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1404 | esac |
| 1405 | fi |
| 1406 | echo "$ac_t""$LINKCC" 1>&6 |
| 1407 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1408 | echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1409 | echo "configure:1410: checking LDLIBRARY" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1410 | |
| 1411 | # 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] | 1412 | case $MACHDEP in |
| 1413 | dguxR4) |
| 1414 | LDLIBRARY='libpython$(VERSION).so' |
| 1415 | OPT="$OPT -pic" |
| 1416 | ;; |
| 1417 | beos*) |
| 1418 | LDLIBRARY='libpython$(VERSION).so' |
| 1419 | ;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1420 | cygwin*) |
| 1421 | LDLIBRARY='libpython$(VERSION).dll.a' |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1422 | DLLLIBRARY='libpython$(VERSION).dll' |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1423 | ;; |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1424 | esac |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1425 | |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 1426 | # MacOSX framework builds need more magic. LDLIBRARY is the dynamic |
| 1427 | # library that we build, but we do not want to link against it (we |
| 1428 | # will find it with a -framework option). For this reason there is an |
| 1429 | # extra variable BLDLIBRARY against which Python and the extension |
| 1430 | # modules are linked, BLDLIBRARY. This is normally the same as |
| 1431 | # LDLIBRARY, but empty for MacOSX framework builds. |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1432 | if test "$enable_framework" |
| 1433 | then |
| 1434 | LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
| 1435 | LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)' |
| 1436 | BLDLIBRARY='' |
| 1437 | else |
| 1438 | BLDLIBRARY='$(LDLIBRARY)' |
| 1439 | fi |
| 1440 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1441 | echo "$ac_t""$LDLIBRARY" 1>&6 |
| 1442 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1443 | # Extract the first word of "ranlib", so it can be a program name with args. |
| 1444 | set dummy ranlib; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1445 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1446 | echo "configure:1447: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1447 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1448 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1449 | else |
| 1450 | if test -n "$RANLIB"; then |
| 1451 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 1452 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1453 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1454 | ac_dummy="$PATH" |
| 1455 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1456 | test -z "$ac_dir" && ac_dir=. |
| 1457 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1458 | ac_cv_prog_RANLIB="ranlib" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1459 | break |
| 1460 | fi |
| 1461 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1462 | IFS="$ac_save_ifs" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1463 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1464 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1465 | fi |
| 1466 | RANLIB="$ac_cv_prog_RANLIB" |
| 1467 | if test -n "$RANLIB"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1468 | echo "$ac_t""$RANLIB" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1469 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1470 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1471 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1472 | |
| 1473 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1474 | for ac_prog in ar aal |
| 1475 | do |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1476 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 1477 | set dummy $ac_prog; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1478 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1479 | echo "configure:1480: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1480 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1481 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1482 | else |
| 1483 | if test -n "$AR"; then |
| 1484 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 1485 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1486 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1487 | ac_dummy="$PATH" |
| 1488 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1489 | test -z "$ac_dir" && ac_dir=. |
| 1490 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1491 | ac_cv_prog_AR="$ac_prog" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1492 | break |
| 1493 | fi |
| 1494 | done |
| 1495 | IFS="$ac_save_ifs" |
| 1496 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1497 | fi |
| 1498 | AR="$ac_cv_prog_AR" |
| 1499 | if test -n "$AR"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1500 | echo "$ac_t""$AR" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1501 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1502 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1503 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1504 | |
| 1505 | test -n "$AR" && break |
| 1506 | done |
| 1507 | test -n "$AR" || AR="ar" |
| 1508 | |
Neil Schemenauer | a42c827 | 2001-03-31 00:01:55 +0000 | [diff] [blame] | 1509 | |
| 1510 | case $MACHDEP in |
| 1511 | bsdos*) |
| 1512 | # install -d does not work on BSDI |
| 1513 | if test -z "$INSTALL" |
| 1514 | then |
| 1515 | INSTALL="${srcdir}/install-sh -c" |
| 1516 | fi |
| 1517 | esac |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1518 | ac_aux_dir= |
| 1519 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
| 1520 | if test -f $ac_dir/install-sh; then |
| 1521 | ac_aux_dir=$ac_dir |
| 1522 | ac_install_sh="$ac_aux_dir/install-sh -c" |
| 1523 | break |
| 1524 | elif test -f $ac_dir/install.sh; then |
| 1525 | ac_aux_dir=$ac_dir |
| 1526 | ac_install_sh="$ac_aux_dir/install.sh -c" |
| 1527 | break |
| 1528 | fi |
| 1529 | done |
| 1530 | if test -z "$ac_aux_dir"; then |
| 1531 | { 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] | 1532 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1533 | ac_config_guess=$ac_aux_dir/config.guess |
| 1534 | ac_config_sub=$ac_aux_dir/config.sub |
| 1535 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. |
| 1536 | |
| 1537 | # Find a good install program. We prefer a C program (faster), |
| 1538 | # so one script is as good as another. But avoid the broken or |
| 1539 | # incompatible versions: |
| 1540 | # SysV /etc/install, /usr/sbin/install |
| 1541 | # SunOS /usr/etc/install |
| 1542 | # IRIX /sbin/install |
| 1543 | # AIX /bin/install |
| 1544 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
| 1545 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
| 1546 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
| 1547 | # ./install, which can be erroneously created by make from ./install.sh. |
| 1548 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1549 | echo "configure:1550: checking for a BSD compatible install" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1550 | if test -z "$INSTALL"; then |
| 1551 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
| 1552 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1553 | else |
| 1554 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" |
| 1555 | for ac_dir in $PATH; do |
| 1556 | # Account for people who put trailing slashes in PATH elements. |
| 1557 | case "$ac_dir/" in |
| 1558 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; |
| 1559 | *) |
| 1560 | # OSF1 and SCO ODT 3.0 have their own names for install. |
| 1561 | # Don't use installbsd from OSF since it installs stuff as root |
| 1562 | # by default. |
| 1563 | for ac_prog in ginstall scoinst install; do |
| 1564 | if test -f $ac_dir/$ac_prog; then |
| 1565 | if test $ac_prog = install && |
| 1566 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then |
| 1567 | # AIX install. It has an incompatible calling convention. |
| 1568 | : |
| 1569 | else |
| 1570 | ac_cv_path_install="$ac_dir/$ac_prog -c" |
| 1571 | break 2 |
| 1572 | fi |
| 1573 | fi |
| 1574 | done |
| 1575 | ;; |
| 1576 | esac |
| 1577 | done |
| 1578 | IFS="$ac_save_IFS" |
| 1579 | |
| 1580 | fi |
| 1581 | if test "${ac_cv_path_install+set}" = set; then |
| 1582 | INSTALL="$ac_cv_path_install" |
| 1583 | else |
| 1584 | # As a last resort, use the slow shell script. We don't cache a |
| 1585 | # path for INSTALL within a source directory, because that will |
| 1586 | # break other packages using the cache if that directory is |
| 1587 | # removed, or if the path is relative. |
| 1588 | INSTALL="$ac_install_sh" |
| 1589 | fi |
| 1590 | fi |
| 1591 | echo "$ac_t""$INSTALL" 1>&6 |
| 1592 | |
| 1593 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
| 1594 | # It thinks the first close brace ends the variable substitution. |
| 1595 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' |
| 1596 | |
| 1597 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
| 1598 | |
| 1599 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
| 1600 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1601 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1602 | # Not every filesystem supports hard links |
| 1603 | |
| 1604 | if test -z "$LN" ; then |
| 1605 | case $ac_sys_system in |
| 1606 | BeOS*) LN="ln -s";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1607 | CYGWIN*) LN="ln -s";; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1608 | *) LN=ln;; |
| 1609 | esac |
| 1610 | fi |
| 1611 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1612 | # Check for --with-pydebug |
| 1613 | echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1614 | echo "configure:1615: checking for --with-pydebug" >&5 |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1615 | # Check whether --with-pydebug or --without-pydebug was given. |
| 1616 | if test "${with_pydebug+set}" = set; then |
| 1617 | withval="$with_pydebug" |
| 1618 | |
| 1619 | if test "$withval" != no |
| 1620 | then cat >> confdefs.h <<\EOF |
| 1621 | #define Py_DEBUG 1 |
| 1622 | EOF |
| 1623 | echo "$ac_t""yes" 1>&6; Py_DEBUG='true' |
| 1624 | else echo "$ac_t""no" 1>&6; Py_DEBUG='false' |
| 1625 | fi |
| 1626 | else |
| 1627 | echo "$ac_t""no" 1>&6 |
| 1628 | fi |
| 1629 | |
| 1630 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1631 | # Optimizer/debugger flags |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1632 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1633 | if test -z "$OPT" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1634 | then |
Guido van Rossum | edca74a | 1997-07-18 23:29:40 +0000 | [diff] [blame] | 1635 | case $GCC in |
| 1636 | yes) |
| 1637 | case $ac_cv_prog_cc_g in |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1638 | yes) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1639 | if test "$Py_DEBUG" = 'true' ; then |
| 1640 | # Optimization messes up debuggers, so turn it off for |
| 1641 | # debug builds. |
| 1642 | OPT="-g -Wall -Wstrict-prototypes" |
| 1643 | else |
| 1644 | OPT="-g -O3 -Wall -Wstrict-prototypes" |
| 1645 | fi;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1646 | *) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1647 | OPT="-O3 -Wall -Wstrict-prototypes";; |
| 1648 | esac |
| 1649 | ;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1650 | *) |
| 1651 | case $ac_sys_system in |
| 1652 | UnixWare*) |
| 1653 | OPT="-O -K pentium,host,inline,loop_unroll,alloca ";; |
| 1654 | *) |
| 1655 | OPT="-O";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1656 | esac |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1657 | esac |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 1658 | case $ac_sys_system in |
| 1659 | Darwin*) |
| 1660 | OPT="$OPT -no-cpp-precomp";; |
| 1661 | esac |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1662 | fi |
| 1663 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1664 | # The current (beta) Monterey compiler dies with optimizations |
| 1665 | case $ac_sys_system in |
| 1666 | Monterey*) OPT="";; |
| 1667 | esac |
| 1668 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 1669 | if test "$ac_arch_flags" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 1670 | then |
| 1671 | OPT="$OPT $ac_arch_flags" |
| 1672 | fi |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1673 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1674 | echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1675 | echo "configure:1676: checking whether $CC accepts -OPT:Olimit=0" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1676 | 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] | 1677 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1678 | else |
| 1679 | ac_save_cc="$CC" |
| 1680 | CC="$CC -OPT:Olimit=0" |
| 1681 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 1682 | ac_cv_opt_olimit_ok=no |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1683 | else |
| 1684 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1685 | #line 1686 "configure" |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1686 | #include "confdefs.h" |
| 1687 | int main() { return 0; } |
| 1688 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1689 | if { (eval echo configure:1690: \"$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] | 1690 | then |
| 1691 | ac_cv_opt_olimit_ok=yes |
| 1692 | else |
| 1693 | echo "configure: failed program was:" >&5 |
| 1694 | cat conftest.$ac_ext >&5 |
| 1695 | rm -fr conftest* |
| 1696 | ac_cv_opt_olimit_ok=no |
| 1697 | fi |
| 1698 | rm -fr conftest* |
| 1699 | fi |
| 1700 | |
| 1701 | CC="$ac_save_cc" |
| 1702 | fi |
| 1703 | |
| 1704 | echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6 |
Guido van Rossum | 2efa34b | 1997-10-23 17:43:11 +0000 | [diff] [blame] | 1705 | if test $ac_cv_opt_olimit_ok = yes; then |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 1706 | case $ac_sys_system in |
| 1707 | Darwin*) OPT="$OPT" ;; |
| 1708 | *) OPT="$OPT -OPT:Olimit=0";; |
| 1709 | esac |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1710 | else |
| 1711 | echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1712 | echo "configure:1713: checking whether $CC accepts -Olimit 1500" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1713 | if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1714 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1715 | else |
| 1716 | ac_save_cc="$CC" |
| 1717 | CC="$CC -Olimit 1500" |
| 1718 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 1719 | ac_cv_olimit_ok=no |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1720 | else |
| 1721 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1722 | #line 1723 "configure" |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1723 | #include "confdefs.h" |
| 1724 | int main() { return 0; } |
| 1725 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1726 | if { (eval echo configure:1727: \"$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] | 1727 | then |
| 1728 | ac_cv_olimit_ok=yes |
| 1729 | else |
| 1730 | echo "configure: failed program was:" >&5 |
| 1731 | cat conftest.$ac_ext >&5 |
| 1732 | rm -fr conftest* |
| 1733 | ac_cv_olimit_ok=no |
Guido van Rossum | 201afe5 | 1997-05-14 21:14:44 +0000 | [diff] [blame] | 1734 | fi |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1735 | rm -fr conftest* |
| 1736 | fi |
| 1737 | |
| 1738 | CC="$ac_save_cc" |
| 1739 | fi |
| 1740 | |
| 1741 | echo "$ac_t""$ac_cv_olimit_ok" 1>&6 |
| 1742 | if test $ac_cv_olimit_ok = yes; then |
| 1743 | OPT="$OPT -Olimit 1500" |
| 1744 | fi |
| 1745 | fi |
| 1746 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1747 | # -Kpthread, if available, provides the right #defines |
| 1748 | # and linker options to make pthread_create available |
| 1749 | echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1750 | echo "configure:1751: checking whether $CC accepts -Kpthread" >&5 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1751 | if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then |
| 1752 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1753 | else |
| 1754 | ac_save_cc="$CC" |
| 1755 | CC="$CC -Kpthread" |
| 1756 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1757 | #line 1758 "configure" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1758 | #include "confdefs.h" |
| 1759 | #include <pthread.h> |
| 1760 | int main() { |
| 1761 | pthread_create(0,0,0,0) |
| 1762 | ; return 0; } |
| 1763 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1764 | if { (eval echo configure:1765: \"$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] | 1765 | rm -rf conftest* |
| 1766 | ac_cv_kpthread=yes |
| 1767 | else |
| 1768 | echo "configure: failed program was:" >&5 |
| 1769 | cat conftest.$ac_ext >&5 |
| 1770 | rm -rf conftest* |
| 1771 | ac_cv_kpthread=no |
| 1772 | fi |
| 1773 | rm -f conftest* |
| 1774 | CC="$ac_save_cc" |
| 1775 | fi |
| 1776 | |
| 1777 | |
| 1778 | # GCC does not reject -Kpthread as an illegal option, it merely complains that |
| 1779 | # it is unrecognized |
| 1780 | if test "$GCC" = "yes" |
| 1781 | then ac_cv_kpthread="no, we have gcc" |
| 1782 | fi |
| 1783 | echo "$ac_t""$ac_cv_kpthread" 1>&6 |
| 1784 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1785 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1786 | # checks for header files |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1787 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1788 | echo "configure:1789: checking for ANSI C header files" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1789 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1790 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1791 | else |
| 1792 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1793 | #line 1794 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1794 | #include "confdefs.h" |
| 1795 | #include <stdlib.h> |
| 1796 | #include <stdarg.h> |
| 1797 | #include <string.h> |
| 1798 | #include <float.h> |
| 1799 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1800 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1801 | { (eval echo configure:1802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1802 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1803 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1804 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1805 | ac_cv_header_stdc=yes |
| 1806 | else |
| 1807 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1808 | echo "configure: failed program was:" >&5 |
| 1809 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1810 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1811 | ac_cv_header_stdc=no |
| 1812 | fi |
| 1813 | rm -f conftest* |
| 1814 | |
| 1815 | if test $ac_cv_header_stdc = yes; then |
| 1816 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 1817 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1818 | #line 1819 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1819 | #include "confdefs.h" |
| 1820 | #include <string.h> |
| 1821 | EOF |
| 1822 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1823 | egrep "memchr" >/dev/null 2>&1; then |
| 1824 | : |
| 1825 | else |
| 1826 | rm -rf conftest* |
| 1827 | ac_cv_header_stdc=no |
| 1828 | fi |
| 1829 | rm -f conftest* |
| 1830 | |
| 1831 | fi |
| 1832 | |
| 1833 | if test $ac_cv_header_stdc = yes; then |
| 1834 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 1835 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1836 | #line 1837 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1837 | #include "confdefs.h" |
| 1838 | #include <stdlib.h> |
| 1839 | EOF |
| 1840 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1841 | egrep "free" >/dev/null 2>&1; then |
| 1842 | : |
| 1843 | else |
| 1844 | rm -rf conftest* |
| 1845 | ac_cv_header_stdc=no |
| 1846 | fi |
| 1847 | rm -f conftest* |
| 1848 | |
| 1849 | fi |
| 1850 | |
| 1851 | if test $ac_cv_header_stdc = yes; then |
| 1852 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| 1853 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1854 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1855 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1856 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1857 | #line 1858 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1858 | #include "confdefs.h" |
| 1859 | #include <ctype.h> |
| 1860 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 1861 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1862 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1863 | int main () { int i; for (i = 0; i < 256; i++) |
| 1864 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 1865 | exit (0); } |
| 1866 | |
| 1867 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1868 | if { (eval echo configure:1869: \"$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] | 1869 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1870 | : |
| 1871 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1872 | echo "configure: failed program was:" >&5 |
| 1873 | cat conftest.$ac_ext >&5 |
| 1874 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1875 | ac_cv_header_stdc=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1876 | fi |
| 1877 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1878 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1879 | |
| 1880 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1881 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1882 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1883 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1884 | if test $ac_cv_header_stdc = yes; then |
| 1885 | cat >> confdefs.h <<\EOF |
| 1886 | #define STDC_HEADERS 1 |
| 1887 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1888 | |
| 1889 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1890 | |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1891 | for ac_hdr in dlfcn.h fcntl.h limits.h langinfo.h locale.h \ |
| 1892 | ncurses.h poll.h pthread.h \ |
Eric S. Raymond | d2d75d3 | 2001-01-16 15:26:34 +0000 | [diff] [blame] | 1893 | 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] | 1894 | 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] | 1895 | 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] | 1896 | sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ |
Martin v. Löwis | f24b2f3 | 2001-08-10 20:29:40 +0000 | [diff] [blame] | 1897 | ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1898 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1899 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1900 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1901 | echo "configure:1902: checking for $ac_hdr" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1902 | 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] | 1903 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1904 | else |
| 1905 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1906 | #line 1907 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1907 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1908 | #include <$ac_hdr> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1909 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1910 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1911 | { (eval echo configure:1912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1912 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1913 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1914 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1915 | eval "ac_cv_header_$ac_safe=yes" |
| 1916 | else |
| 1917 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1918 | echo "configure: failed program was:" >&5 |
| 1919 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1920 | rm -rf conftest* |
| 1921 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1922 | fi |
| 1923 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1924 | fi |
| 1925 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1926 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1927 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1928 | cat >> confdefs.h <<EOF |
| 1929 | #define $ac_tr_hdr 1 |
| 1930 | EOF |
| 1931 | |
| 1932 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1933 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1934 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1935 | done |
| 1936 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1937 | ac_header_dirent=no |
| 1938 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h |
| 1939 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1940 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1941 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1942 | echo "configure:1943: checking for $ac_hdr that defines DIR" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1943 | 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] | 1944 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1945 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1946 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1947 | #line 1948 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1948 | #include "confdefs.h" |
| 1949 | #include <sys/types.h> |
| 1950 | #include <$ac_hdr> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1951 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1952 | DIR *dirp = 0; |
| 1953 | ; return 0; } |
| 1954 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1955 | if { (eval echo configure:1956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1956 | rm -rf conftest* |
| 1957 | eval "ac_cv_header_dirent_$ac_safe=yes" |
| 1958 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1959 | echo "configure: failed program was:" >&5 |
| 1960 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1961 | rm -rf conftest* |
| 1962 | eval "ac_cv_header_dirent_$ac_safe=no" |
| 1963 | fi |
| 1964 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1965 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1966 | 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] | 1967 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1968 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1969 | cat >> confdefs.h <<EOF |
| 1970 | #define $ac_tr_hdr 1 |
| 1971 | EOF |
| 1972 | ac_header_dirent=$ac_hdr; break |
| 1973 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1974 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1975 | fi |
| 1976 | done |
| 1977 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| 1978 | if test $ac_header_dirent = dirent.h; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1979 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1980 | echo "configure:1981: checking for opendir in -ldir" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1981 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1982 | 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] | 1983 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1984 | else |
| 1985 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1986 | LIBS="-ldir $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1987 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1988 | #line 1989 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1989 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1990 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 1991 | /* We use char because int might match the return type of a gcc2 |
| 1992 | builtin and then its argument prototype would still apply. */ |
| 1993 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1994 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1995 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1996 | opendir() |
| 1997 | ; return 0; } |
| 1998 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1999 | if { (eval echo configure:2000: \"$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] | 2000 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2001 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2002 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2003 | echo "configure: failed program was:" >&5 |
| 2004 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2005 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2006 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2007 | fi |
| 2008 | rm -f conftest* |
| 2009 | LIBS="$ac_save_LIBS" |
| 2010 | |
| 2011 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2012 | 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] | 2013 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2014 | LIBS="$LIBS -ldir" |
| 2015 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2016 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2017 | fi |
| 2018 | |
| 2019 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2020 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2021 | echo "configure:2022: checking for opendir in -lx" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2022 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2023 | 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] | 2024 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2025 | else |
| 2026 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2027 | LIBS="-lx $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2028 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2029 | #line 2030 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2030 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2031 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2032 | /* We use char because int might match the return type of a gcc2 |
| 2033 | builtin and then its argument prototype would still apply. */ |
| 2034 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2035 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2036 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2037 | opendir() |
| 2038 | ; return 0; } |
| 2039 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2040 | if { (eval echo configure:2041: \"$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] | 2041 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2042 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2043 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2044 | echo "configure: failed program was:" >&5 |
| 2045 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2046 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2047 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2048 | fi |
| 2049 | rm -f conftest* |
| 2050 | LIBS="$ac_save_LIBS" |
| 2051 | |
| 2052 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2053 | 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] | 2054 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2055 | LIBS="$LIBS -lx" |
| 2056 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2057 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2058 | fi |
| 2059 | |
| 2060 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2061 | |
| 2062 | |
| 2063 | # checks for typedefs |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2064 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2065 | echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2066 | echo "configure:2067: checking for clock_t in time.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2067 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2068 | #line 2069 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2069 | #include "confdefs.h" |
| 2070 | #include <time.h> |
| 2071 | EOF |
| 2072 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2073 | egrep "clock_t" >/dev/null 2>&1; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2074 | rm -rf conftest* |
| 2075 | was_it_defined=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2076 | else |
| 2077 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2078 | cat >> confdefs.h <<\EOF |
| 2079 | #define clock_t long |
| 2080 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2081 | |
| 2082 | fi |
| 2083 | rm -f conftest* |
| 2084 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2085 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2086 | |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 2087 | # Two defines needed to enable largefile support on various platforms |
| 2088 | # These may affect some typedefs |
| 2089 | cat >> confdefs.h <<\EOF |
| 2090 | #define _LARGEFILE_SOURCE 1 |
| 2091 | EOF |
| 2092 | |
| 2093 | cat >> confdefs.h <<\EOF |
| 2094 | #define _FILE_OFFSET_BITS 64 |
| 2095 | EOF |
| 2096 | |
| 2097 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2098 | # Add some code to confdefs.h so that the test for off_t works on SCO |
| 2099 | cat >> confdefs.h <<\EOF |
| 2100 | #if defined(SCO_DS) |
| 2101 | #undef _OFF_T |
| 2102 | #endif |
| 2103 | EOF |
| 2104 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2105 | # Type availability checks |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2106 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2107 | echo "configure:2108: checking for mode_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2108 | 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] | 2109 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2110 | else |
| 2111 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2112 | #line 2113 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2113 | #include "confdefs.h" |
| 2114 | #include <sys/types.h> |
| 2115 | #if STDC_HEADERS |
| 2116 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2117 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2118 | #endif |
| 2119 | EOF |
| 2120 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2121 | 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] | 2122 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2123 | ac_cv_type_mode_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2124 | else |
| 2125 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2126 | ac_cv_type_mode_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2127 | fi |
| 2128 | rm -f conftest* |
| 2129 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2130 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2131 | echo "$ac_t""$ac_cv_type_mode_t" 1>&6 |
| 2132 | if test $ac_cv_type_mode_t = no; then |
| 2133 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2134 | #define mode_t int |
| 2135 | EOF |
| 2136 | |
| 2137 | fi |
| 2138 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2139 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2140 | echo "configure:2141: checking for off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2141 | 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] | 2142 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2143 | else |
| 2144 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2145 | #line 2146 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2146 | #include "confdefs.h" |
| 2147 | #include <sys/types.h> |
| 2148 | #if STDC_HEADERS |
| 2149 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2150 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2151 | #endif |
| 2152 | EOF |
| 2153 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2154 | 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] | 2155 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2156 | ac_cv_type_off_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2157 | else |
| 2158 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2159 | ac_cv_type_off_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2160 | fi |
| 2161 | rm -f conftest* |
| 2162 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2163 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2164 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
| 2165 | if test $ac_cv_type_off_t = no; then |
| 2166 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2167 | #define off_t long |
| 2168 | EOF |
| 2169 | |
| 2170 | fi |
| 2171 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2172 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2173 | echo "configure:2174: checking for pid_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2174 | 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] | 2175 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2176 | else |
| 2177 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2178 | #line 2179 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2179 | #include "confdefs.h" |
| 2180 | #include <sys/types.h> |
| 2181 | #if STDC_HEADERS |
| 2182 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2183 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2184 | #endif |
| 2185 | EOF |
| 2186 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2187 | 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] | 2188 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2189 | ac_cv_type_pid_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2190 | else |
| 2191 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2192 | ac_cv_type_pid_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2193 | fi |
| 2194 | rm -f conftest* |
| 2195 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2196 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2197 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
| 2198 | if test $ac_cv_type_pid_t = no; then |
| 2199 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2200 | #define pid_t int |
| 2201 | EOF |
| 2202 | |
| 2203 | fi |
| 2204 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2205 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2206 | echo "configure:2207: checking return type of signal handlers" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2207 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2208 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2209 | else |
| 2210 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2211 | #line 2212 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2212 | #include "confdefs.h" |
| 2213 | #include <sys/types.h> |
| 2214 | #include <signal.h> |
| 2215 | #ifdef signal |
| 2216 | #undef signal |
| 2217 | #endif |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2218 | #ifdef __cplusplus |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2219 | extern "C" void (*signal (int, void (*)(int)))(int); |
| 2220 | #else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2221 | void (*signal ()) (); |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2222 | #endif |
| 2223 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2224 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2225 | int i; |
| 2226 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2227 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2228 | if { (eval echo configure:2229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2229 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2230 | ac_cv_type_signal=void |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2231 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2232 | echo "configure: failed program was:" >&5 |
| 2233 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2234 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2235 | ac_cv_type_signal=int |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2236 | fi |
| 2237 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2238 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2239 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2240 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2241 | cat >> confdefs.h <<EOF |
| 2242 | #define RETSIGTYPE $ac_cv_type_signal |
| 2243 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2244 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2245 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2246 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2247 | echo "configure:2248: checking for size_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2248 | 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] | 2249 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2250 | else |
| 2251 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2252 | #line 2253 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2253 | #include "confdefs.h" |
| 2254 | #include <sys/types.h> |
| 2255 | #if STDC_HEADERS |
| 2256 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2257 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2258 | #endif |
| 2259 | EOF |
| 2260 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2261 | 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] | 2262 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2263 | ac_cv_type_size_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2264 | else |
| 2265 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2266 | ac_cv_type_size_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2267 | fi |
| 2268 | rm -f conftest* |
| 2269 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2270 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2271 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
| 2272 | if test $ac_cv_type_size_t = no; then |
| 2273 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2274 | #define size_t unsigned |
| 2275 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2276 | |
| 2277 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2278 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2279 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2280 | echo "configure:2281: checking for uid_t in sys/types.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2281 | 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] | 2282 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2283 | else |
| 2284 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2285 | #line 2286 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2286 | #include "confdefs.h" |
| 2287 | #include <sys/types.h> |
| 2288 | EOF |
| 2289 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2290 | egrep "uid_t" >/dev/null 2>&1; then |
| 2291 | rm -rf conftest* |
| 2292 | ac_cv_type_uid_t=yes |
| 2293 | else |
| 2294 | rm -rf conftest* |
| 2295 | ac_cv_type_uid_t=no |
| 2296 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2297 | rm -f conftest* |
| 2298 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2299 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2300 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2301 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2302 | if test $ac_cv_type_uid_t = no; then |
| 2303 | cat >> confdefs.h <<\EOF |
| 2304 | #define uid_t int |
| 2305 | EOF |
| 2306 | |
| 2307 | cat >> confdefs.h <<\EOF |
| 2308 | #define gid_t int |
| 2309 | EOF |
| 2310 | |
| 2311 | fi |
| 2312 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2313 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2314 | # Sizes of various common basic types |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2315 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2316 | echo "configure:2317: checking size of int" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2317 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2318 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2319 | else |
| 2320 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2321 | ac_cv_sizeof_int=4 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2322 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2323 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2324 | #line 2325 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2325 | #include "confdefs.h" |
| 2326 | #include <stdio.h> |
| 2327 | main() |
| 2328 | { |
| 2329 | FILE *f=fopen("conftestval", "w"); |
| 2330 | if (!f) exit(1); |
| 2331 | fprintf(f, "%d\n", sizeof(int)); |
| 2332 | exit(0); |
| 2333 | } |
| 2334 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2335 | if { (eval echo configure:2336: \"$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] | 2336 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2337 | ac_cv_sizeof_int=`cat conftestval` |
| 2338 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2339 | echo "configure: failed program was:" >&5 |
| 2340 | cat conftest.$ac_ext >&5 |
| 2341 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2342 | ac_cv_sizeof_int=0 |
| 2343 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2344 | rm -fr conftest* |
| 2345 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2346 | |
| 2347 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2348 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
| 2349 | cat >> confdefs.h <<EOF |
| 2350 | #define SIZEOF_INT $ac_cv_sizeof_int |
| 2351 | EOF |
| 2352 | |
| 2353 | |
| 2354 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2355 | echo "configure:2356: checking size of long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2356 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2357 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2358 | else |
| 2359 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2360 | ac_cv_sizeof_long=4 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2361 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2362 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2363 | #line 2364 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2364 | #include "confdefs.h" |
| 2365 | #include <stdio.h> |
| 2366 | main() |
| 2367 | { |
| 2368 | FILE *f=fopen("conftestval", "w"); |
| 2369 | if (!f) exit(1); |
| 2370 | fprintf(f, "%d\n", sizeof(long)); |
| 2371 | exit(0); |
| 2372 | } |
| 2373 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2374 | if { (eval echo configure:2375: \"$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] | 2375 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2376 | ac_cv_sizeof_long=`cat conftestval` |
| 2377 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2378 | echo "configure: failed program was:" >&5 |
| 2379 | cat conftest.$ac_ext >&5 |
| 2380 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2381 | ac_cv_sizeof_long=0 |
| 2382 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2383 | rm -fr conftest* |
| 2384 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2385 | |
| 2386 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2387 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
| 2388 | cat >> confdefs.h <<EOF |
| 2389 | #define SIZEOF_LONG $ac_cv_sizeof_long |
| 2390 | EOF |
| 2391 | |
| 2392 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2393 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2394 | echo "configure:2395: checking size of void *" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2395 | 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] | 2396 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2397 | else |
| 2398 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2399 | ac_cv_sizeof_void_p=4 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2400 | else |
| 2401 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2402 | #line 2403 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2403 | #include "confdefs.h" |
| 2404 | #include <stdio.h> |
| 2405 | main() |
| 2406 | { |
| 2407 | FILE *f=fopen("conftestval", "w"); |
| 2408 | if (!f) exit(1); |
| 2409 | fprintf(f, "%d\n", sizeof(void *)); |
| 2410 | exit(0); |
| 2411 | } |
| 2412 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2413 | if { (eval echo configure:2414: \"$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] | 2414 | then |
| 2415 | ac_cv_sizeof_void_p=`cat conftestval` |
| 2416 | else |
| 2417 | echo "configure: failed program was:" >&5 |
| 2418 | cat conftest.$ac_ext >&5 |
| 2419 | rm -fr conftest* |
| 2420 | ac_cv_sizeof_void_p=0 |
| 2421 | fi |
| 2422 | rm -fr conftest* |
| 2423 | fi |
| 2424 | |
| 2425 | fi |
| 2426 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 |
| 2427 | cat >> confdefs.h <<EOF |
| 2428 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
| 2429 | EOF |
| 2430 | |
| 2431 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2432 | echo $ac_n "checking size of char""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2433 | echo "configure:2434: checking size of char" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2434 | if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2435 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2436 | else |
| 2437 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2438 | ac_cv_sizeof_char=1 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2439 | else |
| 2440 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2441 | #line 2442 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2442 | #include "confdefs.h" |
| 2443 | #include <stdio.h> |
| 2444 | main() |
| 2445 | { |
| 2446 | FILE *f=fopen("conftestval", "w"); |
| 2447 | if (!f) exit(1); |
| 2448 | fprintf(f, "%d\n", sizeof(char)); |
| 2449 | exit(0); |
| 2450 | } |
| 2451 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2452 | if { (eval echo configure:2453: \"$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] | 2453 | then |
| 2454 | ac_cv_sizeof_char=`cat conftestval` |
| 2455 | else |
| 2456 | echo "configure: failed program was:" >&5 |
| 2457 | cat conftest.$ac_ext >&5 |
| 2458 | rm -fr conftest* |
| 2459 | ac_cv_sizeof_char=0 |
| 2460 | fi |
| 2461 | rm -fr conftest* |
| 2462 | fi |
| 2463 | |
| 2464 | fi |
| 2465 | echo "$ac_t""$ac_cv_sizeof_char" 1>&6 |
| 2466 | cat >> confdefs.h <<EOF |
| 2467 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
| 2468 | EOF |
| 2469 | |
| 2470 | |
| 2471 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2472 | echo "configure:2473: checking size of short" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2473 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2474 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2475 | else |
| 2476 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2477 | ac_cv_sizeof_short=2 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2478 | else |
| 2479 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2480 | #line 2481 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2481 | #include "confdefs.h" |
| 2482 | #include <stdio.h> |
| 2483 | main() |
| 2484 | { |
| 2485 | FILE *f=fopen("conftestval", "w"); |
| 2486 | if (!f) exit(1); |
| 2487 | fprintf(f, "%d\n", sizeof(short)); |
| 2488 | exit(0); |
| 2489 | } |
| 2490 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2491 | if { (eval echo configure:2492: \"$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] | 2492 | then |
| 2493 | ac_cv_sizeof_short=`cat conftestval` |
| 2494 | else |
| 2495 | echo "configure: failed program was:" >&5 |
| 2496 | cat conftest.$ac_ext >&5 |
| 2497 | rm -fr conftest* |
| 2498 | ac_cv_sizeof_short=0 |
| 2499 | fi |
| 2500 | rm -fr conftest* |
| 2501 | fi |
| 2502 | |
| 2503 | fi |
| 2504 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
| 2505 | cat >> confdefs.h <<EOF |
| 2506 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
| 2507 | EOF |
| 2508 | |
| 2509 | |
| 2510 | echo $ac_n "checking size of float""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2511 | echo "configure:2512: checking size of float" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2512 | if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2513 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2514 | else |
| 2515 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2516 | ac_cv_sizeof_float=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2517 | else |
| 2518 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2519 | #line 2520 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2520 | #include "confdefs.h" |
| 2521 | #include <stdio.h> |
| 2522 | main() |
| 2523 | { |
| 2524 | FILE *f=fopen("conftestval", "w"); |
| 2525 | if (!f) exit(1); |
| 2526 | fprintf(f, "%d\n", sizeof(float)); |
| 2527 | exit(0); |
| 2528 | } |
| 2529 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2530 | if { (eval echo configure:2531: \"$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] | 2531 | then |
| 2532 | ac_cv_sizeof_float=`cat conftestval` |
| 2533 | else |
| 2534 | echo "configure: failed program was:" >&5 |
| 2535 | cat conftest.$ac_ext >&5 |
| 2536 | rm -fr conftest* |
| 2537 | ac_cv_sizeof_float=0 |
| 2538 | fi |
| 2539 | rm -fr conftest* |
| 2540 | fi |
| 2541 | |
| 2542 | fi |
| 2543 | echo "$ac_t""$ac_cv_sizeof_float" 1>&6 |
| 2544 | cat >> confdefs.h <<EOF |
| 2545 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
| 2546 | EOF |
| 2547 | |
| 2548 | |
| 2549 | echo $ac_n "checking size of double""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2550 | echo "configure:2551: checking size of double" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2551 | if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2552 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2553 | else |
| 2554 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2555 | ac_cv_sizeof_double=8 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2556 | else |
| 2557 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2558 | #line 2559 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2559 | #include "confdefs.h" |
| 2560 | #include <stdio.h> |
| 2561 | main() |
| 2562 | { |
| 2563 | FILE *f=fopen("conftestval", "w"); |
| 2564 | if (!f) exit(1); |
| 2565 | fprintf(f, "%d\n", sizeof(double)); |
| 2566 | exit(0); |
| 2567 | } |
| 2568 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2569 | if { (eval echo configure:2570: \"$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] | 2570 | then |
| 2571 | ac_cv_sizeof_double=`cat conftestval` |
| 2572 | else |
| 2573 | echo "configure: failed program was:" >&5 |
| 2574 | cat conftest.$ac_ext >&5 |
| 2575 | rm -fr conftest* |
| 2576 | ac_cv_sizeof_double=0 |
| 2577 | fi |
| 2578 | rm -fr conftest* |
| 2579 | fi |
| 2580 | |
| 2581 | fi |
| 2582 | echo "$ac_t""$ac_cv_sizeof_double" 1>&6 |
| 2583 | cat >> confdefs.h <<EOF |
| 2584 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
| 2585 | EOF |
| 2586 | |
| 2587 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2588 | echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2589 | echo "configure:2590: checking size of fpos_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2590 | 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] | 2591 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2592 | else |
| 2593 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2594 | ac_cv_sizeof_fpos_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2595 | else |
| 2596 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2597 | #line 2598 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2598 | #include "confdefs.h" |
| 2599 | #include <stdio.h> |
| 2600 | main() |
| 2601 | { |
| 2602 | FILE *f=fopen("conftestval", "w"); |
| 2603 | if (!f) exit(1); |
| 2604 | fprintf(f, "%d\n", sizeof(fpos_t)); |
| 2605 | exit(0); |
| 2606 | } |
| 2607 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2608 | if { (eval echo configure:2609: \"$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] | 2609 | then |
| 2610 | ac_cv_sizeof_fpos_t=`cat conftestval` |
| 2611 | else |
| 2612 | echo "configure: failed program was:" >&5 |
| 2613 | cat conftest.$ac_ext >&5 |
| 2614 | rm -fr conftest* |
| 2615 | ac_cv_sizeof_fpos_t=0 |
| 2616 | fi |
| 2617 | rm -fr conftest* |
| 2618 | fi |
| 2619 | |
| 2620 | fi |
| 2621 | echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6 |
| 2622 | cat >> confdefs.h <<EOF |
| 2623 | #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t |
| 2624 | EOF |
| 2625 | |
| 2626 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2627 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2628 | echo $ac_n "checking for long long support""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2629 | echo "configure:2630: checking for long long support" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2630 | have_long_long=no |
| 2631 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2632 | #line 2633 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2633 | #include "confdefs.h" |
| 2634 | |
| 2635 | int main() { |
| 2636 | long long x; x = (long long)0; |
| 2637 | ; return 0; } |
| 2638 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2639 | if { (eval echo configure:2640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2640 | rm -rf conftest* |
| 2641 | cat >> confdefs.h <<\EOF |
| 2642 | #define HAVE_LONG_LONG 1 |
| 2643 | EOF |
| 2644 | have_long_long=yes |
| 2645 | else |
| 2646 | echo "configure: failed program was:" >&5 |
| 2647 | cat conftest.$ac_ext >&5 |
| 2648 | fi |
| 2649 | rm -f conftest* |
| 2650 | echo "$ac_t""$have_long_long" 1>&6 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2651 | if test "$have_long_long" = yes ; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2652 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2653 | echo "configure:2654: checking size of long long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2654 | 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] | 2655 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2656 | else |
| 2657 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2658 | ac_cv_sizeof_long_long=8 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2659 | else |
| 2660 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2661 | #line 2662 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2662 | #include "confdefs.h" |
| 2663 | #include <stdio.h> |
| 2664 | main() |
| 2665 | { |
| 2666 | FILE *f=fopen("conftestval", "w"); |
| 2667 | if (!f) exit(1); |
| 2668 | fprintf(f, "%d\n", sizeof(long long)); |
| 2669 | exit(0); |
| 2670 | } |
| 2671 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2672 | if { (eval echo configure:2673: \"$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] | 2673 | then |
| 2674 | ac_cv_sizeof_long_long=`cat conftestval` |
| 2675 | else |
| 2676 | echo "configure: failed program was:" >&5 |
| 2677 | cat conftest.$ac_ext >&5 |
| 2678 | rm -fr conftest* |
| 2679 | ac_cv_sizeof_long_long=0 |
| 2680 | fi |
| 2681 | rm -fr conftest* |
| 2682 | fi |
| 2683 | |
| 2684 | fi |
| 2685 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
| 2686 | cat >> confdefs.h <<EOF |
| 2687 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 2688 | EOF |
| 2689 | |
| 2690 | |
| 2691 | fi |
| 2692 | |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2693 | echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2694 | echo "configure:2695: checking for uintptr_t support" >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2695 | have_uintptr_t=no |
| 2696 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2697 | #line 2698 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2698 | #include "confdefs.h" |
| 2699 | |
| 2700 | int main() { |
| 2701 | uintptr_t x; x = (uintptr_t)0; |
| 2702 | ; return 0; } |
| 2703 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2704 | if { (eval echo configure:2705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2705 | rm -rf conftest* |
| 2706 | cat >> confdefs.h <<\EOF |
| 2707 | #define HAVE_UINTPTR_T 1 |
| 2708 | EOF |
| 2709 | have_uintptr_t=yes |
| 2710 | else |
| 2711 | echo "configure: failed program was:" >&5 |
| 2712 | cat conftest.$ac_ext >&5 |
| 2713 | fi |
| 2714 | rm -f conftest* |
| 2715 | echo "$ac_t""$have_uintptr_t" 1>&6 |
| 2716 | if test "$have_uintptr_t" = yes ; then |
| 2717 | echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2718 | echo "configure:2719: checking size of uintptr_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2719 | if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2720 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2721 | else |
| 2722 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2723 | ac_cv_sizeof_uintptr_t=4 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2724 | else |
| 2725 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2726 | #line 2727 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2727 | #include "confdefs.h" |
| 2728 | #include <stdio.h> |
| 2729 | main() |
| 2730 | { |
| 2731 | FILE *f=fopen("conftestval", "w"); |
| 2732 | if (!f) exit(1); |
| 2733 | fprintf(f, "%d\n", sizeof(uintptr_t)); |
| 2734 | exit(0); |
| 2735 | } |
| 2736 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2737 | if { (eval echo configure:2738: \"$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] | 2738 | then |
| 2739 | ac_cv_sizeof_uintptr_t=`cat conftestval` |
| 2740 | else |
| 2741 | echo "configure: failed program was:" >&5 |
| 2742 | cat conftest.$ac_ext >&5 |
| 2743 | rm -fr conftest* |
| 2744 | ac_cv_sizeof_uintptr_t=0 |
| 2745 | fi |
| 2746 | rm -fr conftest* |
| 2747 | fi |
| 2748 | |
| 2749 | fi |
| 2750 | echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6 |
| 2751 | cat >> confdefs.h <<EOF |
| 2752 | #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t |
| 2753 | EOF |
| 2754 | |
| 2755 | |
| 2756 | fi |
| 2757 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2758 | # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>. |
| 2759 | echo $ac_n "checking size of off_t""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2760 | echo "configure:2761: checking size of off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2761 | 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] | 2762 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2763 | else |
| 2764 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2765 | ac_cv_sizeof_off_t=4 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2766 | else |
| 2767 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2768 | #line 2769 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2769 | #include "confdefs.h" |
| 2770 | #include <stdio.h> |
| 2771 | #include <sys/types.h> |
| 2772 | main() |
| 2773 | { |
| 2774 | FILE *f=fopen("conftestval", "w"); |
| 2775 | if (!f) exit(1); |
| 2776 | fprintf(f, "%d\n", sizeof(off_t)); |
| 2777 | exit(0); |
| 2778 | } |
| 2779 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2780 | if { (eval echo configure:2781: \"$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] | 2781 | then |
| 2782 | ac_cv_sizeof_off_t=`cat conftestval` |
| 2783 | else |
| 2784 | echo "configure: failed program was:" >&5 |
| 2785 | cat conftest.$ac_ext >&5 |
| 2786 | rm -fr conftest* |
| 2787 | ac_cv_sizeof_off_t=0 |
| 2788 | fi |
| 2789 | rm -fr conftest* |
| 2790 | fi |
| 2791 | |
| 2792 | |
| 2793 | fi |
| 2794 | |
| 2795 | echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6 |
| 2796 | cat >> confdefs.h <<EOF |
| 2797 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
| 2798 | EOF |
| 2799 | |
| 2800 | |
| 2801 | echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2802 | echo "configure:2803: checking whether to enable large file support" >&5 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2803 | if test "$have_long_long" = yes -a \ |
| 2804 | "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ |
| 2805 | "$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] | 2806 | cat >> confdefs.h <<\EOF |
| 2807 | #define HAVE_LARGEFILE_SUPPORT 1 |
| 2808 | EOF |
| 2809 | |
| 2810 | echo "$ac_t""yes" 1>&6 |
| 2811 | else |
| 2812 | echo "$ac_t""no" 1>&6 |
| 2813 | fi |
| 2814 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2815 | # AC_CHECK_SIZEOF() doesn't include <time.h>. |
| 2816 | echo $ac_n "checking size of time_t""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2817 | echo "configure:2818: checking size of time_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2818 | 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] | 2819 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2820 | else |
| 2821 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2822 | ac_cv_sizeof_time_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2823 | else |
| 2824 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2825 | #line 2826 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2826 | #include "confdefs.h" |
| 2827 | #include <stdio.h> |
| 2828 | #include <time.h> |
| 2829 | main() |
| 2830 | { |
| 2831 | FILE *f=fopen("conftestval", "w"); |
| 2832 | if (!f) exit(1); |
| 2833 | fprintf(f, "%d\n", sizeof(time_t)); |
| 2834 | exit(0); |
| 2835 | } |
| 2836 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2837 | if { (eval echo configure:2838: \"$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] | 2838 | then |
| 2839 | ac_cv_sizeof_time_t=`cat conftestval` |
| 2840 | else |
| 2841 | echo "configure: failed program was:" >&5 |
| 2842 | cat conftest.$ac_ext >&5 |
| 2843 | rm -fr conftest* |
| 2844 | ac_cv_sizeof_time_t=0 |
| 2845 | fi |
| 2846 | rm -fr conftest* |
| 2847 | fi |
| 2848 | |
| 2849 | |
| 2850 | fi |
| 2851 | |
| 2852 | echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 |
| 2853 | cat >> confdefs.h <<EOF |
| 2854 | #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
| 2855 | EOF |
| 2856 | |
| 2857 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2858 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2859 | # if have pthread_t then define SIZEOF_PTHREAD_T |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 2860 | ac_save_cc="$CC" |
| 2861 | if test "$ac_cv_kpthread" = "yes" |
| 2862 | then CC="$CC -Kpthread" |
| 2863 | fi |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2864 | echo $ac_n "checking for pthread_t""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2865 | echo "configure:2866: checking for pthread_t" >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2866 | have_pthread_t=no |
| 2867 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2868 | #line 2869 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2869 | #include "confdefs.h" |
| 2870 | #include <pthread.h> |
| 2871 | int main() { |
Guido van Rossum | 1258049 | 2000-09-24 16:47:19 +0000 | [diff] [blame] | 2872 | pthread_t x; x = *(pthread_t*)0; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2873 | ; return 0; } |
| 2874 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2875 | if { (eval echo configure:2876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2876 | rm -rf conftest* |
| 2877 | have_pthread_t=yes |
| 2878 | else |
| 2879 | echo "configure: failed program was:" >&5 |
| 2880 | cat conftest.$ac_ext >&5 |
| 2881 | fi |
| 2882 | rm -f conftest* |
| 2883 | echo "$ac_t""$have_pthread_t" 1>&6 |
| 2884 | if test "$have_pthread_t" = yes ; then |
| 2885 | # AC_CHECK_SIZEOF() doesn't include <pthread.h>. |
| 2886 | echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2887 | echo "configure:2888: checking size of pthread_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2888 | if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2889 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2890 | else |
| 2891 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2892 | ac_cv_sizeof_pthread_t=4 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2893 | else |
| 2894 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2895 | #line 2896 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2896 | #include "confdefs.h" |
| 2897 | #include <stdio.h> |
| 2898 | #include <pthread.h> |
| 2899 | main() |
| 2900 | { |
| 2901 | FILE *f=fopen("conftestval", "w"); |
| 2902 | if (!f) exit(1); |
| 2903 | fprintf(f, "%d\n", sizeof(pthread_t)); |
| 2904 | exit(0); |
| 2905 | } |
| 2906 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2907 | if { (eval echo configure:2908: \"$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] | 2908 | then |
| 2909 | ac_cv_sizeof_pthread_t=`cat conftestval` |
| 2910 | else |
| 2911 | echo "configure: failed program was:" >&5 |
| 2912 | cat conftest.$ac_ext >&5 |
| 2913 | rm -fr conftest* |
| 2914 | ac_cv_sizeof_pthread_t=0 |
| 2915 | fi |
| 2916 | rm -fr conftest* |
| 2917 | fi |
| 2918 | |
| 2919 | |
| 2920 | fi |
| 2921 | |
| 2922 | echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6 |
| 2923 | cat >> confdefs.h <<EOF |
| 2924 | #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t |
| 2925 | EOF |
| 2926 | |
| 2927 | fi |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 2928 | CC="$ac_save_cc" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2929 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2930 | echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2931 | echo "configure:2932: checking for --enable-toolbox-glue" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2932 | # Check whether --enable-toolbox-glue or --disable-toolbox-glue was given. |
| 2933 | if test "${enable_toolbox_glue+set}" = set; then |
| 2934 | enableval="$enable_toolbox_glue" |
| 2935 | : |
| 2936 | fi |
| 2937 | |
| 2938 | |
| 2939 | if test -z "$enable_toolbox_glue" |
| 2940 | then |
| 2941 | case $ac_sys_system/$ac_sys_release in |
| 2942 | Darwin/*) |
| 2943 | enable_toolbox_glue="yes";; |
| 2944 | *) |
| 2945 | enable_toolbox_glue="no";; |
| 2946 | esac |
| 2947 | fi |
| 2948 | case "$enable_toolbox_glue" in |
| 2949 | yes) |
| 2950 | extra_frameworks="-framework Carbon -framework Foundation" |
| 2951 | extra_machdep_objs="Python/mactoolboxglue.o" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 2952 | extra_undefs="-u __dummy -u _PyMac_Error" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2953 | cat >> confdefs.h <<\EOF |
| 2954 | #define USE_TOOLBOX_OBJECT_GLUE 1 |
| 2955 | EOF |
| 2956 | |
| 2957 | ;; |
| 2958 | *) |
| 2959 | extra_frameworks="" |
| 2960 | extra_machdep_objs="" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 2961 | extra_undefs="" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2962 | ;; |
| 2963 | esac |
| 2964 | echo "$ac_t""$enable_toolbox_glue" 1>&6 |
| 2965 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2966 | |
| 2967 | case $ac_sys_system/$ac_sys_release in |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 2968 | Darwin/1.4*) |
| 2969 | ns_undef_sym='_environ' |
| 2970 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym" |
| 2971 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
| 2972 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 2973 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 2974 | Darwin/*) |
| 2975 | ns_undef_sym='_environ' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2976 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" |
| 2977 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
| 2978 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 2979 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2980 | esac |
| 2981 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2982 | echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 2983 | echo "configure:2984: checking for --enable-framework" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2984 | if test "$enable_framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2985 | then |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 2986 | OPT="$OPT -fno-common -dynamic" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2987 | # -U __environ is needed since bundles don't have access |
| 2988 | # to crt0 when built but will always be linked against it |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2989 | # -F. is needed to allow linking to the framework while |
| 2990 | # in the build location. |
| 2991 | |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 2992 | case $ac_sys_system/$ac_sys_release in |
| 2993 | Darwin/1.4*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";; |
| 2994 | Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";; |
| 2995 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2996 | cat >> confdefs.h <<\EOF |
| 2997 | #define WITH_NEXT_FRAMEWORK 1 |
| 2998 | EOF |
| 2999 | |
| 3000 | echo "$ac_t""yes" 1>&6 |
| 3001 | else |
| 3002 | echo "$ac_t""no" 1>&6 |
| 3003 | fi |
| 3004 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3005 | echo $ac_n "checking for dyld""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3006 | echo "configure:3007: checking for dyld" >&5 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3007 | case $ac_sys_system/$ac_sys_release in |
| 3008 | Darwin/*) |
| 3009 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3010 | #define WITH_DYLD 1 |
| 3011 | EOF |
| 3012 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3013 | echo "$ac_t""always on for Darwin" 1>&6 |
| 3014 | ;; |
| 3015 | *) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3016 | echo "$ac_t""no" 1>&6 |
| 3017 | ;; |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3018 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3019 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3020 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3021 | |
| 3022 | |
| 3023 | |
| 3024 | |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3025 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3026 | # SO is the extension of shared libraries `(including the dot!) |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3027 | # -- usually .so, .sl on HP-UX, .dll on Cygwin |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3028 | echo $ac_n "checking SO""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3029 | echo "configure:3030: checking SO" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3030 | if test -z "$SO" |
| 3031 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3032 | case $ac_sys_system in |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3033 | hp*|HP*) SO=.sl;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3034 | CYGWIN*) SO=.dll;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3035 | *) SO=.so;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3036 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3037 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3038 | echo "$ac_t""$SO" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3039 | # LDSHARED is the ld *command* used to create shared library |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3040 | # -- "ld" on SunOS 4.x.x, "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3041 | # (Shared libraries in this instance are shared modules to be loaded into |
| 3042 | # Python, as opposed to building Python itself as a shared library.) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3043 | echo $ac_n "checking LDSHARED""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3044 | echo "configure:3045: checking LDSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3045 | if test -z "$LDSHARED" |
| 3046 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3047 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3048 | AIX*) |
| 3049 | BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" |
| 3050 | LDSHARED="\$(BINLIBDEST)/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/python.exp" |
| 3051 | ;; |
| 3052 | BeOS*) |
| 3053 | BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY" |
| 3054 | LDSHARED="\$(BINLIBDEST)/ld_so_beos \$(LIBDIR)/$LDLIBRARY" |
| 3055 | ;; |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3056 | IRIX/5*) LDSHARED="ld -shared";; |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 3057 | IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3058 | SunOS/4*) LDSHARED="ld";; |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3059 | SunOS/5*) |
| 3060 | if test "$GCC" = "yes" |
Neil Schemenauer | 8ba9445 | 2001-02-19 18:18:48 +0000 | [diff] [blame] | 3061 | then LDSHARED='$(CC) -shared' |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3062 | else LDSHARED="$(CC) -G"; |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3063 | fi ;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3064 | hp*|HP*) LDSHARED="ld -b";; |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3065 | OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; |
| 3066 | DYNIX/ptx*) LDSHARED="ld -G";; |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3067 | Darwin/1.4*) |
| 3068 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3069 | if test "$enable_framework" ; then |
| 3070 | # Link against the framework. All externals should be defined. |
| 3071 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3072 | else |
| 3073 | # No framework. Ignore undefined symbols, assuming they come from Python |
| 3074 | LDSHARED="$LDSHARED -flat_namespace -undefined suppress" |
| 3075 | fi ;; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3076 | Darwin/*) |
| 3077 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3078 | if test "$enable_framework" ; then |
| 3079 | # Link against the framework. All externals should be defined. |
| 3080 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3081 | else |
| 3082 | # No framework. Ignore undefined symbols, assuming they come from Python |
| 3083 | LDSHARED="$LDSHARED -undefined suppress" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3084 | fi ;; |
Guido van Rossum | 81652ab | 1996-07-21 02:53:27 +0000 | [diff] [blame] | 3085 | Linux*) LDSHARED="gcc -shared";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 3086 | dgux*) LDSHARED="ld -G";; |
Guido van Rossum | 458e7fa | 1999-09-17 15:40:40 +0000 | [diff] [blame] | 3087 | BSD/OS*/4*) LDSHARED="gcc -shared";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3088 | OpenBSD*|NetBSD*|FreeBSD*) |
Jeremy Hylton | 4bcc7c5 | 2000-08-31 17:45:35 +0000 | [diff] [blame] | 3089 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3090 | then |
| 3091 | LDSHARED="cc -shared ${LDFLAGS}" |
| 3092 | else |
| 3093 | LDSHARED="ld -Bshareable ${LDFLAGS}" |
| 3094 | fi;; |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3095 | UnixWare*) |
| 3096 | if test "$GCC" = "yes" |
| 3097 | then LDSHARED="$(CC) -shared" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3098 | else LDSHARED="$(CC) -G" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3099 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3100 | SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3101 | Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3102 | CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3103 | *) LDSHARED="ld";; |
| 3104 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3105 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3106 | echo "$ac_t""$LDSHARED" 1>&6 |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3107 | BLDSHARED=${BLDSHARED-$LDSHARED} |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3108 | # 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] | 3109 | # library (module) -- this is only needed for a few systems |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3110 | echo $ac_n "checking CCSHARED""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3111 | echo "configure:3112: checking CCSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3112 | if test -z "$CCSHARED" |
| 3113 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3114 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 3115 | SunOS*) if test "$GCC" = yes; |
| 3116 | then CCSHARED="-fPIC"; |
| 3117 | fi;; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3118 | hp*|HP*) if test "$GCC" = yes; |
Martin v. Löwis | 703ad70 | 2001-09-05 08:36:52 +0000 | [diff] [blame] | 3119 | then CCSHARED="-fPIC"; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3120 | else CCSHARED="+z"; |
| 3121 | fi;; |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3122 | Linux*) CCSHARED="-fPIC";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3123 | BSD/OS*/4*) CCSHARED="-fpic";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3124 | FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";; |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3125 | UnixWare*) |
| 3126 | if test "$GCC" = "yes" |
| 3127 | then CCSHARED="-fPIC" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3128 | else CCSHARED="-KPIC" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3129 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3130 | SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3131 | Monterey*) CCSHARED="-G";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3132 | IRIX*/6*) case $CC in |
| 3133 | *gcc*) CCSHARED="-shared";; |
Guido van Rossum | ee21f41 | 1998-04-20 18:51:54 +0000 | [diff] [blame] | 3134 | *) CCSHARED="";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3135 | esac;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3136 | CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3137 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3138 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3139 | echo "$ac_t""$CCSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3140 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3141 | # the python executable -- this is only needed for a few systems |
| 3142 | echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3143 | echo "configure:3144: checking LINKFORSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3144 | if test -z "$LINKFORSHARED" |
| 3145 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3146 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3147 | AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 3148 | hp*|HP*) |
Guido van Rossum | 304dd2d | 1997-10-20 23:10:56 +0000 | [diff] [blame] | 3149 | LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3150 | BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 2d9feed | 1997-11-24 17:36:21 +0000 | [diff] [blame] | 3151 | Linux*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3152 | # -u libsys_s pulls in all symbols in libsys |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3153 | Darwin/*) |
| 3154 | # -u __dummy makes the linker aware of the objc runtime |
| 3155 | # in System.framework; otherwise, __objcInit (referenced in |
| 3156 | # crt1.o) gets erroneously defined as common, which breaks dynamic |
| 3157 | # loading of any modules which reference it in System.framework. |
| 3158 | # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is |
| 3159 | # not used by the core itself but which needs to be in the core so |
| 3160 | # that dynamically loaded extension modules have access to it. |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3161 | LINKFORSHARED="$extra_undefs -framework System" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3162 | if test "$enable_framework" |
| 3163 | then |
| 3164 | LINKFORSHARED="$LINKFORSHARED -framework Python" |
| 3165 | fi |
| 3166 | LINKFORSHARED="$LINKFORSHARED $extra_frameworks";; |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3167 | UnixWare*) LINKFORSHARED="-Wl,-Bexport";; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3168 | SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3169 | ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3170 | FreeBSD*|NetBSD*|OpenBSD*) |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 3171 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 3172 | then |
| 3173 | LINKFORSHARED="-Wl,--export-dynamic" |
| 3174 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3175 | SunOS/5*) case $CC in |
| 3176 | *gcc*) |
Guido van Rossum | ff48418 | 2000-02-03 13:50:24 +0000 | [diff] [blame] | 3177 | if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 3178 | then |
| 3179 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3180 | fi;; |
| 3181 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3182 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3183 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3184 | echo "$ac_t""$LINKFORSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3185 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3186 | |
| 3187 | echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3188 | echo "configure:3189: checking CFLAGSFORSHARED" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3189 | if test ! "$LIBRARY" = "$LDLIBRARY" |
| 3190 | then |
Neil Schemenauer | 0c6141f | 2001-01-27 21:40:54 +0000 | [diff] [blame] | 3191 | case $ac_sys_system in |
| 3192 | CYGWIN*) |
| 3193 | # Cygwin needs CCSHARED when building extension DLLs |
| 3194 | # but not when building the interpreter DLL. |
| 3195 | CFLAGSFORSHARED='';; |
| 3196 | *) |
| 3197 | CFLAGSFORSHARED='$(CCSHARED)' |
| 3198 | esac |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3199 | fi |
| 3200 | echo "$ac_t""$CFLAGSFORSHARED" 1>&6 |
| 3201 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3202 | # checks for libraries |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3203 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3204 | echo "configure:3205: checking for dlopen in -ldl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3205 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3206 | 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] | 3207 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3208 | else |
| 3209 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3210 | LIBS="-ldl $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3211 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3212 | #line 3213 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3213 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3214 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3215 | /* We use char because int might match the return type of a gcc2 |
| 3216 | builtin and then its argument prototype would still apply. */ |
| 3217 | char dlopen(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3218 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3219 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3220 | dlopen() |
| 3221 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3222 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3223 | if { (eval echo configure:3224: \"$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] | 3224 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3225 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3226 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3227 | echo "configure: failed program was:" >&5 |
| 3228 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3229 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3230 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3231 | fi |
| 3232 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3233 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3234 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3235 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3236 | 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] | 3237 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3238 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3239 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3240 | cat >> confdefs.h <<EOF |
| 3241 | #define $ac_tr_lib 1 |
| 3242 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3243 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3244 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3245 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3246 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3247 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3248 | fi |
| 3249 | # Dynamic linking for SunOS/Solaris and SYSV |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3250 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3251 | echo "configure:3252: checking for shl_load in -ldld" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3252 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3253 | 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] | 3254 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3255 | else |
| 3256 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3257 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3258 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3259 | #line 3260 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3260 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3261 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3262 | /* We use char because int might match the return type of a gcc2 |
| 3263 | builtin and then its argument prototype would still apply. */ |
| 3264 | char shl_load(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3265 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3266 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3267 | shl_load() |
| 3268 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3269 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3270 | if { (eval echo configure:3271: \"$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] | 3271 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3272 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3273 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3274 | echo "configure: failed program was:" >&5 |
| 3275 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3276 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3277 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3278 | fi |
| 3279 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3280 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3281 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3282 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3283 | 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] | 3284 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3285 | ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3286 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3287 | cat >> confdefs.h <<EOF |
| 3288 | #define $ac_tr_lib 1 |
| 3289 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3290 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3291 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3292 | |
| 3293 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3294 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3295 | fi |
| 3296 | # Dynamic linking for HP-UX |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3297 | |
| 3298 | # checks for system dependent C++ extensions support |
| 3299 | case "$ac_sys_system" in |
| 3300 | AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3301 | echo "configure:3302: checking for genuine AIX C++ extensions support" >&5 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3302 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3303 | #line 3304 "configure" |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3304 | #include "confdefs.h" |
| 3305 | #include "/usr/lpp/xlC/include/load.h" |
| 3306 | int main() { |
| 3307 | loadAndInit("", 0, "") |
| 3308 | ; return 0; } |
| 3309 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3310 | if { (eval echo configure:3311: \"$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] | 3311 | rm -rf conftest* |
| 3312 | cat >> confdefs.h <<\EOF |
| 3313 | #define AIX_GENUINE_CPLUSPLUS 1 |
| 3314 | EOF |
| 3315 | |
| 3316 | echo "$ac_t""yes" 1>&6 |
| 3317 | else |
| 3318 | echo "configure: failed program was:" >&5 |
| 3319 | cat conftest.$ac_ext >&5 |
| 3320 | rm -rf conftest* |
| 3321 | echo "$ac_t""no" 1>&6 |
| 3322 | fi |
| 3323 | rm -f conftest*;; |
| 3324 | *) ;; |
| 3325 | esac |
| 3326 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3327 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
| 3328 | # However on SGI IRIX, these exist but are broken. |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3329 | # BeOS' sockets are stashed in libnet. |
| 3330 | case "$ac_sys_system" in |
| 3331 | IRIX*) ;; |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3332 | *) |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3333 | echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3334 | echo "configure:3335: checking for t_open in -lnsl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3335 | ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3336 | 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] | 3337 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3338 | else |
| 3339 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3340 | LIBS="-lnsl $LIBS" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3341 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3342 | #line 3343 "configure" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3343 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3344 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3345 | /* We use char because int might match the return type of a gcc2 |
| 3346 | builtin and then its argument prototype would still apply. */ |
| 3347 | char t_open(); |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3348 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3349 | int main() { |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3350 | t_open() |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3351 | ; return 0; } |
| 3352 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3353 | if { (eval echo configure:3354: \"$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] | 3354 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3355 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3356 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3357 | echo "configure: failed program was:" >&5 |
| 3358 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3359 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3360 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3361 | fi |
| 3362 | rm -f conftest* |
| 3363 | LIBS="$ac_save_LIBS" |
| 3364 | |
| 3365 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3366 | 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] | 3367 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3368 | LIBS="-lnsl $LIBS" |
| 3369 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3370 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3371 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3372 | # SVR4 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3373 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3374 | echo "configure:3375: checking for socket in -lsocket" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3375 | ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3376 | 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] | 3377 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3378 | else |
| 3379 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3380 | LIBS="-lsocket $LIBS $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3381 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3382 | #line 3383 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3383 | #include "confdefs.h" |
| 3384 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3385 | /* We use char because int might match the return type of a gcc2 |
| 3386 | builtin and then its argument prototype would still apply. */ |
| 3387 | char socket(); |
| 3388 | |
| 3389 | int main() { |
| 3390 | socket() |
| 3391 | ; return 0; } |
| 3392 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3393 | if { (eval echo configure:3394: \"$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] | 3394 | rm -rf conftest* |
| 3395 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3396 | else |
| 3397 | echo "configure: failed program was:" >&5 |
| 3398 | cat conftest.$ac_ext >&5 |
| 3399 | rm -rf conftest* |
| 3400 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3401 | fi |
| 3402 | rm -f conftest* |
| 3403 | LIBS="$ac_save_LIBS" |
| 3404 | |
| 3405 | fi |
| 3406 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3407 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3408 | LIBS="-lsocket $LIBS" |
| 3409 | else |
| 3410 | echo "$ac_t""no" 1>&6 |
| 3411 | fi |
| 3412 | # SVR4 sockets |
Jeremy Hylton | cb25d5e | 2000-07-27 21:23:28 +0000 | [diff] [blame] | 3413 | ;; |
| 3414 | esac |
| 3415 | case "$ac_sys_system" in |
| 3416 | BeOS*) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3417 | echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3418 | echo "configure:3419: checking for socket in -lnet" >&5 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3419 | ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3420 | 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] | 3421 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3422 | else |
| 3423 | ac_save_LIBS="$LIBS" |
| 3424 | LIBS="-lnet $LIBS $LIBS" |
| 3425 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3426 | #line 3427 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3427 | #include "confdefs.h" |
| 3428 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3429 | /* We use char because int might match the return type of a gcc2 |
| 3430 | builtin and then its argument prototype would still apply. */ |
| 3431 | char socket(); |
| 3432 | |
| 3433 | int main() { |
| 3434 | socket() |
| 3435 | ; return 0; } |
| 3436 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3437 | if { (eval echo configure:3438: \"$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] | 3438 | rm -rf conftest* |
| 3439 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3440 | else |
| 3441 | echo "configure: failed program was:" >&5 |
| 3442 | cat conftest.$ac_ext >&5 |
| 3443 | rm -rf conftest* |
| 3444 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3445 | fi |
| 3446 | rm -f conftest* |
| 3447 | LIBS="$ac_save_LIBS" |
| 3448 | |
| 3449 | fi |
| 3450 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3451 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3452 | LIBS="-lnet $LIBS" |
| 3453 | else |
| 3454 | echo "$ac_t""no" 1>&6 |
| 3455 | fi |
| 3456 | # BeOS |
| 3457 | ;; |
| 3458 | esac |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3459 | |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3460 | echo $ac_n "checking for --with-libs""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3461 | echo "configure:3462: checking for --with-libs" >&5 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3462 | # Check whether --with-libs or --without-libs was given. |
| 3463 | if test "${with_libs+set}" = set; then |
| 3464 | withval="$with_libs" |
| 3465 | |
| 3466 | echo "$ac_t""$withval" 1>&6 |
| 3467 | LIBS="$withval $LIBS" |
| 3468 | |
| 3469 | else |
| 3470 | echo "$ac_t""no" 1>&6 |
| 3471 | fi |
| 3472 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3473 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3474 | # Determine if signalmodule should be used. |
| 3475 | |
| 3476 | |
| 3477 | echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3478 | echo "configure:3479: checking for --with-signal-module" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3479 | # Check whether --with-signal-module or --without-signal-module was given. |
| 3480 | if test "${with_signal_module+set}" = set; then |
| 3481 | withval="$with_signal_module" |
| 3482 | : |
| 3483 | fi |
| 3484 | |
| 3485 | |
| 3486 | if test -z "$with_signal_module" |
| 3487 | then with_signal_module="yes" |
| 3488 | fi |
| 3489 | echo "$ac_t""$with_signal_module" 1>&6 |
| 3490 | |
| 3491 | if test "${with_signal_module}" = "yes"; then |
| 3492 | USE_SIGNAL_MODULE="" |
| 3493 | SIGNAL_OBJS="" |
| 3494 | else |
| 3495 | USE_SIGNAL_MODULE="#" |
| 3496 | SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o" |
| 3497 | fi |
| 3498 | |
Guido van Rossum | 3d15bd8 | 2001-01-10 18:53:48 +0000 | [diff] [blame] | 3499 | # This is used to generate Setup.config |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3500 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3501 | USE_THREAD_MODULE="" |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3502 | |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3503 | echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3504 | echo "configure:3505: checking for --with-dec-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3505 | |
| 3506 | # Check whether --with-dec-threads or --without-dec-threads was given. |
| 3507 | if test "${with_dec_threads+set}" = set; then |
| 3508 | withval="$with_dec_threads" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3509 | |
| 3510 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3511 | LDLAST=-threads |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3512 | if test "${with_thread+set}" != set; then |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3513 | with_thread="$withval"; |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3514 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3515 | else |
| 3516 | echo "$ac_t""no" 1>&6 |
| 3517 | fi |
| 3518 | |
| 3519 | |
| 3520 | echo $ac_n "checking for --with-threads""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3521 | echo "configure:3522: checking for --with-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3522 | # Check whether --with-threads or --without-threads was given. |
| 3523 | if test "${with_threads+set}" = set; then |
| 3524 | withval="$with_threads" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3525 | : |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3526 | fi |
| 3527 | |
| 3528 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3529 | # --with-thread is deprecated, but check for it anyway |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3530 | # Check whether --with-thread or --without-thread was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3531 | if test "${with_thread+set}" = set; then |
| 3532 | withval="$with_thread" |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 3533 | |
| 3534 | with_threads=$with_thread |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3535 | fi |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3536 | |
| 3537 | |
| 3538 | if test -z "$with_threads" |
| 3539 | then with_threads="yes" |
| 3540 | fi |
| 3541 | echo "$ac_t""$with_threads" 1>&6 |
| 3542 | |
| 3543 | if test "$with_threads" = "no" |
| 3544 | then |
| 3545 | USE_THREAD_MODULE="#" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3546 | elif test "$ac_cv_kpthread" = "yes" |
| 3547 | then |
| 3548 | CC="$CC -Kpthread" |
| 3549 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3550 | #define WITH_THREAD 1 |
| 3551 | EOF |
| 3552 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3553 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3554 | #define _POSIX_THREADS 1 |
| 3555 | EOF |
| 3556 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3557 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3558 | LIBOBJS="$LIBOBJS thread.o" |
| 3559 | else |
| 3560 | if test ! -z "$with_threads" -a -d "$with_threads" |
| 3561 | then LDFLAGS="$LDFLAGS -L$with_threads" |
| 3562 | fi |
| 3563 | if test ! -z "$withval" -a -d "$withval" |
| 3564 | then LDFLAGS="$LDFLAGS -L$withval" |
| 3565 | fi |
| 3566 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 3567 | #define _REENTRANT 1 |
| 3568 | EOF |
| 3569 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3570 | ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3571 | echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3572 | echo "configure:3573: checking for mach/cthreads.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3573 | 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] | 3574 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3575 | else |
| 3576 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3577 | #line 3578 "configure" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3578 | #include "confdefs.h" |
| 3579 | #include <mach/cthreads.h> |
| 3580 | EOF |
| 3581 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3582 | { (eval echo configure:3583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3583 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3584 | if test -z "$ac_err"; then |
| 3585 | rm -rf conftest* |
| 3586 | eval "ac_cv_header_$ac_safe=yes" |
| 3587 | else |
| 3588 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3589 | echo "configure: failed program was:" >&5 |
| 3590 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3591 | rm -rf conftest* |
| 3592 | eval "ac_cv_header_$ac_safe=no" |
| 3593 | fi |
| 3594 | rm -f conftest* |
| 3595 | fi |
| 3596 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3597 | echo "$ac_t""yes" 1>&6 |
| 3598 | cat >> confdefs.h <<\EOF |
| 3599 | #define WITH_THREAD 1 |
| 3600 | EOF |
| 3601 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3602 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3603 | #define C_THREADS 1 |
| 3604 | EOF |
| 3605 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3606 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3607 | else |
| 3608 | echo "$ac_t""no" 1>&6 |
| 3609 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3610 | echo $ac_n "checking for --with-pth""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3611 | echo "configure:3612: checking for --with-pth" >&5 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3612 | # Check whether --with-pth or --without-pth was given. |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3613 | if test "${with_pth+set}" = set; then |
| 3614 | withval="$with_pth" |
| 3615 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3616 | echo "$ac_t""$withval" 1>&6 |
| 3617 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3618 | #define WITH_THREAD 1 |
| 3619 | EOF |
| 3620 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3621 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3622 | #define HAVE_PTH 1 |
| 3623 | EOF |
| 3624 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3625 | LIBS="-lpth $LIBS" |
| 3626 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3627 | else |
| 3628 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3629 | echo "$ac_t""no" 1>&6 |
| 3630 | echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3631 | echo "configure:3632: checking for pthread_create in -lpthread" >&5 |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3632 | ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3633 | 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] | 3634 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3635 | else |
| 3636 | ac_save_LIBS="$LIBS" |
| 3637 | LIBS="-lpthread $LIBS" |
| 3638 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3639 | #line 3640 "configure" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3640 | #include "confdefs.h" |
| 3641 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3642 | /* We use char because int might match the return type of a gcc2 |
| 3643 | builtin and then its argument prototype would still apply. */ |
| 3644 | char pthread_create(); |
| 3645 | |
| 3646 | int main() { |
| 3647 | pthread_create() |
| 3648 | ; return 0; } |
| 3649 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3650 | if { (eval echo configure:3651: \"$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] | 3651 | rm -rf conftest* |
| 3652 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3653 | else |
| 3654 | echo "configure: failed program was:" >&5 |
| 3655 | cat conftest.$ac_ext >&5 |
| 3656 | rm -rf conftest* |
| 3657 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3658 | fi |
| 3659 | rm -f conftest* |
| 3660 | LIBS="$ac_save_LIBS" |
| 3661 | |
| 3662 | fi |
| 3663 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3664 | echo "$ac_t""yes" 1>&6 |
| 3665 | cat >> confdefs.h <<\EOF |
| 3666 | #define WITH_THREAD 1 |
| 3667 | EOF |
| 3668 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3669 | case $ac_sys_system in |
| 3670 | Darwin*) ;; |
| 3671 | *) cat >> confdefs.h <<\EOF |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3672 | #define _POSIX_THREADS 1 |
| 3673 | EOF |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3674 | |
| 3675 | posix_threads=yes |
| 3676 | ;; |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3677 | esac |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3678 | LIBS="-lpthread $LIBS" |
| 3679 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3680 | else |
| 3681 | echo "$ac_t""no" 1>&6 |
| 3682 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3683 | echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3684 | echo "configure:3685: checking for pthread_detach" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3685 | 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] | 3686 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3687 | else |
| 3688 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3689 | #line 3690 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3690 | #include "confdefs.h" |
| 3691 | /* System header to define __stub macros and hopefully few prototypes, |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3692 | which can conflict with char pthread_detach(); below. */ |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3693 | #include <assert.h> |
| 3694 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3695 | /* We use char because int might match the return type of a gcc2 |
| 3696 | builtin and then its argument prototype would still apply. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3697 | char pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3698 | |
| 3699 | int main() { |
| 3700 | |
| 3701 | /* The GNU C library defines this for functions which it implements |
| 3702 | to always fail with ENOSYS. Some functions are actually named |
| 3703 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3704 | #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3705 | choke me |
| 3706 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3707 | pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3708 | #endif |
| 3709 | |
| 3710 | ; return 0; } |
| 3711 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3712 | if { (eval echo configure:3713: \"$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] | 3713 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3714 | eval "ac_cv_func_pthread_detach=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3715 | else |
| 3716 | echo "configure: failed program was:" >&5 |
| 3717 | cat conftest.$ac_ext >&5 |
| 3718 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3719 | eval "ac_cv_func_pthread_detach=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3720 | fi |
| 3721 | rm -f conftest* |
| 3722 | fi |
| 3723 | |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3724 | if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3725 | echo "$ac_t""yes" 1>&6 |
| 3726 | cat >> confdefs.h <<\EOF |
| 3727 | #define WITH_THREAD 1 |
| 3728 | EOF |
| 3729 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3730 | case $ac_sys_system in |
| 3731 | Darwin*) ;; |
| 3732 | *) cat >> confdefs.h <<\EOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3733 | #define _POSIX_THREADS 1 |
| 3734 | EOF |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3735 | |
| 3736 | posix_threads=yes |
| 3737 | ;; |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3738 | esac |
| 3739 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3740 | else |
| 3741 | echo "$ac_t""no" 1>&6 |
| 3742 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3743 | ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3744 | echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3745 | echo "configure:3746: checking for kernel/OS.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3746 | 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] | 3747 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3748 | else |
| 3749 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3750 | #line 3751 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3751 | #include "confdefs.h" |
| 3752 | #include <kernel/OS.h> |
| 3753 | EOF |
| 3754 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3755 | { (eval echo configure:3756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3756 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3757 | if test -z "$ac_err"; then |
| 3758 | rm -rf conftest* |
| 3759 | eval "ac_cv_header_$ac_safe=yes" |
| 3760 | else |
| 3761 | echo "$ac_err" >&5 |
| 3762 | echo "configure: failed program was:" >&5 |
| 3763 | cat conftest.$ac_ext >&5 |
| 3764 | rm -rf conftest* |
| 3765 | eval "ac_cv_header_$ac_safe=no" |
| 3766 | fi |
| 3767 | rm -f conftest* |
| 3768 | fi |
| 3769 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3770 | echo "$ac_t""yes" 1>&6 |
| 3771 | cat >> confdefs.h <<\EOF |
| 3772 | #define WITH_THREAD 1 |
| 3773 | EOF |
| 3774 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3775 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3776 | #define BEOS_THREADS 1 |
| 3777 | EOF |
| 3778 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3779 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3780 | else |
| 3781 | echo "$ac_t""no" 1>&6 |
| 3782 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3783 | echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3784 | echo "configure:3785: checking for pthread_create in -lpthreads" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3785 | ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3786 | 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] | 3787 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3788 | else |
| 3789 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3790 | LIBS="-lpthreads $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3791 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3792 | #line 3793 "configure" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3793 | #include "confdefs.h" |
| 3794 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3795 | /* We use char because int might match the return type of a gcc2 |
| 3796 | builtin and then its argument prototype would still apply. */ |
| 3797 | char pthread_create(); |
| 3798 | |
| 3799 | int main() { |
| 3800 | pthread_create() |
| 3801 | ; return 0; } |
| 3802 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3803 | if { (eval echo configure:3804: \"$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] | 3804 | rm -rf conftest* |
| 3805 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3806 | else |
| 3807 | echo "configure: failed program was:" >&5 |
| 3808 | cat conftest.$ac_ext >&5 |
| 3809 | rm -rf conftest* |
| 3810 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3811 | fi |
| 3812 | rm -f conftest* |
| 3813 | LIBS="$ac_save_LIBS" |
| 3814 | |
| 3815 | fi |
| 3816 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3817 | echo "$ac_t""yes" 1>&6 |
| 3818 | cat >> confdefs.h <<\EOF |
| 3819 | #define WITH_THREAD 1 |
| 3820 | EOF |
| 3821 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3822 | cat >> confdefs.h <<\EOF |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3823 | #define _POSIX_THREADS 1 |
| 3824 | EOF |
| 3825 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3826 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3827 | LIBS="$LIBS -lpthreads" |
| 3828 | LIBOBJS="$LIBOBJS thread.o" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3829 | else |
| 3830 | echo "$ac_t""no" 1>&6 |
| 3831 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3832 | echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3833 | echo "configure:3834: checking for pthread_create in -lc_r" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3834 | ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3835 | 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] | 3836 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3837 | else |
| 3838 | ac_save_LIBS="$LIBS" |
| 3839 | LIBS="-lc_r $LIBS" |
| 3840 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3841 | #line 3842 "configure" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3842 | #include "confdefs.h" |
| 3843 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3844 | /* We use char because int might match the return type of a gcc2 |
| 3845 | builtin and then its argument prototype would still apply. */ |
| 3846 | char pthread_create(); |
| 3847 | |
| 3848 | int main() { |
| 3849 | pthread_create() |
| 3850 | ; return 0; } |
| 3851 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3852 | if { (eval echo configure:3853: \"$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] | 3853 | rm -rf conftest* |
| 3854 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3855 | else |
| 3856 | echo "configure: failed program was:" >&5 |
| 3857 | cat conftest.$ac_ext >&5 |
| 3858 | rm -rf conftest* |
| 3859 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3860 | fi |
| 3861 | rm -f conftest* |
| 3862 | LIBS="$ac_save_LIBS" |
| 3863 | |
| 3864 | fi |
| 3865 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3866 | echo "$ac_t""yes" 1>&6 |
| 3867 | cat >> confdefs.h <<\EOF |
| 3868 | #define WITH_THREAD 1 |
| 3869 | EOF |
| 3870 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3871 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3872 | #define _POSIX_THREADS 1 |
| 3873 | EOF |
| 3874 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3875 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3876 | LIBS="$LIBS -lc_r" |
| 3877 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3878 | else |
| 3879 | echo "$ac_t""no" 1>&6 |
| 3880 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3881 | echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3882 | echo "configure:3883: checking for __d6_pthread_create in -lthread" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3883 | ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3884 | 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] | 3885 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3886 | else |
| 3887 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3888 | LIBS="-lthread $LIBS" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3889 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3890 | #line 3891 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3891 | #include "confdefs.h" |
| 3892 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3893 | /* We use char because int might match the return type of a gcc2 |
| 3894 | builtin and then its argument prototype would still apply. */ |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3895 | char __d6_pthread_create(); |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3896 | |
| 3897 | int main() { |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3898 | __d6_pthread_create() |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3899 | ; return 0; } |
| 3900 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3901 | if { (eval echo configure:3902: \"$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] | 3902 | rm -rf conftest* |
| 3903 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3904 | else |
| 3905 | echo "configure: failed program was:" >&5 |
| 3906 | cat conftest.$ac_ext >&5 |
| 3907 | rm -rf conftest* |
| 3908 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3909 | fi |
| 3910 | rm -f conftest* |
| 3911 | LIBS="$ac_save_LIBS" |
| 3912 | |
| 3913 | fi |
| 3914 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3915 | echo "$ac_t""yes" 1>&6 |
| 3916 | cat >> confdefs.h <<\EOF |
| 3917 | #define WITH_THREAD 1 |
| 3918 | EOF |
| 3919 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3920 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3921 | #define _POSIX_THREADS 1 |
| 3922 | EOF |
| 3923 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3924 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3925 | LIBS="$LIBS -lthread" |
| 3926 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3927 | else |
| 3928 | echo "$ac_t""no" 1>&6 |
| 3929 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3930 | echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3931 | echo "configure:3932: checking for __pthread_create_system in -lpthread" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3932 | ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` |
| 3933 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3934 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3935 | else |
| 3936 | ac_save_LIBS="$LIBS" |
| 3937 | LIBS="-lpthread $LIBS" |
| 3938 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3939 | #line 3940 "configure" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3940 | #include "confdefs.h" |
| 3941 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3942 | /* We use char because int might match the return type of a gcc2 |
| 3943 | builtin and then its argument prototype would still apply. */ |
| 3944 | char __pthread_create_system(); |
| 3945 | |
| 3946 | int main() { |
| 3947 | __pthread_create_system() |
| 3948 | ; return 0; } |
| 3949 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3950 | if { (eval echo configure:3951: \"$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] | 3951 | rm -rf conftest* |
| 3952 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3953 | else |
| 3954 | echo "configure: failed program was:" >&5 |
| 3955 | cat conftest.$ac_ext >&5 |
| 3956 | rm -rf conftest* |
| 3957 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3958 | fi |
| 3959 | rm -f conftest* |
| 3960 | LIBS="$ac_save_LIBS" |
| 3961 | |
| 3962 | fi |
| 3963 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3964 | echo "$ac_t""yes" 1>&6 |
| 3965 | cat >> confdefs.h <<\EOF |
| 3966 | #define WITH_THREAD 1 |
| 3967 | EOF |
| 3968 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3969 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3970 | #define _POSIX_THREADS 1 |
| 3971 | EOF |
| 3972 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3973 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3974 | LIBS="$LIBS -lpthread" |
| 3975 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3976 | else |
| 3977 | echo "$ac_t""no" 1>&6 |
| 3978 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3979 | echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3980 | echo "configure:3981: checking for pthread_create in -lcma" >&5 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3981 | ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3982 | 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] | 3983 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3984 | else |
| 3985 | ac_save_LIBS="$LIBS" |
| 3986 | LIBS="-lcma $LIBS" |
| 3987 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3988 | #line 3989 "configure" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3989 | #include "confdefs.h" |
| 3990 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3991 | /* We use char because int might match the return type of a gcc2 |
| 3992 | builtin and then its argument prototype would still apply. */ |
| 3993 | char pthread_create(); |
| 3994 | |
| 3995 | int main() { |
| 3996 | pthread_create() |
| 3997 | ; return 0; } |
| 3998 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3999 | if { (eval echo configure:4000: \"$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] | 4000 | rm -rf conftest* |
| 4001 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4002 | else |
| 4003 | echo "configure: failed program was:" >&5 |
| 4004 | cat conftest.$ac_ext >&5 |
| 4005 | rm -rf conftest* |
| 4006 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4007 | fi |
| 4008 | rm -f conftest* |
| 4009 | LIBS="$ac_save_LIBS" |
| 4010 | |
| 4011 | fi |
| 4012 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4013 | echo "$ac_t""yes" 1>&6 |
| 4014 | cat >> confdefs.h <<\EOF |
| 4015 | #define WITH_THREAD 1 |
| 4016 | EOF |
| 4017 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4018 | cat >> confdefs.h <<\EOF |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4019 | #define _POSIX_THREADS 1 |
| 4020 | EOF |
| 4021 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4022 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4023 | LIBS="$LIBS -lcma" |
| 4024 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4025 | else |
| 4026 | echo "$ac_t""no" 1>&6 |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 4027 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4028 | USE_THREAD_MODULE="#" |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 4029 | fi |
| 4030 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4031 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4032 | fi |
| 4033 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 4034 | fi |
| 4035 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4036 | fi |
| 4037 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4038 | fi |
| 4039 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4040 | fi |
| 4041 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4042 | fi |
| 4043 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4044 | fi |
| 4045 | |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4046 | fi |
| 4047 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4048 | fi |
| 4049 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4050 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4051 | if test "$posix_threads" = "yes"; then |
| 4052 | echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4053 | echo "configure:4054: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4054 | if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then |
| 4055 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4056 | else |
| 4057 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 4058 | ac_cv_pthread_system_supported=no |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4059 | else |
| 4060 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4061 | #line 4062 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4062 | #include "confdefs.h" |
| 4063 | #include <pthread.h> |
| 4064 | void *foo(void *parm) { |
| 4065 | return NULL; |
| 4066 | } |
| 4067 | main() { |
| 4068 | pthread_attr_t attr; |
| 4069 | if (pthread_attr_init(&attr)) exit(-1); |
| 4070 | if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1); |
| 4071 | if (pthread_create(NULL, &attr, foo, NULL)) exit(-1); |
| 4072 | exit(0); |
| 4073 | } |
| 4074 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4075 | if { (eval echo configure:4076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4076 | then |
| 4077 | ac_cv_pthread_system_supported=yes |
| 4078 | else |
| 4079 | echo "configure: failed program was:" >&5 |
| 4080 | cat conftest.$ac_ext >&5 |
| 4081 | rm -fr conftest* |
| 4082 | ac_cv_pthread_system_supported=no |
| 4083 | fi |
| 4084 | rm -fr conftest* |
| 4085 | fi |
| 4086 | |
| 4087 | |
| 4088 | fi |
| 4089 | |
| 4090 | echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6 |
| 4091 | if test "$ac_cv_pthread_system_supported" = "yes"; then |
| 4092 | cat >> confdefs.h <<\EOF |
| 4093 | #define PTHREAD_SYSTEM_SCHED_SUPPORTED 1 |
| 4094 | EOF |
| 4095 | |
| 4096 | fi |
| 4097 | fi |
| 4098 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4099 | echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4100 | echo "configure:4101: checking for usconfig in -lmpc" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4101 | ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4102 | 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] | 4103 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4104 | else |
| 4105 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4106 | LIBS="-lmpc $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4107 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4108 | #line 4109 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4109 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4110 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4111 | /* We use char because int might match the return type of a gcc2 |
| 4112 | builtin and then its argument prototype would still apply. */ |
| 4113 | char usconfig(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4114 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4115 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4116 | usconfig() |
| 4117 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4118 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4119 | if { (eval echo configure:4120: \"$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] | 4120 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4121 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4122 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4123 | echo "configure: failed program was:" >&5 |
| 4124 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4125 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4126 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4127 | fi |
| 4128 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4129 | LIBS="$ac_save_LIBS" |
| 4130 | |
| 4131 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4132 | 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] | 4133 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4134 | cat >> confdefs.h <<\EOF |
| 4135 | #define WITH_THREAD 1 |
| 4136 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4137 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4138 | LIBS="$LIBS -lmpc" |
| 4139 | LIBOBJS="$LIBOBJS thread.o" |
| 4140 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4141 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4142 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4143 | fi |
| 4144 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4145 | echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4146 | echo "configure:4147: checking for thr_create in -lthread" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4147 | ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4148 | 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] | 4149 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4150 | else |
| 4151 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4152 | LIBS="-lthread $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4153 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4154 | #line 4155 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4155 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4156 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4157 | /* We use char because int might match the return type of a gcc2 |
| 4158 | builtin and then its argument prototype would still apply. */ |
| 4159 | char thr_create(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4160 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4161 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4162 | thr_create() |
| 4163 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4164 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4165 | if { (eval echo configure:4166: \"$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] | 4166 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4167 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4168 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4169 | echo "configure: failed program was:" >&5 |
| 4170 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4171 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4172 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4173 | fi |
| 4174 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4175 | LIBS="$ac_save_LIBS" |
| 4176 | |
| 4177 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4178 | 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] | 4179 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4180 | cat >> confdefs.h <<\EOF |
| 4181 | #define WITH_THREAD 1 |
| 4182 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4183 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4184 | LIBS="$LIBS -lthread" |
| 4185 | LIBOBJS="$LIBOBJS thread.o" |
| 4186 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4187 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4188 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4189 | fi |
| 4190 | |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4191 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4192 | if test "$USE_THREAD_MODULE" != "#" |
| 4193 | then |
| 4194 | # If the above checks didn't disable threads, (at least) OSF1 |
| 4195 | # needs this '-threads' argument during linking. |
| 4196 | case $ac_sys_system in |
| 4197 | OSF1) LDLAST=-threads;; |
| 4198 | esac |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4199 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4200 | fi |
| 4201 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4202 | # Check for enable-ipv6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4203 | echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4204 | echo "configure:4205: checking if --enable-ipv6 is specified" >&5 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4205 | # Check whether --enable-ipv6 or --disable-ipv6 was given. |
| 4206 | if test "${enable_ipv6+set}" = set; then |
| 4207 | enableval="$enable_ipv6" |
| 4208 | case "$enableval" in |
| 4209 | no) |
| 4210 | echo "$ac_t""no" 1>&6 |
| 4211 | ipv6=no |
| 4212 | ;; |
| 4213 | *) echo "$ac_t""yes" 1>&6 |
| 4214 | cat >> confdefs.h <<\EOF |
| 4215 | #define ENABLE_IPV6 1 |
| 4216 | EOF |
| 4217 | |
| 4218 | ipv6=yes |
| 4219 | ;; |
| 4220 | esac |
| 4221 | else |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4222 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4223 | if test "$cross_compiling" = yes; then |
| 4224 | echo "$ac_t""no" 1>&6 |
| 4225 | ipv6=no |
| 4226 | |
| 4227 | else |
| 4228 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4229 | #line 4230 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4230 | #include "confdefs.h" |
| 4231 | /* AF_INET6 available check */ |
| 4232 | #include <sys/types.h> |
| 4233 | #include <sys/socket.h> |
| 4234 | main() |
| 4235 | { |
| 4236 | if (socket(AF_INET6, SOCK_STREAM, 0) < 0) |
| 4237 | exit(1); |
| 4238 | else |
| 4239 | exit(0); |
| 4240 | } |
| 4241 | |
| 4242 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4243 | if { (eval echo configure:4244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4244 | then |
| 4245 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4246 | ipv6=yes |
| 4247 | else |
| 4248 | echo "configure: failed program was:" >&5 |
| 4249 | cat conftest.$ac_ext >&5 |
| 4250 | rm -fr conftest* |
| 4251 | echo "$ac_t""no" 1>&6 |
| 4252 | ipv6=no |
| 4253 | fi |
| 4254 | rm -fr conftest* |
| 4255 | fi |
| 4256 | |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4257 | |
| 4258 | if test "$ipv6" = "yes"; then |
| 4259 | echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4260 | echo "configure:4261: checking if RFC2553 API is available" >&5 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4261 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4262 | #line 4263 "configure" |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4263 | #include "confdefs.h" |
| 4264 | #include <sys/types.h> |
| 4265 | #include <netinet/in.h> |
| 4266 | int main() { |
| 4267 | struct sockaddr_in6 x; |
| 4268 | x.sin6_scope_id; |
| 4269 | ; return 0; } |
| 4270 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4271 | if { (eval echo configure:4272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4272 | rm -rf conftest* |
| 4273 | echo "$ac_t""yes" 1>&6 |
| 4274 | ipv6=yes |
| 4275 | else |
| 4276 | echo "configure: failed program was:" >&5 |
| 4277 | cat conftest.$ac_ext >&5 |
| 4278 | rm -rf conftest* |
| 4279 | echo "$ac_t""no" 1>&6 |
| 4280 | ipv6=no |
| 4281 | fi |
| 4282 | rm -f conftest* |
| 4283 | fi |
| 4284 | |
| 4285 | if test "$ipv6" = "yes"; then |
| 4286 | cat >> confdefs.h <<\EOF |
| 4287 | #define ENABLE_IPV6 1 |
| 4288 | EOF |
| 4289 | |
| 4290 | fi |
| 4291 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4292 | fi |
| 4293 | |
| 4294 | |
| 4295 | ipv6type=unknown |
| 4296 | ipv6lib=none |
| 4297 | ipv6trylibc=no |
| 4298 | |
| 4299 | if test "$ipv6" = "yes"; then |
| 4300 | echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4301 | echo "configure:4302: checking ipv6 stack type" >&5 |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 4302 | for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; |
| 4303 | do |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4304 | case $i in |
| 4305 | inria) |
| 4306 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4307 | #line 4308 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4308 | #include "confdefs.h" |
| 4309 | dnl |
| 4310 | #include <netinet/in.h> |
| 4311 | #ifdef IPV6_INRIA_VERSION |
| 4312 | yes |
| 4313 | #endif |
| 4314 | EOF |
| 4315 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4316 | egrep "yes" >/dev/null 2>&1; then |
| 4317 | rm -rf conftest* |
| 4318 | ipv6type=$i; |
| 4319 | OPT="-DINET6 $OPT" |
| 4320 | fi |
| 4321 | rm -f conftest* |
| 4322 | |
| 4323 | ;; |
| 4324 | kame) |
| 4325 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4326 | #line 4327 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4327 | #include "confdefs.h" |
| 4328 | dnl |
| 4329 | #include <netinet/in.h> |
| 4330 | #ifdef __KAME__ |
| 4331 | yes |
| 4332 | #endif |
| 4333 | EOF |
| 4334 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4335 | egrep "yes" >/dev/null 2>&1; then |
| 4336 | rm -rf conftest* |
| 4337 | ipv6type=$i; |
| 4338 | ipv6lib=inet6 |
| 4339 | ipv6libdir=/usr/local/v6/lib |
| 4340 | ipv6trylibc=yes |
| 4341 | OPT="-DINET6 $OPT" |
| 4342 | fi |
| 4343 | rm -f conftest* |
| 4344 | |
| 4345 | ;; |
| 4346 | linux-glibc) |
| 4347 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4348 | #line 4349 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4349 | #include "confdefs.h" |
| 4350 | dnl |
| 4351 | #include <features.h> |
| 4352 | #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) |
| 4353 | yes |
| 4354 | #endif |
| 4355 | EOF |
| 4356 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4357 | egrep "yes" >/dev/null 2>&1; then |
| 4358 | rm -rf conftest* |
| 4359 | ipv6type=$i; |
| 4360 | ipv6trylibc=yes |
| 4361 | OPT="-DINET6 $OPT" |
| 4362 | fi |
| 4363 | rm -f conftest* |
| 4364 | |
| 4365 | ;; |
| 4366 | linux-inet6) |
| 4367 | if test -d /usr/inet6; then |
| 4368 | ipv6type=$i |
| 4369 | ipv6lib=inet6 |
| 4370 | ipv6libdir=/usr/inet6/lib |
| 4371 | OPT="-DINET6 -I/usr/inet6/include $OPT" |
| 4372 | fi |
| 4373 | ;; |
| 4374 | solaris) |
| 4375 | if test -f /etc/netconfig; then |
| 4376 | if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then |
| 4377 | ipv6type=$i |
| 4378 | ipv6trylibc=yes |
| 4379 | OPT="-DINET6 $OPT" |
| 4380 | fi |
| 4381 | fi |
| 4382 | ;; |
| 4383 | toshiba) |
| 4384 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4385 | #line 4386 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4386 | #include "confdefs.h" |
| 4387 | dnl |
| 4388 | #include <sys/param.h> |
| 4389 | #ifdef _TOSHIBA_INET6 |
| 4390 | yes |
| 4391 | #endif |
| 4392 | EOF |
| 4393 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4394 | egrep "yes" >/dev/null 2>&1; then |
| 4395 | rm -rf conftest* |
| 4396 | ipv6type=$i; |
| 4397 | ipv6lib=inet6; |
| 4398 | ipv6libdir=/usr/local/v6/lib; |
| 4399 | OPT="-DINET6 $OPT" |
| 4400 | fi |
| 4401 | rm -f conftest* |
| 4402 | |
| 4403 | ;; |
| 4404 | v6d) |
| 4405 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4406 | #line 4407 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4407 | #include "confdefs.h" |
| 4408 | dnl |
| 4409 | #include </usr/local/v6/include/sys/v6config.h> |
| 4410 | #ifdef __V6D__ |
| 4411 | yes |
| 4412 | #endif |
| 4413 | EOF |
| 4414 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4415 | egrep "yes" >/dev/null 2>&1; then |
| 4416 | rm -rf conftest* |
| 4417 | ipv6type=$i; |
| 4418 | ipv6lib=v6; |
| 4419 | ipv6libdir=/usr/local/v6/lib; |
| 4420 | OPT="-I/usr/local/v6/include $OPT" |
| 4421 | fi |
| 4422 | rm -f conftest* |
| 4423 | |
| 4424 | ;; |
| 4425 | zeta) |
| 4426 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4427 | #line 4428 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4428 | #include "confdefs.h" |
| 4429 | dnl |
| 4430 | #include <sys/param.h> |
| 4431 | #ifdef _ZETA_MINAMI_INET6 |
| 4432 | yes |
| 4433 | #endif |
| 4434 | EOF |
| 4435 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4436 | egrep "yes" >/dev/null 2>&1; then |
| 4437 | rm -rf conftest* |
| 4438 | ipv6type=$i; |
| 4439 | ipv6lib=inet6; |
| 4440 | ipv6libdir=/usr/local/v6/lib; |
| 4441 | OPT="-DINET6 $OPT" |
| 4442 | fi |
| 4443 | rm -f conftest* |
| 4444 | |
| 4445 | ;; |
| 4446 | esac |
| 4447 | if test "$ipv6type" != "unknown"; then |
| 4448 | break |
| 4449 | fi |
| 4450 | done |
| 4451 | echo "$ac_t""$ipv6type" 1>&6 |
| 4452 | fi |
| 4453 | |
| 4454 | if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then |
| 4455 | if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then |
| 4456 | LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" |
| 4457 | echo "using lib$ipv6lib" |
| 4458 | else |
| 4459 | if test $ipv6trylibc = "yes"; then |
| 4460 | echo "using libc" |
| 4461 | else |
| 4462 | echo 'Fatal: no $ipv6lib library found. cannot continue.' |
| 4463 | echo "You need to fetch lib$ipv6lib.a from appropriate" |
| 4464 | echo 'ipv6 kit and compile beforehand.' |
| 4465 | exit 1 |
| 4466 | fi |
| 4467 | fi |
| 4468 | fi |
| 4469 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4470 | # Check for GC support |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4471 | echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4472 | echo "configure:4473: checking for --with-cycle-gc" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4473 | # Check whether --with-cycle-gc or --without-cycle-gc was given. |
| 4474 | if test "${with_cycle_gc+set}" = set; then |
| 4475 | withval="$with_cycle_gc" |
| 4476 | : |
| 4477 | fi |
| 4478 | |
| 4479 | |
| 4480 | if test -z "$with_cycle_gc" |
| 4481 | then with_cycle_gc="yes" |
| 4482 | fi |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame] | 4483 | if test "$with_cycle_gc" != "no" |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4484 | then |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4485 | cat >> confdefs.h <<\EOF |
| 4486 | #define WITH_CYCLE_GC 1 |
| 4487 | EOF |
| 4488 | |
| 4489 | fi |
| 4490 | echo "$ac_t""$with_cycle_gc" 1>&6 |
| 4491 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4492 | # Check for Python-specific malloc support |
| 4493 | echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4494 | echo "configure:4495: checking for --with-pymalloc" >&5 |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4495 | # Check whether --with-pymalloc or --without-pymalloc was given. |
| 4496 | if test "${with_pymalloc+set}" = set; then |
| 4497 | withval="$with_pymalloc" |
| 4498 | |
| 4499 | if test "$withval" != no |
| 4500 | then cat >> confdefs.h <<\EOF |
| 4501 | #define WITH_PYMALLOC 1 |
| 4502 | EOF |
| 4503 | echo "$ac_t""yes" 1>&6 |
| 4504 | else echo "$ac_t""no" 1>&6 |
| 4505 | fi |
| 4506 | else |
| 4507 | echo "$ac_t""no" 1>&6 |
| 4508 | fi |
| 4509 | |
| 4510 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4511 | # Check for --with-wctype-functions |
| 4512 | echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4513 | echo "configure:4514: checking for --with-wctype-functions" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4514 | # Check whether --with-wctype-functions or --without-wctype-functions was given. |
| 4515 | if test "${with_wctype_functions+set}" = set; then |
| 4516 | withval="$with_wctype_functions" |
| 4517 | |
| 4518 | if test "$withval" != no |
| 4519 | then cat >> confdefs.h <<\EOF |
| 4520 | #define WANT_WCTYPE_FUNCTIONS 1 |
| 4521 | EOF |
| 4522 | echo "$ac_t""yes" 1>&6 |
| 4523 | else echo "$ac_t""no" 1>&6 |
| 4524 | fi |
| 4525 | else |
| 4526 | echo "$ac_t""no" 1>&6 |
| 4527 | fi |
| 4528 | |
| 4529 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4530 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4531 | |
Guido van Rossum | 98935bf | 2001-09-05 19:13:16 +0000 | [diff] [blame] | 4532 | DLINCLDIR=. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4533 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4534 | echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4535 | echo "configure:4536: checking for --with-sgi-dl" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4536 | # Check whether --with-sgi-dl or --without-sgi-dl was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4537 | if test "${with_sgi_dl+set}" = set; then |
| 4538 | withval="$with_sgi_dl" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4539 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4540 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4541 | cat >> confdefs.h <<\EOF |
| 4542 | #define WITH_SGI_DL 1 |
| 4543 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4544 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4545 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4546 | dldir=$withval |
Guido van Rossum | 4095101 | 2000-10-07 16:21:27 +0000 | [diff] [blame] | 4547 | if test ! -z "$dldir" -a -d "$dldir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 4548 | then LDFLAGS="$LDFLAGS -L$dldir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4549 | 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] | 4550 | fi |
| 4551 | DLINCLDIR=${dldir} |
| 4552 | LIBS="$LIBS -ldl -lmld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4553 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4554 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4555 | fi |
| 4556 | |
| 4557 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4558 | echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4559 | echo "configure:4560: checking for --with-dl-dld" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4560 | # Check whether --with-dl-dld or --without-dl-dld was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4561 | if test "${with_dl_dld+set}" = set; then |
| 4562 | withval="$with_dl_dld" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4563 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4564 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4565 | cat >> confdefs.h <<\EOF |
| 4566 | #define WITH_DL_DLD 1 |
| 4567 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4568 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4569 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4570 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 4571 | dlddir=`echo "$withval" | sed 's/.*,//'` |
Barry Warsaw | 7d1219d | 2000-10-05 18:45:53 +0000 | [diff] [blame] | 4572 | 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] | 4573 | then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4574 | 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] | 4575 | fi |
| 4576 | DLINCLDIR=${dldir} |
| 4577 | LIBS="$LIBS -ldl -ldld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4578 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4579 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4580 | fi |
| 4581 | |
| 4582 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4583 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 4584 | # 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] | 4585 | for ac_func in dlopen |
| 4586 | do |
| 4587 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4588 | echo "configure:4589: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4589 | 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] | 4590 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4591 | else |
| 4592 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4593 | #line 4594 "configure" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4594 | #include "confdefs.h" |
| 4595 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4596 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4597 | #include <assert.h> |
| 4598 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4599 | /* We use char because int might match the return type of a gcc2 |
| 4600 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4601 | char $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4602 | |
| 4603 | int main() { |
| 4604 | |
| 4605 | /* The GNU C library defines this for functions which it implements |
| 4606 | to always fail with ENOSYS. Some functions are actually named |
| 4607 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4608 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4609 | choke me |
| 4610 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4611 | $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4612 | #endif |
| 4613 | |
| 4614 | ; return 0; } |
| 4615 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4616 | if { (eval echo configure:4617: \"$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] | 4617 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4618 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4619 | else |
| 4620 | echo "configure: failed program was:" >&5 |
| 4621 | cat conftest.$ac_ext >&5 |
| 4622 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4623 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4624 | fi |
| 4625 | rm -f conftest* |
| 4626 | fi |
| 4627 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4628 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4629 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4630 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4631 | cat >> confdefs.h <<EOF |
| 4632 | #define $ac_tr_func 1 |
| 4633 | EOF |
| 4634 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4635 | else |
| 4636 | echo "$ac_t""no" 1>&6 |
| 4637 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4638 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4639 | |
| 4640 | |
| 4641 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 4642 | # loading of modules. |
| 4643 | |
| 4644 | echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4645 | echo "configure:4646: checking DYNLOADFILE" >&5 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4646 | if test -z "$DYNLOADFILE" |
| 4647 | then |
| 4648 | case $ac_sys_system/$ac_sys_release in |
| 4649 | AIX*) DYNLOADFILE="dynload_aix.o";; |
| 4650 | BeOS*) DYNLOADFILE="dynload_beos.o";; |
| 4651 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4652 | Darwin/*) DYNLOADFILE="dynload_next.o";; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4653 | *) |
| 4654 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 4655 | # out any dynamic loading |
| 4656 | if test "$ac_cv_func_dlopen" = yes |
| 4657 | then DYNLOADFILE="dynload_shlib.o" |
| 4658 | else DYNLOADFILE="dynload_stub.o" |
| 4659 | fi |
| 4660 | ;; |
| 4661 | esac |
| 4662 | fi |
| 4663 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
| 4664 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 4665 | then |
| 4666 | cat >> confdefs.h <<\EOF |
| 4667 | #define HAVE_DYNAMIC_LOADING 1 |
| 4668 | EOF |
| 4669 | |
| 4670 | fi |
| 4671 | |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4672 | # MACHDEP_OBJS can be set to platform-specific object files needed by Python |
| 4673 | |
| 4674 | |
| 4675 | echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4676 | echo "configure:4677: checking MACHDEP_OBJS" >&5 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4677 | if test -z "$MACHDEP_OBJS" |
| 4678 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4679 | MACHDEP_OBJS=$extra_machdep_objs |
| 4680 | else |
| 4681 | MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4682 | fi |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4683 | echo "$ac_t""MACHDEP_OBJS" 1>&6 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4684 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4685 | # checks for library functions |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4686 | for ac_func in alarm chown clock confstr ctermid ctermid_r execv \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4687 | flock fork fsync fdatasync fpathconf ftime ftruncate \ |
Martin v. Löwis | f95dd0a | 2001-08-15 17:14:33 +0000 | [diff] [blame] | 4688 | gai_strerror getgroups getlogin getpeername getpid getpwent getwd \ |
Martin v. Löwis | 864e9ff | 2001-08-04 22:32:03 +0000 | [diff] [blame] | 4689 | hstrerror inet_pton kill link lstat mkfifo mktime mremap \ |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 4690 | nice pathconf pause plock poll pthread_init \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4691 | putenv readlink \ |
Andrew M. Kuchling | 8d2f2b2 | 2000-07-13 01:26:58 +0000 | [diff] [blame] | 4692 | select setegid seteuid setgid \ |
Martin v. Löwis | 791bfda | 2001-07-24 06:33:08 +0000 | [diff] [blame] | 4693 | setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4694 | sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ |
Fred Drake | 89143df | 1999-12-09 22:03:25 +0000 | [diff] [blame] | 4695 | tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Thomas Wouters | c2c12dc | 2001-07-11 14:45:34 +0000 | [diff] [blame] | 4696 | truncate uname waitpid _getpty getpriority |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4697 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4698 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4699 | echo "configure:4700: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4700 | 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] | 4701 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4702 | else |
| 4703 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4704 | #line 4705 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4705 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4706 | /* System header to define __stub macros and hopefully few prototypes, |
| 4707 | which can conflict with char $ac_func(); below. */ |
| 4708 | #include <assert.h> |
| 4709 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4710 | /* We use char because int might match the return type of a gcc2 |
| 4711 | builtin and then its argument prototype would still apply. */ |
| 4712 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4713 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4714 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4715 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4716 | /* The GNU C library defines this for functions which it implements |
| 4717 | to always fail with ENOSYS. Some functions are actually named |
| 4718 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4719 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4720 | choke me |
| 4721 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4722 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4723 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4724 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4725 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4726 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4727 | if { (eval echo configure:4728: \"$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] | 4728 | rm -rf conftest* |
| 4729 | eval "ac_cv_func_$ac_func=yes" |
| 4730 | else |
| 4731 | echo "configure: failed program was:" >&5 |
| 4732 | cat conftest.$ac_ext >&5 |
| 4733 | rm -rf conftest* |
| 4734 | eval "ac_cv_func_$ac_func=no" |
| 4735 | fi |
| 4736 | rm -f conftest* |
| 4737 | fi |
| 4738 | |
| 4739 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4740 | echo "$ac_t""yes" 1>&6 |
| 4741 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4742 | cat >> confdefs.h <<EOF |
| 4743 | #define $ac_tr_func 1 |
| 4744 | EOF |
| 4745 | |
| 4746 | else |
| 4747 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4748 | fi |
| 4749 | done |
| 4750 | |
| 4751 | |
| 4752 | # check for openpty and forkpty |
| 4753 | |
| 4754 | for ac_func in openpty |
| 4755 | do |
| 4756 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4757 | echo "configure:4758: checking for $ac_func" >&5 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4758 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4759 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4760 | else |
| 4761 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4762 | #line 4763 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4763 | #include "confdefs.h" |
| 4764 | /* System header to define __stub macros and hopefully few prototypes, |
| 4765 | which can conflict with char $ac_func(); below. */ |
| 4766 | #include <assert.h> |
| 4767 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4768 | /* We use char because int might match the return type of a gcc2 |
| 4769 | builtin and then its argument prototype would still apply. */ |
| 4770 | char $ac_func(); |
| 4771 | |
| 4772 | int main() { |
| 4773 | |
| 4774 | /* The GNU C library defines this for functions which it implements |
| 4775 | to always fail with ENOSYS. Some functions are actually named |
| 4776 | something starting with __ and the normal name is an alias. */ |
| 4777 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4778 | choke me |
| 4779 | #else |
| 4780 | $ac_func(); |
| 4781 | #endif |
| 4782 | |
| 4783 | ; return 0; } |
| 4784 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4785 | if { (eval echo configure:4786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4786 | rm -rf conftest* |
| 4787 | eval "ac_cv_func_$ac_func=yes" |
| 4788 | else |
| 4789 | echo "configure: failed program was:" >&5 |
| 4790 | cat conftest.$ac_ext >&5 |
| 4791 | rm -rf conftest* |
| 4792 | eval "ac_cv_func_$ac_func=no" |
| 4793 | fi |
| 4794 | rm -f conftest* |
| 4795 | fi |
| 4796 | |
| 4797 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4798 | echo "$ac_t""yes" 1>&6 |
| 4799 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4800 | cat >> confdefs.h <<EOF |
| 4801 | #define $ac_tr_func 1 |
| 4802 | EOF |
| 4803 | |
| 4804 | else |
| 4805 | echo "$ac_t""no" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4806 | echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4807 | echo "configure:4808: checking for openpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4808 | ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4809 | 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] | 4810 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4811 | else |
| 4812 | ac_save_LIBS="$LIBS" |
| 4813 | LIBS="-lutil $LIBS" |
| 4814 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4815 | #line 4816 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4816 | #include "confdefs.h" |
| 4817 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4818 | /* We use char because int might match the return type of a gcc2 |
| 4819 | builtin and then its argument prototype would still apply. */ |
| 4820 | char openpty(); |
| 4821 | |
| 4822 | int main() { |
| 4823 | openpty() |
| 4824 | ; return 0; } |
| 4825 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4826 | if { (eval echo configure:4827: \"$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] | 4827 | rm -rf conftest* |
| 4828 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4829 | else |
| 4830 | echo "configure: failed program was:" >&5 |
| 4831 | cat conftest.$ac_ext >&5 |
| 4832 | rm -rf conftest* |
| 4833 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4834 | fi |
| 4835 | rm -f conftest* |
| 4836 | LIBS="$ac_save_LIBS" |
| 4837 | |
| 4838 | fi |
| 4839 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4840 | echo "$ac_t""yes" 1>&6 |
| 4841 | cat >> confdefs.h <<\EOF |
| 4842 | #define HAVE_OPENPTY 1 |
| 4843 | EOF |
| 4844 | LIBS="$LIBS -lutil" |
| 4845 | else |
| 4846 | echo "$ac_t""no" 1>&6 |
| 4847 | fi |
| 4848 | |
| 4849 | fi |
| 4850 | done |
| 4851 | |
| 4852 | for ac_func in forkpty |
| 4853 | do |
| 4854 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4855 | echo "configure:4856: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4856 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4857 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4858 | else |
| 4859 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4860 | #line 4861 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4861 | #include "confdefs.h" |
| 4862 | /* System header to define __stub macros and hopefully few prototypes, |
| 4863 | which can conflict with char $ac_func(); below. */ |
| 4864 | #include <assert.h> |
| 4865 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4866 | /* We use char because int might match the return type of a gcc2 |
| 4867 | builtin and then its argument prototype would still apply. */ |
| 4868 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4869 | |
| 4870 | int main() { |
| 4871 | |
| 4872 | /* The GNU C library defines this for functions which it implements |
| 4873 | to always fail with ENOSYS. Some functions are actually named |
| 4874 | something starting with __ and the normal name is an alias. */ |
| 4875 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4876 | choke me |
| 4877 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4878 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4879 | #endif |
| 4880 | |
| 4881 | ; return 0; } |
| 4882 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4883 | if { (eval echo configure:4884: \"$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] | 4884 | rm -rf conftest* |
| 4885 | eval "ac_cv_func_$ac_func=yes" |
| 4886 | else |
| 4887 | echo "configure: failed program was:" >&5 |
| 4888 | cat conftest.$ac_ext >&5 |
| 4889 | rm -rf conftest* |
| 4890 | eval "ac_cv_func_$ac_func=no" |
| 4891 | fi |
| 4892 | rm -f conftest* |
| 4893 | fi |
| 4894 | |
| 4895 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4896 | echo "$ac_t""yes" 1>&6 |
| 4897 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4898 | cat >> confdefs.h <<EOF |
| 4899 | #define $ac_tr_func 1 |
| 4900 | EOF |
| 4901 | |
| 4902 | else |
| 4903 | echo "$ac_t""no" 1>&6 |
| 4904 | echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4905 | echo "configure:4906: checking for forkpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4906 | ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4907 | 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] | 4908 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4909 | else |
| 4910 | ac_save_LIBS="$LIBS" |
| 4911 | LIBS="-lutil $LIBS" |
| 4912 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4913 | #line 4914 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4914 | #include "confdefs.h" |
| 4915 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4916 | /* We use char because int might match the return type of a gcc2 |
| 4917 | builtin and then its argument prototype would still apply. */ |
| 4918 | char forkpty(); |
| 4919 | |
| 4920 | int main() { |
| 4921 | forkpty() |
| 4922 | ; return 0; } |
| 4923 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4924 | if { (eval echo configure:4925: \"$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] | 4925 | rm -rf conftest* |
| 4926 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4927 | else |
| 4928 | echo "configure: failed program was:" >&5 |
| 4929 | cat conftest.$ac_ext >&5 |
| 4930 | rm -rf conftest* |
| 4931 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4932 | fi |
| 4933 | rm -f conftest* |
| 4934 | LIBS="$ac_save_LIBS" |
| 4935 | |
| 4936 | fi |
| 4937 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4938 | echo "$ac_t""yes" 1>&6 |
| 4939 | cat >> confdefs.h <<\EOF |
| 4940 | #define HAVE_FORKPTY 1 |
| 4941 | EOF |
| 4942 | LIBS="$LIBS -lutil" |
| 4943 | else |
| 4944 | echo "$ac_t""no" 1>&6 |
| 4945 | fi |
| 4946 | |
| 4947 | fi |
| 4948 | done |
| 4949 | |
| 4950 | |
| 4951 | # check for long file support functions |
| 4952 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
| 4953 | do |
| 4954 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4955 | echo "configure:4956: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4956 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4957 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4958 | else |
| 4959 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4960 | #line 4961 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4961 | #include "confdefs.h" |
| 4962 | /* System header to define __stub macros and hopefully few prototypes, |
| 4963 | which can conflict with char $ac_func(); below. */ |
| 4964 | #include <assert.h> |
| 4965 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4966 | /* We use char because int might match the return type of a gcc2 |
| 4967 | builtin and then its argument prototype would still apply. */ |
| 4968 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4969 | |
| 4970 | int main() { |
| 4971 | |
| 4972 | /* The GNU C library defines this for functions which it implements |
| 4973 | to always fail with ENOSYS. Some functions are actually named |
| 4974 | something starting with __ and the normal name is an alias. */ |
| 4975 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4976 | choke me |
| 4977 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4978 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4979 | #endif |
| 4980 | |
| 4981 | ; return 0; } |
| 4982 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 4983 | if { (eval echo configure:4984: \"$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] | 4984 | rm -rf conftest* |
| 4985 | eval "ac_cv_func_$ac_func=yes" |
| 4986 | else |
| 4987 | echo "configure: failed program was:" >&5 |
| 4988 | cat conftest.$ac_ext >&5 |
| 4989 | rm -rf conftest* |
| 4990 | eval "ac_cv_func_$ac_func=no" |
| 4991 | fi |
| 4992 | rm -f conftest* |
| 4993 | fi |
| 4994 | |
| 4995 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4996 | echo "$ac_t""yes" 1>&6 |
| 4997 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4998 | cat >> confdefs.h <<EOF |
| 4999 | #define $ac_tr_func 1 |
| 5000 | EOF |
| 5001 | |
| 5002 | else |
| 5003 | echo "$ac_t""no" 1>&6 |
| 5004 | fi |
| 5005 | done |
| 5006 | |
| 5007 | |
| 5008 | for ac_func in dup2 getcwd strdup strerror memmove |
| 5009 | do |
| 5010 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5011 | echo "configure:5012: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5012 | 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] | 5013 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5014 | else |
| 5015 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5016 | #line 5017 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5017 | #include "confdefs.h" |
| 5018 | /* System header to define __stub macros and hopefully few prototypes, |
| 5019 | which can conflict with char $ac_func(); below. */ |
| 5020 | #include <assert.h> |
| 5021 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5022 | /* We use char because int might match the return type of a gcc2 |
| 5023 | builtin and then its argument prototype would still apply. */ |
| 5024 | char $ac_func(); |
| 5025 | |
| 5026 | int main() { |
| 5027 | |
| 5028 | /* The GNU C library defines this for functions which it implements |
| 5029 | to always fail with ENOSYS. Some functions are actually named |
| 5030 | something starting with __ and the normal name is an alias. */ |
| 5031 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5032 | choke me |
| 5033 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5034 | $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5035 | #endif |
| 5036 | |
| 5037 | ; return 0; } |
| 5038 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5039 | if { (eval echo configure:5040: \"$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] | 5040 | rm -rf conftest* |
| 5041 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5042 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5043 | echo "configure: failed program was:" >&5 |
| 5044 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5045 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5046 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5047 | fi |
| 5048 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5049 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5050 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5051 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5052 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5053 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5054 | cat >> confdefs.h <<EOF |
| 5055 | #define $ac_tr_func 1 |
| 5056 | EOF |
| 5057 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5058 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5059 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 5060 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5061 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5062 | done |
| 5063 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5064 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5065 | for ac_func in getpgrp |
| 5066 | do |
| 5067 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5068 | echo "configure:5069: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5069 | 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] | 5070 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5071 | else |
| 5072 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5073 | #line 5074 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5074 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5075 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5076 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5077 | #include <assert.h> |
| 5078 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5079 | /* We use char because int might match the return type of a gcc2 |
| 5080 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5081 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5082 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5083 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5084 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5085 | /* The GNU C library defines this for functions which it implements |
| 5086 | to always fail with ENOSYS. Some functions are actually named |
| 5087 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5088 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5089 | choke me |
| 5090 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5091 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5092 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5093 | |
| 5094 | ; return 0; } |
| 5095 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5096 | if { (eval echo configure:5097: \"$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] | 5097 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5098 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5099 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5100 | echo "configure: failed program was:" >&5 |
| 5101 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5102 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5103 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5104 | fi |
| 5105 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5106 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5107 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5108 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5109 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5110 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5111 | cat >> confdefs.h <<EOF |
| 5112 | #define $ac_tr_func 1 |
| 5113 | EOF |
| 5114 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5115 | #line 5116 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5116 | #include "confdefs.h" |
| 5117 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5118 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5119 | getpgrp(0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5120 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5121 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5122 | if { (eval echo configure:5123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5123 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5124 | cat >> confdefs.h <<\EOF |
| 5125 | #define GETPGRP_HAVE_ARG 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5126 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5127 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5128 | else |
| 5129 | echo "configure: failed program was:" >&5 |
| 5130 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5131 | fi |
| 5132 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5133 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5134 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5135 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5136 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5137 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5138 | for ac_func in setpgrp |
| 5139 | do |
| 5140 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5141 | echo "configure:5142: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5142 | 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] | 5143 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5144 | else |
| 5145 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5146 | #line 5147 "configure" |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5147 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5148 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5149 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5150 | #include <assert.h> |
| 5151 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5152 | /* We use char because int might match the return type of a gcc2 |
| 5153 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5154 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5155 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5156 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5157 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5158 | /* The GNU C library defines this for functions which it implements |
| 5159 | to always fail with ENOSYS. Some functions are actually named |
| 5160 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5161 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5162 | choke me |
| 5163 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5164 | $ac_func(); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5165 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5166 | |
| 5167 | ; return 0; } |
| 5168 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5169 | if { (eval echo configure:5170: \"$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] | 5170 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5171 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5172 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5173 | echo "configure: failed program was:" >&5 |
| 5174 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5175 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5176 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5177 | fi |
| 5178 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5179 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5180 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5181 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5182 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5183 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5184 | cat >> confdefs.h <<EOF |
| 5185 | #define $ac_tr_func 1 |
| 5186 | EOF |
| 5187 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5188 | #line 5189 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5189 | #include "confdefs.h" |
| 5190 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5191 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5192 | setpgrp(0,0); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5193 | ; return 0; } |
| 5194 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5195 | if { (eval echo configure:5196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5196 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5197 | cat >> confdefs.h <<\EOF |
| 5198 | #define SETPGRP_HAVE_ARG 1 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5199 | EOF |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5200 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5201 | else |
| 5202 | echo "configure: failed program was:" >&5 |
| 5203 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5204 | fi |
| 5205 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5206 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5207 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5208 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5209 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5210 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5211 | for ac_func in gettimeofday |
| 5212 | do |
| 5213 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5214 | echo "configure:5215: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5215 | 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] | 5216 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5217 | else |
| 5218 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5219 | #line 5220 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5220 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5221 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5222 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5223 | #include <assert.h> |
| 5224 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5225 | /* We use char because int might match the return type of a gcc2 |
| 5226 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5227 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5228 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5229 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5230 | |
| 5231 | /* The GNU C library defines this for functions which it implements |
| 5232 | to always fail with ENOSYS. Some functions are actually named |
| 5233 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5234 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5235 | choke me |
| 5236 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5237 | $ac_func(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5238 | #endif |
| 5239 | |
| 5240 | ; return 0; } |
| 5241 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5242 | if { (eval echo configure:5243: \"$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] | 5243 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5244 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5245 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5246 | echo "configure: failed program was:" >&5 |
| 5247 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5248 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5249 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5250 | fi |
| 5251 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5252 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5253 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5254 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5255 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5256 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5257 | cat >> confdefs.h <<EOF |
| 5258 | #define $ac_tr_func 1 |
| 5259 | EOF |
| 5260 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5261 | #line 5262 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5262 | #include "confdefs.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5263 | #include <sys/time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5264 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5265 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
| 5266 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5267 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5268 | if { (eval echo configure:5269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5269 | : |
| 5270 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5271 | echo "configure: failed program was:" >&5 |
| 5272 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5273 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5274 | cat >> confdefs.h <<\EOF |
| 5275 | #define GETTIMEOFDAY_NO_TZ 1 |
| 5276 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5277 | |
| 5278 | fi |
| 5279 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5280 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5281 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5282 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5283 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5284 | |
| 5285 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5286 | for ac_func in getaddrinfo |
| 5287 | do |
| 5288 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5289 | echo "configure:5290: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5290 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5291 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5292 | else |
| 5293 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5294 | #line 5295 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5295 | #include "confdefs.h" |
| 5296 | /* System header to define __stub macros and hopefully few prototypes, |
| 5297 | which can conflict with char $ac_func(); below. */ |
| 5298 | #include <assert.h> |
| 5299 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5300 | /* We use char because int might match the return type of a gcc2 |
| 5301 | builtin and then its argument prototype would still apply. */ |
| 5302 | char $ac_func(); |
| 5303 | |
| 5304 | int main() { |
| 5305 | |
| 5306 | /* The GNU C library defines this for functions which it implements |
| 5307 | to always fail with ENOSYS. Some functions are actually named |
| 5308 | something starting with __ and the normal name is an alias. */ |
| 5309 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5310 | choke me |
| 5311 | #else |
| 5312 | $ac_func(); |
| 5313 | #endif |
| 5314 | |
| 5315 | ; return 0; } |
| 5316 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5317 | if { (eval echo configure:5318: \"$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] | 5318 | rm -rf conftest* |
| 5319 | eval "ac_cv_func_$ac_func=yes" |
| 5320 | else |
| 5321 | echo "configure: failed program was:" >&5 |
| 5322 | cat conftest.$ac_ext >&5 |
| 5323 | rm -rf conftest* |
| 5324 | eval "ac_cv_func_$ac_func=no" |
| 5325 | fi |
| 5326 | rm -f conftest* |
| 5327 | fi |
| 5328 | |
| 5329 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5330 | echo "$ac_t""yes" 1>&6 |
| 5331 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5332 | cat >> confdefs.h <<EOF |
| 5333 | #define $ac_tr_func 1 |
| 5334 | EOF |
| 5335 | echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5336 | echo "configure:5337: checking getaddrinfo bug" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5337 | if test "$cross_compiling" = yes; then |
| 5338 | echo "$ac_t""buggy" 1>&6 |
| 5339 | buggygetaddrinfo=yes |
| 5340 | else |
| 5341 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5342 | #line 5343 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5343 | #include "confdefs.h" |
| 5344 | |
| 5345 | #include <sys/types.h> |
| 5346 | #include <netdb.h> |
| 5347 | #include <string.h> |
| 5348 | #include <sys/socket.h> |
| 5349 | #include <netinet/in.h> |
| 5350 | |
| 5351 | main() |
| 5352 | { |
| 5353 | int passive, gaierr, inet4 = 0, inet6 = 0; |
| 5354 | struct addrinfo hints, *ai, *aitop; |
| 5355 | char straddr[INET6_ADDRSTRLEN], strport[16]; |
| 5356 | |
| 5357 | for (passive = 0; passive <= 1; passive++) { |
| 5358 | memset(&hints, 0, sizeof(hints)); |
| 5359 | hints.ai_family = AF_UNSPEC; |
| 5360 | hints.ai_flags = passive ? AI_PASSIVE : 0; |
| 5361 | hints.ai_socktype = SOCK_STREAM; |
| 5362 | if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { |
| 5363 | (void)gai_strerror(gaierr); |
| 5364 | goto bad; |
| 5365 | } |
| 5366 | for (ai = aitop; ai; ai = ai->ai_next) { |
| 5367 | if (ai->ai_addr == NULL || |
| 5368 | ai->ai_addrlen == 0 || |
| 5369 | getnameinfo(ai->ai_addr, ai->ai_addrlen, |
| 5370 | straddr, sizeof(straddr), strport, sizeof(strport), |
| 5371 | NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
| 5372 | goto bad; |
| 5373 | } |
| 5374 | switch (ai->ai_family) { |
| 5375 | case AF_INET: |
| 5376 | if (strcmp(strport, "54321") != 0) { |
| 5377 | goto bad; |
| 5378 | } |
| 5379 | if (passive) { |
| 5380 | if (strcmp(straddr, "0.0.0.0") != 0) { |
| 5381 | goto bad; |
| 5382 | } |
| 5383 | } else { |
| 5384 | if (strcmp(straddr, "127.0.0.1") != 0) { |
| 5385 | goto bad; |
| 5386 | } |
| 5387 | } |
| 5388 | inet4++; |
| 5389 | break; |
| 5390 | case AF_INET6: |
| 5391 | if (strcmp(strport, "54321") != 0) { |
| 5392 | goto bad; |
| 5393 | } |
| 5394 | if (passive) { |
| 5395 | if (strcmp(straddr, "::") != 0) { |
| 5396 | goto bad; |
| 5397 | } |
| 5398 | } else { |
| 5399 | if (strcmp(straddr, "::1") != 0) { |
| 5400 | goto bad; |
| 5401 | } |
| 5402 | } |
| 5403 | inet6++; |
| 5404 | break; |
| 5405 | case AF_UNSPEC: |
| 5406 | goto bad; |
| 5407 | break; |
| 5408 | default: |
| 5409 | /* another family support? */ |
| 5410 | break; |
| 5411 | } |
| 5412 | } |
| 5413 | } |
| 5414 | |
| 5415 | if (!(inet4 == 0 || inet4 == 2)) |
| 5416 | goto bad; |
| 5417 | if (!(inet6 == 0 || inet6 == 2)) |
| 5418 | goto bad; |
| 5419 | |
| 5420 | if (aitop) |
| 5421 | freeaddrinfo(aitop); |
| 5422 | exit(0); |
| 5423 | |
| 5424 | bad: |
| 5425 | if (aitop) |
| 5426 | freeaddrinfo(aitop); |
| 5427 | exit(1); |
| 5428 | } |
| 5429 | |
| 5430 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5431 | if { (eval echo configure:5432: \"$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] | 5432 | then |
| 5433 | echo "$ac_t""good" 1>&6 |
| 5434 | buggygetaddrinfo=no |
| 5435 | else |
| 5436 | echo "configure: failed program was:" >&5 |
| 5437 | cat conftest.$ac_ext >&5 |
| 5438 | rm -fr conftest* |
| 5439 | echo "$ac_t""buggy" 1>&6 |
| 5440 | buggygetaddrinfo=yes |
| 5441 | fi |
| 5442 | rm -fr conftest* |
| 5443 | fi |
| 5444 | |
| 5445 | else |
| 5446 | echo "$ac_t""no" 1>&6 |
| 5447 | buggygetaddrinfo=yes |
| 5448 | fi |
| 5449 | done |
| 5450 | |
| 5451 | |
| 5452 | if test "$buggygetaddrinfo" = "yes"; then |
| 5453 | if test "$ipv6" = "yes"; then |
| 5454 | echo 'Fatal: You must get working getaddrinfo() function.' |
| 5455 | echo ' or you can specify "--disable-ipv6"'. |
| 5456 | exit 1 |
| 5457 | fi |
| 5458 | fi |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5459 | for ac_func in getnameinfo |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5460 | do |
| 5461 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5462 | echo "configure:5463: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5463 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5464 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5465 | else |
| 5466 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5467 | #line 5468 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5468 | #include "confdefs.h" |
| 5469 | /* System header to define __stub macros and hopefully few prototypes, |
| 5470 | which can conflict with char $ac_func(); below. */ |
| 5471 | #include <assert.h> |
| 5472 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5473 | /* We use char because int might match the return type of a gcc2 |
| 5474 | builtin and then its argument prototype would still apply. */ |
| 5475 | char $ac_func(); |
| 5476 | |
| 5477 | int main() { |
| 5478 | |
| 5479 | /* The GNU C library defines this for functions which it implements |
| 5480 | to always fail with ENOSYS. Some functions are actually named |
| 5481 | something starting with __ and the normal name is an alias. */ |
| 5482 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5483 | choke me |
| 5484 | #else |
| 5485 | $ac_func(); |
| 5486 | #endif |
| 5487 | |
| 5488 | ; return 0; } |
| 5489 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5490 | if { (eval echo configure:5491: \"$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] | 5491 | rm -rf conftest* |
| 5492 | eval "ac_cv_func_$ac_func=yes" |
| 5493 | else |
| 5494 | echo "configure: failed program was:" >&5 |
| 5495 | cat conftest.$ac_ext >&5 |
| 5496 | rm -rf conftest* |
| 5497 | eval "ac_cv_func_$ac_func=no" |
| 5498 | fi |
| 5499 | rm -f conftest* |
| 5500 | fi |
| 5501 | |
| 5502 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5503 | echo "$ac_t""yes" 1>&6 |
| 5504 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5505 | cat >> confdefs.h <<EOF |
| 5506 | #define $ac_tr_func 1 |
| 5507 | EOF |
| 5508 | |
| 5509 | else |
| 5510 | echo "$ac_t""no" 1>&6 |
| 5511 | fi |
| 5512 | done |
| 5513 | |
| 5514 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5515 | # checks for structures |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5516 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5517 | echo "configure:5518: 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] | 5518 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5519 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5520 | else |
| 5521 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5522 | #line 5523 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5523 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5524 | #include <sys/types.h> |
| 5525 | #include <sys/time.h> |
| 5526 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5527 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5528 | struct tm *tp; |
| 5529 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5530 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5531 | if { (eval echo configure:5532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5532 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5533 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5534 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5535 | echo "configure: failed program was:" >&5 |
| 5536 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5537 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5538 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5539 | fi |
| 5540 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5541 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5542 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5543 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5544 | if test $ac_cv_header_time = yes; then |
| 5545 | cat >> confdefs.h <<\EOF |
| 5546 | #define TIME_WITH_SYS_TIME 1 |
| 5547 | EOF |
| 5548 | |
| 5549 | fi |
| 5550 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5551 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5552 | echo "configure:5553: 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] | 5553 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5554 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5555 | else |
| 5556 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5557 | #line 5558 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5558 | #include "confdefs.h" |
| 5559 | #include <sys/types.h> |
| 5560 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5561 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5562 | struct tm *tp; tp->tm_sec; |
| 5563 | ; return 0; } |
| 5564 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5565 | if { (eval echo configure:5566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5566 | rm -rf conftest* |
| 5567 | ac_cv_struct_tm=time.h |
| 5568 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5569 | echo "configure: failed program was:" >&5 |
| 5570 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5571 | rm -rf conftest* |
| 5572 | ac_cv_struct_tm=sys/time.h |
| 5573 | fi |
| 5574 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5575 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5576 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5577 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5578 | if test $ac_cv_struct_tm = sys/time.h; then |
| 5579 | cat >> confdefs.h <<\EOF |
| 5580 | #define TM_IN_SYS_TIME 1 |
| 5581 | EOF |
| 5582 | |
| 5583 | fi |
| 5584 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5585 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5586 | echo "configure:5587: checking for tm_zone in struct tm" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5587 | 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] | 5588 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5589 | else |
| 5590 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5591 | #line 5592 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5592 | #include "confdefs.h" |
| 5593 | #include <sys/types.h> |
| 5594 | #include <$ac_cv_struct_tm> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5595 | int main() { |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5596 | struct tm tm; tm.tm_zone; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5597 | ; return 0; } |
| 5598 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5599 | if { (eval echo configure:5600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5600 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5601 | ac_cv_struct_tm_zone=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5602 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5603 | echo "configure: failed program was:" >&5 |
| 5604 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5605 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5606 | ac_cv_struct_tm_zone=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5607 | fi |
| 5608 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5609 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5610 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5611 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 |
| 5612 | if test "$ac_cv_struct_tm_zone" = yes; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5613 | cat >> confdefs.h <<\EOF |
| 5614 | #define HAVE_TM_ZONE 1 |
| 5615 | EOF |
| 5616 | |
| 5617 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5618 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5619 | echo "configure:5620: checking for tzname" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5620 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5621 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5622 | else |
| 5623 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5624 | #line 5625 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5625 | #include "confdefs.h" |
| 5626 | #include <time.h> |
| 5627 | #ifndef tzname /* For SGI. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5628 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5629 | #endif |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5630 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5631 | atoi(*tzname); |
| 5632 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5633 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5634 | if { (eval echo configure:5635: \"$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] | 5635 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5636 | ac_cv_var_tzname=yes |
| 5637 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5638 | echo "configure: failed program was:" >&5 |
| 5639 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5640 | rm -rf conftest* |
| 5641 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5642 | fi |
| 5643 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5644 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5645 | |
| 5646 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5647 | if test $ac_cv_var_tzname = yes; then |
| 5648 | cat >> confdefs.h <<\EOF |
| 5649 | #define HAVE_TZNAME 1 |
| 5650 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5651 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5652 | fi |
| 5653 | fi |
| 5654 | |
| 5655 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5656 | echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5657 | echo "configure:5658: checking for time.h that defines altzone" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5658 | 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] | 5659 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5660 | else |
| 5661 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5662 | #line 5663 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5663 | #include "confdefs.h" |
| 5664 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5665 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5666 | return altzone; |
| 5667 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5668 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5669 | if { (eval echo configure:5670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5670 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5671 | ac_cv_header_time_altzone=yes |
| 5672 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5673 | echo "configure: failed program was:" >&5 |
| 5674 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5675 | rm -rf conftest* |
| 5676 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5677 | fi |
| 5678 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5679 | fi |
| 5680 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5681 | echo "$ac_t""$ac_cv_header_time_altzone" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5682 | if test $ac_cv_header_time_altzone = yes; then |
| 5683 | cat >> confdefs.h <<\EOF |
| 5684 | #define HAVE_ALTZONE 1 |
| 5685 | EOF |
| 5686 | |
| 5687 | fi |
| 5688 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5689 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5690 | echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5691 | echo "configure:5692: 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] | 5692 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5693 | #line 5694 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5694 | #include "confdefs.h" |
| 5695 | |
| 5696 | #include <sys/types.h> |
| 5697 | #include <sys/select.h> |
| 5698 | #include <sys/time.h> |
| 5699 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5700 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5701 | ; |
| 5702 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5703 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5704 | if { (eval echo configure:5705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5705 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5706 | cat >> confdefs.h <<\EOF |
| 5707 | #define SYS_SELECT_WITH_SYS_TIME 1 |
| 5708 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5709 | was_it_defined=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5710 | else |
| 5711 | echo "configure: failed program was:" >&5 |
| 5712 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5713 | fi |
| 5714 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5715 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5716 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5717 | echo $ac_n "checking for addrinfo""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5718 | echo "configure:5719: checking for addrinfo" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5719 | if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then |
| 5720 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5721 | else |
| 5722 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5723 | #line 5724 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5724 | #include "confdefs.h" |
| 5725 | |
| 5726 | # include <netdb.h> |
| 5727 | int main() { |
| 5728 | struct addrinfo a |
| 5729 | ; return 0; } |
| 5730 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5731 | if { (eval echo configure:5732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5732 | rm -rf conftest* |
| 5733 | ac_cv_struct_addrinfo=yes |
| 5734 | else |
| 5735 | echo "configure: failed program was:" >&5 |
| 5736 | cat conftest.$ac_ext >&5 |
| 5737 | rm -rf conftest* |
| 5738 | ac_cv_struct_addrinfo=no |
| 5739 | fi |
| 5740 | rm -f conftest* |
| 5741 | fi |
| 5742 | |
| 5743 | echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6 |
| 5744 | if test $ac_cv_struct_addrinfo = yes; then |
| 5745 | cat >> confdefs.h <<\EOF |
| 5746 | #define HAVE_ADDRINFO 1 |
| 5747 | EOF |
| 5748 | |
| 5749 | fi |
| 5750 | |
| 5751 | echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5752 | echo "configure:5753: checking for sockaddr_storage" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5753 | if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then |
| 5754 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5755 | else |
| 5756 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5757 | #line 5758 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5758 | #include "confdefs.h" |
| 5759 | |
| 5760 | # include <sys/types.h> |
| 5761 | # include <sys/socket.h> |
| 5762 | int main() { |
| 5763 | struct sockaddr_storage s |
| 5764 | ; return 0; } |
| 5765 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5766 | if { (eval echo configure:5767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5767 | rm -rf conftest* |
| 5768 | ac_cv_struct_sockaddr_storage=yes |
| 5769 | else |
| 5770 | echo "configure: failed program was:" >&5 |
| 5771 | cat conftest.$ac_ext >&5 |
| 5772 | rm -rf conftest* |
| 5773 | ac_cv_struct_sockaddr_storage=no |
| 5774 | fi |
| 5775 | rm -f conftest* |
| 5776 | fi |
| 5777 | |
| 5778 | echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6 |
| 5779 | if test $ac_cv_struct_sockaddr_storage = yes; then |
| 5780 | cat >> confdefs.h <<\EOF |
| 5781 | #define HAVE_SOCKADDR_STORAGE 1 |
| 5782 | EOF |
| 5783 | |
| 5784 | fi |
| 5785 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5786 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5787 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5788 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5789 | echo "configure:5790: checking whether char is unsigned" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5790 | 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] | 5791 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5792 | else |
| 5793 | if test "$GCC" = yes; then |
| 5794 | # GCC predefines this symbol on systems where it applies. |
| 5795 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5796 | #line 5797 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5797 | #include "confdefs.h" |
| 5798 | #ifdef __CHAR_UNSIGNED__ |
| 5799 | yes |
| 5800 | #endif |
| 5801 | |
| 5802 | EOF |
| 5803 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 5804 | egrep "yes" >/dev/null 2>&1; then |
| 5805 | rm -rf conftest* |
| 5806 | ac_cv_c_char_unsigned=yes |
| 5807 | else |
| 5808 | rm -rf conftest* |
| 5809 | ac_cv_c_char_unsigned=no |
| 5810 | fi |
| 5811 | rm -f conftest* |
| 5812 | |
| 5813 | else |
| 5814 | if test "$cross_compiling" = yes; then |
| 5815 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5816 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5817 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5818 | #line 5819 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5819 | #include "confdefs.h" |
| 5820 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5821 | #if !defined(__STDC__) || __STDC__ != 1 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5822 | #define volatile |
| 5823 | #endif |
| 5824 | main() { |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5825 | volatile char c = 255; exit(c < 0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5826 | } |
| 5827 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5828 | if { (eval echo configure:5829: \"$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] | 5829 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5830 | ac_cv_c_char_unsigned=yes |
| 5831 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5832 | echo "configure: failed program was:" >&5 |
| 5833 | cat conftest.$ac_ext >&5 |
| 5834 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5835 | ac_cv_c_char_unsigned=no |
| 5836 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5837 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5838 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5839 | |
| 5840 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5841 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5842 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5843 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5844 | if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then |
| 5845 | cat >> confdefs.h <<\EOF |
| 5846 | #define __CHAR_UNSIGNED__ 1 |
| 5847 | EOF |
| 5848 | |
| 5849 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5850 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5851 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5852 | echo "configure:5853: checking for working const" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5853 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5854 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5855 | else |
| 5856 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5857 | #line 5858 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5858 | #include "confdefs.h" |
| 5859 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5860 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5861 | |
| 5862 | /* Ultrix mips cc rejects this. */ |
Martin v. Löwis | 9db2f57 | 2001-07-23 01:30:10 +0000 | [diff] [blame] | 5863 | typedef int charset[2]; const charset x; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5864 | /* SunOS 4.1.1 cc rejects this. */ |
| 5865 | char const *const *ccp; |
| 5866 | char **p; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5867 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 5868 | struct point {int x, y;}; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5869 | static struct point const zero = {0,0}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5870 | /* AIX XL C 1.02.0.0 rejects this. |
| 5871 | It does not let you subtract one const X* pointer from another in an arm |
| 5872 | of an if-expression whose if-part is not a constant expression */ |
| 5873 | const char *g = "string"; |
| 5874 | ccp = &g + (g ? g-g : 0); |
| 5875 | /* HPUX 7.0 cc rejects these. */ |
| 5876 | ++ccp; |
| 5877 | p = (char**) ccp; |
| 5878 | ccp = (char const *const *) p; |
| 5879 | { /* SCO 3.2v4 cc rejects this. */ |
| 5880 | char *t; |
| 5881 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
| 5882 | |
| 5883 | *t++ = 0; |
| 5884 | } |
| 5885 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5886 | int x[] = {25, 17}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5887 | const int *foo = &x[0]; |
| 5888 | ++foo; |
| 5889 | } |
| 5890 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 5891 | typedef const int *iptr; |
| 5892 | iptr p = 0; |
| 5893 | ++p; |
| 5894 | } |
| 5895 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 5896 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 5897 | struct s { int j; const int *ap[3]; }; |
| 5898 | struct s *b; b->j = 5; |
| 5899 | } |
| 5900 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 5901 | const int foo = 10; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5902 | } |
| 5903 | |
| 5904 | ; return 0; } |
| 5905 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5906 | if { (eval echo configure:5907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5907 | rm -rf conftest* |
| 5908 | ac_cv_c_const=yes |
| 5909 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5910 | echo "configure: failed program was:" >&5 |
| 5911 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5912 | rm -rf conftest* |
| 5913 | ac_cv_c_const=no |
| 5914 | fi |
| 5915 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5916 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5917 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5918 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5919 | if test $ac_cv_c_const = no; then |
| 5920 | cat >> confdefs.h <<\EOF |
| 5921 | #define const |
| 5922 | EOF |
| 5923 | |
| 5924 | fi |
| 5925 | |
| 5926 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5927 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5928 | echo $ac_n "checking for working volatile""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5929 | echo "configure:5930: checking for working volatile" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5930 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5931 | #line 5932 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5932 | #include "confdefs.h" |
| 5933 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5934 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5935 | volatile int x; x = 0; |
| 5936 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5937 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5938 | if { (eval echo configure:5939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5939 | rm -rf conftest* |
| 5940 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5941 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5942 | echo "configure: failed program was:" >&5 |
| 5943 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5944 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5945 | cat >> confdefs.h <<\EOF |
| 5946 | #define volatile |
| 5947 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5948 | |
| 5949 | fi |
| 5950 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5951 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5952 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5953 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5954 | echo $ac_n "checking for working signed char""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5955 | echo "configure:5956: checking for working signed char" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5956 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5957 | #line 5958 "configure" |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5958 | #include "confdefs.h" |
| 5959 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5960 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5961 | signed char c; |
| 5962 | ; return 0; } |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5963 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5964 | if { (eval echo configure:5965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5965 | rm -rf conftest* |
| 5966 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5967 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5968 | echo "configure: failed program was:" >&5 |
| 5969 | cat conftest.$ac_ext >&5 |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5970 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5971 | cat >> confdefs.h <<\EOF |
| 5972 | #define signed |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5973 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5974 | |
| 5975 | fi |
| 5976 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5977 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5978 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5979 | have_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5980 | echo $ac_n "checking for prototypes""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5981 | echo "configure:5982: checking for prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5982 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5983 | #line 5984 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5984 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5985 | int foo(int x) { return 0; } |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5986 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5987 | return foo(10); |
| 5988 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5989 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 5990 | if { (eval echo configure:5991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5991 | rm -rf conftest* |
| 5992 | cat >> confdefs.h <<\EOF |
| 5993 | #define HAVE_PROTOTYPES 1 |
| 5994 | EOF |
| 5995 | have_prototypes=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5996 | else |
| 5997 | echo "configure: failed program was:" >&5 |
| 5998 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5999 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6000 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6001 | echo "$ac_t""$have_prototypes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6002 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6003 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6004 | echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6005 | echo "configure:6006: checking for variable length prototypes and stdarg.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6006 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6007 | #line 6008 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6008 | #include "confdefs.h" |
| 6009 | |
| 6010 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6011 | int foo(int x, ...) { |
| 6012 | va_list va; |
| 6013 | va_start(va, x); |
| 6014 | va_arg(va, int); |
| 6015 | va_arg(va, char *); |
| 6016 | va_arg(va, double); |
| 6017 | return 0; |
| 6018 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6019 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6020 | int main() { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6021 | return foo(10, "", 3.14); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6022 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6023 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6024 | if { (eval echo configure:6025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6025 | rm -rf conftest* |
| 6026 | cat >> confdefs.h <<\EOF |
| 6027 | #define HAVE_STDARG_PROTOTYPES 1 |
| 6028 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6029 | works=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6030 | else |
| 6031 | echo "configure: failed program was:" >&5 |
| 6032 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6033 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6034 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6035 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6036 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6037 | if test "$have_prototypes" = yes; then |
| 6038 | bad_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6039 | echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6040 | echo "configure:6041: checking for bad exec* prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6041 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6042 | #line 6043 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6043 | #include "confdefs.h" |
| 6044 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6045 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6046 | char **t;execve("@",t,t); |
| 6047 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6048 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6049 | if { (eval echo configure:6050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6050 | : |
| 6051 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6052 | echo "configure: failed program was:" >&5 |
| 6053 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6054 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6055 | cat >> confdefs.h <<\EOF |
| 6056 | #define BAD_EXEC_PROTOTYPES 1 |
| 6057 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6058 | bad_prototypes=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6059 | fi |
| 6060 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6061 | echo "$ac_t""$bad_prototypes" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6062 | fi |
| 6063 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6064 | # check if sockaddr has sa_len member |
| 6065 | echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6066 | echo "configure:6067: checking if sockaddr has sa_len member" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6067 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6068 | #line 6069 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6069 | #include "confdefs.h" |
| 6070 | #include <sys/types.h> |
| 6071 | #include <sys/socket.h> |
| 6072 | int main() { |
| 6073 | struct sockaddr x; |
| 6074 | x.sa_len = 0; |
| 6075 | ; return 0; } |
| 6076 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6077 | if { (eval echo configure:6078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6078 | rm -rf conftest* |
| 6079 | echo "$ac_t""yes" 1>&6 |
| 6080 | cat >> confdefs.h <<\EOF |
| 6081 | #define HAVE_SOCKADDR_SA_LEN 1 |
| 6082 | EOF |
| 6083 | |
| 6084 | else |
| 6085 | echo "configure: failed program was:" >&5 |
| 6086 | cat conftest.$ac_ext >&5 |
| 6087 | rm -rf conftest* |
| 6088 | echo "$ac_t""no" 1>&6 |
| 6089 | fi |
| 6090 | rm -f conftest* |
| 6091 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6092 | echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6093 | echo "configure:6094: checking for bad static forward" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6094 | if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then |
| 6095 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6096 | else |
| 6097 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6098 | ac_cv_bad_static_forward=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6099 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6100 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6101 | #line 6102 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6102 | #include "confdefs.h" |
| 6103 | |
| 6104 | struct s { int a; int b; }; |
| 6105 | static struct s foo; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6106 | int foobar() { |
| 6107 | static int random; |
| 6108 | random = (int) &foo; |
| 6109 | return random; |
| 6110 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6111 | static struct s foo = { 1, 2 }; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6112 | main() { |
| 6113 | exit(!((int)&foo == foobar())); |
| 6114 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6115 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6116 | if { (eval echo configure:6117: \"$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] | 6117 | then |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6118 | ac_cv_bad_static_forward=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6119 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6120 | echo "configure: failed program was:" >&5 |
| 6121 | cat conftest.$ac_ext >&5 |
| 6122 | rm -fr conftest* |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6123 | ac_cv_bad_static_forward=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6124 | fi |
| 6125 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6126 | fi |
| 6127 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6128 | fi |
| 6129 | |
| 6130 | echo "$ac_t""$ac_cv_bad_static_forward" 1>&6 |
| 6131 | if test "$ac_cv_bad_static_forward" = yes |
| 6132 | then |
| 6133 | cat >> confdefs.h <<\EOF |
| 6134 | #define BAD_STATIC_FORWARD 1 |
| 6135 | EOF |
| 6136 | |
| 6137 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6138 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6139 | va_list_is_array=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6140 | echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6141 | echo "configure:6142: checking whether va_list is an array" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6142 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6143 | #line 6144 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6144 | #include "confdefs.h" |
| 6145 | |
| 6146 | #ifdef HAVE_STDARG_PROTOTYPES |
| 6147 | #include <stdarg.h> |
| 6148 | #else |
| 6149 | #include <varargs.h> |
| 6150 | #endif |
| 6151 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6152 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6153 | va_list list1, list2; list1 = list2; |
| 6154 | ; return 0; } |
| 6155 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6156 | if { (eval echo configure:6157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6157 | : |
| 6158 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6159 | echo "configure: failed program was:" >&5 |
| 6160 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6161 | rm -rf conftest* |
| 6162 | cat >> confdefs.h <<\EOF |
| 6163 | #define VA_LIST_IS_ARRAY 1 |
| 6164 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6165 | va_list_is_array=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6166 | fi |
| 6167 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6168 | echo "$ac_t""$va_list_is_array" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6169 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6170 | # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( |
| 6171 | echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6172 | echo "configure:6173: checking for gethostbyname_r" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6173 | 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] | 6174 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6175 | else |
| 6176 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6177 | #line 6178 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6178 | #include "confdefs.h" |
| 6179 | /* System header to define __stub macros and hopefully few prototypes, |
| 6180 | which can conflict with char gethostbyname_r(); below. */ |
| 6181 | #include <assert.h> |
| 6182 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6183 | /* We use char because int might match the return type of a gcc2 |
| 6184 | builtin and then its argument prototype would still apply. */ |
| 6185 | char gethostbyname_r(); |
| 6186 | |
| 6187 | int main() { |
| 6188 | |
| 6189 | /* The GNU C library defines this for functions which it implements |
| 6190 | to always fail with ENOSYS. Some functions are actually named |
| 6191 | something starting with __ and the normal name is an alias. */ |
| 6192 | #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) |
| 6193 | choke me |
| 6194 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6195 | gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6196 | #endif |
| 6197 | |
| 6198 | ; return 0; } |
| 6199 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6200 | if { (eval echo configure:6201: \"$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] | 6201 | rm -rf conftest* |
| 6202 | eval "ac_cv_func_gethostbyname_r=yes" |
| 6203 | else |
| 6204 | echo "configure: failed program was:" >&5 |
| 6205 | cat conftest.$ac_ext >&5 |
| 6206 | rm -rf conftest* |
| 6207 | eval "ac_cv_func_gethostbyname_r=no" |
| 6208 | fi |
| 6209 | rm -f conftest* |
| 6210 | fi |
| 6211 | |
| 6212 | if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then |
| 6213 | echo "$ac_t""yes" 1>&6 |
| 6214 | |
| 6215 | cat >> confdefs.h <<\EOF |
| 6216 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6217 | EOF |
| 6218 | |
| 6219 | echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6220 | echo "configure:6221: checking gethostbyname_r with 6 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6221 | OLD_CFLAGS=$CFLAGS |
| 6222 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
| 6223 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6224 | #line 6225 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6225 | #include "confdefs.h" |
| 6226 | |
| 6227 | # include <netdb.h> |
| 6228 | |
| 6229 | int main() { |
| 6230 | |
| 6231 | char *name; |
| 6232 | struct hostent *he, *res; |
| 6233 | char buffer[2048]; |
| 6234 | int buflen = 2048; |
| 6235 | int h_errnop; |
| 6236 | |
| 6237 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
| 6238 | |
| 6239 | ; return 0; } |
| 6240 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6241 | if { (eval echo configure:6242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6242 | rm -rf conftest* |
| 6243 | |
| 6244 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6245 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6246 | EOF |
| 6247 | |
| 6248 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6249 | #define HAVE_GETHOSTBYNAME_R_6_ARG 1 |
| 6250 | EOF |
| 6251 | |
| 6252 | echo "$ac_t""yes" 1>&6 |
| 6253 | |
| 6254 | else |
| 6255 | echo "configure: failed program was:" >&5 |
| 6256 | cat conftest.$ac_ext >&5 |
| 6257 | rm -rf conftest* |
| 6258 | |
| 6259 | echo "$ac_t""no" 1>&6 |
| 6260 | echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6261 | echo "configure:6262: checking gethostbyname_r with 5 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6262 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6263 | #line 6264 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6264 | #include "confdefs.h" |
| 6265 | |
| 6266 | # include <netdb.h> |
| 6267 | |
| 6268 | int main() { |
| 6269 | |
| 6270 | char *name; |
| 6271 | struct hostent *he; |
| 6272 | char buffer[2048]; |
| 6273 | int buflen = 2048; |
| 6274 | int h_errnop; |
| 6275 | |
| 6276 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
| 6277 | |
| 6278 | ; return 0; } |
| 6279 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6280 | if { (eval echo configure:6281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6281 | rm -rf conftest* |
| 6282 | |
| 6283 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6284 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6285 | EOF |
| 6286 | |
| 6287 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6288 | #define HAVE_GETHOSTBYNAME_R_5_ARG 1 |
| 6289 | EOF |
| 6290 | |
| 6291 | echo "$ac_t""yes" 1>&6 |
| 6292 | |
| 6293 | else |
| 6294 | echo "configure: failed program was:" >&5 |
| 6295 | cat conftest.$ac_ext >&5 |
| 6296 | rm -rf conftest* |
| 6297 | |
| 6298 | echo "$ac_t""no" 1>&6 |
| 6299 | echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6300 | echo "configure:6301: checking gethostbyname_r with 3 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6301 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6302 | #line 6303 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6303 | #include "confdefs.h" |
| 6304 | |
| 6305 | # include <netdb.h> |
| 6306 | |
| 6307 | int main() { |
| 6308 | |
| 6309 | char *name; |
| 6310 | struct hostent *he; |
| 6311 | struct hostent_data data; |
| 6312 | |
| 6313 | (void) gethostbyname_r(name, he, &data); |
| 6314 | |
| 6315 | ; return 0; } |
| 6316 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6317 | if { (eval echo configure:6318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6318 | rm -rf conftest* |
| 6319 | |
| 6320 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6321 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6322 | EOF |
| 6323 | |
| 6324 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6325 | #define HAVE_GETHOSTBYNAME_R_3_ARG 1 |
| 6326 | EOF |
| 6327 | |
| 6328 | echo "$ac_t""yes" 1>&6 |
| 6329 | |
| 6330 | else |
| 6331 | echo "configure: failed program was:" >&5 |
| 6332 | cat conftest.$ac_ext >&5 |
| 6333 | rm -rf conftest* |
| 6334 | |
| 6335 | echo "$ac_t""no" 1>&6 |
| 6336 | |
| 6337 | fi |
| 6338 | rm -f conftest* |
| 6339 | |
| 6340 | fi |
| 6341 | rm -f conftest* |
| 6342 | |
| 6343 | fi |
| 6344 | rm -f conftest* |
| 6345 | CFLAGS=$OLD_CFLAGS |
| 6346 | |
| 6347 | else |
| 6348 | echo "$ac_t""no" 1>&6 |
| 6349 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6350 | for ac_func in gethostbyname |
| 6351 | do |
| 6352 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6353 | echo "configure:6354: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6354 | 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] | 6355 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6356 | else |
| 6357 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6358 | #line 6359 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6359 | #include "confdefs.h" |
| 6360 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6361 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6362 | #include <assert.h> |
| 6363 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6364 | /* We use char because int might match the return type of a gcc2 |
| 6365 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6366 | char $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6367 | |
| 6368 | int main() { |
| 6369 | |
| 6370 | /* The GNU C library defines this for functions which it implements |
| 6371 | to always fail with ENOSYS. Some functions are actually named |
| 6372 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6373 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6374 | choke me |
| 6375 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6376 | $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6377 | #endif |
| 6378 | |
| 6379 | ; return 0; } |
| 6380 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6381 | if { (eval echo configure:6382: \"$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] | 6382 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6383 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6384 | else |
| 6385 | echo "configure: failed program was:" >&5 |
| 6386 | cat conftest.$ac_ext >&5 |
| 6387 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6388 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6389 | fi |
| 6390 | rm -f conftest* |
| 6391 | fi |
| 6392 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6393 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6394 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6395 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6396 | cat >> confdefs.h <<EOF |
| 6397 | #define $ac_tr_func 1 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6398 | EOF |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6399 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6400 | else |
| 6401 | echo "$ac_t""no" 1>&6 |
| 6402 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6403 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6404 | |
| 6405 | |
| 6406 | fi |
| 6407 | |
| 6408 | |
| 6409 | |
| 6410 | |
| 6411 | |
| 6412 | |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6413 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6414 | # checks for system services |
| 6415 | # (none yet) |
| 6416 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6417 | # Linux requires this for correct f.p. operations |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6418 | echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6419 | echo "configure:6420: checking for __fpu_control" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6420 | if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6421 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6422 | else |
| 6423 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6424 | #line 6425 "configure" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6425 | #include "confdefs.h" |
| 6426 | /* System header to define __stub macros and hopefully few prototypes, |
| 6427 | which can conflict with char __fpu_control(); below. */ |
| 6428 | #include <assert.h> |
| 6429 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6430 | /* We use char because int might match the return type of a gcc2 |
| 6431 | builtin and then its argument prototype would still apply. */ |
| 6432 | char __fpu_control(); |
| 6433 | |
| 6434 | int main() { |
| 6435 | |
| 6436 | /* The GNU C library defines this for functions which it implements |
| 6437 | to always fail with ENOSYS. Some functions are actually named |
| 6438 | something starting with __ and the normal name is an alias. */ |
| 6439 | #if defined (__stub___fpu_control) || defined (__stub_____fpu_control) |
| 6440 | choke me |
| 6441 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6442 | __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6443 | #endif |
| 6444 | |
| 6445 | ; return 0; } |
| 6446 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6447 | if { (eval echo configure:6448: \"$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] | 6448 | rm -rf conftest* |
| 6449 | eval "ac_cv_func___fpu_control=yes" |
| 6450 | else |
| 6451 | echo "configure: failed program was:" >&5 |
| 6452 | cat conftest.$ac_ext >&5 |
| 6453 | rm -rf conftest* |
| 6454 | eval "ac_cv_func___fpu_control=no" |
| 6455 | fi |
| 6456 | rm -f conftest* |
| 6457 | fi |
| 6458 | |
| 6459 | if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then |
| 6460 | echo "$ac_t""yes" 1>&6 |
| 6461 | : |
| 6462 | else |
| 6463 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6464 | echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6465 | echo "configure:6466: checking for __fpu_control in -lieee" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6466 | ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6467 | 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] | 6468 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6469 | else |
| 6470 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6471 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6472 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6473 | #line 6474 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6474 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6475 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6476 | /* We use char because int might match the return type of a gcc2 |
| 6477 | builtin and then its argument prototype would still apply. */ |
| 6478 | char __fpu_control(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6479 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6480 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6481 | __fpu_control() |
| 6482 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6483 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6484 | if { (eval echo configure:6485: \"$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] | 6485 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6486 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6487 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6488 | echo "configure: failed program was:" >&5 |
| 6489 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6490 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6491 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6492 | fi |
| 6493 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6494 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6495 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6496 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6497 | 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] | 6498 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6499 | ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 6500 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6501 | cat >> confdefs.h <<EOF |
| 6502 | #define $ac_tr_lib 1 |
| 6503 | EOF |
| 6504 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6505 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6506 | |
| 6507 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6508 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6509 | fi |
| 6510 | |
| 6511 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6512 | fi |
| 6513 | |
| 6514 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6515 | # Check for --with-fpectl |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6516 | echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6517 | echo "configure:6518: checking for --with-fpectl" >&5 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6518 | # Check whether --with-fpectl or --without-fpectl was given. |
| 6519 | if test "${with_fpectl+set}" = set; then |
| 6520 | withval="$with_fpectl" |
| 6521 | |
| 6522 | if test "$withval" != no |
| 6523 | then cat >> confdefs.h <<\EOF |
| 6524 | #define WANT_SIGFPE_HANDLER 1 |
| 6525 | EOF |
| 6526 | echo "$ac_t""yes" 1>&6 |
| 6527 | else echo "$ac_t""no" 1>&6 |
| 6528 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6529 | else |
| 6530 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6531 | fi |
| 6532 | |
| 6533 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6534 | # check for --with-libm=... |
| 6535 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6536 | case $ac_sys_system in |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 6537 | Darwin) ;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 6538 | BeOS) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6539 | *) LIBM=-lm |
| 6540 | esac |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6541 | echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6542 | echo "configure:6543: checking for --with-libm=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6543 | # Check whether --with-libm or --without-libm was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6544 | if test "${with_libm+set}" = set; then |
| 6545 | withval="$with_libm" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6546 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6547 | if test "$withval" = no |
| 6548 | then LIBM= |
| 6549 | echo "$ac_t""force LIBM empty" 1>&6 |
| 6550 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6551 | then LIBM=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6552 | echo "$ac_t""set LIBM=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6553 | 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] | 6554 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6555 | else |
| 6556 | echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6557 | fi |
| 6558 | |
| 6559 | |
| 6560 | # check for --with-libc=... |
| 6561 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6562 | echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6563 | echo "configure:6564: checking for --with-libc=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6564 | # Check whether --with-libc or --without-libc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6565 | if test "${with_libc+set}" = set; then |
| 6566 | withval="$with_libc" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6567 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6568 | if test "$withval" = no |
| 6569 | then LIBC= |
| 6570 | echo "$ac_t""force LIBC empty" 1>&6 |
| 6571 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6572 | then LIBC=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6573 | echo "$ac_t""set LIBC=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6574 | 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] | 6575 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6576 | else |
| 6577 | echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6578 | fi |
| 6579 | |
| 6580 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6581 | # check for hypot() in math library |
| 6582 | LIBS_SAVE=$LIBS |
| 6583 | LIBS="$LIBS $LIBM" |
| 6584 | for ac_func in hypot |
| 6585 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6586 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6587 | echo "configure:6588: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6588 | 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] | 6589 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6590 | else |
| 6591 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6592 | #line 6593 "configure" |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6593 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6594 | /* System header to define __stub macros and hopefully few prototypes, |
| 6595 | which can conflict with char $ac_func(); below. */ |
| 6596 | #include <assert.h> |
| 6597 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6598 | /* We use char because int might match the return type of a gcc2 |
| 6599 | builtin and then its argument prototype would still apply. */ |
| 6600 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6601 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6602 | int main() { |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6603 | |
| 6604 | /* The GNU C library defines this for functions which it implements |
| 6605 | to always fail with ENOSYS. Some functions are actually named |
| 6606 | something starting with __ and the normal name is an alias. */ |
| 6607 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 6608 | choke me |
| 6609 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6610 | $ac_func(); |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6611 | #endif |
| 6612 | |
| 6613 | ; return 0; } |
| 6614 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6615 | if { (eval echo configure:6616: \"$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] | 6616 | rm -rf conftest* |
| 6617 | eval "ac_cv_func_$ac_func=yes" |
| 6618 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6619 | echo "configure: failed program was:" >&5 |
| 6620 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6621 | rm -rf conftest* |
| 6622 | eval "ac_cv_func_$ac_func=no" |
| 6623 | fi |
| 6624 | rm -f conftest* |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6625 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6626 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6627 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 6628 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6629 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6630 | cat >> confdefs.h <<EOF |
| 6631 | #define $ac_tr_func 1 |
| 6632 | EOF |
| 6633 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6634 | else |
| 6635 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 6636 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6637 | fi |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6638 | done |
| 6639 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6640 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6641 | LIBS=$LIBS_SAVE |
| 6642 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6643 | # check whether malloc(0) returns NULL or not |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6644 | echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6645 | echo "configure:6646: checking what malloc(0) returns" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6646 | if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6647 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6648 | else |
| 6649 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6650 | ac_cv_malloc_zero=nonnull |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6651 | else |
| 6652 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6653 | #line 6654 "configure" |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6654 | #include "confdefs.h" |
| 6655 | #include <stdio.h> |
| 6656 | #ifdef HAVE_STDLIB |
| 6657 | #include <stdlib.h> |
| 6658 | #else |
| 6659 | char *malloc(), *realloc(); |
| 6660 | int *free(); |
| 6661 | #endif |
| 6662 | main() { |
| 6663 | char *p; |
| 6664 | p = malloc(0); |
| 6665 | if (p == NULL) exit(1); |
| 6666 | p = realloc(p, 0); |
| 6667 | if (p == NULL) exit(1); |
| 6668 | free(p); |
| 6669 | exit(0); |
| 6670 | } |
| 6671 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6672 | if { (eval echo configure:6673: \"$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] | 6673 | then |
| 6674 | ac_cv_malloc_zero=nonnull |
| 6675 | else |
| 6676 | echo "configure: failed program was:" >&5 |
| 6677 | cat conftest.$ac_ext >&5 |
| 6678 | rm -fr conftest* |
| 6679 | ac_cv_malloc_zero=null |
| 6680 | fi |
| 6681 | rm -fr conftest* |
| 6682 | fi |
| 6683 | |
| 6684 | fi |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6685 | # XXX arm cross-compile? |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6686 | echo "$ac_t""$ac_cv_malloc_zero" 1>&6 |
| 6687 | if test "$ac_cv_malloc_zero" = null |
| 6688 | then |
| 6689 | cat >> confdefs.h <<\EOF |
| 6690 | #define MALLOC_ZERO_RETURNS_NULL 1 |
| 6691 | EOF |
| 6692 | |
| 6693 | fi |
| 6694 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6695 | # check for wchar.h |
| 6696 | ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` |
| 6697 | echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6698 | echo "configure:6699: checking for wchar.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6699 | 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] | 6700 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6701 | else |
| 6702 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6703 | #line 6704 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6704 | #include "confdefs.h" |
| 6705 | #include <wchar.h> |
| 6706 | EOF |
| 6707 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6708 | { (eval echo configure:6709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6709 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 6710 | if test -z "$ac_err"; then |
| 6711 | rm -rf conftest* |
| 6712 | eval "ac_cv_header_$ac_safe=yes" |
| 6713 | else |
| 6714 | echo "$ac_err" >&5 |
| 6715 | echo "configure: failed program was:" >&5 |
| 6716 | cat conftest.$ac_ext >&5 |
| 6717 | rm -rf conftest* |
| 6718 | eval "ac_cv_header_$ac_safe=no" |
| 6719 | fi |
| 6720 | rm -f conftest* |
| 6721 | fi |
| 6722 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 6723 | echo "$ac_t""yes" 1>&6 |
| 6724 | cat >> confdefs.h <<\EOF |
| 6725 | #define HAVE_WCHAR_H 1 |
| 6726 | EOF |
| 6727 | wchar_h="yes" |
| 6728 | else |
| 6729 | echo "$ac_t""no" 1>&6 |
| 6730 | wchar_h="no" |
| 6731 | |
| 6732 | fi |
| 6733 | |
| 6734 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6735 | # determine wchar_t size |
| 6736 | if test "$wchar_h" = yes |
| 6737 | then |
| 6738 | echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6739 | echo "configure:6740: checking size of wchar_t" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6740 | if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then |
| 6741 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6742 | else |
| 6743 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6744 | ac_cv_sizeof_wchar_t=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6745 | else |
| 6746 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6747 | #line 6748 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6748 | #include "confdefs.h" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6749 | #include <stdio.h> |
| 6750 | main() |
| 6751 | { |
| 6752 | FILE *f=fopen("conftestval", "w"); |
| 6753 | if (!f) exit(1); |
| 6754 | fprintf(f, "%d\n", sizeof(wchar_t)); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6755 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6756 | } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6757 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6758 | if { (eval echo configure:6759: \"$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] | 6759 | then |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6760 | ac_cv_sizeof_wchar_t=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6761 | else |
| 6762 | echo "configure: failed program was:" >&5 |
| 6763 | cat conftest.$ac_ext >&5 |
| 6764 | rm -fr conftest* |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6765 | ac_cv_sizeof_wchar_t=0 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6766 | fi |
| 6767 | rm -fr conftest* |
| 6768 | fi |
| 6769 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6770 | fi |
| 6771 | echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 |
| 6772 | cat >> confdefs.h <<EOF |
| 6773 | #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t |
| 6774 | EOF |
| 6775 | |
| 6776 | |
| 6777 | fi |
| 6778 | |
| 6779 | echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6780 | echo "configure:6781: checking what type to use for unicode" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6781 | # Check whether --enable-unicode or --disable-unicode was given. |
| 6782 | if test "${enable_unicode+set}" = set; then |
| 6783 | enableval="$enable_unicode" |
| 6784 | : |
| 6785 | else |
| 6786 | enable_unicode=yes |
| 6787 | fi |
| 6788 | |
| 6789 | |
| 6790 | if test $enable_unicode = yes |
| 6791 | then |
Martin v. Löwis | fd91779 | 2001-06-27 20:22:04 +0000 | [diff] [blame] | 6792 | # Without any arguments, Py_UNICODE defaults to two-byte mode |
| 6793 | enable_unicode="ucs2" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6794 | fi |
| 6795 | |
| 6796 | case "$enable_unicode" in |
| 6797 | ucs2) unicode_size="2" |
| 6798 | cat >> confdefs.h <<\EOF |
| 6799 | #define Py_UNICODE_SIZE 2 |
| 6800 | EOF |
| 6801 | |
| 6802 | ;; |
| 6803 | ucs4) unicode_size="4" |
| 6804 | cat >> confdefs.h <<\EOF |
| 6805 | #define Py_UNICODE_SIZE 4 |
| 6806 | EOF |
| 6807 | |
| 6808 | ;; |
| 6809 | esac |
| 6810 | |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6811 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6812 | if test "$enable_unicode" = "no" |
| 6813 | then |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6814 | UNICODE_OBJS="" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6815 | echo "$ac_t""not used" 1>&6 |
| 6816 | else |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6817 | UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6818 | cat >> confdefs.h <<\EOF |
| 6819 | #define Py_USING_UNICODE 1 |
| 6820 | EOF |
| 6821 | |
| 6822 | if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" |
| 6823 | then |
| 6824 | PY_UNICODE_TYPE="wchar_t" |
| 6825 | cat >> confdefs.h <<\EOF |
| 6826 | #define HAVE_USABLE_WCHAR_T 1 |
| 6827 | EOF |
| 6828 | |
| 6829 | cat >> confdefs.h <<\EOF |
| 6830 | #define PY_UNICODE_TYPE wchar_t |
| 6831 | EOF |
| 6832 | |
| 6833 | elif test "$ac_cv_sizeof_short" = "$unicode_size" |
| 6834 | then |
| 6835 | PY_UNICODE_TYPE="unsigned short" |
| 6836 | cat >> confdefs.h <<\EOF |
| 6837 | #define PY_UNICODE_TYPE unsigned short |
| 6838 | EOF |
| 6839 | |
| 6840 | elif test "$ac_cv_sizeof_long" = "$unicode_size" |
| 6841 | then |
| 6842 | PY_UNICODE_TYPE="unsigned long" |
| 6843 | cat >> confdefs.h <<\EOF |
| 6844 | #define PY_UNICODE_TYPE unsigned long |
| 6845 | EOF |
| 6846 | |
| 6847 | else |
| 6848 | PY_UNICODE_TYPE="no type found" |
| 6849 | fi |
| 6850 | echo "$ac_t""$PY_UNICODE_TYPE" 1>&6 |
| 6851 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6852 | |
| 6853 | # check for endianness |
| 6854 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6855 | echo "configure:6856: checking whether byte ordering is bigendian" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6856 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6857 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6858 | else |
| 6859 | ac_cv_c_bigendian=unknown |
| 6860 | # See if sys/param.h defines the BYTE_ORDER macro. |
| 6861 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6862 | #line 6863 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6863 | #include "confdefs.h" |
| 6864 | #include <sys/types.h> |
| 6865 | #include <sys/param.h> |
| 6866 | int main() { |
| 6867 | |
| 6868 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 6869 | bogus endian macros |
| 6870 | #endif |
| 6871 | ; return 0; } |
| 6872 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6873 | if { (eval echo configure:6874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6874 | rm -rf conftest* |
| 6875 | # It does; now see whether it defined to BIG_ENDIAN or not. |
| 6876 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6877 | #line 6878 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6878 | #include "confdefs.h" |
| 6879 | #include <sys/types.h> |
| 6880 | #include <sys/param.h> |
| 6881 | int main() { |
| 6882 | |
| 6883 | #if BYTE_ORDER != BIG_ENDIAN |
| 6884 | not big endian |
| 6885 | #endif |
| 6886 | ; return 0; } |
| 6887 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6888 | if { (eval echo configure:6889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6889 | rm -rf conftest* |
| 6890 | ac_cv_c_bigendian=yes |
| 6891 | else |
| 6892 | echo "configure: failed program was:" >&5 |
| 6893 | cat conftest.$ac_ext >&5 |
| 6894 | rm -rf conftest* |
| 6895 | ac_cv_c_bigendian=no |
| 6896 | fi |
| 6897 | rm -f conftest* |
| 6898 | else |
| 6899 | echo "configure: failed program was:" >&5 |
| 6900 | cat conftest.$ac_ext >&5 |
| 6901 | fi |
| 6902 | rm -f conftest* |
| 6903 | if test $ac_cv_c_bigendian = unknown; then |
| 6904 | if test "$cross_compiling" = yes; then |
| 6905 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6906 | else |
| 6907 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6908 | #line 6909 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6909 | #include "confdefs.h" |
| 6910 | main () { |
| 6911 | /* Are we little or big endian? From Harbison&Steele. */ |
| 6912 | union |
| 6913 | { |
| 6914 | long l; |
| 6915 | char c[sizeof (long)]; |
| 6916 | } u; |
| 6917 | u.l = 1; |
| 6918 | exit (u.c[sizeof (long) - 1] == 1); |
| 6919 | } |
| 6920 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6921 | if { (eval echo configure:6922: \"$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] | 6922 | then |
| 6923 | ac_cv_c_bigendian=no |
| 6924 | else |
| 6925 | echo "configure: failed program was:" >&5 |
| 6926 | cat conftest.$ac_ext >&5 |
| 6927 | rm -fr conftest* |
| 6928 | ac_cv_c_bigendian=yes |
| 6929 | fi |
| 6930 | rm -fr conftest* |
| 6931 | fi |
| 6932 | |
| 6933 | fi |
| 6934 | fi |
| 6935 | |
| 6936 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 6937 | if test $ac_cv_c_bigendian = yes; then |
| 6938 | cat >> confdefs.h <<\EOF |
| 6939 | #define WORDS_BIGENDIAN 1 |
| 6940 | EOF |
| 6941 | |
| 6942 | fi |
| 6943 | |
| 6944 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6945 | # Check whether right shifting a negative integer extends the sign bit |
| 6946 | # or fills with zeros (like the Cray J90, according to Tim Peters). |
| 6947 | echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6948 | echo "configure:6949: checking whether right shift extends the sign bit" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6949 | if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 6950 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6951 | else |
| 6952 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6953 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6954 | ac_cv_rshift_extends_sign=yes |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6955 | else |
| 6956 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6957 | #line 6958 "configure" |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6958 | #include "confdefs.h" |
| 6959 | |
| 6960 | int main() |
| 6961 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 6962 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6963 | } |
| 6964 | |
| 6965 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6966 | if { (eval echo configure:6967: \"$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] | 6967 | then |
| 6968 | ac_cv_rshift_extends_sign=yes |
| 6969 | else |
| 6970 | echo "configure: failed program was:" >&5 |
| 6971 | cat conftest.$ac_ext >&5 |
| 6972 | rm -fr conftest* |
| 6973 | ac_cv_rshift_extends_sign=no |
| 6974 | fi |
| 6975 | rm -fr conftest* |
| 6976 | fi |
| 6977 | |
| 6978 | fi |
| 6979 | |
| 6980 | echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 |
| 6981 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6982 | then |
| 6983 | cat >> confdefs.h <<\EOF |
| 6984 | #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 |
| 6985 | EOF |
| 6986 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6987 | fi |
| 6988 | |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6989 | # check for getc_unlocked and related locking functions |
| 6990 | echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6991 | echo "configure:6992: checking for getc_unlocked() and friends" >&5 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6992 | if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then |
| 6993 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6994 | else |
| 6995 | |
| 6996 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 6997 | #line 6998 "configure" |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6998 | #include "confdefs.h" |
| 6999 | #include <stdio.h> |
| 7000 | int main() { |
| 7001 | |
| 7002 | FILE *f = fopen("/dev/null", "r"); |
| 7003 | flockfile(f); |
| 7004 | getc_unlocked(f); |
| 7005 | funlockfile(f); |
| 7006 | |
| 7007 | ; return 0; } |
| 7008 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 7009 | if { (eval echo configure:7010: \"$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] | 7010 | rm -rf conftest* |
| 7011 | ac_cv_have_getc_unlocked=yes |
| 7012 | else |
| 7013 | echo "configure: failed program was:" >&5 |
| 7014 | cat conftest.$ac_ext >&5 |
| 7015 | rm -rf conftest* |
| 7016 | ac_cv_have_getc_unlocked=no |
| 7017 | fi |
| 7018 | rm -f conftest* |
| 7019 | fi |
| 7020 | |
| 7021 | echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6 |
| 7022 | if test "$ac_cv_have_getc_unlocked" = yes |
| 7023 | then |
| 7024 | cat >> confdefs.h <<\EOF |
| 7025 | #define HAVE_GETC_UNLOCKED 1 |
| 7026 | EOF |
| 7027 | |
| 7028 | fi |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7029 | |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7030 | # check for readline 4.2 |
| 7031 | echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 7032 | echo "configure:7033: checking for rl_completion_matches in -lreadline" >&5 |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7033 | ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` |
| 7034 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7035 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7036 | else |
| 7037 | ac_save_LIBS="$LIBS" |
| 7038 | LIBS="-lreadline -ltermcap $LIBS" |
| 7039 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 7040 | #line 7041 "configure" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7041 | #include "confdefs.h" |
| 7042 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7043 | /* We use char because int might match the return type of a gcc2 |
| 7044 | builtin and then its argument prototype would still apply. */ |
| 7045 | char rl_completion_matches(); |
| 7046 | |
| 7047 | int main() { |
| 7048 | rl_completion_matches() |
| 7049 | ; return 0; } |
| 7050 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 7051 | if { (eval echo configure:7052: \"$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] | 7052 | rm -rf conftest* |
| 7053 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 7054 | else |
| 7055 | echo "configure: failed program was:" >&5 |
| 7056 | cat conftest.$ac_ext >&5 |
| 7057 | rm -rf conftest* |
| 7058 | eval "ac_cv_lib_$ac_lib_var=no" |
| 7059 | fi |
| 7060 | rm -f conftest* |
| 7061 | LIBS="$ac_save_LIBS" |
| 7062 | |
| 7063 | fi |
| 7064 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7065 | echo "$ac_t""yes" 1>&6 |
| 7066 | cat >> confdefs.h <<\EOF |
| 7067 | #define HAVE_RL_COMPLETION_MATCHES 1 |
| 7068 | EOF |
| 7069 | |
| 7070 | else |
| 7071 | echo "$ac_t""no" 1>&6 |
| 7072 | fi |
| 7073 | |
| 7074 | |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7075 | echo $ac_n "checking for broken nice()""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 7076 | echo "configure:7077: checking for broken nice()" >&5 |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7077 | if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then |
| 7078 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7079 | else |
| 7080 | |
| 7081 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7082 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7083 | else |
| 7084 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 7085 | #line 7086 "configure" |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7086 | #include "confdefs.h" |
| 7087 | |
| 7088 | int main() |
| 7089 | { |
| 7090 | int val1 = nice(1); |
| 7091 | if (val1 != -1 && val1 == nice(2)) |
| 7092 | exit(0); |
| 7093 | exit(1); |
| 7094 | } |
| 7095 | |
| 7096 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 7097 | if { (eval echo configure:7098: \"$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] | 7098 | then |
| 7099 | ac_cv_broken_nice=yes |
| 7100 | else |
| 7101 | echo "configure: failed program was:" >&5 |
| 7102 | cat conftest.$ac_ext >&5 |
| 7103 | rm -fr conftest* |
| 7104 | ac_cv_broken_nice=no |
| 7105 | fi |
| 7106 | rm -fr conftest* |
| 7107 | fi |
| 7108 | |
| 7109 | fi |
| 7110 | |
| 7111 | echo "$ac_t""$ac_cv_broken_nice" 1>&6 |
| 7112 | if test "$ac_cv_broken_nice" = yes |
| 7113 | then |
| 7114 | cat >> confdefs.h <<\EOF |
| 7115 | #define HAVE_BROKEN_NICE 1 |
| 7116 | EOF |
| 7117 | |
| 7118 | fi |
| 7119 | |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7120 | # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! |
| 7121 | # Add sys/socket.h to confdefs.h |
| 7122 | cat >> confdefs.h <<\EOF |
| 7123 | #ifdef HAVE_SYS_SOCKET_H |
| 7124 | #include <sys/socket.h> |
| 7125 | #endif |
| 7126 | EOF |
| 7127 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 7128 | echo "configure:7129: checking for socklen_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7129 | 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] | 7130 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7131 | else |
| 7132 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 7133 | #line 7134 "configure" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7134 | #include "confdefs.h" |
| 7135 | #include <sys/types.h> |
| 7136 | #if STDC_HEADERS |
| 7137 | #include <stdlib.h> |
| 7138 | #include <stddef.h> |
| 7139 | #endif |
| 7140 | EOF |
| 7141 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 7142 | egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 7143 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7144 | ac_cv_type_socklen_t=yes |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7145 | else |
| 7146 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7147 | ac_cv_type_socklen_t=no |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7148 | fi |
| 7149 | rm -f conftest* |
| 7150 | |
| 7151 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7152 | echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 |
| 7153 | if test $ac_cv_type_socklen_t = no; then |
| 7154 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7155 | #define socklen_t int |
| 7156 | EOF |
| 7157 | |
| 7158 | fi |
| 7159 | |
| 7160 | |
Neil Schemenauer | f25cf6c | 2001-03-04 06:39:33 +0000 | [diff] [blame] | 7161 | # Add Python/ prefix to LIBOBJS |
| 7162 | libobjs=$LIBOBJS |
| 7163 | LIBOBJS= |
| 7164 | for obj in $libobjs; do |
| 7165 | LIBOBJS="$LIBOBJS Python/$obj" |
| 7166 | done |
| 7167 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7168 | #AC_MSG_CHECKING(for Modules/Setup) |
| 7169 | #if test ! -f Modules/Setup ; then |
| 7170 | # if test ! -d Modules ; then |
| 7171 | # mkdir Modules |
| 7172 | # fi |
| 7173 | # cp "$srcdir/Modules/Setup.dist" Modules/Setup |
| 7174 | # AC_MSG_RESULT(creating) |
| 7175 | #else |
| 7176 | # AC_MSG_RESULT(already exists) |
| 7177 | #fi |
| 7178 | |
| 7179 | |
Neil Schemenauer | acbf9ef | 2001-02-27 02:15:14 +0000 | [diff] [blame] | 7180 | SRCDIRS="Parser Grammar Objects Python Modules" |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7181 | echo $ac_n "checking for build directories""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 7182 | echo "configure:7183: checking for build directories" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7183 | for dir in $SRCDIRS; do |
| 7184 | if test ! -d $dir; then |
| 7185 | mkdir $dir |
Guido van Rossum | 262cf20 | 2000-11-02 19:33:53 +0000 | [diff] [blame] | 7186 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7187 | done |
| 7188 | echo "$ac_t""done" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 7189 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7190 | # generate output files |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7191 | trap '' 1 2 15 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7192 | cat > confcache <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7193 | # This file is a shell script that caches the results of configure |
| 7194 | # tests run on this system so they can be shared between configure |
| 7195 | # scripts and configure runs. It is not useful on other systems. |
| 7196 | # If it contains results you don't want to keep, you may remove or edit it. |
| 7197 | # |
| 7198 | # By default, configure uses ./config.cache as the cache file, |
| 7199 | # creating it if it does not exist already. You can give configure |
| 7200 | # the --cache-file=FILE option to use a different cache file; that is |
| 7201 | # what configure does when it calls configure scripts in |
| 7202 | # subdirectories, so they share the cache. |
| 7203 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| 7204 | # config.status only pays attention to the cache file if you give it the |
| 7205 | # --recheck option to rerun configure. |
| 7206 | # |
| 7207 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7208 | # The following way of writing the cache mishandles newlines in values, |
| 7209 | # but we know of no workaround that is simple, portable, and efficient. |
| 7210 | # So, don't put newlines in cache variables' values. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7211 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 7212 | # 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] | 7213 | (set) 2>&1 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7214 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7215 | *ac_space=\ *) |
| 7216 | # `set' does not quote correctly, so add quotes (double-quote substitution |
| 7217 | # turns \\\\ into \\, and sed turns \\ into \). |
| 7218 | sed -n \ |
| 7219 | -e "s/'/'\\\\''/g" \ |
| 7220 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| 7221 | ;; |
| 7222 | *) |
| 7223 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 7224 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| 7225 | ;; |
| 7226 | esac >> confcache |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7227 | if cmp -s $cache_file confcache; then |
| 7228 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7229 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7230 | if test -w $cache_file; then |
| 7231 | echo "updating cache $cache_file" |
| 7232 | cat confcache > $cache_file |
| 7233 | else |
| 7234 | echo "not updating unwritable cache $cache_file" |
| 7235 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7236 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7237 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7238 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7239 | 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] | 7240 | |
| 7241 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 7242 | # Let make expand exec_prefix. |
| 7243 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7244 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7245 | # Any assignment to VPATH causes Sun make to only execute |
| 7246 | # the first set of double-colon rules, so remove it if not needed. |
| 7247 | # If there is a colon in the path, we need to keep it. |
| 7248 | if test "x$srcdir" = x.; then |
| 7249 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
| 7250 | fi |
| 7251 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7252 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7253 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7254 | DEFS=-DHAVE_CONFIG_H |
| 7255 | |
| 7256 | # Without the "./", some shells look in PATH for config.status. |
| 7257 | : ${CONFIG_STATUS=./config.status} |
| 7258 | |
| 7259 | echo creating $CONFIG_STATUS |
| 7260 | rm -f $CONFIG_STATUS |
| 7261 | cat > $CONFIG_STATUS <<EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7262 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7263 | # Generated automatically by configure. |
| 7264 | # Run this file to recreate the current configuration. |
| 7265 | # This directory was configured as follows, |
| 7266 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 7267 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7268 | # $0 $ac_configure_args |
| 7269 | # |
| 7270 | # Compiler output produced by configure, useful for debugging |
| 7271 | # configure, is in ./config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7272 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7273 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7274 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7275 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7276 | case "\$ac_option" in |
| 7277 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7278 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
| 7279 | 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] | 7280 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7281 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7282 | exit 0 ;; |
| 7283 | -help | --help | --hel | --he | --h) |
| 7284 | echo "\$ac_cs_usage"; exit 0 ;; |
| 7285 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7286 | esac |
| 7287 | done |
| 7288 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7289 | ac_given_srcdir=$srcdir |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7290 | ac_given_INSTALL="$INSTALL" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7291 | |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7292 | 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] | 7293 | EOF |
| 7294 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7295 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7296 | # Protect against being on the right side of a sed subst in config.status. |
| 7297 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 7298 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7299 | $ac_vpsub |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7300 | $extrasub |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7301 | s%@SHELL@%$SHELL%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7302 | s%@CFLAGS@%$CFLAGS%g |
| 7303 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 7304 | s%@CXXFLAGS@%$CXXFLAGS%g |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7305 | s%@FFLAGS@%$FFLAGS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7306 | s%@DEFS@%$DEFS%g |
| 7307 | s%@LDFLAGS@%$LDFLAGS%g |
| 7308 | s%@LIBS@%$LIBS%g |
| 7309 | s%@exec_prefix@%$exec_prefix%g |
| 7310 | s%@prefix@%$prefix%g |
| 7311 | s%@program_transform_name@%$program_transform_name%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7312 | s%@bindir@%$bindir%g |
| 7313 | s%@sbindir@%$sbindir%g |
| 7314 | s%@libexecdir@%$libexecdir%g |
| 7315 | s%@datadir@%$datadir%g |
| 7316 | s%@sysconfdir@%$sysconfdir%g |
| 7317 | s%@sharedstatedir@%$sharedstatedir%g |
| 7318 | s%@localstatedir@%$localstatedir%g |
| 7319 | s%@libdir@%$libdir%g |
| 7320 | s%@includedir@%$includedir%g |
| 7321 | s%@oldincludedir@%$oldincludedir%g |
| 7322 | s%@infodir@%$infodir%g |
| 7323 | s%@mandir@%$mandir%g |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 7324 | s%@VERSION@%$VERSION%g |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 7325 | s%@CONFIG_ARGS@%$CONFIG_ARGS%g |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 7326 | s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g |
| 7327 | s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g |
| 7328 | s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g |
| 7329 | s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 7330 | s%@MACHDEP@%$MACHDEP%g |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 7331 | s%@SGI_ABI@%$SGI_ABI%g |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 7332 | s%@CXX@%$CXX%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7333 | s%@MAINOBJ@%$MAINOBJ%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7334 | s%@CC@%$CC%g |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 7335 | s%@CPP@%$CPP%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7336 | s%@EXEEXT@%$EXEEXT%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7337 | s%@LIBRARY@%$LIBRARY%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7338 | s%@LDLIBRARY@%$LDLIBRARY%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7339 | s%@DLLLIBRARY@%$DLLLIBRARY%g |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 7340 | s%@BLDLIBRARY@%$BLDLIBRARY%g |
| 7341 | s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 7342 | s%@LINKCC@%$LINKCC%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7343 | s%@RANLIB@%$RANLIB%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7344 | s%@AR@%$AR%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7345 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7346 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7347 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 7348 | s%@LN@%$LN%g |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 7349 | s%@OPT@%$OPT%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7350 | s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7351 | s%@SO@%$SO%g |
| 7352 | s%@LDSHARED@%$LDSHARED%g |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 7353 | s%@BLDSHARED@%$BLDSHARED%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7354 | s%@CCSHARED@%$CCSHARED%g |
| 7355 | s%@LINKFORSHARED@%$LINKFORSHARED%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7356 | s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7357 | s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g |
| 7358 | s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 7359 | s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 7360 | s%@LDLAST@%$LDLAST%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7361 | s%@DLINCLDIR@%$DLINCLDIR%g |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 7362 | s%@DYNLOADFILE@%$DYNLOADFILE%g |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 7363 | s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7364 | s%@LIBOBJS@%$LIBOBJS%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7365 | s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g |
| 7366 | s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g |
| 7367 | 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] | 7368 | s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7369 | s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7370 | s%@LIBM@%$LIBM%g |
| 7371 | s%@LIBC@%$LIBC%g |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7372 | s%@UNICODE_OBJS@%$UNICODE_OBJS%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7373 | s%@SRCDIRS@%$SRCDIRS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7374 | |
| 7375 | CEOF |
| 7376 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7377 | |
| 7378 | cat >> $CONFIG_STATUS <<\EOF |
| 7379 | |
| 7380 | # Split the substitutions into bite-sized pieces for seds with |
| 7381 | # small command number limits, like on Digital OSF/1 and HP-UX. |
| 7382 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 7383 | ac_file=1 # Number of current file. |
| 7384 | ac_beg=1 # First line for current file. |
| 7385 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 7386 | ac_more_lines=: |
| 7387 | ac_sed_cmds="" |
| 7388 | while $ac_more_lines; do |
| 7389 | if test $ac_beg -gt 1; then |
| 7390 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7391 | else |
| 7392 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7393 | fi |
| 7394 | if test ! -s conftest.s$ac_file; then |
| 7395 | ac_more_lines=false |
| 7396 | rm -f conftest.s$ac_file |
| 7397 | else |
| 7398 | if test -z "$ac_sed_cmds"; then |
| 7399 | ac_sed_cmds="sed -f conftest.s$ac_file" |
| 7400 | else |
| 7401 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
| 7402 | fi |
| 7403 | ac_file=`expr $ac_file + 1` |
| 7404 | ac_beg=$ac_end |
| 7405 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
| 7406 | fi |
| 7407 | done |
| 7408 | if test -z "$ac_sed_cmds"; then |
| 7409 | ac_sed_cmds=cat |
| 7410 | fi |
| 7411 | EOF |
| 7412 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7413 | cat >> $CONFIG_STATUS <<EOF |
| 7414 | |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7415 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"} |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7416 | EOF |
| 7417 | cat >> $CONFIG_STATUS <<\EOF |
| 7418 | 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] | 7419 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7420 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7421 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7422 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7423 | *) ac_file_in="${ac_file}.in" ;; |
| 7424 | esac |
| 7425 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7426 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7427 | |
| 7428 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7429 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7430 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7431 | # The file is in a subdirectory. |
| 7432 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7433 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7434 | # A "../" for each directory in $ac_dir_suffix. |
| 7435 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
| 7436 | else |
| 7437 | ac_dir_suffix= ac_dots= |
| 7438 | fi |
| 7439 | |
| 7440 | case "$ac_given_srcdir" in |
| 7441 | .) srcdir=. |
| 7442 | if test -z "$ac_dots"; then top_srcdir=. |
| 7443 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
| 7444 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; |
| 7445 | *) # Relative path. |
| 7446 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 7447 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
| 7448 | esac |
| 7449 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7450 | case "$ac_given_INSTALL" in |
| 7451 | [/$]*) INSTALL="$ac_given_INSTALL" ;; |
| 7452 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
| 7453 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7454 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7455 | echo creating "$ac_file" |
| 7456 | rm -f "$ac_file" |
| 7457 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
| 7458 | case "$ac_file" in |
| 7459 | *Makefile*) ac_comsub="1i\\ |
| 7460 | # $configure_input" ;; |
| 7461 | *) ac_comsub= ;; |
| 7462 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7463 | |
| 7464 | 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] | 7465 | sed -e "$ac_comsub |
| 7466 | s%@configure_input@%$configure_input%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7467 | s%@srcdir@%$srcdir%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7468 | s%@top_srcdir@%$top_srcdir%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7469 | s%@INSTALL@%$INSTALL%g |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7470 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7471 | fi; done |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7472 | rm -f conftest.s* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7473 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7474 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
| 7475 | # 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] | 7476 | # |
| 7477 | # ac_d sets the value in "#define NAME VALUE" lines. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7478 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 7479 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7480 | ac_dC='\3' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7481 | ac_dD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7482 | # 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] | 7483 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7484 | ac_uB='\([ ]\)%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7485 | ac_uC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7486 | ac_uD='\4%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7487 | # 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] | 7488 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7489 | ac_eB='$%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7490 | ac_eC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7491 | ac_eD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7492 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7493 | if test "${CONFIG_HEADERS+set}" != set; then |
| 7494 | EOF |
| 7495 | cat >> $CONFIG_STATUS <<EOF |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7496 | CONFIG_HEADERS="pyconfig.h" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7497 | EOF |
| 7498 | cat >> $CONFIG_STATUS <<\EOF |
| 7499 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7500 | 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] | 7501 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7502 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7503 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7504 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7505 | *) ac_file_in="${ac_file}.in" ;; |
| 7506 | esac |
| 7507 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7508 | echo creating $ac_file |
| 7509 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7510 | rm -f conftest.frag conftest.in conftest.out |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7511 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 7512 | cat $ac_file_inputs > conftest.in |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7513 | |
| 7514 | EOF |
| 7515 | |
| 7516 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
| 7517 | # 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] | 7518 | # 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] | 7519 | # Protect against being in an unquoted here document in config.status. |
| 7520 | rm -f conftest.vals |
| 7521 | cat > conftest.hdr <<\EOF |
| 7522 | s/[\\&%]/\\&/g |
| 7523 | s%[\\$`]%\\&%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7524 | 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] | 7525 | s%ac_d%ac_u%gp |
| 7526 | s%ac_u%ac_e%gp |
| 7527 | EOF |
| 7528 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
| 7529 | rm -f conftest.hdr |
| 7530 | |
| 7531 | # This sed command replaces #undef with comments. This is necessary, for |
| 7532 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 7533 | # on some systems where configure will not decide to define it. |
| 7534 | cat >> conftest.vals <<\EOF |
| 7535 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
| 7536 | EOF |
| 7537 | |
| 7538 | # Break up conftest.vals because some shells have a limit on |
| 7539 | # 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] | 7540 | |
| 7541 | rm -f conftest.tail |
| 7542 | while : |
| 7543 | do |
| 7544 | ac_lines=`grep -c . conftest.vals` |
| 7545 | # grep -c gives empty output for an empty file on some AIX systems. |
| 7546 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 7547 | # Write a limited-size here document to conftest.frag. |
| 7548 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
| 7549 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
| 7550 | echo 'CEOF |
| 7551 | sed -f conftest.frag conftest.in > conftest.out |
| 7552 | rm -f conftest.in |
| 7553 | mv conftest.out conftest.in |
| 7554 | ' >> $CONFIG_STATUS |
| 7555 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
| 7556 | rm -f conftest.vals |
| 7557 | mv conftest.tail conftest.vals |
| 7558 | done |
| 7559 | rm -f conftest.vals |
| 7560 | |
| 7561 | cat >> $CONFIG_STATUS <<\EOF |
| 7562 | rm -f conftest.frag conftest.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7563 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7564 | cat conftest.in >> conftest.h |
| 7565 | rm -f conftest.in |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7566 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7567 | echo "$ac_file is unchanged" |
| 7568 | rm -f conftest.h |
| 7569 | else |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7570 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7571 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7572 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7573 | # The file is in a subdirectory. |
| 7574 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 7575 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7576 | rm -f $ac_file |
| 7577 | mv conftest.h $ac_file |
| 7578 | fi |
| 7579 | fi; done |
| 7580 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7581 | EOF |
| 7582 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7583 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7584 | EOF |
| 7585 | cat >> $CONFIG_STATUS <<\EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7586 | |
| 7587 | exit 0 |
| 7588 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7589 | chmod +x $CONFIG_STATUS |
| 7590 | rm -fr confdefs* $ac_clean_files |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7591 | 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] | 7592 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7593 | |
| 7594 | echo "creating Setup" |
| 7595 | if test ! -f Modules/Setup |
| 7596 | then |
| 7597 | cp $srcdir/Modules/Setup.dist Modules/Setup |
| 7598 | fi |
| 7599 | |
| 7600 | echo "creating Setup.local" |
| 7601 | if test ! -f Modules/Setup.local |
| 7602 | then |
| 7603 | echo "# Edit this file for local setup changes" >Modules/Setup.local |
| 7604 | fi |
| 7605 | |
| 7606 | echo "creating Makefile" |
| 7607 | $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ |
| 7608 | -s Modules Modules/Setup.config \ |
Neil Schemenauer | f8b71c5 | 2001-04-21 17:41:16 +0000 | [diff] [blame] | 7609 | Modules/Setup.local Modules/Setup |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 7610 | mv config.c Modules |