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 | c524d95 | 2001-10-19 01:31:59 +0000 | [diff] [blame] | 3 | # From configure.in Revision: 1.274 |
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 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 743 | |
| 744 | |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 745 | if test "$check_cxx" = "yes" |
| 746 | then |
| 747 | for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl |
| 748 | do |
| 749 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 750 | set dummy $ac_prog; ac_word=$2 |
| 751 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 752 | echo "configure:753: checking for $ac_word" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 753 | if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then |
| 754 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 755 | else |
| 756 | if test -n "$CXX"; then |
| 757 | ac_cv_prog_CXX="$CXX" # Let the user override the test. |
| 758 | else |
| 759 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 760 | ac_dummy="$PATH" |
| 761 | for ac_dir in $ac_dummy; do |
| 762 | test -z "$ac_dir" && ac_dir=. |
| 763 | if test -f $ac_dir/$ac_word; then |
| 764 | ac_cv_prog_CXX="$ac_prog" |
| 765 | break |
| 766 | fi |
| 767 | done |
| 768 | IFS="$ac_save_ifs" |
| 769 | fi |
| 770 | fi |
| 771 | CXX="$ac_cv_prog_CXX" |
| 772 | if test -n "$CXX"; then |
| 773 | echo "$ac_t""$CXX" 1>&6 |
| 774 | else |
| 775 | echo "$ac_t""no" 1>&6 |
| 776 | fi |
| 777 | |
| 778 | test -n "$CXX" && break |
| 779 | done |
| 780 | test -n "$CXX" || CXX="notfound" |
| 781 | |
| 782 | if test "$CXX" = "notfound" |
| 783 | then |
| 784 | CXX= |
| 785 | else |
| 786 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 787 | echo "configure:788: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 788 | |
| 789 | ac_ext=C |
| 790 | # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 791 | ac_cpp='$CXXCPP $CPPFLAGS' |
| 792 | ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 793 | ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 794 | cross_compiling=$ac_cv_prog_cxx_cross |
| 795 | |
| 796 | cat > conftest.$ac_ext << EOF |
| 797 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 798 | #line 799 "configure" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 799 | #include "confdefs.h" |
| 800 | |
| 801 | int main(){return(0);} |
| 802 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 803 | if { (eval echo configure:804: \"$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] | 804 | ac_cv_prog_cxx_works=yes |
| 805 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 806 | if (./conftest; exit) 2>/dev/null; then |
| 807 | ac_cv_prog_cxx_cross=no |
| 808 | else |
| 809 | ac_cv_prog_cxx_cross=yes |
| 810 | fi |
| 811 | else |
| 812 | echo "configure: failed program was:" >&5 |
| 813 | cat conftest.$ac_ext >&5 |
| 814 | ac_cv_prog_cxx_works=no |
| 815 | fi |
| 816 | rm -fr conftest* |
| 817 | ac_ext=c |
| 818 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 819 | ac_cpp='$CPP $CPPFLAGS' |
| 820 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 821 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 822 | cross_compiling=$ac_cv_prog_cc_cross |
| 823 | |
| 824 | echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 |
| 825 | if test $ac_cv_prog_cxx_works = no; then |
| 826 | { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } |
| 827 | fi |
| 828 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 829 | echo "configure:830: 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] | 830 | echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 |
| 831 | cross_compiling=$ac_cv_prog_cxx_cross |
| 832 | |
| 833 | fi |
| 834 | fi |
| 835 | |
Guido van Rossum | 8b131c5 | 1995-03-09 14:10:13 +0000 | [diff] [blame] | 836 | # If the user switches compilers, we can't believe the cache |
| 837 | if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" |
| 838 | then |
| 839 | { echo "configure: error: cached CC is different -- throw away $cache_file |
| 840 | (it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; } |
| 841 | fi |
| 842 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 843 | # Extract the first word of "gcc", so it can be a program name with args. |
| 844 | set dummy gcc; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 845 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 846 | echo "configure:847: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 847 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 848 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 849 | else |
| 850 | if test -n "$CC"; then |
| 851 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 852 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 853 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 854 | ac_dummy="$PATH" |
| 855 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 856 | test -z "$ac_dir" && ac_dir=. |
| 857 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 858 | ac_cv_prog_CC="gcc" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 859 | break |
| 860 | fi |
| 861 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 862 | IFS="$ac_save_ifs" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 863 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 864 | fi |
| 865 | CC="$ac_cv_prog_CC" |
| 866 | if test -n "$CC"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 867 | echo "$ac_t""$CC" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 868 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 869 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 870 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 871 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 872 | if test -z "$CC"; then |
| 873 | # Extract the first word of "cc", so it can be a program name with args. |
| 874 | set dummy cc; ac_word=$2 |
| 875 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 876 | echo "configure:877: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 877 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 878 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 879 | else |
| 880 | if test -n "$CC"; then |
| 881 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 882 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 883 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 884 | ac_prog_rejected=no |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 885 | ac_dummy="$PATH" |
| 886 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 887 | test -z "$ac_dir" && ac_dir=. |
| 888 | if test -f $ac_dir/$ac_word; then |
| 889 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then |
| 890 | ac_prog_rejected=yes |
| 891 | continue |
| 892 | fi |
| 893 | ac_cv_prog_CC="cc" |
| 894 | break |
| 895 | fi |
| 896 | done |
| 897 | IFS="$ac_save_ifs" |
| 898 | if test $ac_prog_rejected = yes; then |
| 899 | # We found a bogon in the path, so make sure we never use it. |
| 900 | set dummy $ac_cv_prog_CC |
| 901 | shift |
| 902 | if test $# -gt 0; then |
| 903 | # We chose a different compiler from the bogus one. |
| 904 | # However, it has the same basename, so the bogon will be chosen |
| 905 | # first if we set CC to just the basename; use the full file name. |
| 906 | shift |
| 907 | set dummy "$ac_dir/$ac_word" "$@" |
| 908 | shift |
| 909 | ac_cv_prog_CC="$@" |
| 910 | fi |
| 911 | fi |
| 912 | fi |
| 913 | fi |
| 914 | CC="$ac_cv_prog_CC" |
| 915 | if test -n "$CC"; then |
| 916 | echo "$ac_t""$CC" 1>&6 |
| 917 | else |
| 918 | echo "$ac_t""no" 1>&6 |
| 919 | fi |
| 920 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 921 | if test -z "$CC"; then |
| 922 | case "`uname -s`" in |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 923 | *win32* | *WIN32*) |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 924 | # Extract the first word of "cl", so it can be a program name with args. |
| 925 | set dummy cl; ac_word=$2 |
| 926 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 927 | echo "configure:928: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 928 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 929 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 930 | else |
| 931 | if test -n "$CC"; then |
| 932 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 933 | else |
| 934 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 935 | ac_dummy="$PATH" |
| 936 | for ac_dir in $ac_dummy; do |
| 937 | test -z "$ac_dir" && ac_dir=. |
| 938 | if test -f $ac_dir/$ac_word; then |
| 939 | ac_cv_prog_CC="cl" |
| 940 | break |
| 941 | fi |
| 942 | done |
| 943 | IFS="$ac_save_ifs" |
| 944 | fi |
| 945 | fi |
| 946 | CC="$ac_cv_prog_CC" |
| 947 | if test -n "$CC"; then |
| 948 | echo "$ac_t""$CC" 1>&6 |
| 949 | else |
| 950 | echo "$ac_t""no" 1>&6 |
| 951 | fi |
| 952 | ;; |
| 953 | esac |
| 954 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 955 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
| 956 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 957 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 958 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 959 | echo "configure:960: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 960 | |
| 961 | ac_ext=c |
| 962 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 963 | ac_cpp='$CPP $CPPFLAGS' |
| 964 | 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] | 965 | 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] | 966 | cross_compiling=$ac_cv_prog_cc_cross |
| 967 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 968 | cat > conftest.$ac_ext << EOF |
| 969 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 970 | #line 971 "configure" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 971 | #include "confdefs.h" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 972 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 973 | main(){return(0);} |
| 974 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 975 | if { (eval echo configure:976: \"$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] | 976 | ac_cv_prog_cc_works=yes |
| 977 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 978 | if (./conftest; exit) 2>/dev/null; then |
| 979 | ac_cv_prog_cc_cross=no |
| 980 | else |
| 981 | ac_cv_prog_cc_cross=yes |
| 982 | fi |
| 983 | else |
| 984 | echo "configure: failed program was:" >&5 |
| 985 | cat conftest.$ac_ext >&5 |
| 986 | ac_cv_prog_cc_works=no |
| 987 | fi |
| 988 | rm -fr conftest* |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 989 | ac_ext=c |
| 990 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 991 | ac_cpp='$CPP $CPPFLAGS' |
| 992 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 993 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 994 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 995 | |
| 996 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
| 997 | if test $ac_cv_prog_cc_works = no; then |
| 998 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } |
| 999 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1000 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1001 | echo "configure:1002: 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] | 1002 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
| 1003 | cross_compiling=$ac_cv_prog_cc_cross |
| 1004 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1005 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1006 | echo "configure:1007: checking whether we are using GNU C" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1007 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1008 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1009 | else |
| 1010 | cat > conftest.c <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1011 | #ifdef __GNUC__ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1012 | yes; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1013 | #endif |
| 1014 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1015 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1016: \"$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] | 1016 | ac_cv_prog_gcc=yes |
| 1017 | else |
| 1018 | ac_cv_prog_gcc=no |
| 1019 | fi |
| 1020 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1021 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1022 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1023 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1024 | if test $ac_cv_prog_gcc = yes; then |
| 1025 | GCC=yes |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1026 | else |
| 1027 | GCC= |
| 1028 | fi |
| 1029 | |
| 1030 | ac_test_CFLAGS="${CFLAGS+set}" |
| 1031 | ac_save_CFLAGS="$CFLAGS" |
| 1032 | CFLAGS= |
| 1033 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1034 | echo "configure:1035: checking whether ${CC-cc} accepts -g" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1035 | 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] | 1036 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1037 | else |
| 1038 | echo 'void f(){}' > conftest.c |
| 1039 | 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] | 1040 | ac_cv_prog_cc_g=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1041 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1042 | ac_cv_prog_cc_g=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1043 | fi |
| 1044 | rm -f conftest* |
| 1045 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1046 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1047 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1048 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1049 | if test "$ac_test_CFLAGS" = set; then |
| 1050 | CFLAGS="$ac_save_CFLAGS" |
| 1051 | elif test $ac_cv_prog_cc_g = yes; then |
| 1052 | if test "$GCC" = yes; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1053 | CFLAGS="-g -O2" |
| 1054 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1055 | CFLAGS="-g" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1056 | fi |
| 1057 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1058 | if test "$GCC" = yes; then |
| 1059 | CFLAGS="-O2" |
| 1060 | else |
| 1061 | CFLAGS= |
| 1062 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1063 | fi |
| 1064 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1065 | |
| 1066 | # checks for UNIX variants that set C preprocessor variables |
| 1067 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1068 | echo "configure:1069: checking how to run the C preprocessor" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1069 | # On Suns, sometimes $CPP names a directory. |
| 1070 | if test -n "$CPP" && test -d "$CPP"; then |
| 1071 | CPP= |
| 1072 | fi |
| 1073 | if test -z "$CPP"; then |
| 1074 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
| 1075 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1076 | else |
| 1077 | # This must be in double quotes, not single quotes, because CPP may get |
| 1078 | # substituted into the Makefile and "${CC-cc}" will confuse make. |
| 1079 | CPP="${CC-cc} -E" |
| 1080 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 1081 | # not just through cpp. |
| 1082 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1083 | #line 1084 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1084 | #include "confdefs.h" |
| 1085 | #include <assert.h> |
| 1086 | Syntax Error |
| 1087 | EOF |
| 1088 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1089 | { (eval echo configure:1090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1090 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1091 | if test -z "$ac_err"; then |
| 1092 | : |
| 1093 | else |
| 1094 | echo "$ac_err" >&5 |
| 1095 | echo "configure: failed program was:" >&5 |
| 1096 | cat conftest.$ac_ext >&5 |
| 1097 | rm -rf conftest* |
| 1098 | CPP="${CC-cc} -E -traditional-cpp" |
| 1099 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1100 | #line 1101 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1101 | #include "confdefs.h" |
| 1102 | #include <assert.h> |
| 1103 | Syntax Error |
| 1104 | EOF |
| 1105 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1106 | { (eval echo configure:1107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1107 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1108 | if test -z "$ac_err"; then |
| 1109 | : |
| 1110 | else |
| 1111 | echo "$ac_err" >&5 |
| 1112 | echo "configure: failed program was:" >&5 |
| 1113 | cat conftest.$ac_ext >&5 |
| 1114 | rm -rf conftest* |
| 1115 | CPP="${CC-cc} -nologo -E" |
| 1116 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1117 | #line 1118 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1118 | #include "confdefs.h" |
| 1119 | #include <assert.h> |
| 1120 | Syntax Error |
| 1121 | EOF |
| 1122 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1123 | { (eval echo configure:1124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1124 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1125 | if test -z "$ac_err"; then |
| 1126 | : |
| 1127 | else |
| 1128 | echo "$ac_err" >&5 |
| 1129 | echo "configure: failed program was:" >&5 |
| 1130 | cat conftest.$ac_ext >&5 |
| 1131 | rm -rf conftest* |
| 1132 | CPP=/lib/cpp |
| 1133 | fi |
| 1134 | rm -f conftest* |
| 1135 | fi |
| 1136 | rm -f conftest* |
| 1137 | fi |
| 1138 | rm -f conftest* |
| 1139 | ac_cv_prog_CPP="$CPP" |
| 1140 | fi |
| 1141 | CPP="$ac_cv_prog_CPP" |
| 1142 | else |
| 1143 | ac_cv_prog_CPP="$CPP" |
| 1144 | fi |
| 1145 | echo "$ac_t""$CPP" 1>&6 |
| 1146 | |
| 1147 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1148 | echo "configure:1149: checking for AIX" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1149 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1150 | #line 1151 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1151 | #include "confdefs.h" |
| 1152 | #ifdef _AIX |
| 1153 | yes |
| 1154 | #endif |
| 1155 | |
| 1156 | EOF |
| 1157 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1158 | egrep "yes" >/dev/null 2>&1; then |
| 1159 | rm -rf conftest* |
| 1160 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF |
| 1161 | #define _ALL_SOURCE 1 |
| 1162 | EOF |
| 1163 | |
| 1164 | else |
| 1165 | rm -rf conftest* |
| 1166 | echo "$ac_t""no" 1>&6 |
| 1167 | fi |
| 1168 | rm -f conftest* |
| 1169 | |
| 1170 | |
| 1171 | ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` |
| 1172 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1173 | echo "configure:1174: checking for minix/config.h" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1174 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 1175 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1176 | else |
| 1177 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1178 | #line 1179 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1179 | #include "confdefs.h" |
| 1180 | #include <minix/config.h> |
| 1181 | EOF |
| 1182 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1183 | { (eval echo configure:1184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1184 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1185 | if test -z "$ac_err"; then |
| 1186 | rm -rf conftest* |
| 1187 | eval "ac_cv_header_$ac_safe=yes" |
| 1188 | else |
| 1189 | echo "$ac_err" >&5 |
| 1190 | echo "configure: failed program was:" >&5 |
| 1191 | cat conftest.$ac_ext >&5 |
| 1192 | rm -rf conftest* |
| 1193 | eval "ac_cv_header_$ac_safe=no" |
| 1194 | fi |
| 1195 | rm -f conftest* |
| 1196 | fi |
| 1197 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 1198 | echo "$ac_t""yes" 1>&6 |
| 1199 | MINIX=yes |
| 1200 | else |
| 1201 | echo "$ac_t""no" 1>&6 |
| 1202 | MINIX= |
| 1203 | fi |
| 1204 | |
| 1205 | if test "$MINIX" = yes; then |
| 1206 | cat >> confdefs.h <<\EOF |
| 1207 | #define _POSIX_SOURCE 1 |
| 1208 | EOF |
| 1209 | |
| 1210 | cat >> confdefs.h <<\EOF |
| 1211 | #define _POSIX_1_SOURCE 2 |
| 1212 | EOF |
| 1213 | |
| 1214 | cat >> confdefs.h <<\EOF |
| 1215 | #define _MINIX 1 |
| 1216 | EOF |
| 1217 | |
| 1218 | fi |
| 1219 | |
| 1220 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1221 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1222 | echo "configure:1223: checking for Cygwin environment" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1223 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
| 1224 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1225 | else |
| 1226 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1227 | #line 1228 "configure" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1228 | #include "confdefs.h" |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1229 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1230 | int main() { |
| 1231 | |
| 1232 | #ifndef __CYGWIN__ |
| 1233 | #define __CYGWIN__ __CYGWIN32__ |
| 1234 | #endif |
| 1235 | return __CYGWIN__; |
| 1236 | ; return 0; } |
| 1237 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1238 | if { (eval echo configure:1239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1239 | rm -rf conftest* |
| 1240 | ac_cv_cygwin=yes |
| 1241 | else |
| 1242 | echo "configure: failed program was:" >&5 |
| 1243 | cat conftest.$ac_ext >&5 |
| 1244 | rm -rf conftest* |
| 1245 | ac_cv_cygwin=no |
| 1246 | fi |
| 1247 | rm -f conftest* |
| 1248 | rm -f conftest* |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1249 | fi |
| 1250 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1251 | echo "$ac_t""$ac_cv_cygwin" 1>&6 |
| 1252 | CYGWIN= |
| 1253 | test "$ac_cv_cygwin" = yes && CYGWIN=yes |
| 1254 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1255 | echo "configure:1256: checking for mingw32 environment" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1256 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
| 1257 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1258 | else |
| 1259 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1260 | #line 1261 "configure" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1261 | #include "confdefs.h" |
| 1262 | |
| 1263 | int main() { |
| 1264 | return __MINGW32__; |
| 1265 | ; return 0; } |
| 1266 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1267 | if { (eval echo configure:1268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1268 | rm -rf conftest* |
| 1269 | ac_cv_mingw32=yes |
| 1270 | else |
| 1271 | echo "configure: failed program was:" >&5 |
| 1272 | cat conftest.$ac_ext >&5 |
| 1273 | rm -rf conftest* |
| 1274 | ac_cv_mingw32=no |
| 1275 | fi |
| 1276 | rm -f conftest* |
| 1277 | rm -f conftest* |
| 1278 | fi |
| 1279 | |
| 1280 | echo "$ac_t""$ac_cv_mingw32" 1>&6 |
| 1281 | MINGW32= |
| 1282 | test "$ac_cv_mingw32" = yes && MINGW32=yes |
| 1283 | |
| 1284 | |
| 1285 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1286 | echo "configure:1287: checking for executable suffix" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1287 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
| 1288 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1289 | else |
| 1290 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then |
| 1291 | ac_cv_exeext=.exe |
| 1292 | else |
| 1293 | rm -f conftest* |
| 1294 | echo 'int main () { return 0; }' > conftest.$ac_ext |
| 1295 | ac_cv_exeext= |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1296 | if { (eval echo configure:1297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1297 | for file in conftest.*; do |
| 1298 | case $file in |
| 1299 | *.c | *.o | *.obj) ;; |
| 1300 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
| 1301 | esac |
| 1302 | done |
| 1303 | else |
| 1304 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } |
| 1305 | fi |
| 1306 | rm -f conftest* |
| 1307 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no |
| 1308 | fi |
| 1309 | fi |
| 1310 | |
| 1311 | EXEEXT="" |
| 1312 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} |
| 1313 | echo "$ac_t""${ac_cv_exeext}" 1>&6 |
| 1314 | ac_exeext=$EXEEXT |
| 1315 | |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1316 | echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1317 | echo "configure:1318: checking for --with-suffix" >&5 |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1318 | # Check whether --with-suffix or --without-suffix was given. |
| 1319 | if test "${with_suffix+set}" = set; then |
| 1320 | withval="$with_suffix" |
| 1321 | |
| 1322 | case $withval in |
| 1323 | no) EXEEXT=;; |
| 1324 | yes) EXEEXT=.exe;; |
| 1325 | *) EXEEXT=$withval;; |
| 1326 | esac |
| 1327 | fi |
| 1328 | |
| 1329 | echo "$ac_t""$EXEEXT" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1330 | # Test whether we're running on a non-case-sensitive system, in which |
| 1331 | # case we give a warning if no ext is given |
| 1332 | if test -d "python" -a -z "$EXEEXT" |
| 1333 | then |
| 1334 | echo "configure: warning: This filesystem is not case-sensitive so you should probably use --with-suffix" 1>&2 |
| 1335 | fi |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1336 | |
Guido van Rossum | dd997f7 | 1998-10-07 19:58:26 +0000 | [diff] [blame] | 1337 | case $MACHDEP in |
| 1338 | bsdos*) |
| 1339 | case $CC in |
| 1340 | gcc) CC="$CC -D_HAVE_BSDI";; |
| 1341 | esac;; |
| 1342 | esac |
| 1343 | |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1344 | case $ac_sys_system in |
| 1345 | hp*|HP*) |
| 1346 | case $CC in |
Guido van Rossum | cd5ff9f | 2000-09-22 16:15:54 +0000 | [diff] [blame] | 1347 | cc|*/cc) CC="$CC -Ae";; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1348 | esac;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1349 | Monterey*) |
| 1350 | case $CC in |
| 1351 | cc) CC="$CC -Wl,-Bexport";; |
| 1352 | esac;; |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1353 | SunOS*) |
| 1354 | # Some functions have a prototype only with that define, e.g. confstr |
| 1355 | cat >> confdefs.h <<\EOF |
| 1356 | #define __EXTENSIONS__ 1 |
| 1357 | EOF |
| 1358 | |
| 1359 | ;; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1360 | esac |
| 1361 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1362 | |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1363 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1364 | echo $ac_n "checking LIBRARY""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1365 | echo "configure:1366: checking LIBRARY" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1366 | if test -z "$LIBRARY" |
| 1367 | then |
| 1368 | LIBRARY='libpython$(VERSION).a' |
| 1369 | fi |
| 1370 | echo "$ac_t""$LIBRARY" 1>&6 |
| 1371 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1372 | # 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] | 1373 | # name of the library into which to insert object files). BLDLIBRARY is also |
| 1374 | # the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY |
| 1375 | # is blank as the main program is not linked directly against LDLIBRARY. |
| 1376 | # LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On |
| 1377 | # systems without shared libraries, LDLIBRARY is the same as LIBRARY |
| 1378 | # (defined in the Makefiles). On Cygwin LDLIBRARY is the import library, |
| 1379 | # DLLLIBRARY is the shared (i.e., DLL) library. |
| 1380 | # |
| 1381 | |
| 1382 | |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1383 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1384 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1385 | LDLIBRARY="$LIBRARY" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1386 | BLDLIBRARY='$(LDLIBRARY)' |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 1387 | DLLLIBRARY='' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1388 | LDLIBRARYDIR='' |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1389 | |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1390 | # LINKCC is the command that links the python executable -- default is $(CC). |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1391 | # If CXX is set, and if it is needed to link a main function that was |
| 1392 | # compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable: |
| 1393 | # python might then depend on the C++ runtime |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1394 | # 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] | 1395 | # linking. |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1396 | |
| 1397 | echo $ac_n "checking LINKCC""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1398 | echo "configure:1399: checking LINKCC" >&5 |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1399 | if test -z "$LINKCC" |
| 1400 | then |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1401 | if test -z "$CXX"; then |
| 1402 | LINKCC="\$(PURIFY) \$(CC)" |
| 1403 | else |
| 1404 | echo 'int main(){return 0;}' > conftest.$ac_ext |
| 1405 | $CXX -c conftest.$ac_ext 2>&5 |
| 1406 | if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \ |
| 1407 | && test -s conftest$ac_exeext && ./conftest$ac_exeext |
| 1408 | then |
| 1409 | LINKCC="\$(PURIFY) \$(CC)" |
| 1410 | else |
| 1411 | LINKCC="\$(PURIFY) \$(CXX)" |
| 1412 | fi |
| 1413 | rm -fr conftest* |
| 1414 | fi |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1415 | case $ac_sys_system in |
| 1416 | AIX*) |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1417 | LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $(LINKCC)";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 1418 | dgux*) |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1419 | LINKCC="LD_RUN_PATH=$libdir $(LINKCC)";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1420 | Monterey64*) |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1421 | LINKCC="$(LINKCC) -L/usr/lib/ia64l64";; |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1422 | esac |
| 1423 | fi |
| 1424 | echo "$ac_t""$LINKCC" 1>&6 |
| 1425 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1426 | echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1427 | echo "configure:1428: checking LDLIBRARY" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1428 | |
| 1429 | # 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] | 1430 | case $MACHDEP in |
| 1431 | dguxR4) |
| 1432 | LDLIBRARY='libpython$(VERSION).so' |
| 1433 | OPT="$OPT -pic" |
| 1434 | ;; |
| 1435 | beos*) |
| 1436 | LDLIBRARY='libpython$(VERSION).so' |
| 1437 | ;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1438 | cygwin*) |
| 1439 | LDLIBRARY='libpython$(VERSION).dll.a' |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1440 | DLLLIBRARY='libpython$(VERSION).dll' |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1441 | ;; |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1442 | esac |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1443 | |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 1444 | # MacOSX framework builds need more magic. LDLIBRARY is the dynamic |
| 1445 | # library that we build, but we do not want to link against it (we |
| 1446 | # will find it with a -framework option). For this reason there is an |
| 1447 | # extra variable BLDLIBRARY against which Python and the extension |
| 1448 | # modules are linked, BLDLIBRARY. This is normally the same as |
| 1449 | # LDLIBRARY, but empty for MacOSX framework builds. |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1450 | if test "$enable_framework" |
| 1451 | then |
| 1452 | LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
| 1453 | LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)' |
| 1454 | BLDLIBRARY='' |
| 1455 | else |
| 1456 | BLDLIBRARY='$(LDLIBRARY)' |
| 1457 | fi |
| 1458 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1459 | echo "$ac_t""$LDLIBRARY" 1>&6 |
| 1460 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1461 | # Extract the first word of "ranlib", so it can be a program name with args. |
| 1462 | set dummy ranlib; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1463 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1464 | echo "configure:1465: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1465 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1466 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1467 | else |
| 1468 | if test -n "$RANLIB"; then |
| 1469 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 1470 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1471 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1472 | ac_dummy="$PATH" |
| 1473 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1474 | test -z "$ac_dir" && ac_dir=. |
| 1475 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1476 | ac_cv_prog_RANLIB="ranlib" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1477 | break |
| 1478 | fi |
| 1479 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1480 | IFS="$ac_save_ifs" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1481 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1482 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1483 | fi |
| 1484 | RANLIB="$ac_cv_prog_RANLIB" |
| 1485 | if test -n "$RANLIB"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1486 | echo "$ac_t""$RANLIB" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1487 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1488 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1489 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1490 | |
| 1491 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1492 | for ac_prog in ar aal |
| 1493 | do |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1494 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 1495 | set dummy $ac_prog; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1496 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1497 | echo "configure:1498: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1498 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1499 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1500 | else |
| 1501 | if test -n "$AR"; then |
| 1502 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 1503 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1504 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1505 | ac_dummy="$PATH" |
| 1506 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1507 | test -z "$ac_dir" && ac_dir=. |
| 1508 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1509 | ac_cv_prog_AR="$ac_prog" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1510 | break |
| 1511 | fi |
| 1512 | done |
| 1513 | IFS="$ac_save_ifs" |
| 1514 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1515 | fi |
| 1516 | AR="$ac_cv_prog_AR" |
| 1517 | if test -n "$AR"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1518 | echo "$ac_t""$AR" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1519 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1520 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1521 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1522 | |
| 1523 | test -n "$AR" && break |
| 1524 | done |
| 1525 | test -n "$AR" || AR="ar" |
| 1526 | |
Neil Schemenauer | a42c827 | 2001-03-31 00:01:55 +0000 | [diff] [blame] | 1527 | |
| 1528 | case $MACHDEP in |
| 1529 | bsdos*) |
| 1530 | # install -d does not work on BSDI |
| 1531 | if test -z "$INSTALL" |
| 1532 | then |
| 1533 | INSTALL="${srcdir}/install-sh -c" |
| 1534 | fi |
| 1535 | esac |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1536 | ac_aux_dir= |
| 1537 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
| 1538 | if test -f $ac_dir/install-sh; then |
| 1539 | ac_aux_dir=$ac_dir |
| 1540 | ac_install_sh="$ac_aux_dir/install-sh -c" |
| 1541 | break |
| 1542 | elif test -f $ac_dir/install.sh; then |
| 1543 | ac_aux_dir=$ac_dir |
| 1544 | ac_install_sh="$ac_aux_dir/install.sh -c" |
| 1545 | break |
| 1546 | fi |
| 1547 | done |
| 1548 | if test -z "$ac_aux_dir"; then |
| 1549 | { 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] | 1550 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1551 | ac_config_guess=$ac_aux_dir/config.guess |
| 1552 | ac_config_sub=$ac_aux_dir/config.sub |
| 1553 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. |
| 1554 | |
| 1555 | # Find a good install program. We prefer a C program (faster), |
| 1556 | # so one script is as good as another. But avoid the broken or |
| 1557 | # incompatible versions: |
| 1558 | # SysV /etc/install, /usr/sbin/install |
| 1559 | # SunOS /usr/etc/install |
| 1560 | # IRIX /sbin/install |
| 1561 | # AIX /bin/install |
| 1562 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
| 1563 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
| 1564 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
| 1565 | # ./install, which can be erroneously created by make from ./install.sh. |
| 1566 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1567 | echo "configure:1568: checking for a BSD compatible install" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1568 | if test -z "$INSTALL"; then |
| 1569 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
| 1570 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1571 | else |
| 1572 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" |
| 1573 | for ac_dir in $PATH; do |
| 1574 | # Account for people who put trailing slashes in PATH elements. |
| 1575 | case "$ac_dir/" in |
| 1576 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; |
| 1577 | *) |
| 1578 | # OSF1 and SCO ODT 3.0 have their own names for install. |
| 1579 | # Don't use installbsd from OSF since it installs stuff as root |
| 1580 | # by default. |
| 1581 | for ac_prog in ginstall scoinst install; do |
| 1582 | if test -f $ac_dir/$ac_prog; then |
| 1583 | if test $ac_prog = install && |
| 1584 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then |
| 1585 | # AIX install. It has an incompatible calling convention. |
| 1586 | : |
| 1587 | else |
| 1588 | ac_cv_path_install="$ac_dir/$ac_prog -c" |
| 1589 | break 2 |
| 1590 | fi |
| 1591 | fi |
| 1592 | done |
| 1593 | ;; |
| 1594 | esac |
| 1595 | done |
| 1596 | IFS="$ac_save_IFS" |
| 1597 | |
| 1598 | fi |
| 1599 | if test "${ac_cv_path_install+set}" = set; then |
| 1600 | INSTALL="$ac_cv_path_install" |
| 1601 | else |
| 1602 | # As a last resort, use the slow shell script. We don't cache a |
| 1603 | # path for INSTALL within a source directory, because that will |
| 1604 | # break other packages using the cache if that directory is |
| 1605 | # removed, or if the path is relative. |
| 1606 | INSTALL="$ac_install_sh" |
| 1607 | fi |
| 1608 | fi |
| 1609 | echo "$ac_t""$INSTALL" 1>&6 |
| 1610 | |
| 1611 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
| 1612 | # It thinks the first close brace ends the variable substitution. |
| 1613 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' |
| 1614 | |
| 1615 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
| 1616 | |
| 1617 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
| 1618 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1619 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1620 | # Not every filesystem supports hard links |
| 1621 | |
| 1622 | if test -z "$LN" ; then |
| 1623 | case $ac_sys_system in |
| 1624 | BeOS*) LN="ln -s";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1625 | CYGWIN*) LN="ln -s";; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1626 | *) LN=ln;; |
| 1627 | esac |
| 1628 | fi |
| 1629 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1630 | # Check for --with-pydebug |
| 1631 | echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1632 | echo "configure:1633: checking for --with-pydebug" >&5 |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1633 | # Check whether --with-pydebug or --without-pydebug was given. |
| 1634 | if test "${with_pydebug+set}" = set; then |
| 1635 | withval="$with_pydebug" |
| 1636 | |
| 1637 | if test "$withval" != no |
| 1638 | then cat >> confdefs.h <<\EOF |
| 1639 | #define Py_DEBUG 1 |
| 1640 | EOF |
| 1641 | echo "$ac_t""yes" 1>&6; Py_DEBUG='true' |
| 1642 | else echo "$ac_t""no" 1>&6; Py_DEBUG='false' |
| 1643 | fi |
| 1644 | else |
| 1645 | echo "$ac_t""no" 1>&6 |
| 1646 | fi |
| 1647 | |
| 1648 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1649 | # Optimizer/debugger flags |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1650 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1651 | if test -z "$OPT" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1652 | then |
Guido van Rossum | edca74a | 1997-07-18 23:29:40 +0000 | [diff] [blame] | 1653 | case $GCC in |
| 1654 | yes) |
| 1655 | case $ac_cv_prog_cc_g in |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1656 | yes) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1657 | if test "$Py_DEBUG" = 'true' ; then |
| 1658 | # Optimization messes up debuggers, so turn it off for |
| 1659 | # debug builds. |
| 1660 | OPT="-g -Wall -Wstrict-prototypes" |
| 1661 | else |
| 1662 | OPT="-g -O3 -Wall -Wstrict-prototypes" |
| 1663 | fi;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1664 | *) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1665 | OPT="-O3 -Wall -Wstrict-prototypes";; |
| 1666 | esac |
| 1667 | ;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1668 | *) |
| 1669 | case $ac_sys_system in |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 1670 | OpenUNIX*|UnixWare*) |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1671 | OPT="-O -K pentium,host,inline,loop_unroll,alloca ";; |
| 1672 | *) |
| 1673 | OPT="-O";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1674 | esac |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1675 | esac |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 1676 | case $ac_sys_system in |
| 1677 | Darwin*) |
| 1678 | OPT="$OPT -no-cpp-precomp";; |
| 1679 | esac |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1680 | fi |
| 1681 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1682 | # The current (beta) Monterey compiler dies with optimizations |
| 1683 | case $ac_sys_system in |
| 1684 | Monterey*) OPT="";; |
| 1685 | esac |
| 1686 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 1687 | if test "$ac_arch_flags" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 1688 | then |
| 1689 | OPT="$OPT $ac_arch_flags" |
| 1690 | fi |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1691 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1692 | echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1693 | echo "configure:1694: checking whether $CC accepts -OPT:Olimit=0" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1694 | 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] | 1695 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1696 | else |
| 1697 | ac_save_cc="$CC" |
| 1698 | CC="$CC -OPT:Olimit=0" |
| 1699 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 1700 | ac_cv_opt_olimit_ok=no |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1701 | else |
| 1702 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1703 | #line 1704 "configure" |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1704 | #include "confdefs.h" |
| 1705 | int main() { return 0; } |
| 1706 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1707 | if { (eval echo configure:1708: \"$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] | 1708 | then |
| 1709 | ac_cv_opt_olimit_ok=yes |
| 1710 | else |
| 1711 | echo "configure: failed program was:" >&5 |
| 1712 | cat conftest.$ac_ext >&5 |
| 1713 | rm -fr conftest* |
| 1714 | ac_cv_opt_olimit_ok=no |
| 1715 | fi |
| 1716 | rm -fr conftest* |
| 1717 | fi |
| 1718 | |
| 1719 | CC="$ac_save_cc" |
| 1720 | fi |
| 1721 | |
| 1722 | echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6 |
Guido van Rossum | 2efa34b | 1997-10-23 17:43:11 +0000 | [diff] [blame] | 1723 | if test $ac_cv_opt_olimit_ok = yes; then |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 1724 | case $ac_sys_system in |
| 1725 | Darwin*) OPT="$OPT" ;; |
| 1726 | *) OPT="$OPT -OPT:Olimit=0";; |
| 1727 | esac |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1728 | else |
| 1729 | echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1730 | echo "configure:1731: checking whether $CC accepts -Olimit 1500" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1731 | if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1732 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1733 | else |
| 1734 | ac_save_cc="$CC" |
| 1735 | CC="$CC -Olimit 1500" |
| 1736 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 1737 | ac_cv_olimit_ok=no |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1738 | else |
| 1739 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1740 | #line 1741 "configure" |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1741 | #include "confdefs.h" |
| 1742 | int main() { return 0; } |
| 1743 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1744 | if { (eval echo configure:1745: \"$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] | 1745 | then |
| 1746 | ac_cv_olimit_ok=yes |
| 1747 | else |
| 1748 | echo "configure: failed program was:" >&5 |
| 1749 | cat conftest.$ac_ext >&5 |
| 1750 | rm -fr conftest* |
| 1751 | ac_cv_olimit_ok=no |
Guido van Rossum | 201afe5 | 1997-05-14 21:14:44 +0000 | [diff] [blame] | 1752 | fi |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1753 | rm -fr conftest* |
| 1754 | fi |
| 1755 | |
| 1756 | CC="$ac_save_cc" |
| 1757 | fi |
| 1758 | |
| 1759 | echo "$ac_t""$ac_cv_olimit_ok" 1>&6 |
| 1760 | if test $ac_cv_olimit_ok = yes; then |
| 1761 | OPT="$OPT -Olimit 1500" |
| 1762 | fi |
| 1763 | fi |
| 1764 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1765 | # On some compilers, pthreads are available without further options |
| 1766 | # (e.g. MacOS X). On some of these systems, the compiler will not |
| 1767 | # complain if unaccepted options are passed (e.g. gcc on Mac OS X). |
| 1768 | # So we have to see first whether pthreads are available without |
| 1769 | # options before we can check whether -Kpthread improves anything. |
| 1770 | echo $ac_n "checking whether pthreads are available without options""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1771 | echo "configure:1772: checking whether pthreads are available without options" >&5 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1772 | if eval "test \"`echo '$''{'ac_cv_pthread_is_default'+set}'`\" = set"; then |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1773 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1774 | else |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1775 | if test "$cross_compiling" = yes; then |
| 1776 | ac_cv_pthread_is_default=no |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1777 | else |
| 1778 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1779 | #line 1780 "configure" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1780 | #include "confdefs.h" |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1781 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1782 | #include <pthread.h> |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1783 | |
| 1784 | void* routine(void* p){return NULL;} |
| 1785 | |
| 1786 | int main(){ |
| 1787 | pthread_t p; |
| 1788 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 1789 | return 1; |
| 1790 | return 0; |
| 1791 | } |
| 1792 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1793 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1794 | if { (eval echo configure:1795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1795 | then |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1796 | ac_cv_pthread_is_default=yes |
| 1797 | else |
| 1798 | echo "configure: failed program was:" >&5 |
| 1799 | cat conftest.$ac_ext >&5 |
| 1800 | rm -fr conftest* |
| 1801 | ac_cv_pthread_is_default=no |
| 1802 | fi |
| 1803 | rm -fr conftest* |
| 1804 | fi |
| 1805 | |
| 1806 | |
| 1807 | fi |
| 1808 | |
| 1809 | echo "$ac_t""$ac_cv_pthread_is_default" 1>&6 |
| 1810 | |
| 1811 | |
| 1812 | if test $ac_cv_pthread_is_default = yes |
| 1813 | then |
| 1814 | ac_cv_kpthread=no |
| 1815 | else |
| 1816 | # -Kpthread, if available, provides the right #defines |
| 1817 | # and linker options to make pthread_create available |
| 1818 | # Some compilers won't report that they do not support -Kpthread, |
| 1819 | # so we need to run a program to see whether it really made the |
| 1820 | # function available. |
| 1821 | echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1822 | echo "configure:1823: checking whether $CC accepts -Kpthread" >&5 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1823 | if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then |
| 1824 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1825 | else |
| 1826 | ac_save_cc="$CC" |
| 1827 | CC="$CC -Kpthread" |
| 1828 | if test "$cross_compiling" = yes; then |
| 1829 | ac_cv_kpthread=no |
| 1830 | else |
| 1831 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1832 | #line 1833 "configure" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1833 | #include "confdefs.h" |
| 1834 | |
| 1835 | #include <pthread.h> |
| 1836 | |
| 1837 | void* routine(void* p){return NULL;} |
| 1838 | |
| 1839 | int main(){ |
| 1840 | pthread_t p; |
| 1841 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 1842 | return 1; |
| 1843 | return 0; |
| 1844 | } |
| 1845 | |
| 1846 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1847 | if { (eval echo configure:1848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1848 | then |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1849 | ac_cv_kpthread=yes |
| 1850 | else |
| 1851 | echo "configure: failed program was:" >&5 |
| 1852 | cat conftest.$ac_ext >&5 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1853 | rm -fr conftest* |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1854 | ac_cv_kpthread=no |
| 1855 | fi |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1856 | rm -fr conftest* |
| 1857 | fi |
| 1858 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1859 | CC="$ac_save_cc" |
| 1860 | fi |
| 1861 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1862 | echo "$ac_t""$ac_cv_kpthread" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1863 | fi |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1864 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1865 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1866 | # checks for header files |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1867 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1868 | echo "configure:1869: checking for ANSI C header files" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1869 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1870 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1871 | else |
| 1872 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1873 | #line 1874 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1874 | #include "confdefs.h" |
| 1875 | #include <stdlib.h> |
| 1876 | #include <stdarg.h> |
| 1877 | #include <string.h> |
| 1878 | #include <float.h> |
| 1879 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1880 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1881 | { (eval echo configure:1882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1882 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1883 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1884 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1885 | ac_cv_header_stdc=yes |
| 1886 | else |
| 1887 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1888 | echo "configure: failed program was:" >&5 |
| 1889 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1890 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1891 | ac_cv_header_stdc=no |
| 1892 | fi |
| 1893 | rm -f conftest* |
| 1894 | |
| 1895 | if test $ac_cv_header_stdc = yes; then |
| 1896 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 1897 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1898 | #line 1899 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1899 | #include "confdefs.h" |
| 1900 | #include <string.h> |
| 1901 | EOF |
| 1902 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1903 | egrep "memchr" >/dev/null 2>&1; then |
| 1904 | : |
| 1905 | else |
| 1906 | rm -rf conftest* |
| 1907 | ac_cv_header_stdc=no |
| 1908 | fi |
| 1909 | rm -f conftest* |
| 1910 | |
| 1911 | fi |
| 1912 | |
| 1913 | if test $ac_cv_header_stdc = yes; then |
| 1914 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 1915 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1916 | #line 1917 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1917 | #include "confdefs.h" |
| 1918 | #include <stdlib.h> |
| 1919 | EOF |
| 1920 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1921 | egrep "free" >/dev/null 2>&1; then |
| 1922 | : |
| 1923 | else |
| 1924 | rm -rf conftest* |
| 1925 | ac_cv_header_stdc=no |
| 1926 | fi |
| 1927 | rm -f conftest* |
| 1928 | |
| 1929 | fi |
| 1930 | |
| 1931 | if test $ac_cv_header_stdc = yes; then |
| 1932 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| 1933 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1934 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1935 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1936 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1937 | #line 1938 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1938 | #include "confdefs.h" |
| 1939 | #include <ctype.h> |
| 1940 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 1941 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1942 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1943 | int main () { int i; for (i = 0; i < 256; i++) |
| 1944 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 1945 | exit (0); } |
| 1946 | |
| 1947 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1948 | if { (eval echo configure:1949: \"$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] | 1949 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1950 | : |
| 1951 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1952 | echo "configure: failed program was:" >&5 |
| 1953 | cat conftest.$ac_ext >&5 |
| 1954 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1955 | ac_cv_header_stdc=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1956 | fi |
| 1957 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1958 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1959 | |
| 1960 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1961 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1962 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1963 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1964 | if test $ac_cv_header_stdc = yes; then |
| 1965 | cat >> confdefs.h <<\EOF |
| 1966 | #define STDC_HEADERS 1 |
| 1967 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1968 | |
| 1969 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1970 | |
Guido van Rossum | a6535fd | 2001-10-18 19:44:10 +0000 | [diff] [blame] | 1971 | for ac_hdr in dlfcn.h fcntl.h grp.h limits.h langinfo.h locale.h \ |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1972 | ncurses.h poll.h pthread.h \ |
Eric S. Raymond | d2d75d3 | 2001-01-16 15:26:34 +0000 | [diff] [blame] | 1973 | 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] | 1974 | 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] | 1975 | sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \ |
Martin v. Löwis | 6953233 | 2001-10-13 09:12:41 +0000 | [diff] [blame] | 1976 | sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \ |
Martin v. Löwis | f24b2f3 | 2001-08-10 20:29:40 +0000 | [diff] [blame] | 1977 | 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] | 1978 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1979 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1980 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1981 | echo "configure:1982: checking for $ac_hdr" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1982 | 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] | 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 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1986 | #line 1987 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1987 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1988 | #include <$ac_hdr> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1989 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1990 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1991 | { (eval echo configure:1992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1992 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1993 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1994 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1995 | eval "ac_cv_header_$ac_safe=yes" |
| 1996 | else |
| 1997 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1998 | echo "configure: failed program was:" >&5 |
| 1999 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2000 | rm -rf conftest* |
| 2001 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2002 | fi |
| 2003 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2004 | fi |
| 2005 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2006 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2007 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2008 | cat >> confdefs.h <<EOF |
| 2009 | #define $ac_tr_hdr 1 |
| 2010 | EOF |
| 2011 | |
| 2012 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2013 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2014 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2015 | done |
| 2016 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2017 | ac_header_dirent=no |
| 2018 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h |
| 2019 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2020 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2021 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2022 | echo "configure:2023: checking for $ac_hdr that defines DIR" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2023 | 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] | 2024 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2025 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2026 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2027 | #line 2028 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2028 | #include "confdefs.h" |
| 2029 | #include <sys/types.h> |
| 2030 | #include <$ac_hdr> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2031 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2032 | DIR *dirp = 0; |
| 2033 | ; return 0; } |
| 2034 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2035 | if { (eval echo configure:2036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2036 | rm -rf conftest* |
| 2037 | eval "ac_cv_header_dirent_$ac_safe=yes" |
| 2038 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2039 | echo "configure: failed program was:" >&5 |
| 2040 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2041 | rm -rf conftest* |
| 2042 | eval "ac_cv_header_dirent_$ac_safe=no" |
| 2043 | fi |
| 2044 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2045 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2046 | 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] | 2047 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2048 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2049 | cat >> confdefs.h <<EOF |
| 2050 | #define $ac_tr_hdr 1 |
| 2051 | EOF |
| 2052 | ac_header_dirent=$ac_hdr; break |
| 2053 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2054 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2055 | fi |
| 2056 | done |
| 2057 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| 2058 | if test $ac_header_dirent = dirent.h; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2059 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2060 | echo "configure:2061: checking for opendir in -ldir" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2061 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2062 | 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] | 2063 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2064 | else |
| 2065 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2066 | LIBS="-ldir $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2067 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2068 | #line 2069 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2069 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2070 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2071 | /* We use char because int might match the return type of a gcc2 |
| 2072 | builtin and then its argument prototype would still apply. */ |
| 2073 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2074 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2075 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2076 | opendir() |
| 2077 | ; return 0; } |
| 2078 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2079 | if { (eval echo configure:2080: \"$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] | 2080 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2081 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2082 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2083 | echo "configure: failed program was:" >&5 |
| 2084 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2085 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2086 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2087 | fi |
| 2088 | rm -f conftest* |
| 2089 | LIBS="$ac_save_LIBS" |
| 2090 | |
| 2091 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2092 | 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] | 2093 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2094 | LIBS="$LIBS -ldir" |
| 2095 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2096 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2097 | fi |
| 2098 | |
| 2099 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2100 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2101 | echo "configure:2102: checking for opendir in -lx" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2102 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2103 | 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] | 2104 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2105 | else |
| 2106 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2107 | LIBS="-lx $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2108 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2109 | #line 2110 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2110 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2111 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2112 | /* We use char because int might match the return type of a gcc2 |
| 2113 | builtin and then its argument prototype would still apply. */ |
| 2114 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2115 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2116 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2117 | opendir() |
| 2118 | ; return 0; } |
| 2119 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2120 | if { (eval echo configure:2121: \"$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] | 2121 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2122 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2123 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2124 | echo "configure: failed program was:" >&5 |
| 2125 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2126 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2127 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2128 | fi |
| 2129 | rm -f conftest* |
| 2130 | LIBS="$ac_save_LIBS" |
| 2131 | |
| 2132 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2133 | 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] | 2134 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2135 | LIBS="$LIBS -lx" |
| 2136 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2137 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2138 | fi |
| 2139 | |
| 2140 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2141 | |
| 2142 | |
| 2143 | # checks for typedefs |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2144 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2145 | echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2146 | echo "configure:2147: checking for clock_t in time.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2147 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2148 | #line 2149 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2149 | #include "confdefs.h" |
| 2150 | #include <time.h> |
| 2151 | EOF |
| 2152 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2153 | egrep "clock_t" >/dev/null 2>&1; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2154 | rm -rf conftest* |
| 2155 | was_it_defined=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2156 | else |
| 2157 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2158 | cat >> confdefs.h <<\EOF |
| 2159 | #define clock_t long |
| 2160 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2161 | |
| 2162 | fi |
| 2163 | rm -f conftest* |
| 2164 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2165 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2166 | |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 2167 | # Two defines needed to enable largefile support on various platforms |
| 2168 | # These may affect some typedefs |
| 2169 | cat >> confdefs.h <<\EOF |
| 2170 | #define _LARGEFILE_SOURCE 1 |
| 2171 | EOF |
| 2172 | |
| 2173 | cat >> confdefs.h <<\EOF |
| 2174 | #define _FILE_OFFSET_BITS 64 |
| 2175 | EOF |
| 2176 | |
| 2177 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2178 | # Add some code to confdefs.h so that the test for off_t works on SCO |
| 2179 | cat >> confdefs.h <<\EOF |
| 2180 | #if defined(SCO_DS) |
| 2181 | #undef _OFF_T |
| 2182 | #endif |
| 2183 | EOF |
| 2184 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2185 | # Type availability checks |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2186 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2187 | echo "configure:2188: checking for mode_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2188 | 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] | 2189 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2190 | else |
| 2191 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2192 | #line 2193 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2193 | #include "confdefs.h" |
| 2194 | #include <sys/types.h> |
| 2195 | #if STDC_HEADERS |
| 2196 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2197 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2198 | #endif |
| 2199 | EOF |
| 2200 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2201 | 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] | 2202 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2203 | ac_cv_type_mode_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2204 | else |
| 2205 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2206 | ac_cv_type_mode_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2207 | fi |
| 2208 | rm -f conftest* |
| 2209 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2210 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2211 | echo "$ac_t""$ac_cv_type_mode_t" 1>&6 |
| 2212 | if test $ac_cv_type_mode_t = no; then |
| 2213 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2214 | #define mode_t int |
| 2215 | EOF |
| 2216 | |
| 2217 | fi |
| 2218 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2219 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2220 | echo "configure:2221: checking for off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2221 | 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] | 2222 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2223 | else |
| 2224 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2225 | #line 2226 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2226 | #include "confdefs.h" |
| 2227 | #include <sys/types.h> |
| 2228 | #if STDC_HEADERS |
| 2229 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2230 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2231 | #endif |
| 2232 | EOF |
| 2233 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2234 | 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] | 2235 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2236 | ac_cv_type_off_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2237 | else |
| 2238 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2239 | ac_cv_type_off_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2240 | fi |
| 2241 | rm -f conftest* |
| 2242 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2243 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2244 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
| 2245 | if test $ac_cv_type_off_t = no; then |
| 2246 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2247 | #define off_t long |
| 2248 | EOF |
| 2249 | |
| 2250 | fi |
| 2251 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2252 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2253 | echo "configure:2254: checking for pid_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2254 | 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] | 2255 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2256 | else |
| 2257 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2258 | #line 2259 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2259 | #include "confdefs.h" |
| 2260 | #include <sys/types.h> |
| 2261 | #if STDC_HEADERS |
| 2262 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2263 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2264 | #endif |
| 2265 | EOF |
| 2266 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2267 | 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] | 2268 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2269 | ac_cv_type_pid_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2270 | else |
| 2271 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2272 | ac_cv_type_pid_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2273 | fi |
| 2274 | rm -f conftest* |
| 2275 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2276 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2277 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
| 2278 | if test $ac_cv_type_pid_t = no; then |
| 2279 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2280 | #define pid_t int |
| 2281 | EOF |
| 2282 | |
| 2283 | fi |
| 2284 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2285 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2286 | echo "configure:2287: checking return type of signal handlers" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2287 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2288 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2289 | else |
| 2290 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2291 | #line 2292 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2292 | #include "confdefs.h" |
| 2293 | #include <sys/types.h> |
| 2294 | #include <signal.h> |
| 2295 | #ifdef signal |
| 2296 | #undef signal |
| 2297 | #endif |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2298 | #ifdef __cplusplus |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2299 | extern "C" void (*signal (int, void (*)(int)))(int); |
| 2300 | #else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2301 | void (*signal ()) (); |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2302 | #endif |
| 2303 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2304 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2305 | int i; |
| 2306 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2307 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2308 | if { (eval echo configure:2309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2309 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2310 | ac_cv_type_signal=void |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2311 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2312 | echo "configure: failed program was:" >&5 |
| 2313 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2314 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2315 | ac_cv_type_signal=int |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2316 | fi |
| 2317 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2318 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2319 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2320 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2321 | cat >> confdefs.h <<EOF |
| 2322 | #define RETSIGTYPE $ac_cv_type_signal |
| 2323 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2324 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2325 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2326 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2327 | echo "configure:2328: checking for size_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2328 | 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] | 2329 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2330 | else |
| 2331 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2332 | #line 2333 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2333 | #include "confdefs.h" |
| 2334 | #include <sys/types.h> |
| 2335 | #if STDC_HEADERS |
| 2336 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2337 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2338 | #endif |
| 2339 | EOF |
| 2340 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2341 | 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] | 2342 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2343 | ac_cv_type_size_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2344 | else |
| 2345 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2346 | ac_cv_type_size_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2347 | fi |
| 2348 | rm -f conftest* |
| 2349 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2350 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2351 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
| 2352 | if test $ac_cv_type_size_t = no; then |
| 2353 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2354 | #define size_t unsigned |
| 2355 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2356 | |
| 2357 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2358 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2359 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2360 | echo "configure:2361: checking for uid_t in sys/types.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2361 | 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] | 2362 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2363 | else |
| 2364 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2365 | #line 2366 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2366 | #include "confdefs.h" |
| 2367 | #include <sys/types.h> |
| 2368 | EOF |
| 2369 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2370 | egrep "uid_t" >/dev/null 2>&1; then |
| 2371 | rm -rf conftest* |
| 2372 | ac_cv_type_uid_t=yes |
| 2373 | else |
| 2374 | rm -rf conftest* |
| 2375 | ac_cv_type_uid_t=no |
| 2376 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2377 | rm -f conftest* |
| 2378 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2379 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2380 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2381 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2382 | if test $ac_cv_type_uid_t = no; then |
| 2383 | cat >> confdefs.h <<\EOF |
| 2384 | #define uid_t int |
| 2385 | EOF |
| 2386 | |
| 2387 | cat >> confdefs.h <<\EOF |
| 2388 | #define gid_t int |
| 2389 | EOF |
| 2390 | |
| 2391 | fi |
| 2392 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2393 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2394 | # Sizes of various common basic types |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2395 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2396 | echo "configure:2397: checking size of int" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2397 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2398 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2399 | else |
| 2400 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2401 | ac_cv_sizeof_int=4 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2402 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2403 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2404 | #line 2405 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2405 | #include "confdefs.h" |
| 2406 | #include <stdio.h> |
| 2407 | main() |
| 2408 | { |
| 2409 | FILE *f=fopen("conftestval", "w"); |
| 2410 | if (!f) exit(1); |
| 2411 | fprintf(f, "%d\n", sizeof(int)); |
| 2412 | exit(0); |
| 2413 | } |
| 2414 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2415 | if { (eval echo configure:2416: \"$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] | 2416 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2417 | ac_cv_sizeof_int=`cat conftestval` |
| 2418 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2419 | echo "configure: failed program was:" >&5 |
| 2420 | cat conftest.$ac_ext >&5 |
| 2421 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2422 | ac_cv_sizeof_int=0 |
| 2423 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2424 | rm -fr conftest* |
| 2425 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2426 | |
| 2427 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2428 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
| 2429 | cat >> confdefs.h <<EOF |
| 2430 | #define SIZEOF_INT $ac_cv_sizeof_int |
| 2431 | EOF |
| 2432 | |
| 2433 | |
| 2434 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2435 | echo "configure:2436: checking size of long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2436 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2437 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2438 | else |
| 2439 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2440 | ac_cv_sizeof_long=4 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2441 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2442 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2443 | #line 2444 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2444 | #include "confdefs.h" |
| 2445 | #include <stdio.h> |
| 2446 | main() |
| 2447 | { |
| 2448 | FILE *f=fopen("conftestval", "w"); |
| 2449 | if (!f) exit(1); |
| 2450 | fprintf(f, "%d\n", sizeof(long)); |
| 2451 | exit(0); |
| 2452 | } |
| 2453 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2454 | if { (eval echo configure:2455: \"$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] | 2455 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2456 | ac_cv_sizeof_long=`cat conftestval` |
| 2457 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2458 | echo "configure: failed program was:" >&5 |
| 2459 | cat conftest.$ac_ext >&5 |
| 2460 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2461 | ac_cv_sizeof_long=0 |
| 2462 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2463 | rm -fr conftest* |
| 2464 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2465 | |
| 2466 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2467 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
| 2468 | cat >> confdefs.h <<EOF |
| 2469 | #define SIZEOF_LONG $ac_cv_sizeof_long |
| 2470 | EOF |
| 2471 | |
| 2472 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2473 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2474 | echo "configure:2475: checking size of void *" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2475 | 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] | 2476 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2477 | else |
| 2478 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2479 | ac_cv_sizeof_void_p=4 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2480 | else |
| 2481 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2482 | #line 2483 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2483 | #include "confdefs.h" |
| 2484 | #include <stdio.h> |
| 2485 | main() |
| 2486 | { |
| 2487 | FILE *f=fopen("conftestval", "w"); |
| 2488 | if (!f) exit(1); |
| 2489 | fprintf(f, "%d\n", sizeof(void *)); |
| 2490 | exit(0); |
| 2491 | } |
| 2492 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2493 | if { (eval echo configure:2494: \"$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] | 2494 | then |
| 2495 | ac_cv_sizeof_void_p=`cat conftestval` |
| 2496 | else |
| 2497 | echo "configure: failed program was:" >&5 |
| 2498 | cat conftest.$ac_ext >&5 |
| 2499 | rm -fr conftest* |
| 2500 | ac_cv_sizeof_void_p=0 |
| 2501 | fi |
| 2502 | rm -fr conftest* |
| 2503 | fi |
| 2504 | |
| 2505 | fi |
| 2506 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 |
| 2507 | cat >> confdefs.h <<EOF |
| 2508 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
| 2509 | EOF |
| 2510 | |
| 2511 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2512 | echo $ac_n "checking size of char""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2513 | echo "configure:2514: checking size of char" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2514 | if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2515 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2516 | else |
| 2517 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2518 | ac_cv_sizeof_char=1 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2519 | else |
| 2520 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2521 | #line 2522 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2522 | #include "confdefs.h" |
| 2523 | #include <stdio.h> |
| 2524 | main() |
| 2525 | { |
| 2526 | FILE *f=fopen("conftestval", "w"); |
| 2527 | if (!f) exit(1); |
| 2528 | fprintf(f, "%d\n", sizeof(char)); |
| 2529 | exit(0); |
| 2530 | } |
| 2531 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2532 | if { (eval echo configure:2533: \"$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] | 2533 | then |
| 2534 | ac_cv_sizeof_char=`cat conftestval` |
| 2535 | else |
| 2536 | echo "configure: failed program was:" >&5 |
| 2537 | cat conftest.$ac_ext >&5 |
| 2538 | rm -fr conftest* |
| 2539 | ac_cv_sizeof_char=0 |
| 2540 | fi |
| 2541 | rm -fr conftest* |
| 2542 | fi |
| 2543 | |
| 2544 | fi |
| 2545 | echo "$ac_t""$ac_cv_sizeof_char" 1>&6 |
| 2546 | cat >> confdefs.h <<EOF |
| 2547 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
| 2548 | EOF |
| 2549 | |
| 2550 | |
| 2551 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2552 | echo "configure:2553: checking size of short" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2553 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2554 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2555 | else |
| 2556 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2557 | ac_cv_sizeof_short=2 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2558 | else |
| 2559 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2560 | #line 2561 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2561 | #include "confdefs.h" |
| 2562 | #include <stdio.h> |
| 2563 | main() |
| 2564 | { |
| 2565 | FILE *f=fopen("conftestval", "w"); |
| 2566 | if (!f) exit(1); |
| 2567 | fprintf(f, "%d\n", sizeof(short)); |
| 2568 | exit(0); |
| 2569 | } |
| 2570 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2571 | if { (eval echo configure:2572: \"$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] | 2572 | then |
| 2573 | ac_cv_sizeof_short=`cat conftestval` |
| 2574 | else |
| 2575 | echo "configure: failed program was:" >&5 |
| 2576 | cat conftest.$ac_ext >&5 |
| 2577 | rm -fr conftest* |
| 2578 | ac_cv_sizeof_short=0 |
| 2579 | fi |
| 2580 | rm -fr conftest* |
| 2581 | fi |
| 2582 | |
| 2583 | fi |
| 2584 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
| 2585 | cat >> confdefs.h <<EOF |
| 2586 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
| 2587 | EOF |
| 2588 | |
| 2589 | |
| 2590 | echo $ac_n "checking size of float""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2591 | echo "configure:2592: checking size of float" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2592 | if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2593 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2594 | else |
| 2595 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2596 | ac_cv_sizeof_float=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2597 | else |
| 2598 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2599 | #line 2600 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2600 | #include "confdefs.h" |
| 2601 | #include <stdio.h> |
| 2602 | main() |
| 2603 | { |
| 2604 | FILE *f=fopen("conftestval", "w"); |
| 2605 | if (!f) exit(1); |
| 2606 | fprintf(f, "%d\n", sizeof(float)); |
| 2607 | exit(0); |
| 2608 | } |
| 2609 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2610 | if { (eval echo configure:2611: \"$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] | 2611 | then |
| 2612 | ac_cv_sizeof_float=`cat conftestval` |
| 2613 | else |
| 2614 | echo "configure: failed program was:" >&5 |
| 2615 | cat conftest.$ac_ext >&5 |
| 2616 | rm -fr conftest* |
| 2617 | ac_cv_sizeof_float=0 |
| 2618 | fi |
| 2619 | rm -fr conftest* |
| 2620 | fi |
| 2621 | |
| 2622 | fi |
| 2623 | echo "$ac_t""$ac_cv_sizeof_float" 1>&6 |
| 2624 | cat >> confdefs.h <<EOF |
| 2625 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
| 2626 | EOF |
| 2627 | |
| 2628 | |
| 2629 | echo $ac_n "checking size of double""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2630 | echo "configure:2631: checking size of double" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2631 | if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2632 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2633 | else |
| 2634 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2635 | ac_cv_sizeof_double=8 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2636 | else |
| 2637 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2638 | #line 2639 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2639 | #include "confdefs.h" |
| 2640 | #include <stdio.h> |
| 2641 | main() |
| 2642 | { |
| 2643 | FILE *f=fopen("conftestval", "w"); |
| 2644 | if (!f) exit(1); |
| 2645 | fprintf(f, "%d\n", sizeof(double)); |
| 2646 | exit(0); |
| 2647 | } |
| 2648 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2649 | if { (eval echo configure:2650: \"$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] | 2650 | then |
| 2651 | ac_cv_sizeof_double=`cat conftestval` |
| 2652 | else |
| 2653 | echo "configure: failed program was:" >&5 |
| 2654 | cat conftest.$ac_ext >&5 |
| 2655 | rm -fr conftest* |
| 2656 | ac_cv_sizeof_double=0 |
| 2657 | fi |
| 2658 | rm -fr conftest* |
| 2659 | fi |
| 2660 | |
| 2661 | fi |
| 2662 | echo "$ac_t""$ac_cv_sizeof_double" 1>&6 |
| 2663 | cat >> confdefs.h <<EOF |
| 2664 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
| 2665 | EOF |
| 2666 | |
| 2667 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2668 | echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2669 | echo "configure:2670: checking size of fpos_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2670 | 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] | 2671 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2672 | else |
| 2673 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2674 | ac_cv_sizeof_fpos_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2675 | else |
| 2676 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2677 | #line 2678 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2678 | #include "confdefs.h" |
| 2679 | #include <stdio.h> |
| 2680 | main() |
| 2681 | { |
| 2682 | FILE *f=fopen("conftestval", "w"); |
| 2683 | if (!f) exit(1); |
| 2684 | fprintf(f, "%d\n", sizeof(fpos_t)); |
| 2685 | exit(0); |
| 2686 | } |
| 2687 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2688 | if { (eval echo configure:2689: \"$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] | 2689 | then |
| 2690 | ac_cv_sizeof_fpos_t=`cat conftestval` |
| 2691 | else |
| 2692 | echo "configure: failed program was:" >&5 |
| 2693 | cat conftest.$ac_ext >&5 |
| 2694 | rm -fr conftest* |
| 2695 | ac_cv_sizeof_fpos_t=0 |
| 2696 | fi |
| 2697 | rm -fr conftest* |
| 2698 | fi |
| 2699 | |
| 2700 | fi |
| 2701 | echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6 |
| 2702 | cat >> confdefs.h <<EOF |
| 2703 | #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t |
| 2704 | EOF |
| 2705 | |
| 2706 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2707 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2708 | echo $ac_n "checking for long long support""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2709 | echo "configure:2710: checking for long long support" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2710 | have_long_long=no |
| 2711 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2712 | #line 2713 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2713 | #include "confdefs.h" |
| 2714 | |
| 2715 | int main() { |
| 2716 | long long x; x = (long long)0; |
| 2717 | ; return 0; } |
| 2718 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2719 | if { (eval echo configure:2720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2720 | rm -rf conftest* |
| 2721 | cat >> confdefs.h <<\EOF |
| 2722 | #define HAVE_LONG_LONG 1 |
| 2723 | EOF |
| 2724 | have_long_long=yes |
| 2725 | else |
| 2726 | echo "configure: failed program was:" >&5 |
| 2727 | cat conftest.$ac_ext >&5 |
| 2728 | fi |
| 2729 | rm -f conftest* |
| 2730 | echo "$ac_t""$have_long_long" 1>&6 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2731 | if test "$have_long_long" = yes ; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2732 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2733 | echo "configure:2734: checking size of long long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2734 | 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] | 2735 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2736 | else |
| 2737 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2738 | ac_cv_sizeof_long_long=8 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2739 | else |
| 2740 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2741 | #line 2742 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2742 | #include "confdefs.h" |
| 2743 | #include <stdio.h> |
| 2744 | main() |
| 2745 | { |
| 2746 | FILE *f=fopen("conftestval", "w"); |
| 2747 | if (!f) exit(1); |
| 2748 | fprintf(f, "%d\n", sizeof(long long)); |
| 2749 | exit(0); |
| 2750 | } |
| 2751 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2752 | if { (eval echo configure:2753: \"$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] | 2753 | then |
| 2754 | ac_cv_sizeof_long_long=`cat conftestval` |
| 2755 | else |
| 2756 | echo "configure: failed program was:" >&5 |
| 2757 | cat conftest.$ac_ext >&5 |
| 2758 | rm -fr conftest* |
| 2759 | ac_cv_sizeof_long_long=0 |
| 2760 | fi |
| 2761 | rm -fr conftest* |
| 2762 | fi |
| 2763 | |
| 2764 | fi |
| 2765 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
| 2766 | cat >> confdefs.h <<EOF |
| 2767 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 2768 | EOF |
| 2769 | |
| 2770 | |
| 2771 | fi |
| 2772 | |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2773 | echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2774 | echo "configure:2775: checking for uintptr_t support" >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2775 | have_uintptr_t=no |
| 2776 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2777 | #line 2778 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2778 | #include "confdefs.h" |
| 2779 | |
| 2780 | int main() { |
| 2781 | uintptr_t x; x = (uintptr_t)0; |
| 2782 | ; return 0; } |
| 2783 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2784 | if { (eval echo configure:2785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2785 | rm -rf conftest* |
| 2786 | cat >> confdefs.h <<\EOF |
| 2787 | #define HAVE_UINTPTR_T 1 |
| 2788 | EOF |
| 2789 | have_uintptr_t=yes |
| 2790 | else |
| 2791 | echo "configure: failed program was:" >&5 |
| 2792 | cat conftest.$ac_ext >&5 |
| 2793 | fi |
| 2794 | rm -f conftest* |
| 2795 | echo "$ac_t""$have_uintptr_t" 1>&6 |
| 2796 | if test "$have_uintptr_t" = yes ; then |
| 2797 | echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2798 | echo "configure:2799: checking size of uintptr_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2799 | if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2800 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2801 | else |
| 2802 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2803 | ac_cv_sizeof_uintptr_t=4 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2804 | else |
| 2805 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2806 | #line 2807 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2807 | #include "confdefs.h" |
| 2808 | #include <stdio.h> |
| 2809 | main() |
| 2810 | { |
| 2811 | FILE *f=fopen("conftestval", "w"); |
| 2812 | if (!f) exit(1); |
| 2813 | fprintf(f, "%d\n", sizeof(uintptr_t)); |
| 2814 | exit(0); |
| 2815 | } |
| 2816 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2817 | if { (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2818 | then |
| 2819 | ac_cv_sizeof_uintptr_t=`cat conftestval` |
| 2820 | else |
| 2821 | echo "configure: failed program was:" >&5 |
| 2822 | cat conftest.$ac_ext >&5 |
| 2823 | rm -fr conftest* |
| 2824 | ac_cv_sizeof_uintptr_t=0 |
| 2825 | fi |
| 2826 | rm -fr conftest* |
| 2827 | fi |
| 2828 | |
| 2829 | fi |
| 2830 | echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6 |
| 2831 | cat >> confdefs.h <<EOF |
| 2832 | #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t |
| 2833 | EOF |
| 2834 | |
| 2835 | |
| 2836 | fi |
| 2837 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2838 | # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>. |
| 2839 | echo $ac_n "checking size of off_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2840 | echo "configure:2841: checking size of off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2841 | 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] | 2842 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2843 | else |
| 2844 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2845 | ac_cv_sizeof_off_t=4 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2846 | else |
| 2847 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2848 | #line 2849 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2849 | #include "confdefs.h" |
| 2850 | #include <stdio.h> |
| 2851 | #include <sys/types.h> |
| 2852 | main() |
| 2853 | { |
| 2854 | FILE *f=fopen("conftestval", "w"); |
| 2855 | if (!f) exit(1); |
| 2856 | fprintf(f, "%d\n", sizeof(off_t)); |
| 2857 | exit(0); |
| 2858 | } |
| 2859 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2860 | if { (eval echo configure:2861: \"$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] | 2861 | then |
| 2862 | ac_cv_sizeof_off_t=`cat conftestval` |
| 2863 | else |
| 2864 | echo "configure: failed program was:" >&5 |
| 2865 | cat conftest.$ac_ext >&5 |
| 2866 | rm -fr conftest* |
| 2867 | ac_cv_sizeof_off_t=0 |
| 2868 | fi |
| 2869 | rm -fr conftest* |
| 2870 | fi |
| 2871 | |
| 2872 | |
| 2873 | fi |
| 2874 | |
| 2875 | echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6 |
| 2876 | cat >> confdefs.h <<EOF |
| 2877 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
| 2878 | EOF |
| 2879 | |
| 2880 | |
| 2881 | echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2882 | echo "configure:2883: checking whether to enable large file support" >&5 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2883 | if test "$have_long_long" = yes -a \ |
| 2884 | "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ |
| 2885 | "$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] | 2886 | cat >> confdefs.h <<\EOF |
| 2887 | #define HAVE_LARGEFILE_SUPPORT 1 |
| 2888 | EOF |
| 2889 | |
| 2890 | echo "$ac_t""yes" 1>&6 |
| 2891 | else |
| 2892 | echo "$ac_t""no" 1>&6 |
| 2893 | fi |
| 2894 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2895 | # AC_CHECK_SIZEOF() doesn't include <time.h>. |
| 2896 | echo $ac_n "checking size of time_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2897 | echo "configure:2898: checking size of time_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2898 | 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] | 2899 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2900 | else |
| 2901 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2902 | ac_cv_sizeof_time_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2903 | else |
| 2904 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2905 | #line 2906 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2906 | #include "confdefs.h" |
| 2907 | #include <stdio.h> |
| 2908 | #include <time.h> |
| 2909 | main() |
| 2910 | { |
| 2911 | FILE *f=fopen("conftestval", "w"); |
| 2912 | if (!f) exit(1); |
| 2913 | fprintf(f, "%d\n", sizeof(time_t)); |
| 2914 | exit(0); |
| 2915 | } |
| 2916 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2917 | if { (eval echo configure:2918: \"$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] | 2918 | then |
| 2919 | ac_cv_sizeof_time_t=`cat conftestval` |
| 2920 | else |
| 2921 | echo "configure: failed program was:" >&5 |
| 2922 | cat conftest.$ac_ext >&5 |
| 2923 | rm -fr conftest* |
| 2924 | ac_cv_sizeof_time_t=0 |
| 2925 | fi |
| 2926 | rm -fr conftest* |
| 2927 | fi |
| 2928 | |
| 2929 | |
| 2930 | fi |
| 2931 | |
| 2932 | echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 |
| 2933 | cat >> confdefs.h <<EOF |
| 2934 | #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
| 2935 | EOF |
| 2936 | |
| 2937 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2938 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2939 | # if have pthread_t then define SIZEOF_PTHREAD_T |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 2940 | ac_save_cc="$CC" |
| 2941 | if test "$ac_cv_kpthread" = "yes" |
| 2942 | then CC="$CC -Kpthread" |
| 2943 | fi |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2944 | echo $ac_n "checking for pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2945 | echo "configure:2946: checking for pthread_t" >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2946 | have_pthread_t=no |
| 2947 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2948 | #line 2949 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2949 | #include "confdefs.h" |
| 2950 | #include <pthread.h> |
| 2951 | int main() { |
Guido van Rossum | 1258049 | 2000-09-24 16:47:19 +0000 | [diff] [blame] | 2952 | pthread_t x; x = *(pthread_t*)0; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2953 | ; return 0; } |
| 2954 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2955 | if { (eval echo configure:2956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2956 | rm -rf conftest* |
| 2957 | have_pthread_t=yes |
| 2958 | else |
| 2959 | echo "configure: failed program was:" >&5 |
| 2960 | cat conftest.$ac_ext >&5 |
| 2961 | fi |
| 2962 | rm -f conftest* |
| 2963 | echo "$ac_t""$have_pthread_t" 1>&6 |
| 2964 | if test "$have_pthread_t" = yes ; then |
| 2965 | # AC_CHECK_SIZEOF() doesn't include <pthread.h>. |
| 2966 | echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2967 | echo "configure:2968: checking size of pthread_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2968 | if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2969 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2970 | else |
| 2971 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2972 | ac_cv_sizeof_pthread_t=4 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2973 | else |
| 2974 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2975 | #line 2976 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2976 | #include "confdefs.h" |
| 2977 | #include <stdio.h> |
| 2978 | #include <pthread.h> |
| 2979 | main() |
| 2980 | { |
| 2981 | FILE *f=fopen("conftestval", "w"); |
| 2982 | if (!f) exit(1); |
| 2983 | fprintf(f, "%d\n", sizeof(pthread_t)); |
| 2984 | exit(0); |
| 2985 | } |
| 2986 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2987 | if { (eval echo configure:2988: \"$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] | 2988 | then |
| 2989 | ac_cv_sizeof_pthread_t=`cat conftestval` |
| 2990 | else |
| 2991 | echo "configure: failed program was:" >&5 |
| 2992 | cat conftest.$ac_ext >&5 |
| 2993 | rm -fr conftest* |
| 2994 | ac_cv_sizeof_pthread_t=0 |
| 2995 | fi |
| 2996 | rm -fr conftest* |
| 2997 | fi |
| 2998 | |
| 2999 | |
| 3000 | fi |
| 3001 | |
| 3002 | echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6 |
| 3003 | cat >> confdefs.h <<EOF |
| 3004 | #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t |
| 3005 | EOF |
| 3006 | |
| 3007 | fi |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 3008 | CC="$ac_save_cc" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3009 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3010 | echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3011 | echo "configure:3012: checking for --enable-toolbox-glue" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3012 | # Check whether --enable-toolbox-glue or --disable-toolbox-glue was given. |
| 3013 | if test "${enable_toolbox_glue+set}" = set; then |
| 3014 | enableval="$enable_toolbox_glue" |
| 3015 | : |
| 3016 | fi |
| 3017 | |
| 3018 | |
| 3019 | if test -z "$enable_toolbox_glue" |
| 3020 | then |
| 3021 | case $ac_sys_system/$ac_sys_release in |
| 3022 | Darwin/*) |
| 3023 | enable_toolbox_glue="yes";; |
| 3024 | *) |
| 3025 | enable_toolbox_glue="no";; |
| 3026 | esac |
| 3027 | fi |
| 3028 | case "$enable_toolbox_glue" in |
| 3029 | yes) |
| 3030 | extra_frameworks="-framework Carbon -framework Foundation" |
| 3031 | extra_machdep_objs="Python/mactoolboxglue.o" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3032 | extra_undefs="-u __dummy -u _PyMac_Error" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3033 | cat >> confdefs.h <<\EOF |
| 3034 | #define USE_TOOLBOX_OBJECT_GLUE 1 |
| 3035 | EOF |
| 3036 | |
| 3037 | ;; |
| 3038 | *) |
| 3039 | extra_frameworks="" |
| 3040 | extra_machdep_objs="" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3041 | extra_undefs="" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3042 | ;; |
| 3043 | esac |
| 3044 | echo "$ac_t""$enable_toolbox_glue" 1>&6 |
| 3045 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3046 | |
| 3047 | case $ac_sys_system/$ac_sys_release in |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3048 | Darwin/1.4*) |
| 3049 | ns_undef_sym='_environ' |
| 3050 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym" |
| 3051 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
| 3052 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 3053 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 3054 | Darwin/*) |
| 3055 | ns_undef_sym='_environ' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3056 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" |
| 3057 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
| 3058 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 3059 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3060 | esac |
| 3061 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3062 | echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3063 | echo "configure:3064: checking for --enable-framework" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3064 | if test "$enable_framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3065 | then |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 3066 | OPT="$OPT -fno-common -dynamic" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3067 | # -U __environ is needed since bundles don't have access |
| 3068 | # to crt0 when built but will always be linked against it |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3069 | # -F. is needed to allow linking to the framework while |
| 3070 | # in the build location. |
| 3071 | |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3072 | case $ac_sys_system/$ac_sys_release in |
| 3073 | Darwin/1.4*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";; |
| 3074 | Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";; |
| 3075 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3076 | cat >> confdefs.h <<\EOF |
| 3077 | #define WITH_NEXT_FRAMEWORK 1 |
| 3078 | EOF |
| 3079 | |
| 3080 | echo "$ac_t""yes" 1>&6 |
| 3081 | else |
| 3082 | echo "$ac_t""no" 1>&6 |
| 3083 | fi |
| 3084 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3085 | echo $ac_n "checking for dyld""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3086 | echo "configure:3087: checking for dyld" >&5 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3087 | case $ac_sys_system/$ac_sys_release in |
| 3088 | Darwin/*) |
| 3089 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3090 | #define WITH_DYLD 1 |
| 3091 | EOF |
| 3092 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3093 | echo "$ac_t""always on for Darwin" 1>&6 |
| 3094 | ;; |
| 3095 | *) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3096 | echo "$ac_t""no" 1>&6 |
| 3097 | ;; |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3098 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3099 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3100 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3101 | |
| 3102 | |
| 3103 | |
| 3104 | |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3105 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3106 | # SO is the extension of shared libraries `(including the dot!) |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3107 | # -- usually .so, .sl on HP-UX, .dll on Cygwin |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3108 | echo $ac_n "checking SO""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3109 | echo "configure:3110: checking SO" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3110 | if test -z "$SO" |
| 3111 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3112 | case $ac_sys_system in |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3113 | hp*|HP*) SO=.sl;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3114 | CYGWIN*) SO=.dll;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3115 | *) SO=.so;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3116 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3117 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3118 | echo "$ac_t""$SO" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3119 | # LDSHARED is the ld *command* used to create shared library |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3120 | # -- "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] | 3121 | # (Shared libraries in this instance are shared modules to be loaded into |
| 3122 | # Python, as opposed to building Python itself as a shared library.) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3123 | echo $ac_n "checking LDSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3124 | echo "configure:3125: checking LDSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3125 | if test -z "$LDSHARED" |
| 3126 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3127 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3128 | AIX*) |
| 3129 | BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" |
Guido van Rossum | ce608b0 | 2001-09-28 15:59:38 +0000 | [diff] [blame] | 3130 | LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3131 | ;; |
| 3132 | BeOS*) |
| 3133 | BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY" |
Guido van Rossum | ce608b0 | 2001-09-28 15:59:38 +0000 | [diff] [blame] | 3134 | LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3135 | ;; |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3136 | IRIX/5*) LDSHARED="ld -shared";; |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 3137 | IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3138 | SunOS/4*) LDSHARED="ld";; |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3139 | SunOS/5*) |
| 3140 | if test "$GCC" = "yes" |
Neil Schemenauer | 8ba9445 | 2001-02-19 18:18:48 +0000 | [diff] [blame] | 3141 | then LDSHARED='$(CC) -shared' |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3142 | else LDSHARED="$(CC) -G"; |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3143 | fi ;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3144 | hp*|HP*) LDSHARED="ld -b";; |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3145 | OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; |
| 3146 | DYNIX/ptx*) LDSHARED="ld -G";; |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3147 | Darwin/1.4*) |
| 3148 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3149 | if test "$enable_framework" ; then |
| 3150 | # Link against the framework. All externals should be defined. |
| 3151 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3152 | else |
| 3153 | # No framework. Ignore undefined symbols, assuming they come from Python |
| 3154 | LDSHARED="$LDSHARED -flat_namespace -undefined suppress" |
| 3155 | fi ;; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3156 | Darwin/*) |
| 3157 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3158 | if test "$enable_framework" ; then |
| 3159 | # Link against the framework. All externals should be defined. |
| 3160 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3161 | else |
| 3162 | # No framework. Ignore undefined symbols, assuming they come from Python |
| 3163 | LDSHARED="$LDSHARED -undefined suppress" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3164 | fi ;; |
Guido van Rossum | 81652ab | 1996-07-21 02:53:27 +0000 | [diff] [blame] | 3165 | Linux*) LDSHARED="gcc -shared";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 3166 | dgux*) LDSHARED="ld -G";; |
Guido van Rossum | 458e7fa | 1999-09-17 15:40:40 +0000 | [diff] [blame] | 3167 | BSD/OS*/4*) LDSHARED="gcc -shared";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3168 | OpenBSD*|NetBSD*|FreeBSD*) |
Jeremy Hylton | 4bcc7c5 | 2000-08-31 17:45:35 +0000 | [diff] [blame] | 3169 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3170 | then |
| 3171 | LDSHARED="cc -shared ${LDFLAGS}" |
| 3172 | else |
| 3173 | LDSHARED="ld -Bshareable ${LDFLAGS}" |
| 3174 | fi;; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3175 | OpenUNIX*|UnixWare*) |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3176 | if test "$GCC" = "yes" |
| 3177 | then LDSHARED="$(CC) -shared" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3178 | else LDSHARED="$(CC) -G" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3179 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3180 | SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3181 | Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3182 | CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3183 | *) LDSHARED="ld";; |
| 3184 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3185 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3186 | echo "$ac_t""$LDSHARED" 1>&6 |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3187 | BLDSHARED=${BLDSHARED-$LDSHARED} |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3188 | # 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] | 3189 | # library (module) -- this is only needed for a few systems |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3190 | echo $ac_n "checking CCSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3191 | echo "configure:3192: checking CCSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3192 | if test -z "$CCSHARED" |
| 3193 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3194 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 3195 | SunOS*) if test "$GCC" = yes; |
| 3196 | then CCSHARED="-fPIC"; |
| 3197 | fi;; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3198 | hp*|HP*) if test "$GCC" = yes; |
Martin v. Löwis | 703ad70 | 2001-09-05 08:36:52 +0000 | [diff] [blame] | 3199 | then CCSHARED="-fPIC"; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3200 | else CCSHARED="+z"; |
| 3201 | fi;; |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3202 | Linux*) CCSHARED="-fPIC";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3203 | BSD/OS*/4*) CCSHARED="-fpic";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3204 | FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3205 | OpenUNIX*|UnixWare*) |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3206 | if test "$GCC" = "yes" |
| 3207 | then CCSHARED="-fPIC" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3208 | else CCSHARED="-KPIC" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3209 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3210 | SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3211 | Monterey*) CCSHARED="-G";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3212 | IRIX*/6*) case $CC in |
| 3213 | *gcc*) CCSHARED="-shared";; |
Guido van Rossum | ee21f41 | 1998-04-20 18:51:54 +0000 | [diff] [blame] | 3214 | *) CCSHARED="";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3215 | esac;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3216 | CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3217 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3218 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3219 | echo "$ac_t""$CCSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3220 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3221 | # the python executable -- this is only needed for a few systems |
| 3222 | echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3223 | echo "configure:3224: checking LINKFORSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3224 | if test -z "$LINKFORSHARED" |
| 3225 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3226 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3227 | AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 3228 | hp*|HP*) |
Guido van Rossum | 304dd2d | 1997-10-20 23:10:56 +0000 | [diff] [blame] | 3229 | LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3230 | BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 2d9feed | 1997-11-24 17:36:21 +0000 | [diff] [blame] | 3231 | Linux*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3232 | # -u libsys_s pulls in all symbols in libsys |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3233 | Darwin/*) |
| 3234 | # -u __dummy makes the linker aware of the objc runtime |
| 3235 | # in System.framework; otherwise, __objcInit (referenced in |
| 3236 | # crt1.o) gets erroneously defined as common, which breaks dynamic |
| 3237 | # loading of any modules which reference it in System.framework. |
| 3238 | # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is |
| 3239 | # not used by the core itself but which needs to be in the core so |
| 3240 | # that dynamically loaded extension modules have access to it. |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3241 | LINKFORSHARED="$extra_undefs -framework System" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3242 | if test "$enable_framework" |
| 3243 | then |
| 3244 | LINKFORSHARED="$LINKFORSHARED -framework Python" |
| 3245 | fi |
| 3246 | LINKFORSHARED="$LINKFORSHARED $extra_frameworks";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3247 | OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3248 | SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3249 | ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3250 | FreeBSD*|NetBSD*|OpenBSD*) |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 3251 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 3252 | then |
| 3253 | LINKFORSHARED="-Wl,--export-dynamic" |
| 3254 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3255 | SunOS/5*) case $CC in |
| 3256 | *gcc*) |
Guido van Rossum | ff48418 | 2000-02-03 13:50:24 +0000 | [diff] [blame] | 3257 | if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 3258 | then |
| 3259 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3260 | fi;; |
| 3261 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3262 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3263 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3264 | echo "$ac_t""$LINKFORSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3265 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3266 | |
| 3267 | echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3268 | echo "configure:3269: checking CFLAGSFORSHARED" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3269 | if test ! "$LIBRARY" = "$LDLIBRARY" |
| 3270 | then |
Neil Schemenauer | 0c6141f | 2001-01-27 21:40:54 +0000 | [diff] [blame] | 3271 | case $ac_sys_system in |
| 3272 | CYGWIN*) |
| 3273 | # Cygwin needs CCSHARED when building extension DLLs |
| 3274 | # but not when building the interpreter DLL. |
| 3275 | CFLAGSFORSHARED='';; |
| 3276 | *) |
| 3277 | CFLAGSFORSHARED='$(CCSHARED)' |
| 3278 | esac |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3279 | fi |
| 3280 | echo "$ac_t""$CFLAGSFORSHARED" 1>&6 |
| 3281 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3282 | # checks for libraries |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3283 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3284 | echo "configure:3285: checking for dlopen in -ldl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3285 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3286 | 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] | 3287 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3288 | else |
| 3289 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3290 | LIBS="-ldl $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3291 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3292 | #line 3293 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3293 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3294 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3295 | /* We use char because int might match the return type of a gcc2 |
| 3296 | builtin and then its argument prototype would still apply. */ |
| 3297 | char dlopen(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3298 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3299 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3300 | dlopen() |
| 3301 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3302 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3303 | if { (eval echo configure:3304: \"$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] | 3304 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3305 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3306 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3307 | echo "configure: failed program was:" >&5 |
| 3308 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3309 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3310 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3311 | fi |
| 3312 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3313 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3314 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3315 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3316 | 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] | 3317 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3318 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3319 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3320 | cat >> confdefs.h <<EOF |
| 3321 | #define $ac_tr_lib 1 |
| 3322 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3323 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3324 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3325 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3326 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3327 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3328 | fi |
| 3329 | # Dynamic linking for SunOS/Solaris and SYSV |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3330 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3331 | echo "configure:3332: checking for shl_load in -ldld" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3332 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3333 | 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] | 3334 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3335 | else |
| 3336 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3337 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3338 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3339 | #line 3340 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3340 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3341 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3342 | /* We use char because int might match the return type of a gcc2 |
| 3343 | builtin and then its argument prototype would still apply. */ |
| 3344 | char shl_load(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3345 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3346 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3347 | shl_load() |
| 3348 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3349 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3350 | if { (eval echo configure:3351: \"$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] | 3351 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3352 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3353 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3354 | echo "configure: failed program was:" >&5 |
| 3355 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3356 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3357 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3358 | fi |
| 3359 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3360 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3361 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3362 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3363 | 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] | 3364 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3365 | ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3366 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3367 | cat >> confdefs.h <<EOF |
| 3368 | #define $ac_tr_lib 1 |
| 3369 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3370 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3371 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3372 | |
| 3373 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3374 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3375 | fi |
| 3376 | # Dynamic linking for HP-UX |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3377 | |
| 3378 | # checks for system dependent C++ extensions support |
| 3379 | case "$ac_sys_system" in |
| 3380 | AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3381 | echo "configure:3382: checking for genuine AIX C++ extensions support" >&5 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3382 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3383 | #line 3384 "configure" |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3384 | #include "confdefs.h" |
| 3385 | #include "/usr/lpp/xlC/include/load.h" |
| 3386 | int main() { |
| 3387 | loadAndInit("", 0, "") |
| 3388 | ; return 0; } |
| 3389 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3390 | if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3391 | rm -rf conftest* |
| 3392 | cat >> confdefs.h <<\EOF |
| 3393 | #define AIX_GENUINE_CPLUSPLUS 1 |
| 3394 | EOF |
| 3395 | |
| 3396 | echo "$ac_t""yes" 1>&6 |
| 3397 | else |
| 3398 | echo "configure: failed program was:" >&5 |
| 3399 | cat conftest.$ac_ext >&5 |
| 3400 | rm -rf conftest* |
| 3401 | echo "$ac_t""no" 1>&6 |
| 3402 | fi |
| 3403 | rm -f conftest*;; |
| 3404 | *) ;; |
| 3405 | esac |
| 3406 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3407 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
| 3408 | # However on SGI IRIX, these exist but are broken. |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3409 | # BeOS' sockets are stashed in libnet. |
| 3410 | case "$ac_sys_system" in |
| 3411 | IRIX*) ;; |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3412 | *) |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3413 | echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3414 | echo "configure:3415: checking for t_open in -lnsl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3415 | ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3416 | 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] | 3417 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3418 | else |
| 3419 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3420 | LIBS="-lnsl $LIBS" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3421 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3422 | #line 3423 "configure" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3423 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3424 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3425 | /* We use char because int might match the return type of a gcc2 |
| 3426 | builtin and then its argument prototype would still apply. */ |
| 3427 | char t_open(); |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3428 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3429 | int main() { |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3430 | t_open() |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3431 | ; return 0; } |
| 3432 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3433 | if { (eval echo configure:3434: \"$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] | 3434 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3435 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3436 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3437 | echo "configure: failed program was:" >&5 |
| 3438 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3439 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3440 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3441 | fi |
| 3442 | rm -f conftest* |
| 3443 | LIBS="$ac_save_LIBS" |
| 3444 | |
| 3445 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3446 | 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] | 3447 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3448 | LIBS="-lnsl $LIBS" |
| 3449 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3450 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3451 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3452 | # SVR4 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3453 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3454 | echo "configure:3455: checking for socket in -lsocket" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3455 | ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3456 | 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] | 3457 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3458 | else |
| 3459 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3460 | LIBS="-lsocket $LIBS $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3461 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3462 | #line 3463 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3463 | #include "confdefs.h" |
| 3464 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3465 | /* We use char because int might match the return type of a gcc2 |
| 3466 | builtin and then its argument prototype would still apply. */ |
| 3467 | char socket(); |
| 3468 | |
| 3469 | int main() { |
| 3470 | socket() |
| 3471 | ; return 0; } |
| 3472 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3473 | if { (eval echo configure:3474: \"$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] | 3474 | rm -rf conftest* |
| 3475 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3476 | else |
| 3477 | echo "configure: failed program was:" >&5 |
| 3478 | cat conftest.$ac_ext >&5 |
| 3479 | rm -rf conftest* |
| 3480 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3481 | fi |
| 3482 | rm -f conftest* |
| 3483 | LIBS="$ac_save_LIBS" |
| 3484 | |
| 3485 | fi |
| 3486 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3487 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3488 | LIBS="-lsocket $LIBS" |
| 3489 | else |
| 3490 | echo "$ac_t""no" 1>&6 |
| 3491 | fi |
| 3492 | # SVR4 sockets |
Jeremy Hylton | cb25d5e | 2000-07-27 21:23:28 +0000 | [diff] [blame] | 3493 | ;; |
| 3494 | esac |
| 3495 | case "$ac_sys_system" in |
| 3496 | BeOS*) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3497 | echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3498 | echo "configure:3499: checking for socket in -lnet" >&5 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3499 | ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3500 | 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] | 3501 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3502 | else |
| 3503 | ac_save_LIBS="$LIBS" |
| 3504 | LIBS="-lnet $LIBS $LIBS" |
| 3505 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3506 | #line 3507 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3507 | #include "confdefs.h" |
| 3508 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3509 | /* We use char because int might match the return type of a gcc2 |
| 3510 | builtin and then its argument prototype would still apply. */ |
| 3511 | char socket(); |
| 3512 | |
| 3513 | int main() { |
| 3514 | socket() |
| 3515 | ; return 0; } |
| 3516 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3517 | if { (eval echo configure:3518: \"$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] | 3518 | rm -rf conftest* |
| 3519 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3520 | else |
| 3521 | echo "configure: failed program was:" >&5 |
| 3522 | cat conftest.$ac_ext >&5 |
| 3523 | rm -rf conftest* |
| 3524 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3525 | fi |
| 3526 | rm -f conftest* |
| 3527 | LIBS="$ac_save_LIBS" |
| 3528 | |
| 3529 | fi |
| 3530 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3531 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3532 | LIBS="-lnet $LIBS" |
| 3533 | else |
| 3534 | echo "$ac_t""no" 1>&6 |
| 3535 | fi |
| 3536 | # BeOS |
| 3537 | ;; |
| 3538 | esac |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3539 | |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3540 | echo $ac_n "checking for --with-libs""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3541 | echo "configure:3542: checking for --with-libs" >&5 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3542 | # Check whether --with-libs or --without-libs was given. |
| 3543 | if test "${with_libs+set}" = set; then |
| 3544 | withval="$with_libs" |
| 3545 | |
| 3546 | echo "$ac_t""$withval" 1>&6 |
| 3547 | LIBS="$withval $LIBS" |
| 3548 | |
| 3549 | else |
| 3550 | echo "$ac_t""no" 1>&6 |
| 3551 | fi |
| 3552 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3553 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3554 | # Determine if signalmodule should be used. |
| 3555 | |
| 3556 | |
| 3557 | echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3558 | echo "configure:3559: checking for --with-signal-module" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3559 | # Check whether --with-signal-module or --without-signal-module was given. |
| 3560 | if test "${with_signal_module+set}" = set; then |
| 3561 | withval="$with_signal_module" |
| 3562 | : |
| 3563 | fi |
| 3564 | |
| 3565 | |
| 3566 | if test -z "$with_signal_module" |
| 3567 | then with_signal_module="yes" |
| 3568 | fi |
| 3569 | echo "$ac_t""$with_signal_module" 1>&6 |
| 3570 | |
| 3571 | if test "${with_signal_module}" = "yes"; then |
| 3572 | USE_SIGNAL_MODULE="" |
| 3573 | SIGNAL_OBJS="" |
| 3574 | else |
| 3575 | USE_SIGNAL_MODULE="#" |
| 3576 | SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o" |
| 3577 | fi |
| 3578 | |
Guido van Rossum | 3d15bd8 | 2001-01-10 18:53:48 +0000 | [diff] [blame] | 3579 | # This is used to generate Setup.config |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3580 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3581 | USE_THREAD_MODULE="" |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3582 | |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3583 | echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3584 | echo "configure:3585: checking for --with-dec-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3585 | |
| 3586 | # Check whether --with-dec-threads or --without-dec-threads was given. |
| 3587 | if test "${with_dec_threads+set}" = set; then |
| 3588 | withval="$with_dec_threads" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3589 | |
| 3590 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3591 | LDLAST=-threads |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3592 | if test "${with_thread+set}" != set; then |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3593 | with_thread="$withval"; |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3594 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3595 | else |
| 3596 | echo "$ac_t""no" 1>&6 |
| 3597 | fi |
| 3598 | |
| 3599 | |
| 3600 | echo $ac_n "checking for --with-threads""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3601 | echo "configure:3602: checking for --with-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3602 | # Check whether --with-threads or --without-threads was given. |
| 3603 | if test "${with_threads+set}" = set; then |
| 3604 | withval="$with_threads" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3605 | : |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3606 | fi |
| 3607 | |
| 3608 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3609 | # --with-thread is deprecated, but check for it anyway |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3610 | # Check whether --with-thread or --without-thread was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3611 | if test "${with_thread+set}" = set; then |
| 3612 | withval="$with_thread" |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 3613 | |
| 3614 | with_threads=$with_thread |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3615 | fi |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3616 | |
| 3617 | |
| 3618 | if test -z "$with_threads" |
| 3619 | then with_threads="yes" |
| 3620 | fi |
| 3621 | echo "$ac_t""$with_threads" 1>&6 |
| 3622 | |
| 3623 | if test "$with_threads" = "no" |
| 3624 | then |
| 3625 | USE_THREAD_MODULE="#" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3626 | elif test "$ac_cv_pthread_is_default" = yes |
| 3627 | then |
| 3628 | cat >> confdefs.h <<\EOF |
| 3629 | #define WITH_THREAD 1 |
| 3630 | EOF |
| 3631 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3632 | # Defining _REENTRANT on system with POSIX threads should not hurt. |
| 3633 | cat >> confdefs.h <<\EOF |
| 3634 | #define _REENTRANT 1 |
| 3635 | EOF |
| 3636 | |
| 3637 | posix_threads=yes |
| 3638 | LIBOBJS="$LIBOBJS thread.o" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3639 | elif test "$ac_cv_kpthread" = "yes" |
| 3640 | then |
| 3641 | CC="$CC -Kpthread" |
| 3642 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3643 | #define WITH_THREAD 1 |
| 3644 | EOF |
| 3645 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3646 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3647 | LIBOBJS="$LIBOBJS thread.o" |
| 3648 | else |
| 3649 | if test ! -z "$with_threads" -a -d "$with_threads" |
| 3650 | then LDFLAGS="$LDFLAGS -L$with_threads" |
| 3651 | fi |
| 3652 | if test ! -z "$withval" -a -d "$withval" |
| 3653 | then LDFLAGS="$LDFLAGS -L$withval" |
| 3654 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3655 | |
| 3656 | # According to the POSIX spec, a pthreads implementation must |
| 3657 | # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?) |
| 3658 | echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3659 | echo "configure:3660: checking for _POSIX_THREADS in unistd.h" >&5 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3660 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3661 | #line 3662 "configure" |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3662 | #include "confdefs.h" |
| 3663 | #include <unistd.h> |
| 3664 | #ifdef _POSIX_THREADS |
| 3665 | yes |
| 3666 | #endif |
| 3667 | |
| 3668 | EOF |
| 3669 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 3670 | egrep "yes" >/dev/null 2>&1; then |
| 3671 | rm -rf conftest* |
| 3672 | unistd_defines_pthreads=yes |
| 3673 | else |
| 3674 | rm -rf conftest* |
| 3675 | unistd_defines_pthreads=no |
| 3676 | fi |
| 3677 | rm -f conftest* |
| 3678 | |
| 3679 | echo "$ac_t""$unistd_defines_pthreads" 1>&6 |
| 3680 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3681 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 3682 | #define _REENTRANT 1 |
| 3683 | EOF |
| 3684 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3685 | ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3686 | echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3687 | echo "configure:3688: checking for mach/cthreads.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3688 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3689 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3690 | else |
| 3691 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3692 | #line 3693 "configure" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3693 | #include "confdefs.h" |
| 3694 | #include <mach/cthreads.h> |
| 3695 | EOF |
| 3696 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3697 | { (eval echo configure:3698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3698 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3699 | if test -z "$ac_err"; then |
| 3700 | rm -rf conftest* |
| 3701 | eval "ac_cv_header_$ac_safe=yes" |
| 3702 | else |
| 3703 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3704 | echo "configure: failed program was:" >&5 |
| 3705 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3706 | rm -rf conftest* |
| 3707 | eval "ac_cv_header_$ac_safe=no" |
| 3708 | fi |
| 3709 | rm -f conftest* |
| 3710 | fi |
| 3711 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3712 | echo "$ac_t""yes" 1>&6 |
| 3713 | cat >> confdefs.h <<\EOF |
| 3714 | #define WITH_THREAD 1 |
| 3715 | EOF |
| 3716 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3717 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3718 | #define C_THREADS 1 |
| 3719 | EOF |
| 3720 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3721 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3722 | else |
| 3723 | echo "$ac_t""no" 1>&6 |
| 3724 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3725 | echo $ac_n "checking for --with-pth""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3726 | echo "configure:3727: checking for --with-pth" >&5 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3727 | # Check whether --with-pth or --without-pth was given. |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3728 | if test "${with_pth+set}" = set; then |
| 3729 | withval="$with_pth" |
| 3730 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3731 | echo "$ac_t""$withval" 1>&6 |
| 3732 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3733 | #define WITH_THREAD 1 |
| 3734 | EOF |
| 3735 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3736 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3737 | #define HAVE_PTH 1 |
| 3738 | EOF |
| 3739 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3740 | LIBS="-lpth $LIBS" |
| 3741 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3742 | else |
| 3743 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3744 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3745 | |
| 3746 | # Just looking for pthread_create in libpthread is not enough: |
| 3747 | # on HP/UX, pthread.h renames pthread_create to a different symbol name. |
| 3748 | # So we really have to include pthread.h, and then link. |
| 3749 | _libs=$LIBS |
| 3750 | LIBS="$LIBS -lpthread" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3751 | echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3752 | echo "configure:3753: checking for pthread_create in -lpthread" >&5 |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3753 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3754 | #line 3755 "configure" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3755 | #include "confdefs.h" |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3756 | #include <pthread.h> |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3757 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3758 | void * start_routine (void *arg) { exit (0); } |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3759 | int main() { |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3760 | |
| 3761 | pthread_create (NULL, NULL, start_routine, NULL) |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3762 | ; return 0; } |
| 3763 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3764 | if { (eval echo configure:3765: \"$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] | 3765 | rm -rf conftest* |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3766 | |
| 3767 | echo "$ac_t""yes" 1>&6 |
| 3768 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3769 | #define WITH_THREAD 1 |
| 3770 | EOF |
| 3771 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3772 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3773 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3774 | else |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3775 | echo "configure: failed program was:" >&5 |
| 3776 | cat conftest.$ac_ext >&5 |
| 3777 | rm -rf conftest* |
| 3778 | |
| 3779 | LIBS=$_libs |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3780 | echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3781 | echo "configure:3782: checking for pthread_detach" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3782 | 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] | 3783 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3784 | else |
| 3785 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3786 | #line 3787 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3787 | #include "confdefs.h" |
| 3788 | /* System header to define __stub macros and hopefully few prototypes, |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3789 | which can conflict with char pthread_detach(); below. */ |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3790 | #include <assert.h> |
| 3791 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3792 | /* We use char because int might match the return type of a gcc2 |
| 3793 | builtin and then its argument prototype would still apply. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3794 | char pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3795 | |
| 3796 | int main() { |
| 3797 | |
| 3798 | /* The GNU C library defines this for functions which it implements |
| 3799 | to always fail with ENOSYS. Some functions are actually named |
| 3800 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3801 | #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3802 | choke me |
| 3803 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3804 | pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3805 | #endif |
| 3806 | |
| 3807 | ; return 0; } |
| 3808 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3809 | if { (eval echo configure:3810: \"$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] | 3810 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3811 | eval "ac_cv_func_pthread_detach=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3812 | else |
| 3813 | echo "configure: failed program was:" >&5 |
| 3814 | cat conftest.$ac_ext >&5 |
| 3815 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3816 | eval "ac_cv_func_pthread_detach=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3817 | fi |
| 3818 | rm -f conftest* |
| 3819 | fi |
| 3820 | |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3821 | if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3822 | echo "$ac_t""yes" 1>&6 |
| 3823 | cat >> confdefs.h <<\EOF |
| 3824 | #define WITH_THREAD 1 |
| 3825 | EOF |
| 3826 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3827 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3828 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +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 | ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3833 | echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3834 | echo "configure:3835: checking for kernel/OS.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3835 | 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] | 3836 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3837 | else |
| 3838 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3839 | #line 3840 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3840 | #include "confdefs.h" |
| 3841 | #include <kernel/OS.h> |
| 3842 | EOF |
| 3843 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3844 | { (eval echo configure:3845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3845 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3846 | if test -z "$ac_err"; then |
| 3847 | rm -rf conftest* |
| 3848 | eval "ac_cv_header_$ac_safe=yes" |
| 3849 | else |
| 3850 | echo "$ac_err" >&5 |
| 3851 | echo "configure: failed program was:" >&5 |
| 3852 | cat conftest.$ac_ext >&5 |
| 3853 | rm -rf conftest* |
| 3854 | eval "ac_cv_header_$ac_safe=no" |
| 3855 | fi |
| 3856 | rm -f conftest* |
| 3857 | fi |
| 3858 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3859 | echo "$ac_t""yes" 1>&6 |
| 3860 | cat >> confdefs.h <<\EOF |
| 3861 | #define WITH_THREAD 1 |
| 3862 | EOF |
| 3863 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3864 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3865 | #define BEOS_THREADS 1 |
| 3866 | EOF |
| 3867 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3868 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3869 | else |
| 3870 | echo "$ac_t""no" 1>&6 |
| 3871 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3872 | echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3873 | echo "configure:3874: checking for pthread_create in -lpthreads" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3874 | ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3875 | 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] | 3876 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3877 | else |
| 3878 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3879 | LIBS="-lpthreads $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3880 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3881 | #line 3882 "configure" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3882 | #include "confdefs.h" |
| 3883 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3884 | /* We use char because int might match the return type of a gcc2 |
| 3885 | builtin and then its argument prototype would still apply. */ |
| 3886 | char pthread_create(); |
| 3887 | |
| 3888 | int main() { |
| 3889 | pthread_create() |
| 3890 | ; return 0; } |
| 3891 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3892 | if { (eval echo configure:3893: \"$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] | 3893 | rm -rf conftest* |
| 3894 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3895 | else |
| 3896 | echo "configure: failed program was:" >&5 |
| 3897 | cat conftest.$ac_ext >&5 |
| 3898 | rm -rf conftest* |
| 3899 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3900 | fi |
| 3901 | rm -f conftest* |
| 3902 | LIBS="$ac_save_LIBS" |
| 3903 | |
| 3904 | fi |
| 3905 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3906 | echo "$ac_t""yes" 1>&6 |
| 3907 | cat >> confdefs.h <<\EOF |
| 3908 | #define WITH_THREAD 1 |
| 3909 | EOF |
| 3910 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3911 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3912 | LIBS="$LIBS -lpthreads" |
| 3913 | LIBOBJS="$LIBOBJS thread.o" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3914 | else |
| 3915 | echo "$ac_t""no" 1>&6 |
| 3916 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3917 | echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3918 | echo "configure:3919: checking for pthread_create in -lc_r" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3919 | ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3920 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3921 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3922 | else |
| 3923 | ac_save_LIBS="$LIBS" |
| 3924 | LIBS="-lc_r $LIBS" |
| 3925 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3926 | #line 3927 "configure" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3927 | #include "confdefs.h" |
| 3928 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3929 | /* We use char because int might match the return type of a gcc2 |
| 3930 | builtin and then its argument prototype would still apply. */ |
| 3931 | char pthread_create(); |
| 3932 | |
| 3933 | int main() { |
| 3934 | pthread_create() |
| 3935 | ; return 0; } |
| 3936 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3937 | if { (eval echo configure:3938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3938 | rm -rf conftest* |
| 3939 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3940 | else |
| 3941 | echo "configure: failed program was:" >&5 |
| 3942 | cat conftest.$ac_ext >&5 |
| 3943 | rm -rf conftest* |
| 3944 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3945 | fi |
| 3946 | rm -f conftest* |
| 3947 | LIBS="$ac_save_LIBS" |
| 3948 | |
| 3949 | fi |
| 3950 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3951 | echo "$ac_t""yes" 1>&6 |
| 3952 | cat >> confdefs.h <<\EOF |
| 3953 | #define WITH_THREAD 1 |
| 3954 | EOF |
| 3955 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3956 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3957 | LIBS="$LIBS -lc_r" |
| 3958 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3959 | else |
| 3960 | echo "$ac_t""no" 1>&6 |
| 3961 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3962 | echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3963 | echo "configure:3964: checking for __d6_pthread_create in -lthread" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3964 | ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3965 | 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] | 3966 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3967 | else |
| 3968 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3969 | LIBS="-lthread $LIBS" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3970 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3971 | #line 3972 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3972 | #include "confdefs.h" |
| 3973 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3974 | /* We use char because int might match the return type of a gcc2 |
| 3975 | builtin and then its argument prototype would still apply. */ |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3976 | char __d6_pthread_create(); |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3977 | |
| 3978 | int main() { |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3979 | __d6_pthread_create() |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3980 | ; return 0; } |
| 3981 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3982 | if { (eval echo configure:3983: \"$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] | 3983 | rm -rf conftest* |
| 3984 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3985 | else |
| 3986 | echo "configure: failed program was:" >&5 |
| 3987 | cat conftest.$ac_ext >&5 |
| 3988 | rm -rf conftest* |
| 3989 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3990 | fi |
| 3991 | rm -f conftest* |
| 3992 | LIBS="$ac_save_LIBS" |
| 3993 | |
| 3994 | fi |
| 3995 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3996 | echo "$ac_t""yes" 1>&6 |
| 3997 | cat >> confdefs.h <<\EOF |
| 3998 | #define WITH_THREAD 1 |
| 3999 | EOF |
| 4000 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4001 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4002 | LIBS="$LIBS -lthread" |
| 4003 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4004 | else |
| 4005 | echo "$ac_t""no" 1>&6 |
| 4006 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4007 | echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4008 | echo "configure:4009: checking for __pthread_create_system in -lpthread" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4009 | ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` |
| 4010 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4011 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4012 | else |
| 4013 | ac_save_LIBS="$LIBS" |
| 4014 | LIBS="-lpthread $LIBS" |
| 4015 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4016 | #line 4017 "configure" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4017 | #include "confdefs.h" |
| 4018 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4019 | /* We use char because int might match the return type of a gcc2 |
| 4020 | builtin and then its argument prototype would still apply. */ |
| 4021 | char __pthread_create_system(); |
| 4022 | |
| 4023 | int main() { |
| 4024 | __pthread_create_system() |
| 4025 | ; return 0; } |
| 4026 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4027 | if { (eval echo configure:4028: \"$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] | 4028 | rm -rf conftest* |
| 4029 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4030 | else |
| 4031 | echo "configure: failed program was:" >&5 |
| 4032 | cat conftest.$ac_ext >&5 |
| 4033 | rm -rf conftest* |
| 4034 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4035 | fi |
| 4036 | rm -f conftest* |
| 4037 | LIBS="$ac_save_LIBS" |
| 4038 | |
| 4039 | fi |
| 4040 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4041 | echo "$ac_t""yes" 1>&6 |
| 4042 | cat >> confdefs.h <<\EOF |
| 4043 | #define WITH_THREAD 1 |
| 4044 | EOF |
| 4045 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4046 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4047 | LIBS="$LIBS -lpthread" |
| 4048 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4049 | else |
| 4050 | echo "$ac_t""no" 1>&6 |
| 4051 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4052 | echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4053 | echo "configure:4054: checking for pthread_create in -lcma" >&5 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4054 | ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4055 | 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] | 4056 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4057 | else |
| 4058 | ac_save_LIBS="$LIBS" |
| 4059 | LIBS="-lcma $LIBS" |
| 4060 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4061 | #line 4062 "configure" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4062 | #include "confdefs.h" |
| 4063 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4064 | /* We use char because int might match the return type of a gcc2 |
| 4065 | builtin and then its argument prototype would still apply. */ |
| 4066 | char pthread_create(); |
| 4067 | |
| 4068 | int main() { |
| 4069 | pthread_create() |
| 4070 | ; return 0; } |
| 4071 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4072 | if { (eval echo configure:4073: \"$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] | 4073 | rm -rf conftest* |
| 4074 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4075 | else |
| 4076 | echo "configure: failed program was:" >&5 |
| 4077 | cat conftest.$ac_ext >&5 |
| 4078 | rm -rf conftest* |
| 4079 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4080 | fi |
| 4081 | rm -f conftest* |
| 4082 | LIBS="$ac_save_LIBS" |
| 4083 | |
| 4084 | fi |
| 4085 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4086 | echo "$ac_t""yes" 1>&6 |
| 4087 | cat >> confdefs.h <<\EOF |
| 4088 | #define WITH_THREAD 1 |
| 4089 | EOF |
| 4090 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4091 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4092 | LIBS="$LIBS -lcma" |
| 4093 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4094 | else |
| 4095 | echo "$ac_t""no" 1>&6 |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 4096 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4097 | USE_THREAD_MODULE="#" |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 4098 | fi |
| 4099 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4100 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4101 | fi |
| 4102 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 4103 | fi |
| 4104 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4105 | fi |
| 4106 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4107 | fi |
| 4108 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4109 | fi |
| 4110 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4111 | fi |
| 4112 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4113 | fi |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 4114 | rm -f conftest* |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4115 | fi |
| 4116 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4117 | fi |
| 4118 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4119 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4120 | if test "$posix_threads" = "yes"; then |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4121 | if test "$unistd_defines_pthreads" = "no"; then |
| 4122 | cat >> confdefs.h <<\EOF |
| 4123 | #define _POSIX_THREADS 1 |
| 4124 | EOF |
| 4125 | |
| 4126 | fi |
| 4127 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4128 | echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4129 | echo "configure:4130: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4130 | if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then |
| 4131 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4132 | else |
| 4133 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 4134 | ac_cv_pthread_system_supported=no |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4135 | else |
| 4136 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4137 | #line 4138 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4138 | #include "confdefs.h" |
| 4139 | #include <pthread.h> |
| 4140 | void *foo(void *parm) { |
| 4141 | return NULL; |
| 4142 | } |
| 4143 | main() { |
| 4144 | pthread_attr_t attr; |
| 4145 | if (pthread_attr_init(&attr)) exit(-1); |
| 4146 | if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1); |
| 4147 | if (pthread_create(NULL, &attr, foo, NULL)) exit(-1); |
| 4148 | exit(0); |
| 4149 | } |
| 4150 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4151 | if { (eval echo configure:4152: \"$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] | 4152 | then |
| 4153 | ac_cv_pthread_system_supported=yes |
| 4154 | else |
| 4155 | echo "configure: failed program was:" >&5 |
| 4156 | cat conftest.$ac_ext >&5 |
| 4157 | rm -fr conftest* |
| 4158 | ac_cv_pthread_system_supported=no |
| 4159 | fi |
| 4160 | rm -fr conftest* |
| 4161 | fi |
| 4162 | |
| 4163 | |
| 4164 | fi |
| 4165 | |
| 4166 | echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6 |
| 4167 | if test "$ac_cv_pthread_system_supported" = "yes"; then |
| 4168 | cat >> confdefs.h <<\EOF |
| 4169 | #define PTHREAD_SYSTEM_SCHED_SUPPORTED 1 |
| 4170 | EOF |
| 4171 | |
| 4172 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4173 | for ac_func in pthread_sigmask |
| 4174 | do |
| 4175 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4176 | echo "configure:4177: checking for $ac_func" >&5 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4177 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4178 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4179 | else |
| 4180 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4181 | #line 4182 "configure" |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4182 | #include "confdefs.h" |
| 4183 | /* System header to define __stub macros and hopefully few prototypes, |
| 4184 | which can conflict with char $ac_func(); below. */ |
| 4185 | #include <assert.h> |
| 4186 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4187 | /* We use char because int might match the return type of a gcc2 |
| 4188 | builtin and then its argument prototype would still apply. */ |
| 4189 | char $ac_func(); |
| 4190 | |
| 4191 | int main() { |
| 4192 | |
| 4193 | /* The GNU C library defines this for functions which it implements |
| 4194 | to always fail with ENOSYS. Some functions are actually named |
| 4195 | something starting with __ and the normal name is an alias. */ |
| 4196 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4197 | choke me |
| 4198 | #else |
| 4199 | $ac_func(); |
| 4200 | #endif |
| 4201 | |
| 4202 | ; return 0; } |
| 4203 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4204 | if { (eval echo configure:4205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4205 | rm -rf conftest* |
| 4206 | eval "ac_cv_func_$ac_func=yes" |
| 4207 | else |
| 4208 | echo "configure: failed program was:" >&5 |
| 4209 | cat conftest.$ac_ext >&5 |
| 4210 | rm -rf conftest* |
| 4211 | eval "ac_cv_func_$ac_func=no" |
| 4212 | fi |
| 4213 | rm -f conftest* |
| 4214 | fi |
| 4215 | |
| 4216 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4217 | echo "$ac_t""yes" 1>&6 |
| 4218 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4219 | cat >> confdefs.h <<EOF |
| 4220 | #define $ac_tr_func 1 |
| 4221 | EOF |
| 4222 | |
| 4223 | else |
| 4224 | echo "$ac_t""no" 1>&6 |
| 4225 | fi |
| 4226 | done |
| 4227 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4228 | fi |
| 4229 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4230 | echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4231 | echo "configure:4232: checking for usconfig in -lmpc" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4232 | ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4233 | 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] | 4234 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4235 | else |
| 4236 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4237 | LIBS="-lmpc $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4238 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4239 | #line 4240 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4240 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4241 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4242 | /* We use char because int might match the return type of a gcc2 |
| 4243 | builtin and then its argument prototype would still apply. */ |
| 4244 | char usconfig(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4245 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4246 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4247 | usconfig() |
| 4248 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4249 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4250 | if { (eval echo configure:4251: \"$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] | 4251 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4252 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4253 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4254 | echo "configure: failed program was:" >&5 |
| 4255 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4256 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4257 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4258 | fi |
| 4259 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4260 | LIBS="$ac_save_LIBS" |
| 4261 | |
| 4262 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4263 | 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] | 4264 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4265 | cat >> confdefs.h <<\EOF |
| 4266 | #define WITH_THREAD 1 |
| 4267 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4268 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4269 | LIBS="$LIBS -lmpc" |
| 4270 | LIBOBJS="$LIBOBJS thread.o" |
| 4271 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4272 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4273 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4274 | fi |
| 4275 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4276 | echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4277 | echo "configure:4278: checking for thr_create in -lthread" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4278 | ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4279 | 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] | 4280 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4281 | else |
| 4282 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4283 | LIBS="-lthread $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4284 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4285 | #line 4286 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4286 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4287 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4288 | /* We use char because int might match the return type of a gcc2 |
| 4289 | builtin and then its argument prototype would still apply. */ |
| 4290 | char thr_create(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4291 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4292 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4293 | thr_create() |
| 4294 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4295 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4296 | if { (eval echo configure:4297: \"$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] | 4297 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4298 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4299 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4300 | echo "configure: failed program was:" >&5 |
| 4301 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4302 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4303 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4304 | fi |
| 4305 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4306 | LIBS="$ac_save_LIBS" |
| 4307 | |
| 4308 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4309 | 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] | 4310 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4311 | cat >> confdefs.h <<\EOF |
| 4312 | #define WITH_THREAD 1 |
| 4313 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4314 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4315 | LIBS="$LIBS -lthread" |
| 4316 | LIBOBJS="$LIBOBJS thread.o" |
| 4317 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4318 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4319 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4320 | fi |
| 4321 | |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4322 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4323 | if test "$USE_THREAD_MODULE" != "#" |
| 4324 | then |
| 4325 | # If the above checks didn't disable threads, (at least) OSF1 |
| 4326 | # needs this '-threads' argument during linking. |
| 4327 | case $ac_sys_system in |
| 4328 | OSF1) LDLAST=-threads;; |
| 4329 | esac |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4330 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4331 | fi |
| 4332 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4333 | # Check for enable-ipv6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4334 | echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4335 | echo "configure:4336: checking if --enable-ipv6 is specified" >&5 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4336 | # Check whether --enable-ipv6 or --disable-ipv6 was given. |
| 4337 | if test "${enable_ipv6+set}" = set; then |
| 4338 | enableval="$enable_ipv6" |
| 4339 | case "$enableval" in |
| 4340 | no) |
| 4341 | echo "$ac_t""no" 1>&6 |
| 4342 | ipv6=no |
| 4343 | ;; |
| 4344 | *) echo "$ac_t""yes" 1>&6 |
| 4345 | cat >> confdefs.h <<\EOF |
| 4346 | #define ENABLE_IPV6 1 |
| 4347 | EOF |
| 4348 | |
| 4349 | ipv6=yes |
| 4350 | ;; |
| 4351 | esac |
| 4352 | else |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4353 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4354 | if test "$cross_compiling" = yes; then |
| 4355 | echo "$ac_t""no" 1>&6 |
| 4356 | ipv6=no |
| 4357 | |
| 4358 | else |
| 4359 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4360 | #line 4361 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4361 | #include "confdefs.h" |
| 4362 | /* AF_INET6 available check */ |
| 4363 | #include <sys/types.h> |
| 4364 | #include <sys/socket.h> |
| 4365 | main() |
| 4366 | { |
| 4367 | if (socket(AF_INET6, SOCK_STREAM, 0) < 0) |
| 4368 | exit(1); |
| 4369 | else |
| 4370 | exit(0); |
| 4371 | } |
| 4372 | |
| 4373 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4374 | if { (eval echo configure:4375: \"$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] | 4375 | then |
| 4376 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4377 | ipv6=yes |
| 4378 | else |
| 4379 | echo "configure: failed program was:" >&5 |
| 4380 | cat conftest.$ac_ext >&5 |
| 4381 | rm -fr conftest* |
| 4382 | echo "$ac_t""no" 1>&6 |
| 4383 | ipv6=no |
| 4384 | fi |
| 4385 | rm -fr conftest* |
| 4386 | fi |
| 4387 | |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4388 | |
| 4389 | if test "$ipv6" = "yes"; then |
| 4390 | echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4391 | echo "configure:4392: checking if RFC2553 API is available" >&5 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4392 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4393 | #line 4394 "configure" |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4394 | #include "confdefs.h" |
| 4395 | #include <sys/types.h> |
| 4396 | #include <netinet/in.h> |
| 4397 | int main() { |
| 4398 | struct sockaddr_in6 x; |
| 4399 | x.sin6_scope_id; |
| 4400 | ; return 0; } |
| 4401 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4402 | if { (eval echo configure:4403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4403 | rm -rf conftest* |
| 4404 | echo "$ac_t""yes" 1>&6 |
| 4405 | ipv6=yes |
| 4406 | else |
| 4407 | echo "configure: failed program was:" >&5 |
| 4408 | cat conftest.$ac_ext >&5 |
| 4409 | rm -rf conftest* |
| 4410 | echo "$ac_t""no" 1>&6 |
| 4411 | ipv6=no |
| 4412 | fi |
| 4413 | rm -f conftest* |
| 4414 | fi |
| 4415 | |
| 4416 | if test "$ipv6" = "yes"; then |
| 4417 | cat >> confdefs.h <<\EOF |
| 4418 | #define ENABLE_IPV6 1 |
| 4419 | EOF |
| 4420 | |
| 4421 | fi |
| 4422 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4423 | fi |
| 4424 | |
| 4425 | |
| 4426 | ipv6type=unknown |
| 4427 | ipv6lib=none |
| 4428 | ipv6trylibc=no |
| 4429 | |
| 4430 | if test "$ipv6" = "yes"; then |
| 4431 | echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4432 | echo "configure:4433: checking ipv6 stack type" >&5 |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 4433 | for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; |
| 4434 | do |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4435 | case $i in |
| 4436 | inria) |
| 4437 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4438 | #line 4439 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4439 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4440 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4441 | #include <netinet/in.h> |
| 4442 | #ifdef IPV6_INRIA_VERSION |
| 4443 | yes |
| 4444 | #endif |
| 4445 | EOF |
| 4446 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4447 | egrep "yes" >/dev/null 2>&1; then |
| 4448 | rm -rf conftest* |
| 4449 | ipv6type=$i; |
| 4450 | OPT="-DINET6 $OPT" |
| 4451 | fi |
| 4452 | rm -f conftest* |
| 4453 | |
| 4454 | ;; |
| 4455 | kame) |
| 4456 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4457 | #line 4458 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4458 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4459 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4460 | #include <netinet/in.h> |
| 4461 | #ifdef __KAME__ |
| 4462 | yes |
| 4463 | #endif |
| 4464 | EOF |
| 4465 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4466 | egrep "yes" >/dev/null 2>&1; then |
| 4467 | rm -rf conftest* |
| 4468 | ipv6type=$i; |
| 4469 | ipv6lib=inet6 |
| 4470 | ipv6libdir=/usr/local/v6/lib |
| 4471 | ipv6trylibc=yes |
| 4472 | OPT="-DINET6 $OPT" |
| 4473 | fi |
| 4474 | rm -f conftest* |
| 4475 | |
| 4476 | ;; |
| 4477 | linux-glibc) |
| 4478 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4479 | #line 4480 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4480 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4481 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4482 | #include <features.h> |
| 4483 | #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) |
| 4484 | yes |
| 4485 | #endif |
| 4486 | EOF |
| 4487 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4488 | egrep "yes" >/dev/null 2>&1; then |
| 4489 | rm -rf conftest* |
| 4490 | ipv6type=$i; |
| 4491 | ipv6trylibc=yes |
| 4492 | OPT="-DINET6 $OPT" |
| 4493 | fi |
| 4494 | rm -f conftest* |
| 4495 | |
| 4496 | ;; |
| 4497 | linux-inet6) |
| 4498 | if test -d /usr/inet6; then |
| 4499 | ipv6type=$i |
| 4500 | ipv6lib=inet6 |
| 4501 | ipv6libdir=/usr/inet6/lib |
| 4502 | OPT="-DINET6 -I/usr/inet6/include $OPT" |
| 4503 | fi |
| 4504 | ;; |
| 4505 | solaris) |
| 4506 | if test -f /etc/netconfig; then |
| 4507 | if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then |
| 4508 | ipv6type=$i |
| 4509 | ipv6trylibc=yes |
| 4510 | OPT="-DINET6 $OPT" |
| 4511 | fi |
| 4512 | fi |
| 4513 | ;; |
| 4514 | toshiba) |
| 4515 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4516 | #line 4517 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4517 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4518 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4519 | #include <sys/param.h> |
| 4520 | #ifdef _TOSHIBA_INET6 |
| 4521 | yes |
| 4522 | #endif |
| 4523 | EOF |
| 4524 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4525 | egrep "yes" >/dev/null 2>&1; then |
| 4526 | rm -rf conftest* |
| 4527 | ipv6type=$i; |
| 4528 | ipv6lib=inet6; |
| 4529 | ipv6libdir=/usr/local/v6/lib; |
| 4530 | OPT="-DINET6 $OPT" |
| 4531 | fi |
| 4532 | rm -f conftest* |
| 4533 | |
| 4534 | ;; |
| 4535 | v6d) |
| 4536 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4537 | #line 4538 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4538 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4539 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4540 | #include </usr/local/v6/include/sys/v6config.h> |
| 4541 | #ifdef __V6D__ |
| 4542 | yes |
| 4543 | #endif |
| 4544 | EOF |
| 4545 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4546 | egrep "yes" >/dev/null 2>&1; then |
| 4547 | rm -rf conftest* |
| 4548 | ipv6type=$i; |
| 4549 | ipv6lib=v6; |
| 4550 | ipv6libdir=/usr/local/v6/lib; |
| 4551 | OPT="-I/usr/local/v6/include $OPT" |
| 4552 | fi |
| 4553 | rm -f conftest* |
| 4554 | |
| 4555 | ;; |
| 4556 | zeta) |
| 4557 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4558 | #line 4559 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4559 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4560 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4561 | #include <sys/param.h> |
| 4562 | #ifdef _ZETA_MINAMI_INET6 |
| 4563 | yes |
| 4564 | #endif |
| 4565 | EOF |
| 4566 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4567 | egrep "yes" >/dev/null 2>&1; then |
| 4568 | rm -rf conftest* |
| 4569 | ipv6type=$i; |
| 4570 | ipv6lib=inet6; |
| 4571 | ipv6libdir=/usr/local/v6/lib; |
| 4572 | OPT="-DINET6 $OPT" |
| 4573 | fi |
| 4574 | rm -f conftest* |
| 4575 | |
| 4576 | ;; |
| 4577 | esac |
| 4578 | if test "$ipv6type" != "unknown"; then |
| 4579 | break |
| 4580 | fi |
| 4581 | done |
| 4582 | echo "$ac_t""$ipv6type" 1>&6 |
| 4583 | fi |
| 4584 | |
| 4585 | if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then |
| 4586 | if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then |
| 4587 | LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" |
| 4588 | echo "using lib$ipv6lib" |
| 4589 | else |
| 4590 | if test $ipv6trylibc = "yes"; then |
| 4591 | echo "using libc" |
| 4592 | else |
| 4593 | echo 'Fatal: no $ipv6lib library found. cannot continue.' |
| 4594 | echo "You need to fetch lib$ipv6lib.a from appropriate" |
| 4595 | echo 'ipv6 kit and compile beforehand.' |
| 4596 | exit 1 |
| 4597 | fi |
| 4598 | fi |
| 4599 | fi |
| 4600 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4601 | # Check for GC support |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4602 | echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4603 | echo "configure:4604: checking for --with-cycle-gc" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4604 | # Check whether --with-cycle-gc or --without-cycle-gc was given. |
| 4605 | if test "${with_cycle_gc+set}" = set; then |
| 4606 | withval="$with_cycle_gc" |
| 4607 | : |
| 4608 | fi |
| 4609 | |
| 4610 | |
| 4611 | if test -z "$with_cycle_gc" |
| 4612 | then with_cycle_gc="yes" |
| 4613 | fi |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame] | 4614 | if test "$with_cycle_gc" != "no" |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4615 | then |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4616 | cat >> confdefs.h <<\EOF |
| 4617 | #define WITH_CYCLE_GC 1 |
| 4618 | EOF |
| 4619 | |
| 4620 | fi |
| 4621 | echo "$ac_t""$with_cycle_gc" 1>&6 |
| 4622 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4623 | # Check for Python-specific malloc support |
| 4624 | echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4625 | echo "configure:4626: checking for --with-pymalloc" >&5 |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4626 | # Check whether --with-pymalloc or --without-pymalloc was given. |
| 4627 | if test "${with_pymalloc+set}" = set; then |
| 4628 | withval="$with_pymalloc" |
| 4629 | |
| 4630 | if test "$withval" != no |
| 4631 | then cat >> confdefs.h <<\EOF |
| 4632 | #define WITH_PYMALLOC 1 |
| 4633 | EOF |
| 4634 | echo "$ac_t""yes" 1>&6 |
| 4635 | else echo "$ac_t""no" 1>&6 |
| 4636 | fi |
| 4637 | else |
| 4638 | echo "$ac_t""no" 1>&6 |
| 4639 | fi |
| 4640 | |
| 4641 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4642 | # Check for --with-wctype-functions |
| 4643 | echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4644 | echo "configure:4645: checking for --with-wctype-functions" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4645 | # Check whether --with-wctype-functions or --without-wctype-functions was given. |
| 4646 | if test "${with_wctype_functions+set}" = set; then |
| 4647 | withval="$with_wctype_functions" |
| 4648 | |
| 4649 | if test "$withval" != no |
| 4650 | then cat >> confdefs.h <<\EOF |
| 4651 | #define WANT_WCTYPE_FUNCTIONS 1 |
| 4652 | EOF |
| 4653 | echo "$ac_t""yes" 1>&6 |
| 4654 | else echo "$ac_t""no" 1>&6 |
| 4655 | fi |
| 4656 | else |
| 4657 | echo "$ac_t""no" 1>&6 |
| 4658 | fi |
| 4659 | |
| 4660 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4661 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4662 | |
Guido van Rossum | 98935bf | 2001-09-05 19:13:16 +0000 | [diff] [blame] | 4663 | DLINCLDIR=. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4664 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4665 | echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4666 | echo "configure:4667: checking for --with-sgi-dl" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4667 | # Check whether --with-sgi-dl or --without-sgi-dl was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4668 | if test "${with_sgi_dl+set}" = set; then |
| 4669 | withval="$with_sgi_dl" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4670 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4671 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4672 | cat >> confdefs.h <<\EOF |
| 4673 | #define WITH_SGI_DL 1 |
| 4674 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4675 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4676 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4677 | dldir=$withval |
Guido van Rossum | 4095101 | 2000-10-07 16:21:27 +0000 | [diff] [blame] | 4678 | if test ! -z "$dldir" -a -d "$dldir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 4679 | then LDFLAGS="$LDFLAGS -L$dldir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4680 | 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] | 4681 | fi |
| 4682 | DLINCLDIR=${dldir} |
| 4683 | LIBS="$LIBS -ldl -lmld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4684 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4685 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4686 | fi |
| 4687 | |
| 4688 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4689 | echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4690 | echo "configure:4691: checking for --with-dl-dld" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4691 | # Check whether --with-dl-dld or --without-dl-dld was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4692 | if test "${with_dl_dld+set}" = set; then |
| 4693 | withval="$with_dl_dld" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4694 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4695 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4696 | cat >> confdefs.h <<\EOF |
| 4697 | #define WITH_DL_DLD 1 |
| 4698 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4699 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4700 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4701 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 4702 | dlddir=`echo "$withval" | sed 's/.*,//'` |
Barry Warsaw | 7d1219d | 2000-10-05 18:45:53 +0000 | [diff] [blame] | 4703 | 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] | 4704 | then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4705 | 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] | 4706 | fi |
| 4707 | DLINCLDIR=${dldir} |
| 4708 | LIBS="$LIBS -ldl -ldld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4709 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4710 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4711 | fi |
| 4712 | |
| 4713 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4714 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 4715 | # 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] | 4716 | for ac_func in dlopen |
| 4717 | do |
| 4718 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4719 | echo "configure:4720: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4720 | 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] | 4721 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4722 | else |
| 4723 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4724 | #line 4725 "configure" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4725 | #include "confdefs.h" |
| 4726 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4727 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4728 | #include <assert.h> |
| 4729 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4730 | /* We use char because int might match the return type of a gcc2 |
| 4731 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4732 | char $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4733 | |
| 4734 | int main() { |
| 4735 | |
| 4736 | /* The GNU C library defines this for functions which it implements |
| 4737 | to always fail with ENOSYS. Some functions are actually named |
| 4738 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4739 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4740 | choke me |
| 4741 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4742 | $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4743 | #endif |
| 4744 | |
| 4745 | ; return 0; } |
| 4746 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4747 | if { (eval echo configure:4748: \"$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] | 4748 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4749 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4750 | else |
| 4751 | echo "configure: failed program was:" >&5 |
| 4752 | cat conftest.$ac_ext >&5 |
| 4753 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4754 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4755 | fi |
| 4756 | rm -f conftest* |
| 4757 | fi |
| 4758 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4759 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4760 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4761 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4762 | cat >> confdefs.h <<EOF |
| 4763 | #define $ac_tr_func 1 |
| 4764 | EOF |
| 4765 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4766 | else |
| 4767 | echo "$ac_t""no" 1>&6 |
| 4768 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4769 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4770 | |
| 4771 | |
| 4772 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 4773 | # loading of modules. |
| 4774 | |
| 4775 | echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4776 | echo "configure:4777: checking DYNLOADFILE" >&5 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4777 | if test -z "$DYNLOADFILE" |
| 4778 | then |
| 4779 | case $ac_sys_system/$ac_sys_release in |
| 4780 | AIX*) DYNLOADFILE="dynload_aix.o";; |
| 4781 | BeOS*) DYNLOADFILE="dynload_beos.o";; |
| 4782 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4783 | Darwin/*) DYNLOADFILE="dynload_next.o";; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4784 | *) |
| 4785 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 4786 | # out any dynamic loading |
| 4787 | if test "$ac_cv_func_dlopen" = yes |
| 4788 | then DYNLOADFILE="dynload_shlib.o" |
| 4789 | else DYNLOADFILE="dynload_stub.o" |
| 4790 | fi |
| 4791 | ;; |
| 4792 | esac |
| 4793 | fi |
| 4794 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
| 4795 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 4796 | then |
| 4797 | cat >> confdefs.h <<\EOF |
| 4798 | #define HAVE_DYNAMIC_LOADING 1 |
| 4799 | EOF |
| 4800 | |
| 4801 | fi |
| 4802 | |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4803 | # MACHDEP_OBJS can be set to platform-specific object files needed by Python |
| 4804 | |
| 4805 | |
| 4806 | echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4807 | echo "configure:4808: checking MACHDEP_OBJS" >&5 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4808 | if test -z "$MACHDEP_OBJS" |
| 4809 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4810 | MACHDEP_OBJS=$extra_machdep_objs |
| 4811 | else |
| 4812 | MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4813 | fi |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4814 | echo "$ac_t""MACHDEP_OBJS" 1>&6 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4815 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4816 | # checks for library functions |
Martin v. Löwis | 244edc8 | 2001-10-04 22:44:26 +0000 | [diff] [blame] | 4817 | for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4818 | flock fork fsync fdatasync fpathconf ftime ftruncate \ |
Martin v. Löwis | f95dd0a | 2001-08-15 17:14:33 +0000 | [diff] [blame] | 4819 | gai_strerror getgroups getlogin getpeername getpid getpwent getwd \ |
Martin v. Löwis | 864e9ff | 2001-08-04 22:32:03 +0000 | [diff] [blame] | 4820 | hstrerror inet_pton kill link lstat mkfifo mktime mremap \ |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 4821 | nice pathconf pause plock poll pthread_init \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4822 | putenv readlink \ |
Martin v. Löwis | 61c5edf | 2001-10-18 04:06:00 +0000 | [diff] [blame] | 4823 | select setegid seteuid setgid setgroups \ |
Martin v. Löwis | 791bfda | 2001-07-24 06:33:08 +0000 | [diff] [blame] | 4824 | setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4825 | sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ |
Fred Drake | 89143df | 1999-12-09 22:03:25 +0000 | [diff] [blame] | 4826 | tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Guido van Rossum | c524d95 | 2001-10-19 01:31:59 +0000 | [diff] [blame] | 4827 | truncate uname unsetenv waitpid _getpty getpriority |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4828 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4829 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4830 | echo "configure:4831: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4831 | 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] | 4832 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4833 | else |
| 4834 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4835 | #line 4836 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4836 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4837 | /* System header to define __stub macros and hopefully few prototypes, |
| 4838 | which can conflict with char $ac_func(); below. */ |
| 4839 | #include <assert.h> |
| 4840 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4841 | /* We use char because int might match the return type of a gcc2 |
| 4842 | builtin and then its argument prototype would still apply. */ |
| 4843 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4844 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4845 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4846 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4847 | /* The GNU C library defines this for functions which it implements |
| 4848 | to always fail with ENOSYS. Some functions are actually named |
| 4849 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4850 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4851 | choke me |
| 4852 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4853 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4854 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4855 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4856 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4857 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4858 | if { (eval echo configure:4859: \"$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] | 4859 | rm -rf conftest* |
| 4860 | eval "ac_cv_func_$ac_func=yes" |
| 4861 | else |
| 4862 | echo "configure: failed program was:" >&5 |
| 4863 | cat conftest.$ac_ext >&5 |
| 4864 | rm -rf conftest* |
| 4865 | eval "ac_cv_func_$ac_func=no" |
| 4866 | fi |
| 4867 | rm -f conftest* |
| 4868 | fi |
| 4869 | |
| 4870 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4871 | echo "$ac_t""yes" 1>&6 |
| 4872 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4873 | cat >> confdefs.h <<EOF |
| 4874 | #define $ac_tr_func 1 |
| 4875 | EOF |
| 4876 | |
| 4877 | else |
| 4878 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4879 | fi |
| 4880 | done |
| 4881 | |
| 4882 | |
| 4883 | # check for openpty and forkpty |
| 4884 | |
| 4885 | for ac_func in openpty |
| 4886 | do |
| 4887 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4888 | echo "configure:4889: checking for $ac_func" >&5 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4889 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4890 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4891 | else |
| 4892 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4893 | #line 4894 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4894 | #include "confdefs.h" |
| 4895 | /* System header to define __stub macros and hopefully few prototypes, |
| 4896 | which can conflict with char $ac_func(); below. */ |
| 4897 | #include <assert.h> |
| 4898 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4899 | /* We use char because int might match the return type of a gcc2 |
| 4900 | builtin and then its argument prototype would still apply. */ |
| 4901 | char $ac_func(); |
| 4902 | |
| 4903 | int main() { |
| 4904 | |
| 4905 | /* The GNU C library defines this for functions which it implements |
| 4906 | to always fail with ENOSYS. Some functions are actually named |
| 4907 | something starting with __ and the normal name is an alias. */ |
| 4908 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4909 | choke me |
| 4910 | #else |
| 4911 | $ac_func(); |
| 4912 | #endif |
| 4913 | |
| 4914 | ; return 0; } |
| 4915 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4916 | if { (eval echo configure:4917: \"$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] | 4917 | rm -rf conftest* |
| 4918 | eval "ac_cv_func_$ac_func=yes" |
| 4919 | else |
| 4920 | echo "configure: failed program was:" >&5 |
| 4921 | cat conftest.$ac_ext >&5 |
| 4922 | rm -rf conftest* |
| 4923 | eval "ac_cv_func_$ac_func=no" |
| 4924 | fi |
| 4925 | rm -f conftest* |
| 4926 | fi |
| 4927 | |
| 4928 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4929 | echo "$ac_t""yes" 1>&6 |
| 4930 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4931 | cat >> confdefs.h <<EOF |
| 4932 | #define $ac_tr_func 1 |
| 4933 | EOF |
| 4934 | |
| 4935 | else |
| 4936 | echo "$ac_t""no" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4937 | echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4938 | echo "configure:4939: checking for openpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4939 | ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4940 | 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] | 4941 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4942 | else |
| 4943 | ac_save_LIBS="$LIBS" |
| 4944 | LIBS="-lutil $LIBS" |
| 4945 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4946 | #line 4947 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4947 | #include "confdefs.h" |
| 4948 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4949 | /* We use char because int might match the return type of a gcc2 |
| 4950 | builtin and then its argument prototype would still apply. */ |
| 4951 | char openpty(); |
| 4952 | |
| 4953 | int main() { |
| 4954 | openpty() |
| 4955 | ; return 0; } |
| 4956 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4957 | if { (eval echo configure:4958: \"$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] | 4958 | rm -rf conftest* |
| 4959 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4960 | else |
| 4961 | echo "configure: failed program was:" >&5 |
| 4962 | cat conftest.$ac_ext >&5 |
| 4963 | rm -rf conftest* |
| 4964 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4965 | fi |
| 4966 | rm -f conftest* |
| 4967 | LIBS="$ac_save_LIBS" |
| 4968 | |
| 4969 | fi |
| 4970 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4971 | echo "$ac_t""yes" 1>&6 |
| 4972 | cat >> confdefs.h <<\EOF |
| 4973 | #define HAVE_OPENPTY 1 |
| 4974 | EOF |
| 4975 | LIBS="$LIBS -lutil" |
| 4976 | else |
| 4977 | echo "$ac_t""no" 1>&6 |
| 4978 | fi |
| 4979 | |
| 4980 | fi |
| 4981 | done |
| 4982 | |
| 4983 | for ac_func in forkpty |
| 4984 | do |
| 4985 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4986 | echo "configure:4987: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4987 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4988 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4989 | else |
| 4990 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4991 | #line 4992 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4992 | #include "confdefs.h" |
| 4993 | /* System header to define __stub macros and hopefully few prototypes, |
| 4994 | which can conflict with char $ac_func(); below. */ |
| 4995 | #include <assert.h> |
| 4996 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4997 | /* We use char because int might match the return type of a gcc2 |
| 4998 | builtin and then its argument prototype would still apply. */ |
| 4999 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5000 | |
| 5001 | int main() { |
| 5002 | |
| 5003 | /* The GNU C library defines this for functions which it implements |
| 5004 | to always fail with ENOSYS. Some functions are actually named |
| 5005 | something starting with __ and the normal name is an alias. */ |
| 5006 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5007 | choke me |
| 5008 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5009 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5010 | #endif |
| 5011 | |
| 5012 | ; return 0; } |
| 5013 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5014 | if { (eval echo configure:5015: \"$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] | 5015 | rm -rf conftest* |
| 5016 | eval "ac_cv_func_$ac_func=yes" |
| 5017 | else |
| 5018 | echo "configure: failed program was:" >&5 |
| 5019 | cat conftest.$ac_ext >&5 |
| 5020 | rm -rf conftest* |
| 5021 | eval "ac_cv_func_$ac_func=no" |
| 5022 | fi |
| 5023 | rm -f conftest* |
| 5024 | fi |
| 5025 | |
| 5026 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5027 | echo "$ac_t""yes" 1>&6 |
| 5028 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5029 | cat >> confdefs.h <<EOF |
| 5030 | #define $ac_tr_func 1 |
| 5031 | EOF |
| 5032 | |
| 5033 | else |
| 5034 | echo "$ac_t""no" 1>&6 |
| 5035 | echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5036 | echo "configure:5037: checking for forkpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5037 | ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5038 | 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] | 5039 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5040 | else |
| 5041 | ac_save_LIBS="$LIBS" |
| 5042 | LIBS="-lutil $LIBS" |
| 5043 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5044 | #line 5045 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5045 | #include "confdefs.h" |
| 5046 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5047 | /* We use char because int might match the return type of a gcc2 |
| 5048 | builtin and then its argument prototype would still apply. */ |
| 5049 | char forkpty(); |
| 5050 | |
| 5051 | int main() { |
| 5052 | forkpty() |
| 5053 | ; return 0; } |
| 5054 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5055 | if { (eval echo configure:5056: \"$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] | 5056 | rm -rf conftest* |
| 5057 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 5058 | else |
| 5059 | echo "configure: failed program was:" >&5 |
| 5060 | cat conftest.$ac_ext >&5 |
| 5061 | rm -rf conftest* |
| 5062 | eval "ac_cv_lib_$ac_lib_var=no" |
| 5063 | fi |
| 5064 | rm -f conftest* |
| 5065 | LIBS="$ac_save_LIBS" |
| 5066 | |
| 5067 | fi |
| 5068 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5069 | echo "$ac_t""yes" 1>&6 |
| 5070 | cat >> confdefs.h <<\EOF |
| 5071 | #define HAVE_FORKPTY 1 |
| 5072 | EOF |
| 5073 | LIBS="$LIBS -lutil" |
| 5074 | else |
| 5075 | echo "$ac_t""no" 1>&6 |
| 5076 | fi |
| 5077 | |
| 5078 | fi |
| 5079 | done |
| 5080 | |
| 5081 | |
| 5082 | # check for long file support functions |
| 5083 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
| 5084 | do |
| 5085 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5086 | echo "configure:5087: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5087 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5088 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5089 | else |
| 5090 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5091 | #line 5092 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5092 | #include "confdefs.h" |
| 5093 | /* System header to define __stub macros and hopefully few prototypes, |
| 5094 | which can conflict with char $ac_func(); below. */ |
| 5095 | #include <assert.h> |
| 5096 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5097 | /* We use char because int might match the return type of a gcc2 |
| 5098 | builtin and then its argument prototype would still apply. */ |
| 5099 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5100 | |
| 5101 | int main() { |
| 5102 | |
| 5103 | /* The GNU C library defines this for functions which it implements |
| 5104 | to always fail with ENOSYS. Some functions are actually named |
| 5105 | something starting with __ and the normal name is an alias. */ |
| 5106 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5107 | choke me |
| 5108 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5109 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5110 | #endif |
| 5111 | |
| 5112 | ; return 0; } |
| 5113 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5114 | if { (eval echo configure:5115: \"$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] | 5115 | rm -rf conftest* |
| 5116 | eval "ac_cv_func_$ac_func=yes" |
| 5117 | else |
| 5118 | echo "configure: failed program was:" >&5 |
| 5119 | cat conftest.$ac_ext >&5 |
| 5120 | rm -rf conftest* |
| 5121 | eval "ac_cv_func_$ac_func=no" |
| 5122 | fi |
| 5123 | rm -f conftest* |
| 5124 | fi |
| 5125 | |
| 5126 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5127 | echo "$ac_t""yes" 1>&6 |
| 5128 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5129 | cat >> confdefs.h <<EOF |
| 5130 | #define $ac_tr_func 1 |
| 5131 | EOF |
| 5132 | |
| 5133 | else |
| 5134 | echo "$ac_t""no" 1>&6 |
| 5135 | fi |
| 5136 | done |
| 5137 | |
| 5138 | |
| 5139 | for ac_func in dup2 getcwd strdup strerror memmove |
| 5140 | do |
| 5141 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5142 | echo "configure:5143: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5143 | 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] | 5144 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5145 | else |
| 5146 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5147 | #line 5148 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5148 | #include "confdefs.h" |
| 5149 | /* System header to define __stub macros and hopefully few prototypes, |
| 5150 | which can conflict with char $ac_func(); below. */ |
| 5151 | #include <assert.h> |
| 5152 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5153 | /* We use char because int might match the return type of a gcc2 |
| 5154 | builtin and then its argument prototype would still apply. */ |
| 5155 | char $ac_func(); |
| 5156 | |
| 5157 | int main() { |
| 5158 | |
| 5159 | /* The GNU C library defines this for functions which it implements |
| 5160 | to always fail with ENOSYS. Some functions are actually named |
| 5161 | something starting with __ and the normal name is an alias. */ |
| 5162 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5163 | choke me |
| 5164 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5165 | $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5166 | #endif |
| 5167 | |
| 5168 | ; return 0; } |
| 5169 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5170 | if { (eval echo configure:5171: \"$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] | 5171 | rm -rf conftest* |
| 5172 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5173 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5174 | echo "configure: failed program was:" >&5 |
| 5175 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5176 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5177 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5178 | fi |
| 5179 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5180 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5181 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5182 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5183 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5184 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5185 | cat >> confdefs.h <<EOF |
| 5186 | #define $ac_tr_func 1 |
| 5187 | EOF |
| 5188 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5189 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5190 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 5191 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5192 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5193 | done |
| 5194 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5195 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5196 | for ac_func in getpgrp |
| 5197 | do |
| 5198 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5199 | echo "configure:5200: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5200 | 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] | 5201 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5202 | else |
| 5203 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5204 | #line 5205 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5205 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5206 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5207 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5208 | #include <assert.h> |
| 5209 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5210 | /* We use char because int might match the return type of a gcc2 |
| 5211 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5212 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5213 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5214 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5215 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5216 | /* The GNU C library defines this for functions which it implements |
| 5217 | to always fail with ENOSYS. Some functions are actually named |
| 5218 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5219 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5220 | choke me |
| 5221 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5222 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5223 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5224 | |
| 5225 | ; return 0; } |
| 5226 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5227 | if { (eval echo configure:5228: \"$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] | 5228 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5229 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5230 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5231 | echo "configure: failed program was:" >&5 |
| 5232 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5233 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5234 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5235 | fi |
| 5236 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5237 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5238 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5239 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5240 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5241 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5242 | cat >> confdefs.h <<EOF |
| 5243 | #define $ac_tr_func 1 |
| 5244 | EOF |
| 5245 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5246 | #line 5247 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5247 | #include "confdefs.h" |
| 5248 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5249 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5250 | getpgrp(0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5251 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5252 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5253 | if { (eval echo configure:5254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5254 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5255 | cat >> confdefs.h <<\EOF |
| 5256 | #define GETPGRP_HAVE_ARG 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5257 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5258 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5259 | else |
| 5260 | echo "configure: failed program was:" >&5 |
| 5261 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5262 | fi |
| 5263 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5264 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5265 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5266 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5267 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5268 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5269 | for ac_func in setpgrp |
| 5270 | do |
| 5271 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5272 | echo "configure:5273: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5273 | 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] | 5274 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5275 | else |
| 5276 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5277 | #line 5278 "configure" |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5278 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5279 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5280 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5281 | #include <assert.h> |
| 5282 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5283 | /* We use char because int might match the return type of a gcc2 |
| 5284 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5285 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5286 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5287 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5288 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5289 | /* The GNU C library defines this for functions which it implements |
| 5290 | to always fail with ENOSYS. Some functions are actually named |
| 5291 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5292 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5293 | choke me |
| 5294 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5295 | $ac_func(); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5296 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5297 | |
| 5298 | ; return 0; } |
| 5299 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5300 | if { (eval echo configure:5301: \"$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] | 5301 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5302 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5303 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5304 | echo "configure: failed program was:" >&5 |
| 5305 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5306 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5307 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5308 | fi |
| 5309 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5310 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5311 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5312 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5313 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5314 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5315 | cat >> confdefs.h <<EOF |
| 5316 | #define $ac_tr_func 1 |
| 5317 | EOF |
| 5318 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5319 | #line 5320 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5320 | #include "confdefs.h" |
| 5321 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5322 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5323 | setpgrp(0,0); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5324 | ; return 0; } |
| 5325 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5326 | if { (eval echo configure:5327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5327 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5328 | cat >> confdefs.h <<\EOF |
| 5329 | #define SETPGRP_HAVE_ARG 1 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5330 | EOF |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5331 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5332 | else |
| 5333 | echo "configure: failed program was:" >&5 |
| 5334 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5335 | fi |
| 5336 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5337 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5338 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5339 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5340 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5341 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5342 | for ac_func in gettimeofday |
| 5343 | do |
| 5344 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5345 | echo "configure:5346: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5346 | 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] | 5347 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5348 | else |
| 5349 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5350 | #line 5351 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5351 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5352 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5353 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5354 | #include <assert.h> |
| 5355 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5356 | /* We use char because int might match the return type of a gcc2 |
| 5357 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5358 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5359 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5360 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5361 | |
| 5362 | /* The GNU C library defines this for functions which it implements |
| 5363 | to always fail with ENOSYS. Some functions are actually named |
| 5364 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5365 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5366 | choke me |
| 5367 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5368 | $ac_func(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5369 | #endif |
| 5370 | |
| 5371 | ; return 0; } |
| 5372 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5373 | if { (eval echo configure:5374: \"$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] | 5374 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5375 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5376 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5377 | echo "configure: failed program was:" >&5 |
| 5378 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5379 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5380 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5381 | fi |
| 5382 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5383 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5384 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5385 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5386 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5387 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5388 | cat >> confdefs.h <<EOF |
| 5389 | #define $ac_tr_func 1 |
| 5390 | EOF |
| 5391 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5392 | #line 5393 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5393 | #include "confdefs.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5394 | #include <sys/time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5395 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5396 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
| 5397 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5398 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5399 | if { (eval echo configure:5400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5400 | : |
| 5401 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5402 | echo "configure: failed program was:" >&5 |
| 5403 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5404 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5405 | cat >> confdefs.h <<\EOF |
| 5406 | #define GETTIMEOFDAY_NO_TZ 1 |
| 5407 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5408 | |
| 5409 | fi |
| 5410 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5411 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5412 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5413 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5414 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5415 | |
| 5416 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5417 | for ac_func in getaddrinfo |
| 5418 | do |
| 5419 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5420 | echo "configure:5421: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5421 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5422 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5423 | else |
| 5424 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5425 | #line 5426 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5426 | #include "confdefs.h" |
| 5427 | /* System header to define __stub macros and hopefully few prototypes, |
| 5428 | which can conflict with char $ac_func(); below. */ |
| 5429 | #include <assert.h> |
| 5430 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5431 | /* We use char because int might match the return type of a gcc2 |
| 5432 | builtin and then its argument prototype would still apply. */ |
| 5433 | char $ac_func(); |
| 5434 | |
| 5435 | int main() { |
| 5436 | |
| 5437 | /* The GNU C library defines this for functions which it implements |
| 5438 | to always fail with ENOSYS. Some functions are actually named |
| 5439 | something starting with __ and the normal name is an alias. */ |
| 5440 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5441 | choke me |
| 5442 | #else |
| 5443 | $ac_func(); |
| 5444 | #endif |
| 5445 | |
| 5446 | ; return 0; } |
| 5447 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5448 | if { (eval echo configure:5449: \"$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] | 5449 | rm -rf conftest* |
| 5450 | eval "ac_cv_func_$ac_func=yes" |
| 5451 | else |
| 5452 | echo "configure: failed program was:" >&5 |
| 5453 | cat conftest.$ac_ext >&5 |
| 5454 | rm -rf conftest* |
| 5455 | eval "ac_cv_func_$ac_func=no" |
| 5456 | fi |
| 5457 | rm -f conftest* |
| 5458 | fi |
| 5459 | |
| 5460 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5461 | echo "$ac_t""yes" 1>&6 |
| 5462 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5463 | cat >> confdefs.h <<EOF |
| 5464 | #define $ac_tr_func 1 |
| 5465 | EOF |
| 5466 | echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5467 | echo "configure:5468: checking getaddrinfo bug" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5468 | if test "$cross_compiling" = yes; then |
| 5469 | echo "$ac_t""buggy" 1>&6 |
| 5470 | buggygetaddrinfo=yes |
| 5471 | else |
| 5472 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5473 | #line 5474 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5474 | #include "confdefs.h" |
| 5475 | |
| 5476 | #include <sys/types.h> |
| 5477 | #include <netdb.h> |
| 5478 | #include <string.h> |
| 5479 | #include <sys/socket.h> |
| 5480 | #include <netinet/in.h> |
| 5481 | |
| 5482 | main() |
| 5483 | { |
| 5484 | int passive, gaierr, inet4 = 0, inet6 = 0; |
| 5485 | struct addrinfo hints, *ai, *aitop; |
| 5486 | char straddr[INET6_ADDRSTRLEN], strport[16]; |
| 5487 | |
| 5488 | for (passive = 0; passive <= 1; passive++) { |
| 5489 | memset(&hints, 0, sizeof(hints)); |
| 5490 | hints.ai_family = AF_UNSPEC; |
| 5491 | hints.ai_flags = passive ? AI_PASSIVE : 0; |
| 5492 | hints.ai_socktype = SOCK_STREAM; |
| 5493 | if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { |
| 5494 | (void)gai_strerror(gaierr); |
| 5495 | goto bad; |
| 5496 | } |
| 5497 | for (ai = aitop; ai; ai = ai->ai_next) { |
| 5498 | if (ai->ai_addr == NULL || |
| 5499 | ai->ai_addrlen == 0 || |
| 5500 | getnameinfo(ai->ai_addr, ai->ai_addrlen, |
| 5501 | straddr, sizeof(straddr), strport, sizeof(strport), |
| 5502 | NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
| 5503 | goto bad; |
| 5504 | } |
| 5505 | switch (ai->ai_family) { |
| 5506 | case AF_INET: |
| 5507 | if (strcmp(strport, "54321") != 0) { |
| 5508 | goto bad; |
| 5509 | } |
| 5510 | if (passive) { |
| 5511 | if (strcmp(straddr, "0.0.0.0") != 0) { |
| 5512 | goto bad; |
| 5513 | } |
| 5514 | } else { |
| 5515 | if (strcmp(straddr, "127.0.0.1") != 0) { |
| 5516 | goto bad; |
| 5517 | } |
| 5518 | } |
| 5519 | inet4++; |
| 5520 | break; |
| 5521 | case AF_INET6: |
| 5522 | if (strcmp(strport, "54321") != 0) { |
| 5523 | goto bad; |
| 5524 | } |
| 5525 | if (passive) { |
| 5526 | if (strcmp(straddr, "::") != 0) { |
| 5527 | goto bad; |
| 5528 | } |
| 5529 | } else { |
| 5530 | if (strcmp(straddr, "::1") != 0) { |
| 5531 | goto bad; |
| 5532 | } |
| 5533 | } |
| 5534 | inet6++; |
| 5535 | break; |
| 5536 | case AF_UNSPEC: |
| 5537 | goto bad; |
| 5538 | break; |
| 5539 | default: |
| 5540 | /* another family support? */ |
| 5541 | break; |
| 5542 | } |
| 5543 | } |
| 5544 | } |
| 5545 | |
| 5546 | if (!(inet4 == 0 || inet4 == 2)) |
| 5547 | goto bad; |
| 5548 | if (!(inet6 == 0 || inet6 == 2)) |
| 5549 | goto bad; |
| 5550 | |
| 5551 | if (aitop) |
| 5552 | freeaddrinfo(aitop); |
| 5553 | exit(0); |
| 5554 | |
| 5555 | bad: |
| 5556 | if (aitop) |
| 5557 | freeaddrinfo(aitop); |
| 5558 | exit(1); |
| 5559 | } |
| 5560 | |
| 5561 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5562 | if { (eval echo configure:5563: \"$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] | 5563 | then |
| 5564 | echo "$ac_t""good" 1>&6 |
| 5565 | buggygetaddrinfo=no |
| 5566 | else |
| 5567 | echo "configure: failed program was:" >&5 |
| 5568 | cat conftest.$ac_ext >&5 |
| 5569 | rm -fr conftest* |
| 5570 | echo "$ac_t""buggy" 1>&6 |
| 5571 | buggygetaddrinfo=yes |
| 5572 | fi |
| 5573 | rm -fr conftest* |
| 5574 | fi |
| 5575 | |
| 5576 | else |
| 5577 | echo "$ac_t""no" 1>&6 |
| 5578 | buggygetaddrinfo=yes |
| 5579 | fi |
| 5580 | done |
| 5581 | |
| 5582 | |
| 5583 | if test "$buggygetaddrinfo" = "yes"; then |
| 5584 | if test "$ipv6" = "yes"; then |
| 5585 | echo 'Fatal: You must get working getaddrinfo() function.' |
| 5586 | echo ' or you can specify "--disable-ipv6"'. |
| 5587 | exit 1 |
| 5588 | fi |
| 5589 | fi |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5590 | for ac_func in getnameinfo |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5591 | do |
| 5592 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5593 | echo "configure:5594: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5594 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5595 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5596 | else |
| 5597 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5598 | #line 5599 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5599 | #include "confdefs.h" |
| 5600 | /* System header to define __stub macros and hopefully few prototypes, |
| 5601 | which can conflict with char $ac_func(); below. */ |
| 5602 | #include <assert.h> |
| 5603 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5604 | /* We use char because int might match the return type of a gcc2 |
| 5605 | builtin and then its argument prototype would still apply. */ |
| 5606 | char $ac_func(); |
| 5607 | |
| 5608 | int main() { |
| 5609 | |
| 5610 | /* The GNU C library defines this for functions which it implements |
| 5611 | to always fail with ENOSYS. Some functions are actually named |
| 5612 | something starting with __ and the normal name is an alias. */ |
| 5613 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5614 | choke me |
| 5615 | #else |
| 5616 | $ac_func(); |
| 5617 | #endif |
| 5618 | |
| 5619 | ; return 0; } |
| 5620 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5621 | if { (eval echo configure:5622: \"$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] | 5622 | rm -rf conftest* |
| 5623 | eval "ac_cv_func_$ac_func=yes" |
| 5624 | else |
| 5625 | echo "configure: failed program was:" >&5 |
| 5626 | cat conftest.$ac_ext >&5 |
| 5627 | rm -rf conftest* |
| 5628 | eval "ac_cv_func_$ac_func=no" |
| 5629 | fi |
| 5630 | rm -f conftest* |
| 5631 | fi |
| 5632 | |
| 5633 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5634 | echo "$ac_t""yes" 1>&6 |
| 5635 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5636 | cat >> confdefs.h <<EOF |
| 5637 | #define $ac_tr_func 1 |
| 5638 | EOF |
| 5639 | |
| 5640 | else |
| 5641 | echo "$ac_t""no" 1>&6 |
| 5642 | fi |
| 5643 | done |
| 5644 | |
| 5645 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5646 | # checks for structures |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5647 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5648 | echo "configure:5649: 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] | 5649 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5650 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5651 | else |
| 5652 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5653 | #line 5654 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5654 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5655 | #include <sys/types.h> |
| 5656 | #include <sys/time.h> |
| 5657 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5658 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5659 | struct tm *tp; |
| 5660 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5661 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5662 | if { (eval echo configure:5663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5663 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5664 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5665 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5666 | echo "configure: failed program was:" >&5 |
| 5667 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5668 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5669 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5670 | fi |
| 5671 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5672 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5673 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5674 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5675 | if test $ac_cv_header_time = yes; then |
| 5676 | cat >> confdefs.h <<\EOF |
| 5677 | #define TIME_WITH_SYS_TIME 1 |
| 5678 | EOF |
| 5679 | |
| 5680 | fi |
| 5681 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5682 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5683 | echo "configure:5684: 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] | 5684 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5685 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5686 | else |
| 5687 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5688 | #line 5689 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5689 | #include "confdefs.h" |
| 5690 | #include <sys/types.h> |
| 5691 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5692 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5693 | struct tm *tp; tp->tm_sec; |
| 5694 | ; return 0; } |
| 5695 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5696 | if { (eval echo configure:5697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5697 | rm -rf conftest* |
| 5698 | ac_cv_struct_tm=time.h |
| 5699 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5700 | echo "configure: failed program was:" >&5 |
| 5701 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5702 | rm -rf conftest* |
| 5703 | ac_cv_struct_tm=sys/time.h |
| 5704 | fi |
| 5705 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5706 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5707 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5708 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5709 | if test $ac_cv_struct_tm = sys/time.h; then |
| 5710 | cat >> confdefs.h <<\EOF |
| 5711 | #define TM_IN_SYS_TIME 1 |
| 5712 | EOF |
| 5713 | |
| 5714 | fi |
| 5715 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5716 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5717 | echo "configure:5718: checking for tm_zone in struct tm" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5718 | 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] | 5719 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5720 | else |
| 5721 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5722 | #line 5723 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5723 | #include "confdefs.h" |
| 5724 | #include <sys/types.h> |
| 5725 | #include <$ac_cv_struct_tm> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5726 | int main() { |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5727 | struct tm tm; tm.tm_zone; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5728 | ; return 0; } |
| 5729 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5730 | if { (eval echo configure:5731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5731 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5732 | ac_cv_struct_tm_zone=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5733 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5734 | echo "configure: failed program was:" >&5 |
| 5735 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5736 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5737 | ac_cv_struct_tm_zone=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5738 | fi |
| 5739 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5740 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5741 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5742 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 |
| 5743 | if test "$ac_cv_struct_tm_zone" = yes; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5744 | cat >> confdefs.h <<\EOF |
| 5745 | #define HAVE_TM_ZONE 1 |
| 5746 | EOF |
| 5747 | |
| 5748 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5749 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5750 | echo "configure:5751: checking for tzname" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5751 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5752 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5753 | else |
| 5754 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5755 | #line 5756 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5756 | #include "confdefs.h" |
| 5757 | #include <time.h> |
| 5758 | #ifndef tzname /* For SGI. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5759 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5760 | #endif |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5761 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5762 | atoi(*tzname); |
| 5763 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5764 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5765 | if { (eval echo configure:5766: \"$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] | 5766 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5767 | ac_cv_var_tzname=yes |
| 5768 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5769 | echo "configure: failed program was:" >&5 |
| 5770 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5771 | rm -rf conftest* |
| 5772 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5773 | fi |
| 5774 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5775 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5776 | |
| 5777 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5778 | if test $ac_cv_var_tzname = yes; then |
| 5779 | cat >> confdefs.h <<\EOF |
| 5780 | #define HAVE_TZNAME 1 |
| 5781 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5782 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5783 | fi |
| 5784 | fi |
| 5785 | |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5786 | echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 |
| 5787 | echo "configure:5788: checking for st_rdev in struct stat" >&5 |
| 5788 | if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then |
| 5789 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5790 | else |
| 5791 | cat > conftest.$ac_ext <<EOF |
| 5792 | #line 5793 "configure" |
| 5793 | #include "confdefs.h" |
| 5794 | #include <sys/types.h> |
| 5795 | #include <sys/stat.h> |
| 5796 | int main() { |
| 5797 | struct stat s; s.st_rdev; |
| 5798 | ; return 0; } |
| 5799 | EOF |
| 5800 | if { (eval echo configure:5801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 5801 | rm -rf conftest* |
| 5802 | ac_cv_struct_st_rdev=yes |
| 5803 | else |
| 5804 | echo "configure: failed program was:" >&5 |
| 5805 | cat conftest.$ac_ext >&5 |
| 5806 | rm -rf conftest* |
| 5807 | ac_cv_struct_st_rdev=no |
| 5808 | fi |
| 5809 | rm -f conftest* |
| 5810 | fi |
| 5811 | |
| 5812 | echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 |
| 5813 | if test $ac_cv_struct_st_rdev = yes; then |
| 5814 | cat >> confdefs.h <<\EOF |
| 5815 | #define HAVE_ST_RDEV 1 |
| 5816 | EOF |
| 5817 | |
| 5818 | fi |
| 5819 | |
| 5820 | echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 |
| 5821 | echo "configure:5822: checking for st_blksize in struct stat" >&5 |
| 5822 | if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then |
| 5823 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5824 | else |
| 5825 | cat > conftest.$ac_ext <<EOF |
| 5826 | #line 5827 "configure" |
| 5827 | #include "confdefs.h" |
| 5828 | #include <sys/types.h> |
| 5829 | #include <sys/stat.h> |
| 5830 | int main() { |
| 5831 | struct stat s; s.st_blksize; |
| 5832 | ; return 0; } |
| 5833 | EOF |
| 5834 | if { (eval echo configure:5835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 5835 | rm -rf conftest* |
| 5836 | ac_cv_struct_st_blksize=yes |
| 5837 | else |
| 5838 | echo "configure: failed program was:" >&5 |
| 5839 | cat conftest.$ac_ext >&5 |
| 5840 | rm -rf conftest* |
| 5841 | ac_cv_struct_st_blksize=no |
| 5842 | fi |
| 5843 | rm -f conftest* |
| 5844 | fi |
| 5845 | |
| 5846 | echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 |
| 5847 | if test $ac_cv_struct_st_blksize = yes; then |
| 5848 | cat >> confdefs.h <<\EOF |
| 5849 | #define HAVE_ST_BLKSIZE 1 |
| 5850 | EOF |
| 5851 | |
| 5852 | fi |
| 5853 | |
| 5854 | echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 |
| 5855 | echo "configure:5856: checking for st_blocks in struct stat" >&5 |
| 5856 | if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then |
| 5857 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5858 | else |
| 5859 | cat > conftest.$ac_ext <<EOF |
| 5860 | #line 5861 "configure" |
| 5861 | #include "confdefs.h" |
| 5862 | #include <sys/types.h> |
| 5863 | #include <sys/stat.h> |
| 5864 | int main() { |
| 5865 | struct stat s; s.st_blocks; |
| 5866 | ; return 0; } |
| 5867 | EOF |
| 5868 | if { (eval echo configure:5869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
| 5869 | rm -rf conftest* |
| 5870 | ac_cv_struct_st_blocks=yes |
| 5871 | else |
| 5872 | echo "configure: failed program was:" >&5 |
| 5873 | cat conftest.$ac_ext >&5 |
| 5874 | rm -rf conftest* |
| 5875 | ac_cv_struct_st_blocks=no |
| 5876 | fi |
| 5877 | rm -f conftest* |
| 5878 | fi |
| 5879 | |
| 5880 | echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6 |
| 5881 | if test $ac_cv_struct_st_blocks = yes; then |
| 5882 | cat >> confdefs.h <<\EOF |
| 5883 | #define HAVE_ST_BLOCKS 1 |
| 5884 | EOF |
| 5885 | |
| 5886 | else |
| 5887 | LIBOBJS="$LIBOBJS fileblocks.${ac_objext}" |
| 5888 | fi |
| 5889 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5890 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5891 | echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5892 | echo "configure:5893: checking for time.h that defines altzone" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5893 | 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] | 5894 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5895 | else |
| 5896 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5897 | #line 5898 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5898 | #include "confdefs.h" |
| 5899 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5900 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5901 | return altzone; |
| 5902 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5903 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5904 | if { (eval echo configure:5905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5905 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5906 | ac_cv_header_time_altzone=yes |
| 5907 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5908 | echo "configure: failed program was:" >&5 |
| 5909 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5910 | rm -rf conftest* |
| 5911 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5912 | fi |
| 5913 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5914 | fi |
| 5915 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5916 | echo "$ac_t""$ac_cv_header_time_altzone" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5917 | if test $ac_cv_header_time_altzone = yes; then |
| 5918 | cat >> confdefs.h <<\EOF |
| 5919 | #define HAVE_ALTZONE 1 |
| 5920 | EOF |
| 5921 | |
| 5922 | fi |
| 5923 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5924 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5925 | echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5926 | echo "configure:5927: 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] | 5927 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5928 | #line 5929 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5929 | #include "confdefs.h" |
| 5930 | |
| 5931 | #include <sys/types.h> |
| 5932 | #include <sys/select.h> |
| 5933 | #include <sys/time.h> |
| 5934 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5935 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5936 | ; |
| 5937 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5938 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5939 | if { (eval echo configure:5940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5940 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5941 | cat >> confdefs.h <<\EOF |
| 5942 | #define SYS_SELECT_WITH_SYS_TIME 1 |
| 5943 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5944 | was_it_defined=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5945 | else |
| 5946 | echo "configure: failed program was:" >&5 |
| 5947 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5948 | fi |
| 5949 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5950 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5951 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5952 | echo $ac_n "checking for addrinfo""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5953 | echo "configure:5954: checking for addrinfo" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5954 | if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then |
| 5955 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5956 | else |
| 5957 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5958 | #line 5959 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5959 | #include "confdefs.h" |
| 5960 | |
| 5961 | # include <netdb.h> |
| 5962 | int main() { |
| 5963 | struct addrinfo a |
| 5964 | ; return 0; } |
| 5965 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5966 | if { (eval echo configure:5967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5967 | rm -rf conftest* |
| 5968 | ac_cv_struct_addrinfo=yes |
| 5969 | else |
| 5970 | echo "configure: failed program was:" >&5 |
| 5971 | cat conftest.$ac_ext >&5 |
| 5972 | rm -rf conftest* |
| 5973 | ac_cv_struct_addrinfo=no |
| 5974 | fi |
| 5975 | rm -f conftest* |
| 5976 | fi |
| 5977 | |
| 5978 | echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6 |
| 5979 | if test $ac_cv_struct_addrinfo = yes; then |
| 5980 | cat >> confdefs.h <<\EOF |
| 5981 | #define HAVE_ADDRINFO 1 |
| 5982 | EOF |
| 5983 | |
| 5984 | fi |
| 5985 | |
| 5986 | echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5987 | echo "configure:5988: checking for sockaddr_storage" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5988 | if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then |
| 5989 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5990 | else |
| 5991 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5992 | #line 5993 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5993 | #include "confdefs.h" |
| 5994 | |
| 5995 | # include <sys/types.h> |
| 5996 | # include <sys/socket.h> |
| 5997 | int main() { |
| 5998 | struct sockaddr_storage s |
| 5999 | ; return 0; } |
| 6000 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6001 | if { (eval echo configure:6002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6002 | rm -rf conftest* |
| 6003 | ac_cv_struct_sockaddr_storage=yes |
| 6004 | else |
| 6005 | echo "configure: failed program was:" >&5 |
| 6006 | cat conftest.$ac_ext >&5 |
| 6007 | rm -rf conftest* |
| 6008 | ac_cv_struct_sockaddr_storage=no |
| 6009 | fi |
| 6010 | rm -f conftest* |
| 6011 | fi |
| 6012 | |
| 6013 | echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6 |
| 6014 | if test $ac_cv_struct_sockaddr_storage = yes; then |
| 6015 | cat >> confdefs.h <<\EOF |
| 6016 | #define HAVE_SOCKADDR_STORAGE 1 |
| 6017 | EOF |
| 6018 | |
| 6019 | fi |
| 6020 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6021 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6022 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6023 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6024 | echo "configure:6025: checking whether char is unsigned" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6025 | 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] | 6026 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6027 | else |
| 6028 | if test "$GCC" = yes; then |
| 6029 | # GCC predefines this symbol on systems where it applies. |
| 6030 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6031 | #line 6032 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6032 | #include "confdefs.h" |
| 6033 | #ifdef __CHAR_UNSIGNED__ |
| 6034 | yes |
| 6035 | #endif |
| 6036 | |
| 6037 | EOF |
| 6038 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 6039 | egrep "yes" >/dev/null 2>&1; then |
| 6040 | rm -rf conftest* |
| 6041 | ac_cv_c_char_unsigned=yes |
| 6042 | else |
| 6043 | rm -rf conftest* |
| 6044 | ac_cv_c_char_unsigned=no |
| 6045 | fi |
| 6046 | rm -f conftest* |
| 6047 | |
| 6048 | else |
| 6049 | if test "$cross_compiling" = yes; then |
| 6050 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6051 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6052 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6053 | #line 6054 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6054 | #include "confdefs.h" |
| 6055 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6056 | #if !defined(__STDC__) || __STDC__ != 1 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6057 | #define volatile |
| 6058 | #endif |
| 6059 | main() { |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6060 | volatile char c = 255; exit(c < 0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6061 | } |
| 6062 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6063 | if { (eval echo configure:6064: \"$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] | 6064 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6065 | ac_cv_c_char_unsigned=yes |
| 6066 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6067 | echo "configure: failed program was:" >&5 |
| 6068 | cat conftest.$ac_ext >&5 |
| 6069 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6070 | ac_cv_c_char_unsigned=no |
| 6071 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6072 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6073 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6074 | |
| 6075 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6076 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6077 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6078 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6079 | if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then |
| 6080 | cat >> confdefs.h <<\EOF |
| 6081 | #define __CHAR_UNSIGNED__ 1 |
| 6082 | EOF |
| 6083 | |
| 6084 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6085 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6086 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6087 | echo "configure:6088: checking for working const" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6088 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6089 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6090 | else |
| 6091 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6092 | #line 6093 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6093 | #include "confdefs.h" |
| 6094 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6095 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6096 | |
| 6097 | /* Ultrix mips cc rejects this. */ |
Martin v. Löwis | 9db2f57 | 2001-07-23 01:30:10 +0000 | [diff] [blame] | 6098 | typedef int charset[2]; const charset x; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6099 | /* SunOS 4.1.1 cc rejects this. */ |
| 6100 | char const *const *ccp; |
| 6101 | char **p; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6102 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 6103 | struct point {int x, y;}; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6104 | static struct point const zero = {0,0}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6105 | /* AIX XL C 1.02.0.0 rejects this. |
| 6106 | It does not let you subtract one const X* pointer from another in an arm |
| 6107 | of an if-expression whose if-part is not a constant expression */ |
| 6108 | const char *g = "string"; |
| 6109 | ccp = &g + (g ? g-g : 0); |
| 6110 | /* HPUX 7.0 cc rejects these. */ |
| 6111 | ++ccp; |
| 6112 | p = (char**) ccp; |
| 6113 | ccp = (char const *const *) p; |
| 6114 | { /* SCO 3.2v4 cc rejects this. */ |
| 6115 | char *t; |
| 6116 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
| 6117 | |
| 6118 | *t++ = 0; |
| 6119 | } |
| 6120 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6121 | int x[] = {25, 17}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6122 | const int *foo = &x[0]; |
| 6123 | ++foo; |
| 6124 | } |
| 6125 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 6126 | typedef const int *iptr; |
| 6127 | iptr p = 0; |
| 6128 | ++p; |
| 6129 | } |
| 6130 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 6131 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 6132 | struct s { int j; const int *ap[3]; }; |
| 6133 | struct s *b; b->j = 5; |
| 6134 | } |
| 6135 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 6136 | const int foo = 10; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6137 | } |
| 6138 | |
| 6139 | ; return 0; } |
| 6140 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6141 | if { (eval echo configure:6142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6142 | rm -rf conftest* |
| 6143 | ac_cv_c_const=yes |
| 6144 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6145 | echo "configure: failed program was:" >&5 |
| 6146 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6147 | rm -rf conftest* |
| 6148 | ac_cv_c_const=no |
| 6149 | fi |
| 6150 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6151 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6152 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6153 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6154 | if test $ac_cv_c_const = no; then |
| 6155 | cat >> confdefs.h <<\EOF |
| 6156 | #define const |
| 6157 | EOF |
| 6158 | |
| 6159 | fi |
| 6160 | |
| 6161 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6162 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6163 | echo $ac_n "checking for working volatile""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6164 | echo "configure:6165: checking for working volatile" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6165 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6166 | #line 6167 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6167 | #include "confdefs.h" |
| 6168 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6169 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6170 | volatile int x; x = 0; |
| 6171 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6172 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6173 | if { (eval echo configure:6174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6174 | rm -rf conftest* |
| 6175 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6176 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6177 | echo "configure: failed program was:" >&5 |
| 6178 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6179 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6180 | cat >> confdefs.h <<\EOF |
| 6181 | #define volatile |
| 6182 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6183 | |
| 6184 | fi |
| 6185 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6186 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6187 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6188 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6189 | echo $ac_n "checking for working signed char""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6190 | echo "configure:6191: checking for working signed char" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6191 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6192 | #line 6193 "configure" |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6193 | #include "confdefs.h" |
| 6194 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6195 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6196 | signed char c; |
| 6197 | ; return 0; } |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6198 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6199 | if { (eval echo configure:6200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6200 | rm -rf conftest* |
| 6201 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6202 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6203 | echo "configure: failed program was:" >&5 |
| 6204 | cat conftest.$ac_ext >&5 |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6205 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6206 | cat >> confdefs.h <<\EOF |
| 6207 | #define signed |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6208 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6209 | |
| 6210 | fi |
| 6211 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6212 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6213 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6214 | have_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6215 | echo $ac_n "checking for prototypes""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6216 | echo "configure:6217: checking for prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6217 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6218 | #line 6219 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6219 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6220 | int foo(int x) { return 0; } |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6221 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6222 | return foo(10); |
| 6223 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6224 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6225 | if { (eval echo configure:6226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6226 | rm -rf conftest* |
| 6227 | cat >> confdefs.h <<\EOF |
| 6228 | #define HAVE_PROTOTYPES 1 |
| 6229 | EOF |
| 6230 | have_prototypes=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6231 | else |
| 6232 | echo "configure: failed program was:" >&5 |
| 6233 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6234 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6235 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6236 | echo "$ac_t""$have_prototypes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6237 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6238 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6239 | echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6240 | echo "configure:6241: checking for variable length prototypes and stdarg.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6241 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6242 | #line 6243 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6243 | #include "confdefs.h" |
| 6244 | |
| 6245 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6246 | int foo(int x, ...) { |
| 6247 | va_list va; |
| 6248 | va_start(va, x); |
| 6249 | va_arg(va, int); |
| 6250 | va_arg(va, char *); |
| 6251 | va_arg(va, double); |
| 6252 | return 0; |
| 6253 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6254 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6255 | int main() { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6256 | return foo(10, "", 3.14); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6257 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6258 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6259 | if { (eval echo configure:6260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6260 | rm -rf conftest* |
| 6261 | cat >> confdefs.h <<\EOF |
| 6262 | #define HAVE_STDARG_PROTOTYPES 1 |
| 6263 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6264 | works=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6265 | else |
| 6266 | echo "configure: failed program was:" >&5 |
| 6267 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6268 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6269 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6270 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6271 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6272 | if test "$have_prototypes" = yes; then |
| 6273 | bad_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6274 | echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6275 | echo "configure:6276: checking for bad exec* prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6276 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6277 | #line 6278 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6278 | #include "confdefs.h" |
| 6279 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6280 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6281 | char **t;execve("@",t,t); |
| 6282 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6283 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6284 | if { (eval echo configure:6285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6285 | : |
| 6286 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6287 | echo "configure: failed program was:" >&5 |
| 6288 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6289 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6290 | cat >> confdefs.h <<\EOF |
| 6291 | #define BAD_EXEC_PROTOTYPES 1 |
| 6292 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6293 | bad_prototypes=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6294 | fi |
| 6295 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6296 | echo "$ac_t""$bad_prototypes" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6297 | fi |
| 6298 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6299 | # check if sockaddr has sa_len member |
| 6300 | echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6301 | echo "configure:6302: checking if sockaddr has sa_len member" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6302 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6303 | #line 6304 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6304 | #include "confdefs.h" |
| 6305 | #include <sys/types.h> |
| 6306 | #include <sys/socket.h> |
| 6307 | int main() { |
| 6308 | struct sockaddr x; |
| 6309 | x.sa_len = 0; |
| 6310 | ; return 0; } |
| 6311 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6312 | if { (eval echo configure:6313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6313 | rm -rf conftest* |
| 6314 | echo "$ac_t""yes" 1>&6 |
| 6315 | cat >> confdefs.h <<\EOF |
| 6316 | #define HAVE_SOCKADDR_SA_LEN 1 |
| 6317 | EOF |
| 6318 | |
| 6319 | else |
| 6320 | echo "configure: failed program was:" >&5 |
| 6321 | cat conftest.$ac_ext >&5 |
| 6322 | rm -rf conftest* |
| 6323 | echo "$ac_t""no" 1>&6 |
| 6324 | fi |
| 6325 | rm -f conftest* |
| 6326 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6327 | echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6328 | echo "configure:6329: checking for bad static forward" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6329 | if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then |
| 6330 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6331 | else |
| 6332 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6333 | ac_cv_bad_static_forward=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6334 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6335 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6336 | #line 6337 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6337 | #include "confdefs.h" |
| 6338 | |
| 6339 | struct s { int a; int b; }; |
| 6340 | static struct s foo; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6341 | int foobar() { |
| 6342 | static int random; |
| 6343 | random = (int) &foo; |
| 6344 | return random; |
| 6345 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6346 | static struct s foo = { 1, 2 }; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6347 | main() { |
| 6348 | exit(!((int)&foo == foobar())); |
| 6349 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6350 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6351 | if { (eval echo configure:6352: \"$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] | 6352 | then |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6353 | ac_cv_bad_static_forward=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6354 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6355 | echo "configure: failed program was:" >&5 |
| 6356 | cat conftest.$ac_ext >&5 |
| 6357 | rm -fr conftest* |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6358 | ac_cv_bad_static_forward=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6359 | fi |
| 6360 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6361 | fi |
| 6362 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6363 | fi |
| 6364 | |
| 6365 | echo "$ac_t""$ac_cv_bad_static_forward" 1>&6 |
| 6366 | if test "$ac_cv_bad_static_forward" = yes |
| 6367 | then |
| 6368 | cat >> confdefs.h <<\EOF |
| 6369 | #define BAD_STATIC_FORWARD 1 |
| 6370 | EOF |
| 6371 | |
| 6372 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6373 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6374 | va_list_is_array=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6375 | echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6376 | echo "configure:6377: checking whether va_list is an array" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6377 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6378 | #line 6379 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6379 | #include "confdefs.h" |
| 6380 | |
| 6381 | #ifdef HAVE_STDARG_PROTOTYPES |
| 6382 | #include <stdarg.h> |
| 6383 | #else |
| 6384 | #include <varargs.h> |
| 6385 | #endif |
| 6386 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6387 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6388 | va_list list1, list2; list1 = list2; |
| 6389 | ; return 0; } |
| 6390 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6391 | if { (eval echo configure:6392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6392 | : |
| 6393 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6394 | echo "configure: failed program was:" >&5 |
| 6395 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6396 | rm -rf conftest* |
| 6397 | cat >> confdefs.h <<\EOF |
| 6398 | #define VA_LIST_IS_ARRAY 1 |
| 6399 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6400 | va_list_is_array=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6401 | fi |
| 6402 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6403 | echo "$ac_t""$va_list_is_array" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6404 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6405 | # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( |
| 6406 | echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6407 | echo "configure:6408: checking for gethostbyname_r" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6408 | 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] | 6409 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6410 | else |
| 6411 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6412 | #line 6413 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6413 | #include "confdefs.h" |
| 6414 | /* System header to define __stub macros and hopefully few prototypes, |
| 6415 | which can conflict with char gethostbyname_r(); below. */ |
| 6416 | #include <assert.h> |
| 6417 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6418 | /* We use char because int might match the return type of a gcc2 |
| 6419 | builtin and then its argument prototype would still apply. */ |
| 6420 | char gethostbyname_r(); |
| 6421 | |
| 6422 | int main() { |
| 6423 | |
| 6424 | /* The GNU C library defines this for functions which it implements |
| 6425 | to always fail with ENOSYS. Some functions are actually named |
| 6426 | something starting with __ and the normal name is an alias. */ |
| 6427 | #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) |
| 6428 | choke me |
| 6429 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6430 | gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6431 | #endif |
| 6432 | |
| 6433 | ; return 0; } |
| 6434 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6435 | if { (eval echo configure:6436: \"$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] | 6436 | rm -rf conftest* |
| 6437 | eval "ac_cv_func_gethostbyname_r=yes" |
| 6438 | else |
| 6439 | echo "configure: failed program was:" >&5 |
| 6440 | cat conftest.$ac_ext >&5 |
| 6441 | rm -rf conftest* |
| 6442 | eval "ac_cv_func_gethostbyname_r=no" |
| 6443 | fi |
| 6444 | rm -f conftest* |
| 6445 | fi |
| 6446 | |
| 6447 | if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then |
| 6448 | echo "$ac_t""yes" 1>&6 |
| 6449 | |
| 6450 | cat >> confdefs.h <<\EOF |
| 6451 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6452 | EOF |
| 6453 | |
| 6454 | echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6455 | echo "configure:6456: checking gethostbyname_r with 6 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6456 | OLD_CFLAGS=$CFLAGS |
| 6457 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
| 6458 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6459 | #line 6460 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6460 | #include "confdefs.h" |
| 6461 | |
| 6462 | # include <netdb.h> |
| 6463 | |
| 6464 | int main() { |
| 6465 | |
| 6466 | char *name; |
| 6467 | struct hostent *he, *res; |
| 6468 | char buffer[2048]; |
| 6469 | int buflen = 2048; |
| 6470 | int h_errnop; |
| 6471 | |
| 6472 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
| 6473 | |
| 6474 | ; return 0; } |
| 6475 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6476 | if { (eval echo configure:6477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6477 | rm -rf conftest* |
| 6478 | |
| 6479 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6480 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6481 | EOF |
| 6482 | |
| 6483 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6484 | #define HAVE_GETHOSTBYNAME_R_6_ARG 1 |
| 6485 | EOF |
| 6486 | |
| 6487 | echo "$ac_t""yes" 1>&6 |
| 6488 | |
| 6489 | else |
| 6490 | echo "configure: failed program was:" >&5 |
| 6491 | cat conftest.$ac_ext >&5 |
| 6492 | rm -rf conftest* |
| 6493 | |
| 6494 | echo "$ac_t""no" 1>&6 |
| 6495 | echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6496 | echo "configure:6497: checking gethostbyname_r with 5 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6497 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6498 | #line 6499 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6499 | #include "confdefs.h" |
| 6500 | |
| 6501 | # include <netdb.h> |
| 6502 | |
| 6503 | int main() { |
| 6504 | |
| 6505 | char *name; |
| 6506 | struct hostent *he; |
| 6507 | char buffer[2048]; |
| 6508 | int buflen = 2048; |
| 6509 | int h_errnop; |
| 6510 | |
| 6511 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
| 6512 | |
| 6513 | ; return 0; } |
| 6514 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6515 | if { (eval echo configure:6516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6516 | rm -rf conftest* |
| 6517 | |
| 6518 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6519 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6520 | EOF |
| 6521 | |
| 6522 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6523 | #define HAVE_GETHOSTBYNAME_R_5_ARG 1 |
| 6524 | EOF |
| 6525 | |
| 6526 | echo "$ac_t""yes" 1>&6 |
| 6527 | |
| 6528 | else |
| 6529 | echo "configure: failed program was:" >&5 |
| 6530 | cat conftest.$ac_ext >&5 |
| 6531 | rm -rf conftest* |
| 6532 | |
| 6533 | echo "$ac_t""no" 1>&6 |
| 6534 | echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6535 | echo "configure:6536: checking gethostbyname_r with 3 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6536 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6537 | #line 6538 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6538 | #include "confdefs.h" |
| 6539 | |
| 6540 | # include <netdb.h> |
| 6541 | |
| 6542 | int main() { |
| 6543 | |
| 6544 | char *name; |
| 6545 | struct hostent *he; |
| 6546 | struct hostent_data data; |
| 6547 | |
| 6548 | (void) gethostbyname_r(name, he, &data); |
| 6549 | |
| 6550 | ; return 0; } |
| 6551 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6552 | if { (eval echo configure:6553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6553 | rm -rf conftest* |
| 6554 | |
| 6555 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6556 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6557 | EOF |
| 6558 | |
| 6559 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6560 | #define HAVE_GETHOSTBYNAME_R_3_ARG 1 |
| 6561 | EOF |
| 6562 | |
| 6563 | echo "$ac_t""yes" 1>&6 |
| 6564 | |
| 6565 | else |
| 6566 | echo "configure: failed program was:" >&5 |
| 6567 | cat conftest.$ac_ext >&5 |
| 6568 | rm -rf conftest* |
| 6569 | |
| 6570 | echo "$ac_t""no" 1>&6 |
| 6571 | |
| 6572 | fi |
| 6573 | rm -f conftest* |
| 6574 | |
| 6575 | fi |
| 6576 | rm -f conftest* |
| 6577 | |
| 6578 | fi |
| 6579 | rm -f conftest* |
| 6580 | CFLAGS=$OLD_CFLAGS |
| 6581 | |
| 6582 | else |
| 6583 | echo "$ac_t""no" 1>&6 |
| 6584 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6585 | for ac_func in gethostbyname |
| 6586 | do |
| 6587 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6588 | echo "configure:6589: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6589 | 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] | 6590 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6591 | else |
| 6592 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6593 | #line 6594 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6594 | #include "confdefs.h" |
| 6595 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6596 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6597 | #include <assert.h> |
| 6598 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6599 | /* We use char because int might match the return type of a gcc2 |
| 6600 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6601 | char $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6602 | |
| 6603 | int main() { |
| 6604 | |
| 6605 | /* The GNU C library defines this for functions which it implements |
| 6606 | to always fail with ENOSYS. Some functions are actually named |
| 6607 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6608 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6609 | choke me |
| 6610 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6611 | $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6612 | #endif |
| 6613 | |
| 6614 | ; return 0; } |
| 6615 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6616 | if { (eval echo configure:6617: \"$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] | 6617 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6618 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6619 | else |
| 6620 | echo "configure: failed program was:" >&5 |
| 6621 | cat conftest.$ac_ext >&5 |
| 6622 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6623 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6624 | fi |
| 6625 | rm -f conftest* |
| 6626 | fi |
| 6627 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6628 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6629 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6630 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6631 | cat >> confdefs.h <<EOF |
| 6632 | #define $ac_tr_func 1 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6633 | EOF |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6634 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6635 | else |
| 6636 | echo "$ac_t""no" 1>&6 |
| 6637 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6638 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6639 | |
| 6640 | |
| 6641 | fi |
| 6642 | |
| 6643 | |
| 6644 | |
| 6645 | |
| 6646 | |
| 6647 | |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6648 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6649 | # checks for system services |
| 6650 | # (none yet) |
| 6651 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6652 | # Linux requires this for correct f.p. operations |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6653 | echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6654 | echo "configure:6655: checking for __fpu_control" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6655 | if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6656 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6657 | else |
| 6658 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6659 | #line 6660 "configure" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6660 | #include "confdefs.h" |
| 6661 | /* System header to define __stub macros and hopefully few prototypes, |
| 6662 | which can conflict with char __fpu_control(); below. */ |
| 6663 | #include <assert.h> |
| 6664 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6665 | /* We use char because int might match the return type of a gcc2 |
| 6666 | builtin and then its argument prototype would still apply. */ |
| 6667 | char __fpu_control(); |
| 6668 | |
| 6669 | int main() { |
| 6670 | |
| 6671 | /* The GNU C library defines this for functions which it implements |
| 6672 | to always fail with ENOSYS. Some functions are actually named |
| 6673 | something starting with __ and the normal name is an alias. */ |
| 6674 | #if defined (__stub___fpu_control) || defined (__stub_____fpu_control) |
| 6675 | choke me |
| 6676 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6677 | __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6678 | #endif |
| 6679 | |
| 6680 | ; return 0; } |
| 6681 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6682 | if { (eval echo configure:6683: \"$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] | 6683 | rm -rf conftest* |
| 6684 | eval "ac_cv_func___fpu_control=yes" |
| 6685 | else |
| 6686 | echo "configure: failed program was:" >&5 |
| 6687 | cat conftest.$ac_ext >&5 |
| 6688 | rm -rf conftest* |
| 6689 | eval "ac_cv_func___fpu_control=no" |
| 6690 | fi |
| 6691 | rm -f conftest* |
| 6692 | fi |
| 6693 | |
| 6694 | if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then |
| 6695 | echo "$ac_t""yes" 1>&6 |
| 6696 | : |
| 6697 | else |
| 6698 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6699 | echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6700 | echo "configure:6701: checking for __fpu_control in -lieee" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6701 | ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6702 | 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] | 6703 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6704 | else |
| 6705 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6706 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6707 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6708 | #line 6709 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6709 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6710 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6711 | /* We use char because int might match the return type of a gcc2 |
| 6712 | builtin and then its argument prototype would still apply. */ |
| 6713 | char __fpu_control(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6714 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6715 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6716 | __fpu_control() |
| 6717 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6718 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6719 | if { (eval echo configure:6720: \"$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] | 6720 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6721 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6722 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6723 | echo "configure: failed program was:" >&5 |
| 6724 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6725 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6726 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6727 | fi |
| 6728 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6729 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6730 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6731 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6732 | 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] | 6733 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6734 | ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 6735 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6736 | cat >> confdefs.h <<EOF |
| 6737 | #define $ac_tr_lib 1 |
| 6738 | EOF |
| 6739 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6740 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6741 | |
| 6742 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6743 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6744 | fi |
| 6745 | |
| 6746 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6747 | fi |
| 6748 | |
| 6749 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6750 | # Check for --with-fpectl |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6751 | echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6752 | echo "configure:6753: checking for --with-fpectl" >&5 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6753 | # Check whether --with-fpectl or --without-fpectl was given. |
| 6754 | if test "${with_fpectl+set}" = set; then |
| 6755 | withval="$with_fpectl" |
| 6756 | |
| 6757 | if test "$withval" != no |
| 6758 | then cat >> confdefs.h <<\EOF |
| 6759 | #define WANT_SIGFPE_HANDLER 1 |
| 6760 | EOF |
| 6761 | echo "$ac_t""yes" 1>&6 |
| 6762 | else echo "$ac_t""no" 1>&6 |
| 6763 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6764 | else |
| 6765 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6766 | fi |
| 6767 | |
| 6768 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6769 | # check for --with-libm=... |
| 6770 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6771 | case $ac_sys_system in |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 6772 | Darwin) ;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 6773 | BeOS) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6774 | *) LIBM=-lm |
| 6775 | esac |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6776 | echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6777 | echo "configure:6778: checking for --with-libm=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6778 | # Check whether --with-libm or --without-libm was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6779 | if test "${with_libm+set}" = set; then |
| 6780 | withval="$with_libm" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6781 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6782 | if test "$withval" = no |
| 6783 | then LIBM= |
| 6784 | echo "$ac_t""force LIBM empty" 1>&6 |
| 6785 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6786 | then LIBM=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6787 | echo "$ac_t""set LIBM=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6788 | 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] | 6789 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6790 | else |
| 6791 | echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6792 | fi |
| 6793 | |
| 6794 | |
| 6795 | # check for --with-libc=... |
| 6796 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6797 | echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6798 | echo "configure:6799: checking for --with-libc=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6799 | # Check whether --with-libc or --without-libc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6800 | if test "${with_libc+set}" = set; then |
| 6801 | withval="$with_libc" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6802 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6803 | if test "$withval" = no |
| 6804 | then LIBC= |
| 6805 | echo "$ac_t""force LIBC empty" 1>&6 |
| 6806 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6807 | then LIBC=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6808 | echo "$ac_t""set LIBC=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6809 | 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] | 6810 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6811 | else |
| 6812 | echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6813 | fi |
| 6814 | |
| 6815 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6816 | # check for hypot() in math library |
| 6817 | LIBS_SAVE=$LIBS |
| 6818 | LIBS="$LIBS $LIBM" |
| 6819 | for ac_func in hypot |
| 6820 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6821 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6822 | echo "configure:6823: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6823 | 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] | 6824 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6825 | else |
| 6826 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6827 | #line 6828 "configure" |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6828 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6829 | /* System header to define __stub macros and hopefully few prototypes, |
| 6830 | which can conflict with char $ac_func(); below. */ |
| 6831 | #include <assert.h> |
| 6832 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6833 | /* We use char because int might match the return type of a gcc2 |
| 6834 | builtin and then its argument prototype would still apply. */ |
| 6835 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6836 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6837 | int main() { |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6838 | |
| 6839 | /* The GNU C library defines this for functions which it implements |
| 6840 | to always fail with ENOSYS. Some functions are actually named |
| 6841 | something starting with __ and the normal name is an alias. */ |
| 6842 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 6843 | choke me |
| 6844 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6845 | $ac_func(); |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6846 | #endif |
| 6847 | |
| 6848 | ; return 0; } |
| 6849 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6850 | if { (eval echo configure:6851: \"$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] | 6851 | rm -rf conftest* |
| 6852 | eval "ac_cv_func_$ac_func=yes" |
| 6853 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6854 | echo "configure: failed program was:" >&5 |
| 6855 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6856 | rm -rf conftest* |
| 6857 | eval "ac_cv_func_$ac_func=no" |
| 6858 | fi |
| 6859 | rm -f conftest* |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6860 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6861 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6862 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 6863 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6864 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6865 | cat >> confdefs.h <<EOF |
| 6866 | #define $ac_tr_func 1 |
| 6867 | EOF |
| 6868 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6869 | else |
| 6870 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 6871 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6872 | fi |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6873 | done |
| 6874 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6875 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6876 | LIBS=$LIBS_SAVE |
| 6877 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6878 | # check whether malloc(0) returns NULL or not |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6879 | echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6880 | echo "configure:6881: checking what malloc(0) returns" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6881 | if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6882 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6883 | else |
| 6884 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6885 | ac_cv_malloc_zero=nonnull |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6886 | else |
| 6887 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6888 | #line 6889 "configure" |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6889 | #include "confdefs.h" |
| 6890 | #include <stdio.h> |
| 6891 | #ifdef HAVE_STDLIB |
| 6892 | #include <stdlib.h> |
| 6893 | #else |
| 6894 | char *malloc(), *realloc(); |
| 6895 | int *free(); |
| 6896 | #endif |
| 6897 | main() { |
| 6898 | char *p; |
| 6899 | p = malloc(0); |
| 6900 | if (p == NULL) exit(1); |
| 6901 | p = realloc(p, 0); |
| 6902 | if (p == NULL) exit(1); |
| 6903 | free(p); |
| 6904 | exit(0); |
| 6905 | } |
| 6906 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6907 | if { (eval echo configure:6908: \"$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] | 6908 | then |
| 6909 | ac_cv_malloc_zero=nonnull |
| 6910 | else |
| 6911 | echo "configure: failed program was:" >&5 |
| 6912 | cat conftest.$ac_ext >&5 |
| 6913 | rm -fr conftest* |
| 6914 | ac_cv_malloc_zero=null |
| 6915 | fi |
| 6916 | rm -fr conftest* |
| 6917 | fi |
| 6918 | |
| 6919 | fi |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6920 | # XXX arm cross-compile? |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6921 | echo "$ac_t""$ac_cv_malloc_zero" 1>&6 |
| 6922 | if test "$ac_cv_malloc_zero" = null |
| 6923 | then |
| 6924 | cat >> confdefs.h <<\EOF |
| 6925 | #define MALLOC_ZERO_RETURNS_NULL 1 |
| 6926 | EOF |
| 6927 | |
| 6928 | fi |
| 6929 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6930 | # check for wchar.h |
| 6931 | ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` |
| 6932 | echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6933 | echo "configure:6934: checking for wchar.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6934 | 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] | 6935 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6936 | else |
| 6937 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6938 | #line 6939 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6939 | #include "confdefs.h" |
| 6940 | #include <wchar.h> |
| 6941 | EOF |
| 6942 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6943 | { (eval echo configure:6944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6944 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 6945 | if test -z "$ac_err"; then |
| 6946 | rm -rf conftest* |
| 6947 | eval "ac_cv_header_$ac_safe=yes" |
| 6948 | else |
| 6949 | echo "$ac_err" >&5 |
| 6950 | echo "configure: failed program was:" >&5 |
| 6951 | cat conftest.$ac_ext >&5 |
| 6952 | rm -rf conftest* |
| 6953 | eval "ac_cv_header_$ac_safe=no" |
| 6954 | fi |
| 6955 | rm -f conftest* |
| 6956 | fi |
| 6957 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 6958 | echo "$ac_t""yes" 1>&6 |
| 6959 | cat >> confdefs.h <<\EOF |
| 6960 | #define HAVE_WCHAR_H 1 |
| 6961 | EOF |
| 6962 | wchar_h="yes" |
| 6963 | else |
| 6964 | echo "$ac_t""no" 1>&6 |
| 6965 | wchar_h="no" |
| 6966 | |
| 6967 | fi |
| 6968 | |
| 6969 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6970 | # determine wchar_t size |
| 6971 | if test "$wchar_h" = yes |
| 6972 | then |
| 6973 | echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6974 | echo "configure:6975: checking size of wchar_t" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6975 | if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then |
| 6976 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6977 | else |
| 6978 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6979 | ac_cv_sizeof_wchar_t=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6980 | else |
| 6981 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6982 | #line 6983 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6983 | #include "confdefs.h" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6984 | #include <stdio.h> |
| 6985 | main() |
| 6986 | { |
| 6987 | FILE *f=fopen("conftestval", "w"); |
| 6988 | if (!f) exit(1); |
| 6989 | fprintf(f, "%d\n", sizeof(wchar_t)); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6990 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6991 | } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6992 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 6993 | if { (eval echo configure:6994: \"$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] | 6994 | then |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6995 | ac_cv_sizeof_wchar_t=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6996 | else |
| 6997 | echo "configure: failed program was:" >&5 |
| 6998 | cat conftest.$ac_ext >&5 |
| 6999 | rm -fr conftest* |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7000 | ac_cv_sizeof_wchar_t=0 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7001 | fi |
| 7002 | rm -fr conftest* |
| 7003 | fi |
| 7004 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7005 | fi |
| 7006 | echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 |
| 7007 | cat >> confdefs.h <<EOF |
| 7008 | #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t |
| 7009 | EOF |
| 7010 | |
| 7011 | |
| 7012 | fi |
| 7013 | |
| 7014 | echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7015 | echo "configure:7016: checking what type to use for unicode" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7016 | # Check whether --enable-unicode or --disable-unicode was given. |
| 7017 | if test "${enable_unicode+set}" = set; then |
| 7018 | enableval="$enable_unicode" |
| 7019 | : |
| 7020 | else |
| 7021 | enable_unicode=yes |
| 7022 | fi |
| 7023 | |
| 7024 | |
| 7025 | if test $enable_unicode = yes |
| 7026 | then |
Martin v. Löwis | fd91779 | 2001-06-27 20:22:04 +0000 | [diff] [blame] | 7027 | # Without any arguments, Py_UNICODE defaults to two-byte mode |
| 7028 | enable_unicode="ucs2" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7029 | fi |
| 7030 | |
| 7031 | case "$enable_unicode" in |
| 7032 | ucs2) unicode_size="2" |
| 7033 | cat >> confdefs.h <<\EOF |
| 7034 | #define Py_UNICODE_SIZE 2 |
| 7035 | EOF |
| 7036 | |
| 7037 | ;; |
| 7038 | ucs4) unicode_size="4" |
| 7039 | cat >> confdefs.h <<\EOF |
| 7040 | #define Py_UNICODE_SIZE 4 |
| 7041 | EOF |
| 7042 | |
| 7043 | ;; |
| 7044 | esac |
| 7045 | |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7046 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7047 | if test "$enable_unicode" = "no" |
| 7048 | then |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7049 | UNICODE_OBJS="" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7050 | echo "$ac_t""not used" 1>&6 |
| 7051 | else |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7052 | UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7053 | cat >> confdefs.h <<\EOF |
| 7054 | #define Py_USING_UNICODE 1 |
| 7055 | EOF |
| 7056 | |
| 7057 | if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" |
| 7058 | then |
| 7059 | PY_UNICODE_TYPE="wchar_t" |
| 7060 | cat >> confdefs.h <<\EOF |
| 7061 | #define HAVE_USABLE_WCHAR_T 1 |
| 7062 | EOF |
| 7063 | |
| 7064 | cat >> confdefs.h <<\EOF |
| 7065 | #define PY_UNICODE_TYPE wchar_t |
| 7066 | EOF |
| 7067 | |
| 7068 | elif test "$ac_cv_sizeof_short" = "$unicode_size" |
| 7069 | then |
| 7070 | PY_UNICODE_TYPE="unsigned short" |
| 7071 | cat >> confdefs.h <<\EOF |
| 7072 | #define PY_UNICODE_TYPE unsigned short |
| 7073 | EOF |
| 7074 | |
| 7075 | elif test "$ac_cv_sizeof_long" = "$unicode_size" |
| 7076 | then |
| 7077 | PY_UNICODE_TYPE="unsigned long" |
| 7078 | cat >> confdefs.h <<\EOF |
| 7079 | #define PY_UNICODE_TYPE unsigned long |
| 7080 | EOF |
| 7081 | |
| 7082 | else |
| 7083 | PY_UNICODE_TYPE="no type found" |
| 7084 | fi |
| 7085 | echo "$ac_t""$PY_UNICODE_TYPE" 1>&6 |
| 7086 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7087 | |
| 7088 | # check for endianness |
| 7089 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7090 | echo "configure:7091: checking whether byte ordering is bigendian" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7091 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7092 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7093 | else |
| 7094 | ac_cv_c_bigendian=unknown |
| 7095 | # See if sys/param.h defines the BYTE_ORDER macro. |
| 7096 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7097 | #line 7098 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7098 | #include "confdefs.h" |
| 7099 | #include <sys/types.h> |
| 7100 | #include <sys/param.h> |
| 7101 | int main() { |
| 7102 | |
| 7103 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 7104 | bogus endian macros |
| 7105 | #endif |
| 7106 | ; return 0; } |
| 7107 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7108 | if { (eval echo configure:7109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7109 | rm -rf conftest* |
| 7110 | # It does; now see whether it defined to BIG_ENDIAN or not. |
| 7111 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7112 | #line 7113 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7113 | #include "confdefs.h" |
| 7114 | #include <sys/types.h> |
| 7115 | #include <sys/param.h> |
| 7116 | int main() { |
| 7117 | |
| 7118 | #if BYTE_ORDER != BIG_ENDIAN |
| 7119 | not big endian |
| 7120 | #endif |
| 7121 | ; return 0; } |
| 7122 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7123 | if { (eval echo configure:7124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7124 | rm -rf conftest* |
| 7125 | ac_cv_c_bigendian=yes |
| 7126 | else |
| 7127 | echo "configure: failed program was:" >&5 |
| 7128 | cat conftest.$ac_ext >&5 |
| 7129 | rm -rf conftest* |
| 7130 | ac_cv_c_bigendian=no |
| 7131 | fi |
| 7132 | rm -f conftest* |
| 7133 | else |
| 7134 | echo "configure: failed program was:" >&5 |
| 7135 | cat conftest.$ac_ext >&5 |
| 7136 | fi |
| 7137 | rm -f conftest* |
| 7138 | if test $ac_cv_c_bigendian = unknown; then |
| 7139 | if test "$cross_compiling" = yes; then |
| 7140 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 7141 | else |
| 7142 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7143 | #line 7144 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7144 | #include "confdefs.h" |
| 7145 | main () { |
| 7146 | /* Are we little or big endian? From Harbison&Steele. */ |
| 7147 | union |
| 7148 | { |
| 7149 | long l; |
| 7150 | char c[sizeof (long)]; |
| 7151 | } u; |
| 7152 | u.l = 1; |
| 7153 | exit (u.c[sizeof (long) - 1] == 1); |
| 7154 | } |
| 7155 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7156 | if { (eval echo configure:7157: \"$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] | 7157 | then |
| 7158 | ac_cv_c_bigendian=no |
| 7159 | else |
| 7160 | echo "configure: failed program was:" >&5 |
| 7161 | cat conftest.$ac_ext >&5 |
| 7162 | rm -fr conftest* |
| 7163 | ac_cv_c_bigendian=yes |
| 7164 | fi |
| 7165 | rm -fr conftest* |
| 7166 | fi |
| 7167 | |
| 7168 | fi |
| 7169 | fi |
| 7170 | |
| 7171 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 7172 | if test $ac_cv_c_bigendian = yes; then |
| 7173 | cat >> confdefs.h <<\EOF |
| 7174 | #define WORDS_BIGENDIAN 1 |
| 7175 | EOF |
| 7176 | |
| 7177 | fi |
| 7178 | |
| 7179 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7180 | # Check whether right shifting a negative integer extends the sign bit |
| 7181 | # or fills with zeros (like the Cray J90, according to Tim Peters). |
| 7182 | echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7183 | echo "configure:7184: checking whether right shift extends the sign bit" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7184 | if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7185 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7186 | else |
| 7187 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7188 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7189 | ac_cv_rshift_extends_sign=yes |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7190 | else |
| 7191 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7192 | #line 7193 "configure" |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7193 | #include "confdefs.h" |
| 7194 | |
| 7195 | int main() |
| 7196 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7197 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7198 | } |
| 7199 | |
| 7200 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7201 | if { (eval echo configure:7202: \"$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] | 7202 | then |
| 7203 | ac_cv_rshift_extends_sign=yes |
| 7204 | else |
| 7205 | echo "configure: failed program was:" >&5 |
| 7206 | cat conftest.$ac_ext >&5 |
| 7207 | rm -fr conftest* |
| 7208 | ac_cv_rshift_extends_sign=no |
| 7209 | fi |
| 7210 | rm -fr conftest* |
| 7211 | fi |
| 7212 | |
| 7213 | fi |
| 7214 | |
| 7215 | echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 |
| 7216 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7217 | then |
| 7218 | cat >> confdefs.h <<\EOF |
| 7219 | #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 |
| 7220 | EOF |
| 7221 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7222 | fi |
| 7223 | |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7224 | # check for getc_unlocked and related locking functions |
| 7225 | echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7226 | echo "configure:7227: checking for getc_unlocked() and friends" >&5 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7227 | if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then |
| 7228 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7229 | else |
| 7230 | |
| 7231 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7232 | #line 7233 "configure" |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7233 | #include "confdefs.h" |
| 7234 | #include <stdio.h> |
| 7235 | int main() { |
| 7236 | |
| 7237 | FILE *f = fopen("/dev/null", "r"); |
| 7238 | flockfile(f); |
| 7239 | getc_unlocked(f); |
| 7240 | funlockfile(f); |
| 7241 | |
| 7242 | ; return 0; } |
| 7243 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7244 | if { (eval echo configure:7245: \"$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] | 7245 | rm -rf conftest* |
| 7246 | ac_cv_have_getc_unlocked=yes |
| 7247 | else |
| 7248 | echo "configure: failed program was:" >&5 |
| 7249 | cat conftest.$ac_ext >&5 |
| 7250 | rm -rf conftest* |
| 7251 | ac_cv_have_getc_unlocked=no |
| 7252 | fi |
| 7253 | rm -f conftest* |
| 7254 | fi |
| 7255 | |
| 7256 | echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6 |
| 7257 | if test "$ac_cv_have_getc_unlocked" = yes |
| 7258 | then |
| 7259 | cat >> confdefs.h <<\EOF |
| 7260 | #define HAVE_GETC_UNLOCKED 1 |
| 7261 | EOF |
| 7262 | |
| 7263 | fi |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7264 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7265 | # check for readline 4.0 |
| 7266 | echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7267 | echo "configure:7268: checking for rl_pre_input_hook in -lreadline" >&5 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7268 | ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'` |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7269 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7270 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7271 | else |
| 7272 | ac_save_LIBS="$LIBS" |
| 7273 | LIBS="-lreadline -ltermcap $LIBS" |
| 7274 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7275 | #line 7276 "configure" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7276 | #include "confdefs.h" |
| 7277 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7278 | /* We use char because int might match the return type of a gcc2 |
| 7279 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7280 | char rl_pre_input_hook(); |
| 7281 | |
| 7282 | int main() { |
| 7283 | rl_pre_input_hook() |
| 7284 | ; return 0; } |
| 7285 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7286 | if { (eval echo configure:7287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7287 | rm -rf conftest* |
| 7288 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 7289 | else |
| 7290 | echo "configure: failed program was:" >&5 |
| 7291 | cat conftest.$ac_ext >&5 |
| 7292 | rm -rf conftest* |
| 7293 | eval "ac_cv_lib_$ac_lib_var=no" |
| 7294 | fi |
| 7295 | rm -f conftest* |
| 7296 | LIBS="$ac_save_LIBS" |
| 7297 | |
| 7298 | fi |
| 7299 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7300 | echo "$ac_t""yes" 1>&6 |
| 7301 | cat >> confdefs.h <<\EOF |
| 7302 | #define HAVE_RL_PRE_INPUT_HOOK 1 |
| 7303 | EOF |
| 7304 | |
| 7305 | else |
| 7306 | echo "$ac_t""no" 1>&6 |
| 7307 | fi |
| 7308 | |
| 7309 | |
| 7310 | # check for readline 4.2 |
| 7311 | echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7312 | echo "configure:7313: checking for rl_completion_matches in -lreadline" >&5 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7313 | ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` |
| 7314 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7315 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7316 | else |
| 7317 | ac_save_LIBS="$LIBS" |
| 7318 | LIBS="-lreadline -ltermcap $LIBS" |
| 7319 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7320 | #line 7321 "configure" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7321 | #include "confdefs.h" |
| 7322 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7323 | /* We use char because int might match the return type of a gcc2 |
| 7324 | builtin and then its argument prototype would still apply. */ |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7325 | char rl_completion_matches(); |
| 7326 | |
| 7327 | int main() { |
| 7328 | rl_completion_matches() |
| 7329 | ; return 0; } |
| 7330 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7331 | if { (eval echo configure:7332: \"$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] | 7332 | rm -rf conftest* |
| 7333 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 7334 | else |
| 7335 | echo "configure: failed program was:" >&5 |
| 7336 | cat conftest.$ac_ext >&5 |
| 7337 | rm -rf conftest* |
| 7338 | eval "ac_cv_lib_$ac_lib_var=no" |
| 7339 | fi |
| 7340 | rm -f conftest* |
| 7341 | LIBS="$ac_save_LIBS" |
| 7342 | |
| 7343 | fi |
| 7344 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7345 | echo "$ac_t""yes" 1>&6 |
| 7346 | cat >> confdefs.h <<\EOF |
| 7347 | #define HAVE_RL_COMPLETION_MATCHES 1 |
| 7348 | EOF |
| 7349 | |
| 7350 | else |
| 7351 | echo "$ac_t""no" 1>&6 |
| 7352 | fi |
| 7353 | |
| 7354 | |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7355 | echo $ac_n "checking for broken nice()""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7356 | echo "configure:7357: checking for broken nice()" >&5 |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7357 | if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then |
| 7358 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7359 | else |
| 7360 | |
| 7361 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7362 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7363 | else |
| 7364 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7365 | #line 7366 "configure" |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7366 | #include "confdefs.h" |
| 7367 | |
| 7368 | int main() |
| 7369 | { |
| 7370 | int val1 = nice(1); |
| 7371 | if (val1 != -1 && val1 == nice(2)) |
| 7372 | exit(0); |
| 7373 | exit(1); |
| 7374 | } |
| 7375 | |
| 7376 | EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7377 | if { (eval echo configure:7378: \"$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] | 7378 | then |
| 7379 | ac_cv_broken_nice=yes |
| 7380 | else |
| 7381 | echo "configure: failed program was:" >&5 |
| 7382 | cat conftest.$ac_ext >&5 |
| 7383 | rm -fr conftest* |
| 7384 | ac_cv_broken_nice=no |
| 7385 | fi |
| 7386 | rm -fr conftest* |
| 7387 | fi |
| 7388 | |
| 7389 | fi |
| 7390 | |
| 7391 | echo "$ac_t""$ac_cv_broken_nice" 1>&6 |
| 7392 | if test "$ac_cv_broken_nice" = yes |
| 7393 | then |
| 7394 | cat >> confdefs.h <<\EOF |
| 7395 | #define HAVE_BROKEN_NICE 1 |
| 7396 | EOF |
| 7397 | |
| 7398 | fi |
| 7399 | |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7400 | # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! |
| 7401 | # Add sys/socket.h to confdefs.h |
| 7402 | cat >> confdefs.h <<\EOF |
| 7403 | #ifdef HAVE_SYS_SOCKET_H |
| 7404 | #include <sys/socket.h> |
| 7405 | #endif |
| 7406 | EOF |
| 7407 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7408 | echo "configure:7409: checking for socklen_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7409 | 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] | 7410 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7411 | else |
| 7412 | cat > conftest.$ac_ext <<EOF |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7413 | #line 7414 "configure" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7414 | #include "confdefs.h" |
| 7415 | #include <sys/types.h> |
| 7416 | #if STDC_HEADERS |
| 7417 | #include <stdlib.h> |
| 7418 | #include <stddef.h> |
| 7419 | #endif |
| 7420 | EOF |
| 7421 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 7422 | egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 7423 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7424 | ac_cv_type_socklen_t=yes |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7425 | else |
| 7426 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7427 | ac_cv_type_socklen_t=no |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7428 | fi |
| 7429 | rm -f conftest* |
| 7430 | |
| 7431 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7432 | echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 |
| 7433 | if test $ac_cv_type_socklen_t = no; then |
| 7434 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7435 | #define socklen_t int |
| 7436 | EOF |
| 7437 | |
| 7438 | fi |
| 7439 | |
| 7440 | |
Neil Schemenauer | f25cf6c | 2001-03-04 06:39:33 +0000 | [diff] [blame] | 7441 | # Add Python/ prefix to LIBOBJS |
| 7442 | libobjs=$LIBOBJS |
| 7443 | LIBOBJS= |
| 7444 | for obj in $libobjs; do |
| 7445 | LIBOBJS="$LIBOBJS Python/$obj" |
| 7446 | done |
| 7447 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7448 | #AC_MSG_CHECKING(for Modules/Setup) |
| 7449 | #if test ! -f Modules/Setup ; then |
| 7450 | # if test ! -d Modules ; then |
| 7451 | # mkdir Modules |
| 7452 | # fi |
| 7453 | # cp "$srcdir/Modules/Setup.dist" Modules/Setup |
| 7454 | # AC_MSG_RESULT(creating) |
| 7455 | #else |
| 7456 | # AC_MSG_RESULT(already exists) |
| 7457 | #fi |
| 7458 | |
| 7459 | |
Neil Schemenauer | acbf9ef | 2001-02-27 02:15:14 +0000 | [diff] [blame] | 7460 | SRCDIRS="Parser Grammar Objects Python Modules" |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7461 | echo $ac_n "checking for build directories""... $ac_c" 1>&6 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 7462 | echo "configure:7463: checking for build directories" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7463 | for dir in $SRCDIRS; do |
| 7464 | if test ! -d $dir; then |
| 7465 | mkdir $dir |
Guido van Rossum | 262cf20 | 2000-11-02 19:33:53 +0000 | [diff] [blame] | 7466 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7467 | done |
| 7468 | echo "$ac_t""done" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 7469 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7470 | # generate output files |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7471 | trap '' 1 2 15 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7472 | cat > confcache <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7473 | # This file is a shell script that caches the results of configure |
| 7474 | # tests run on this system so they can be shared between configure |
| 7475 | # scripts and configure runs. It is not useful on other systems. |
| 7476 | # If it contains results you don't want to keep, you may remove or edit it. |
| 7477 | # |
| 7478 | # By default, configure uses ./config.cache as the cache file, |
| 7479 | # creating it if it does not exist already. You can give configure |
| 7480 | # the --cache-file=FILE option to use a different cache file; that is |
| 7481 | # what configure does when it calls configure scripts in |
| 7482 | # subdirectories, so they share the cache. |
| 7483 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| 7484 | # config.status only pays attention to the cache file if you give it the |
| 7485 | # --recheck option to rerun configure. |
| 7486 | # |
| 7487 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7488 | # The following way of writing the cache mishandles newlines in values, |
| 7489 | # but we know of no workaround that is simple, portable, and efficient. |
| 7490 | # So, don't put newlines in cache variables' values. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7491 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 7492 | # 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] | 7493 | (set) 2>&1 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7494 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7495 | *ac_space=\ *) |
| 7496 | # `set' does not quote correctly, so add quotes (double-quote substitution |
| 7497 | # turns \\\\ into \\, and sed turns \\ into \). |
| 7498 | sed -n \ |
| 7499 | -e "s/'/'\\\\''/g" \ |
| 7500 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| 7501 | ;; |
| 7502 | *) |
| 7503 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 7504 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| 7505 | ;; |
| 7506 | esac >> confcache |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7507 | if cmp -s $cache_file confcache; then |
| 7508 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7509 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7510 | if test -w $cache_file; then |
| 7511 | echo "updating cache $cache_file" |
| 7512 | cat confcache > $cache_file |
| 7513 | else |
| 7514 | echo "not updating unwritable cache $cache_file" |
| 7515 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7516 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7517 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7518 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7519 | 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] | 7520 | |
| 7521 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 7522 | # Let make expand exec_prefix. |
| 7523 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7524 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7525 | # Any assignment to VPATH causes Sun make to only execute |
| 7526 | # the first set of double-colon rules, so remove it if not needed. |
| 7527 | # If there is a colon in the path, we need to keep it. |
| 7528 | if test "x$srcdir" = x.; then |
| 7529 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
| 7530 | fi |
| 7531 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7532 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7533 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7534 | DEFS=-DHAVE_CONFIG_H |
| 7535 | |
| 7536 | # Without the "./", some shells look in PATH for config.status. |
| 7537 | : ${CONFIG_STATUS=./config.status} |
| 7538 | |
| 7539 | echo creating $CONFIG_STATUS |
| 7540 | rm -f $CONFIG_STATUS |
| 7541 | cat > $CONFIG_STATUS <<EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7542 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7543 | # Generated automatically by configure. |
| 7544 | # Run this file to recreate the current configuration. |
| 7545 | # This directory was configured as follows, |
| 7546 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 7547 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7548 | # $0 $ac_configure_args |
| 7549 | # |
| 7550 | # Compiler output produced by configure, useful for debugging |
| 7551 | # configure, is in ./config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7552 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7553 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7554 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7555 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7556 | case "\$ac_option" in |
| 7557 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7558 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
| 7559 | 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] | 7560 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7561 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7562 | exit 0 ;; |
| 7563 | -help | --help | --hel | --he | --h) |
| 7564 | echo "\$ac_cs_usage"; exit 0 ;; |
| 7565 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7566 | esac |
| 7567 | done |
| 7568 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7569 | ac_given_srcdir=$srcdir |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7570 | ac_given_INSTALL="$INSTALL" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7571 | |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7572 | 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] | 7573 | EOF |
| 7574 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7575 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7576 | # Protect against being on the right side of a sed subst in config.status. |
| 7577 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 7578 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7579 | $ac_vpsub |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7580 | $extrasub |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7581 | s%@SHELL@%$SHELL%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7582 | s%@CFLAGS@%$CFLAGS%g |
| 7583 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 7584 | s%@CXXFLAGS@%$CXXFLAGS%g |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7585 | s%@FFLAGS@%$FFLAGS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7586 | s%@DEFS@%$DEFS%g |
| 7587 | s%@LDFLAGS@%$LDFLAGS%g |
| 7588 | s%@LIBS@%$LIBS%g |
| 7589 | s%@exec_prefix@%$exec_prefix%g |
| 7590 | s%@prefix@%$prefix%g |
| 7591 | s%@program_transform_name@%$program_transform_name%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7592 | s%@bindir@%$bindir%g |
| 7593 | s%@sbindir@%$sbindir%g |
| 7594 | s%@libexecdir@%$libexecdir%g |
| 7595 | s%@datadir@%$datadir%g |
| 7596 | s%@sysconfdir@%$sysconfdir%g |
| 7597 | s%@sharedstatedir@%$sharedstatedir%g |
| 7598 | s%@localstatedir@%$localstatedir%g |
| 7599 | s%@libdir@%$libdir%g |
| 7600 | s%@includedir@%$includedir%g |
| 7601 | s%@oldincludedir@%$oldincludedir%g |
| 7602 | s%@infodir@%$infodir%g |
| 7603 | s%@mandir@%$mandir%g |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 7604 | s%@VERSION@%$VERSION%g |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 7605 | s%@CONFIG_ARGS@%$CONFIG_ARGS%g |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 7606 | s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g |
| 7607 | s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g |
| 7608 | s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g |
| 7609 | s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 7610 | s%@MACHDEP@%$MACHDEP%g |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 7611 | s%@SGI_ABI@%$SGI_ABI%g |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 7612 | s%@CXX@%$CXX%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7613 | s%@MAINOBJ@%$MAINOBJ%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7614 | s%@CC@%$CC%g |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 7615 | s%@CPP@%$CPP%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7616 | s%@EXEEXT@%$EXEEXT%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7617 | s%@LIBRARY@%$LIBRARY%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7618 | s%@LDLIBRARY@%$LDLIBRARY%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7619 | s%@DLLLIBRARY@%$DLLLIBRARY%g |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 7620 | s%@BLDLIBRARY@%$BLDLIBRARY%g |
| 7621 | s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 7622 | s%@LINKCC@%$LINKCC%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7623 | s%@RANLIB@%$RANLIB%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7624 | s%@AR@%$AR%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7625 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7626 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7627 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 7628 | s%@LN@%$LN%g |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 7629 | s%@OPT@%$OPT%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7630 | s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7631 | s%@SO@%$SO%g |
| 7632 | s%@LDSHARED@%$LDSHARED%g |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 7633 | s%@BLDSHARED@%$BLDSHARED%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7634 | s%@CCSHARED@%$CCSHARED%g |
| 7635 | s%@LINKFORSHARED@%$LINKFORSHARED%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7636 | s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7637 | s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g |
| 7638 | s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 7639 | s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 7640 | s%@LDLAST@%$LDLAST%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7641 | s%@DLINCLDIR@%$DLINCLDIR%g |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 7642 | s%@DYNLOADFILE@%$DYNLOADFILE%g |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 7643 | s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7644 | s%@LIBOBJS@%$LIBOBJS%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7645 | s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g |
| 7646 | s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g |
| 7647 | 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] | 7648 | s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7649 | s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7650 | s%@LIBM@%$LIBM%g |
| 7651 | s%@LIBC@%$LIBC%g |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7652 | s%@UNICODE_OBJS@%$UNICODE_OBJS%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7653 | s%@SRCDIRS@%$SRCDIRS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7654 | |
| 7655 | CEOF |
| 7656 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7657 | |
| 7658 | cat >> $CONFIG_STATUS <<\EOF |
| 7659 | |
| 7660 | # Split the substitutions into bite-sized pieces for seds with |
| 7661 | # small command number limits, like on Digital OSF/1 and HP-UX. |
| 7662 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 7663 | ac_file=1 # Number of current file. |
| 7664 | ac_beg=1 # First line for current file. |
| 7665 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 7666 | ac_more_lines=: |
| 7667 | ac_sed_cmds="" |
| 7668 | while $ac_more_lines; do |
| 7669 | if test $ac_beg -gt 1; then |
| 7670 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7671 | else |
| 7672 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7673 | fi |
| 7674 | if test ! -s conftest.s$ac_file; then |
| 7675 | ac_more_lines=false |
| 7676 | rm -f conftest.s$ac_file |
| 7677 | else |
| 7678 | if test -z "$ac_sed_cmds"; then |
| 7679 | ac_sed_cmds="sed -f conftest.s$ac_file" |
| 7680 | else |
| 7681 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
| 7682 | fi |
| 7683 | ac_file=`expr $ac_file + 1` |
| 7684 | ac_beg=$ac_end |
| 7685 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
| 7686 | fi |
| 7687 | done |
| 7688 | if test -z "$ac_sed_cmds"; then |
| 7689 | ac_sed_cmds=cat |
| 7690 | fi |
| 7691 | EOF |
| 7692 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7693 | cat >> $CONFIG_STATUS <<EOF |
| 7694 | |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7695 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"} |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7696 | EOF |
| 7697 | cat >> $CONFIG_STATUS <<\EOF |
| 7698 | 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] | 7699 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7700 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7701 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7702 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7703 | *) ac_file_in="${ac_file}.in" ;; |
| 7704 | esac |
| 7705 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7706 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7707 | |
| 7708 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7709 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7710 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7711 | # The file is in a subdirectory. |
| 7712 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7713 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7714 | # A "../" for each directory in $ac_dir_suffix. |
| 7715 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
| 7716 | else |
| 7717 | ac_dir_suffix= ac_dots= |
| 7718 | fi |
| 7719 | |
| 7720 | case "$ac_given_srcdir" in |
| 7721 | .) srcdir=. |
| 7722 | if test -z "$ac_dots"; then top_srcdir=. |
| 7723 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
| 7724 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; |
| 7725 | *) # Relative path. |
| 7726 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 7727 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
| 7728 | esac |
| 7729 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7730 | case "$ac_given_INSTALL" in |
| 7731 | [/$]*) INSTALL="$ac_given_INSTALL" ;; |
| 7732 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
| 7733 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7734 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7735 | echo creating "$ac_file" |
| 7736 | rm -f "$ac_file" |
| 7737 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
| 7738 | case "$ac_file" in |
| 7739 | *Makefile*) ac_comsub="1i\\ |
| 7740 | # $configure_input" ;; |
| 7741 | *) ac_comsub= ;; |
| 7742 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7743 | |
| 7744 | 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] | 7745 | sed -e "$ac_comsub |
| 7746 | s%@configure_input@%$configure_input%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7747 | s%@srcdir@%$srcdir%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7748 | s%@top_srcdir@%$top_srcdir%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7749 | s%@INSTALL@%$INSTALL%g |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7750 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7751 | fi; done |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7752 | rm -f conftest.s* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7753 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7754 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
| 7755 | # 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] | 7756 | # |
| 7757 | # ac_d sets the value in "#define NAME VALUE" lines. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7758 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 7759 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7760 | ac_dC='\3' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7761 | ac_dD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7762 | # 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] | 7763 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7764 | ac_uB='\([ ]\)%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7765 | ac_uC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7766 | ac_uD='\4%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7767 | # 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] | 7768 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7769 | ac_eB='$%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7770 | ac_eC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7771 | ac_eD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7772 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7773 | if test "${CONFIG_HEADERS+set}" != set; then |
| 7774 | EOF |
| 7775 | cat >> $CONFIG_STATUS <<EOF |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7776 | CONFIG_HEADERS="pyconfig.h" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7777 | EOF |
| 7778 | cat >> $CONFIG_STATUS <<\EOF |
| 7779 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7780 | 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] | 7781 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7782 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7783 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7784 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7785 | *) ac_file_in="${ac_file}.in" ;; |
| 7786 | esac |
| 7787 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7788 | echo creating $ac_file |
| 7789 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7790 | rm -f conftest.frag conftest.in conftest.out |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7791 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 7792 | cat $ac_file_inputs > conftest.in |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7793 | |
| 7794 | EOF |
| 7795 | |
| 7796 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
| 7797 | # 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] | 7798 | # 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] | 7799 | # Protect against being in an unquoted here document in config.status. |
| 7800 | rm -f conftest.vals |
| 7801 | cat > conftest.hdr <<\EOF |
| 7802 | s/[\\&%]/\\&/g |
| 7803 | s%[\\$`]%\\&%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7804 | 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] | 7805 | s%ac_d%ac_u%gp |
| 7806 | s%ac_u%ac_e%gp |
| 7807 | EOF |
| 7808 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
| 7809 | rm -f conftest.hdr |
| 7810 | |
| 7811 | # This sed command replaces #undef with comments. This is necessary, for |
| 7812 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 7813 | # on some systems where configure will not decide to define it. |
| 7814 | cat >> conftest.vals <<\EOF |
| 7815 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
| 7816 | EOF |
| 7817 | |
| 7818 | # Break up conftest.vals because some shells have a limit on |
| 7819 | # 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] | 7820 | |
| 7821 | rm -f conftest.tail |
| 7822 | while : |
| 7823 | do |
| 7824 | ac_lines=`grep -c . conftest.vals` |
| 7825 | # grep -c gives empty output for an empty file on some AIX systems. |
| 7826 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 7827 | # Write a limited-size here document to conftest.frag. |
| 7828 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
| 7829 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
| 7830 | echo 'CEOF |
| 7831 | sed -f conftest.frag conftest.in > conftest.out |
| 7832 | rm -f conftest.in |
| 7833 | mv conftest.out conftest.in |
| 7834 | ' >> $CONFIG_STATUS |
| 7835 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
| 7836 | rm -f conftest.vals |
| 7837 | mv conftest.tail conftest.vals |
| 7838 | done |
| 7839 | rm -f conftest.vals |
| 7840 | |
| 7841 | cat >> $CONFIG_STATUS <<\EOF |
| 7842 | rm -f conftest.frag conftest.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7843 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7844 | cat conftest.in >> conftest.h |
| 7845 | rm -f conftest.in |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7846 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7847 | echo "$ac_file is unchanged" |
| 7848 | rm -f conftest.h |
| 7849 | else |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7850 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7851 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7852 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7853 | # The file is in a subdirectory. |
| 7854 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 7855 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7856 | rm -f $ac_file |
| 7857 | mv conftest.h $ac_file |
| 7858 | fi |
| 7859 | fi; done |
| 7860 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7861 | EOF |
| 7862 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7863 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7864 | EOF |
| 7865 | cat >> $CONFIG_STATUS <<\EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7866 | |
| 7867 | exit 0 |
| 7868 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7869 | chmod +x $CONFIG_STATUS |
| 7870 | rm -fr confdefs* $ac_clean_files |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7871 | 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] | 7872 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7873 | |
| 7874 | echo "creating Setup" |
| 7875 | if test ! -f Modules/Setup |
| 7876 | then |
| 7877 | cp $srcdir/Modules/Setup.dist Modules/Setup |
| 7878 | fi |
| 7879 | |
| 7880 | echo "creating Setup.local" |
| 7881 | if test ! -f Modules/Setup.local |
| 7882 | then |
| 7883 | echo "# Edit this file for local setup changes" >Modules/Setup.local |
| 7884 | fi |
| 7885 | |
| 7886 | echo "creating Makefile" |
| 7887 | $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ |
| 7888 | -s Modules Modules/Setup.config \ |
Neil Schemenauer | f8b71c5 | 2001-04-21 17:41:16 +0000 | [diff] [blame] | 7889 | Modules/Setup.local Modules/Setup |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 7890 | mv config.c Modules |