Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1 | #! /bin/sh |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2 | |
Martin v. Löwis | 61c5edf | 2001-10-18 04:06:00 +0000 | [diff] [blame^] | 3 | # From configure.in Revision: 1.269 |
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). |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1391 | # 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] | 1392 | # linking. |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1393 | |
| 1394 | echo $ac_n "checking LINKCC""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1395 | echo "configure:1396: checking LINKCC" >&5 |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1396 | if test -z "$LINKCC" |
| 1397 | then |
| 1398 | case $ac_sys_system in |
| 1399 | AIX*) |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 1400 | LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 1401 | dgux*) |
| 1402 | LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1403 | Monterey64*) |
| 1404 | LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";; |
Guido van Rossum | 25f9303 | 1997-08-18 16:00:04 +0000 | [diff] [blame] | 1405 | *) LINKCC="\$(PURIFY) \$(CC)";; |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1406 | esac |
| 1407 | fi |
| 1408 | echo "$ac_t""$LINKCC" 1>&6 |
| 1409 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1410 | echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1411 | echo "configure:1412: checking LDLIBRARY" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1412 | |
| 1413 | # 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] | 1414 | case $MACHDEP in |
| 1415 | dguxR4) |
| 1416 | LDLIBRARY='libpython$(VERSION).so' |
| 1417 | OPT="$OPT -pic" |
| 1418 | ;; |
| 1419 | beos*) |
| 1420 | LDLIBRARY='libpython$(VERSION).so' |
| 1421 | ;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1422 | cygwin*) |
| 1423 | LDLIBRARY='libpython$(VERSION).dll.a' |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1424 | DLLLIBRARY='libpython$(VERSION).dll' |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1425 | ;; |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1426 | esac |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1427 | |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 1428 | # MacOSX framework builds need more magic. LDLIBRARY is the dynamic |
| 1429 | # library that we build, but we do not want to link against it (we |
| 1430 | # will find it with a -framework option). For this reason there is an |
| 1431 | # extra variable BLDLIBRARY against which Python and the extension |
| 1432 | # modules are linked, BLDLIBRARY. This is normally the same as |
| 1433 | # LDLIBRARY, but empty for MacOSX framework builds. |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1434 | if test "$enable_framework" |
| 1435 | then |
| 1436 | LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
| 1437 | LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)' |
| 1438 | BLDLIBRARY='' |
| 1439 | else |
| 1440 | BLDLIBRARY='$(LDLIBRARY)' |
| 1441 | fi |
| 1442 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1443 | echo "$ac_t""$LDLIBRARY" 1>&6 |
| 1444 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1445 | # Extract the first word of "ranlib", so it can be a program name with args. |
| 1446 | set dummy ranlib; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1447 | 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] | 1448 | echo "configure:1449: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1449 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1450 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1451 | else |
| 1452 | if test -n "$RANLIB"; then |
| 1453 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 1454 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1455 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1456 | ac_dummy="$PATH" |
| 1457 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1458 | test -z "$ac_dir" && ac_dir=. |
| 1459 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1460 | ac_cv_prog_RANLIB="ranlib" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1461 | break |
| 1462 | fi |
| 1463 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1464 | IFS="$ac_save_ifs" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1465 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1466 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1467 | fi |
| 1468 | RANLIB="$ac_cv_prog_RANLIB" |
| 1469 | if test -n "$RANLIB"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1470 | echo "$ac_t""$RANLIB" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1471 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1472 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1473 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1474 | |
| 1475 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1476 | for ac_prog in ar aal |
| 1477 | do |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1478 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 1479 | set dummy $ac_prog; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1480 | 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] | 1481 | echo "configure:1482: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1482 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1483 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1484 | else |
| 1485 | if test -n "$AR"; then |
| 1486 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 1487 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1488 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1489 | ac_dummy="$PATH" |
| 1490 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1491 | test -z "$ac_dir" && ac_dir=. |
| 1492 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1493 | ac_cv_prog_AR="$ac_prog" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1494 | break |
| 1495 | fi |
| 1496 | done |
| 1497 | IFS="$ac_save_ifs" |
| 1498 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1499 | fi |
| 1500 | AR="$ac_cv_prog_AR" |
| 1501 | if test -n "$AR"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1502 | echo "$ac_t""$AR" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1503 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1504 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1505 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1506 | |
| 1507 | test -n "$AR" && break |
| 1508 | done |
| 1509 | test -n "$AR" || AR="ar" |
| 1510 | |
Neil Schemenauer | a42c827 | 2001-03-31 00:01:55 +0000 | [diff] [blame] | 1511 | |
| 1512 | case $MACHDEP in |
| 1513 | bsdos*) |
| 1514 | # install -d does not work on BSDI |
| 1515 | if test -z "$INSTALL" |
| 1516 | then |
| 1517 | INSTALL="${srcdir}/install-sh -c" |
| 1518 | fi |
| 1519 | esac |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1520 | ac_aux_dir= |
| 1521 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
| 1522 | if test -f $ac_dir/install-sh; then |
| 1523 | ac_aux_dir=$ac_dir |
| 1524 | ac_install_sh="$ac_aux_dir/install-sh -c" |
| 1525 | break |
| 1526 | elif test -f $ac_dir/install.sh; then |
| 1527 | ac_aux_dir=$ac_dir |
| 1528 | ac_install_sh="$ac_aux_dir/install.sh -c" |
| 1529 | break |
| 1530 | fi |
| 1531 | done |
| 1532 | if test -z "$ac_aux_dir"; then |
| 1533 | { 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] | 1534 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1535 | ac_config_guess=$ac_aux_dir/config.guess |
| 1536 | ac_config_sub=$ac_aux_dir/config.sub |
| 1537 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. |
| 1538 | |
| 1539 | # Find a good install program. We prefer a C program (faster), |
| 1540 | # so one script is as good as another. But avoid the broken or |
| 1541 | # incompatible versions: |
| 1542 | # SysV /etc/install, /usr/sbin/install |
| 1543 | # SunOS /usr/etc/install |
| 1544 | # IRIX /sbin/install |
| 1545 | # AIX /bin/install |
| 1546 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
| 1547 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
| 1548 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
| 1549 | # ./install, which can be erroneously created by make from ./install.sh. |
| 1550 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1551 | echo "configure:1552: checking for a BSD compatible install" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1552 | if test -z "$INSTALL"; then |
| 1553 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
| 1554 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1555 | else |
| 1556 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" |
| 1557 | for ac_dir in $PATH; do |
| 1558 | # Account for people who put trailing slashes in PATH elements. |
| 1559 | case "$ac_dir/" in |
| 1560 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; |
| 1561 | *) |
| 1562 | # OSF1 and SCO ODT 3.0 have their own names for install. |
| 1563 | # Don't use installbsd from OSF since it installs stuff as root |
| 1564 | # by default. |
| 1565 | for ac_prog in ginstall scoinst install; do |
| 1566 | if test -f $ac_dir/$ac_prog; then |
| 1567 | if test $ac_prog = install && |
| 1568 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then |
| 1569 | # AIX install. It has an incompatible calling convention. |
| 1570 | : |
| 1571 | else |
| 1572 | ac_cv_path_install="$ac_dir/$ac_prog -c" |
| 1573 | break 2 |
| 1574 | fi |
| 1575 | fi |
| 1576 | done |
| 1577 | ;; |
| 1578 | esac |
| 1579 | done |
| 1580 | IFS="$ac_save_IFS" |
| 1581 | |
| 1582 | fi |
| 1583 | if test "${ac_cv_path_install+set}" = set; then |
| 1584 | INSTALL="$ac_cv_path_install" |
| 1585 | else |
| 1586 | # As a last resort, use the slow shell script. We don't cache a |
| 1587 | # path for INSTALL within a source directory, because that will |
| 1588 | # break other packages using the cache if that directory is |
| 1589 | # removed, or if the path is relative. |
| 1590 | INSTALL="$ac_install_sh" |
| 1591 | fi |
| 1592 | fi |
| 1593 | echo "$ac_t""$INSTALL" 1>&6 |
| 1594 | |
| 1595 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
| 1596 | # It thinks the first close brace ends the variable substitution. |
| 1597 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' |
| 1598 | |
| 1599 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
| 1600 | |
| 1601 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
| 1602 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1603 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1604 | # Not every filesystem supports hard links |
| 1605 | |
| 1606 | if test -z "$LN" ; then |
| 1607 | case $ac_sys_system in |
| 1608 | BeOS*) LN="ln -s";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1609 | CYGWIN*) LN="ln -s";; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1610 | *) LN=ln;; |
| 1611 | esac |
| 1612 | fi |
| 1613 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1614 | # Check for --with-pydebug |
| 1615 | echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1616 | echo "configure:1617: checking for --with-pydebug" >&5 |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1617 | # Check whether --with-pydebug or --without-pydebug was given. |
| 1618 | if test "${with_pydebug+set}" = set; then |
| 1619 | withval="$with_pydebug" |
| 1620 | |
| 1621 | if test "$withval" != no |
| 1622 | then cat >> confdefs.h <<\EOF |
| 1623 | #define Py_DEBUG 1 |
| 1624 | EOF |
| 1625 | echo "$ac_t""yes" 1>&6; Py_DEBUG='true' |
| 1626 | else echo "$ac_t""no" 1>&6; Py_DEBUG='false' |
| 1627 | fi |
| 1628 | else |
| 1629 | echo "$ac_t""no" 1>&6 |
| 1630 | fi |
| 1631 | |
| 1632 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1633 | # Optimizer/debugger flags |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1634 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1635 | if test -z "$OPT" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1636 | then |
Guido van Rossum | edca74a | 1997-07-18 23:29:40 +0000 | [diff] [blame] | 1637 | case $GCC in |
| 1638 | yes) |
| 1639 | case $ac_cv_prog_cc_g in |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1640 | yes) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1641 | if test "$Py_DEBUG" = 'true' ; then |
| 1642 | # Optimization messes up debuggers, so turn it off for |
| 1643 | # debug builds. |
| 1644 | OPT="-g -Wall -Wstrict-prototypes" |
| 1645 | else |
| 1646 | OPT="-g -O3 -Wall -Wstrict-prototypes" |
| 1647 | fi;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1648 | *) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1649 | OPT="-O3 -Wall -Wstrict-prototypes";; |
| 1650 | esac |
| 1651 | ;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1652 | *) |
| 1653 | case $ac_sys_system in |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 1654 | OpenUNIX*|UnixWare*) |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1655 | OPT="-O -K pentium,host,inline,loop_unroll,alloca ";; |
| 1656 | *) |
| 1657 | OPT="-O";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1658 | esac |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1659 | esac |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 1660 | case $ac_sys_system in |
| 1661 | Darwin*) |
| 1662 | OPT="$OPT -no-cpp-precomp";; |
| 1663 | esac |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1664 | fi |
| 1665 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1666 | # The current (beta) Monterey compiler dies with optimizations |
| 1667 | case $ac_sys_system in |
| 1668 | Monterey*) OPT="";; |
| 1669 | esac |
| 1670 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 1671 | if test "$ac_arch_flags" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 1672 | then |
| 1673 | OPT="$OPT $ac_arch_flags" |
| 1674 | fi |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1675 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1676 | echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1677 | echo "configure:1678: checking whether $CC accepts -OPT:Olimit=0" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1678 | 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] | 1679 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1680 | else |
| 1681 | ac_save_cc="$CC" |
| 1682 | CC="$CC -OPT:Olimit=0" |
| 1683 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 1684 | ac_cv_opt_olimit_ok=no |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1685 | else |
| 1686 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1687 | #line 1688 "configure" |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1688 | #include "confdefs.h" |
| 1689 | int main() { return 0; } |
| 1690 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1691 | if { (eval echo configure:1692: \"$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] | 1692 | then |
| 1693 | ac_cv_opt_olimit_ok=yes |
| 1694 | else |
| 1695 | echo "configure: failed program was:" >&5 |
| 1696 | cat conftest.$ac_ext >&5 |
| 1697 | rm -fr conftest* |
| 1698 | ac_cv_opt_olimit_ok=no |
| 1699 | fi |
| 1700 | rm -fr conftest* |
| 1701 | fi |
| 1702 | |
| 1703 | CC="$ac_save_cc" |
| 1704 | fi |
| 1705 | |
| 1706 | echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6 |
Guido van Rossum | 2efa34b | 1997-10-23 17:43:11 +0000 | [diff] [blame] | 1707 | if test $ac_cv_opt_olimit_ok = yes; then |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 1708 | case $ac_sys_system in |
| 1709 | Darwin*) OPT="$OPT" ;; |
| 1710 | *) OPT="$OPT -OPT:Olimit=0";; |
| 1711 | esac |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1712 | else |
| 1713 | echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1714 | echo "configure:1715: checking whether $CC accepts -Olimit 1500" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1715 | if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1716 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1717 | else |
| 1718 | ac_save_cc="$CC" |
| 1719 | CC="$CC -Olimit 1500" |
| 1720 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 1721 | ac_cv_olimit_ok=no |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1722 | else |
| 1723 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1724 | #line 1725 "configure" |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1725 | #include "confdefs.h" |
| 1726 | int main() { return 0; } |
| 1727 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1728 | if { (eval echo configure:1729: \"$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] | 1729 | then |
| 1730 | ac_cv_olimit_ok=yes |
| 1731 | else |
| 1732 | echo "configure: failed program was:" >&5 |
| 1733 | cat conftest.$ac_ext >&5 |
| 1734 | rm -fr conftest* |
| 1735 | ac_cv_olimit_ok=no |
Guido van Rossum | 201afe5 | 1997-05-14 21:14:44 +0000 | [diff] [blame] | 1736 | fi |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1737 | rm -fr conftest* |
| 1738 | fi |
| 1739 | |
| 1740 | CC="$ac_save_cc" |
| 1741 | fi |
| 1742 | |
| 1743 | echo "$ac_t""$ac_cv_olimit_ok" 1>&6 |
| 1744 | if test $ac_cv_olimit_ok = yes; then |
| 1745 | OPT="$OPT -Olimit 1500" |
| 1746 | fi |
| 1747 | fi |
| 1748 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1749 | # On some compilers, pthreads are available without further options |
| 1750 | # (e.g. MacOS X). On some of these systems, the compiler will not |
| 1751 | # complain if unaccepted options are passed (e.g. gcc on Mac OS X). |
| 1752 | # So we have to see first whether pthreads are available without |
| 1753 | # options before we can check whether -Kpthread improves anything. |
| 1754 | echo $ac_n "checking whether pthreads are available without options""... $ac_c" 1>&6 |
| 1755 | echo "configure:1756: checking whether pthreads are available without options" >&5 |
| 1756 | 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] | 1757 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1758 | else |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1759 | if test "$cross_compiling" = yes; then |
| 1760 | ac_cv_pthread_is_default=no |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1761 | else |
| 1762 | cat > conftest.$ac_ext <<EOF |
| 1763 | #line 1764 "configure" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1764 | #include "confdefs.h" |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1765 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1766 | #include <pthread.h> |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1767 | |
| 1768 | void* routine(void* p){return NULL;} |
| 1769 | |
| 1770 | int main(){ |
| 1771 | pthread_t p; |
| 1772 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 1773 | return 1; |
| 1774 | return 0; |
| 1775 | } |
| 1776 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1777 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1778 | if { (eval echo configure:1779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 1779 | then |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1780 | ac_cv_pthread_is_default=yes |
| 1781 | else |
| 1782 | echo "configure: failed program was:" >&5 |
| 1783 | cat conftest.$ac_ext >&5 |
| 1784 | rm -fr conftest* |
| 1785 | ac_cv_pthread_is_default=no |
| 1786 | fi |
| 1787 | rm -fr conftest* |
| 1788 | fi |
| 1789 | |
| 1790 | |
| 1791 | fi |
| 1792 | |
| 1793 | echo "$ac_t""$ac_cv_pthread_is_default" 1>&6 |
| 1794 | |
| 1795 | |
| 1796 | if test $ac_cv_pthread_is_default = yes |
| 1797 | then |
| 1798 | ac_cv_kpthread=no |
| 1799 | else |
| 1800 | # -Kpthread, if available, provides the right #defines |
| 1801 | # and linker options to make pthread_create available |
| 1802 | # Some compilers won't report that they do not support -Kpthread, |
| 1803 | # so we need to run a program to see whether it really made the |
| 1804 | # function available. |
| 1805 | echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6 |
| 1806 | echo "configure:1807: checking whether $CC accepts -Kpthread" >&5 |
| 1807 | if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then |
| 1808 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1809 | else |
| 1810 | ac_save_cc="$CC" |
| 1811 | CC="$CC -Kpthread" |
| 1812 | if test "$cross_compiling" = yes; then |
| 1813 | ac_cv_kpthread=no |
| 1814 | else |
| 1815 | cat > conftest.$ac_ext <<EOF |
| 1816 | #line 1817 "configure" |
| 1817 | #include "confdefs.h" |
| 1818 | |
| 1819 | #include <pthread.h> |
| 1820 | |
| 1821 | void* routine(void* p){return NULL;} |
| 1822 | |
| 1823 | int main(){ |
| 1824 | pthread_t p; |
| 1825 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 1826 | return 1; |
| 1827 | return 0; |
| 1828 | } |
| 1829 | |
| 1830 | EOF |
| 1831 | if { (eval echo configure:1832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
| 1832 | then |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1833 | ac_cv_kpthread=yes |
| 1834 | else |
| 1835 | echo "configure: failed program was:" >&5 |
| 1836 | cat conftest.$ac_ext >&5 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1837 | rm -fr conftest* |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1838 | ac_cv_kpthread=no |
| 1839 | fi |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1840 | rm -fr conftest* |
| 1841 | fi |
| 1842 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1843 | CC="$ac_save_cc" |
| 1844 | fi |
| 1845 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1846 | echo "$ac_t""$ac_cv_kpthread" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1847 | fi |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1848 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1849 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1850 | # checks for header files |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1851 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1852 | echo "configure:1853: checking for ANSI C header files" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1853 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1854 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1855 | else |
| 1856 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1857 | #line 1858 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1858 | #include "confdefs.h" |
| 1859 | #include <stdlib.h> |
| 1860 | #include <stdarg.h> |
| 1861 | #include <string.h> |
| 1862 | #include <float.h> |
| 1863 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1864 | 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] | 1865 | { (eval echo configure:1866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1866 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1867 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1868 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1869 | ac_cv_header_stdc=yes |
| 1870 | else |
| 1871 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1872 | echo "configure: failed program was:" >&5 |
| 1873 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1874 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1875 | ac_cv_header_stdc=no |
| 1876 | fi |
| 1877 | rm -f conftest* |
| 1878 | |
| 1879 | if test $ac_cv_header_stdc = yes; then |
| 1880 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 1881 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1882 | #line 1883 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1883 | #include "confdefs.h" |
| 1884 | #include <string.h> |
| 1885 | EOF |
| 1886 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1887 | egrep "memchr" >/dev/null 2>&1; then |
| 1888 | : |
| 1889 | else |
| 1890 | rm -rf conftest* |
| 1891 | ac_cv_header_stdc=no |
| 1892 | fi |
| 1893 | rm -f conftest* |
| 1894 | |
| 1895 | fi |
| 1896 | |
| 1897 | if test $ac_cv_header_stdc = yes; then |
| 1898 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 1899 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1900 | #line 1901 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1901 | #include "confdefs.h" |
| 1902 | #include <stdlib.h> |
| 1903 | EOF |
| 1904 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1905 | egrep "free" >/dev/null 2>&1; then |
| 1906 | : |
| 1907 | else |
| 1908 | rm -rf conftest* |
| 1909 | ac_cv_header_stdc=no |
| 1910 | fi |
| 1911 | rm -f conftest* |
| 1912 | |
| 1913 | fi |
| 1914 | |
| 1915 | if test $ac_cv_header_stdc = yes; then |
| 1916 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| 1917 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1918 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1919 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1920 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1921 | #line 1922 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1922 | #include "confdefs.h" |
| 1923 | #include <ctype.h> |
| 1924 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 1925 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1926 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1927 | int main () { int i; for (i = 0; i < 256; i++) |
| 1928 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 1929 | exit (0); } |
| 1930 | |
| 1931 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1932 | if { (eval echo configure:1933: \"$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] | 1933 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1934 | : |
| 1935 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1936 | echo "configure: failed program was:" >&5 |
| 1937 | cat conftest.$ac_ext >&5 |
| 1938 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1939 | ac_cv_header_stdc=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1940 | fi |
| 1941 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1942 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1943 | |
| 1944 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1945 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1946 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1947 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1948 | if test $ac_cv_header_stdc = yes; then |
| 1949 | cat >> confdefs.h <<\EOF |
| 1950 | #define STDC_HEADERS 1 |
| 1951 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1952 | |
| 1953 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1954 | |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1955 | for ac_hdr in dlfcn.h fcntl.h limits.h langinfo.h locale.h \ |
| 1956 | ncurses.h poll.h pthread.h \ |
Eric S. Raymond | d2d75d3 | 2001-01-16 15:26:34 +0000 | [diff] [blame] | 1957 | 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] | 1958 | 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] | 1959 | 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] | 1960 | 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] | 1961 | 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] | 1962 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1963 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1964 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1965 | echo "configure:1966: checking for $ac_hdr" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1966 | 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] | 1967 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1968 | else |
| 1969 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1970 | #line 1971 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1971 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1972 | #include <$ac_hdr> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1973 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1974 | 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] | 1975 | { (eval echo configure:1976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1976 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1977 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1978 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1979 | eval "ac_cv_header_$ac_safe=yes" |
| 1980 | else |
| 1981 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1982 | echo "configure: failed program was:" >&5 |
| 1983 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1984 | rm -rf conftest* |
| 1985 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1986 | fi |
| 1987 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1988 | fi |
| 1989 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1990 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1991 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1992 | cat >> confdefs.h <<EOF |
| 1993 | #define $ac_tr_hdr 1 |
| 1994 | EOF |
| 1995 | |
| 1996 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1997 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1998 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1999 | done |
| 2000 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2001 | ac_header_dirent=no |
| 2002 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h |
| 2003 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2004 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2005 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2006 | echo "configure:2007: checking for $ac_hdr that defines DIR" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2007 | 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] | 2008 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2009 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2010 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2011 | #line 2012 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2012 | #include "confdefs.h" |
| 2013 | #include <sys/types.h> |
| 2014 | #include <$ac_hdr> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2015 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2016 | DIR *dirp = 0; |
| 2017 | ; return 0; } |
| 2018 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2019 | if { (eval echo configure:2020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2020 | rm -rf conftest* |
| 2021 | eval "ac_cv_header_dirent_$ac_safe=yes" |
| 2022 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2023 | echo "configure: failed program was:" >&5 |
| 2024 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2025 | rm -rf conftest* |
| 2026 | eval "ac_cv_header_dirent_$ac_safe=no" |
| 2027 | fi |
| 2028 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2029 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2030 | 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] | 2031 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2032 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2033 | cat >> confdefs.h <<EOF |
| 2034 | #define $ac_tr_hdr 1 |
| 2035 | EOF |
| 2036 | ac_header_dirent=$ac_hdr; break |
| 2037 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2038 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2039 | fi |
| 2040 | done |
| 2041 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| 2042 | if test $ac_header_dirent = dirent.h; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2043 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2044 | echo "configure:2045: checking for opendir in -ldir" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2045 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2046 | 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] | 2047 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2048 | else |
| 2049 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2050 | LIBS="-ldir $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2051 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2052 | #line 2053 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2053 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2054 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2055 | /* We use char because int might match the return type of a gcc2 |
| 2056 | builtin and then its argument prototype would still apply. */ |
| 2057 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2058 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2059 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2060 | opendir() |
| 2061 | ; return 0; } |
| 2062 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2063 | if { (eval echo configure:2064: \"$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] | 2064 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2065 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2066 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2067 | echo "configure: failed program was:" >&5 |
| 2068 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2069 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2070 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2071 | fi |
| 2072 | rm -f conftest* |
| 2073 | LIBS="$ac_save_LIBS" |
| 2074 | |
| 2075 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2076 | 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] | 2077 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2078 | LIBS="$LIBS -ldir" |
| 2079 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2080 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2081 | fi |
| 2082 | |
| 2083 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2084 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2085 | echo "configure:2086: checking for opendir in -lx" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2086 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2087 | 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] | 2088 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2089 | else |
| 2090 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2091 | LIBS="-lx $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2092 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2093 | #line 2094 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2094 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2095 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2096 | /* We use char because int might match the return type of a gcc2 |
| 2097 | builtin and then its argument prototype would still apply. */ |
| 2098 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2099 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2100 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2101 | opendir() |
| 2102 | ; return 0; } |
| 2103 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2104 | if { (eval echo configure:2105: \"$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] | 2105 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2106 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2107 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2108 | echo "configure: failed program was:" >&5 |
| 2109 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2110 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2111 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2112 | fi |
| 2113 | rm -f conftest* |
| 2114 | LIBS="$ac_save_LIBS" |
| 2115 | |
| 2116 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2117 | 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] | 2118 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2119 | LIBS="$LIBS -lx" |
| 2120 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2121 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2122 | fi |
| 2123 | |
| 2124 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2125 | |
| 2126 | |
| 2127 | # checks for typedefs |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2128 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2129 | echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2130 | echo "configure:2131: checking for clock_t in time.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2131 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2132 | #line 2133 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2133 | #include "confdefs.h" |
| 2134 | #include <time.h> |
| 2135 | EOF |
| 2136 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2137 | egrep "clock_t" >/dev/null 2>&1; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2138 | rm -rf conftest* |
| 2139 | was_it_defined=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2140 | else |
| 2141 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2142 | cat >> confdefs.h <<\EOF |
| 2143 | #define clock_t long |
| 2144 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2145 | |
| 2146 | fi |
| 2147 | rm -f conftest* |
| 2148 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2149 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2150 | |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 2151 | # Two defines needed to enable largefile support on various platforms |
| 2152 | # These may affect some typedefs |
| 2153 | cat >> confdefs.h <<\EOF |
| 2154 | #define _LARGEFILE_SOURCE 1 |
| 2155 | EOF |
| 2156 | |
| 2157 | cat >> confdefs.h <<\EOF |
| 2158 | #define _FILE_OFFSET_BITS 64 |
| 2159 | EOF |
| 2160 | |
| 2161 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2162 | # Add some code to confdefs.h so that the test for off_t works on SCO |
| 2163 | cat >> confdefs.h <<\EOF |
| 2164 | #if defined(SCO_DS) |
| 2165 | #undef _OFF_T |
| 2166 | #endif |
| 2167 | EOF |
| 2168 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2169 | # Type availability checks |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2170 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2171 | echo "configure:2172: checking for mode_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2172 | 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] | 2173 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2174 | else |
| 2175 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2176 | #line 2177 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2177 | #include "confdefs.h" |
| 2178 | #include <sys/types.h> |
| 2179 | #if STDC_HEADERS |
| 2180 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2181 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2182 | #endif |
| 2183 | EOF |
| 2184 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2185 | 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] | 2186 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2187 | ac_cv_type_mode_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2188 | else |
| 2189 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2190 | ac_cv_type_mode_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2191 | fi |
| 2192 | rm -f conftest* |
| 2193 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2194 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2195 | echo "$ac_t""$ac_cv_type_mode_t" 1>&6 |
| 2196 | if test $ac_cv_type_mode_t = no; then |
| 2197 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2198 | #define mode_t int |
| 2199 | EOF |
| 2200 | |
| 2201 | fi |
| 2202 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2203 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2204 | echo "configure:2205: checking for off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2205 | 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] | 2206 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2207 | else |
| 2208 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2209 | #line 2210 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2210 | #include "confdefs.h" |
| 2211 | #include <sys/types.h> |
| 2212 | #if STDC_HEADERS |
| 2213 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2214 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2215 | #endif |
| 2216 | EOF |
| 2217 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2218 | 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] | 2219 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2220 | ac_cv_type_off_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2221 | else |
| 2222 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2223 | ac_cv_type_off_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2224 | fi |
| 2225 | rm -f conftest* |
| 2226 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2227 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2228 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
| 2229 | if test $ac_cv_type_off_t = no; then |
| 2230 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2231 | #define off_t long |
| 2232 | EOF |
| 2233 | |
| 2234 | fi |
| 2235 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2236 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2237 | echo "configure:2238: checking for pid_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2238 | 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] | 2239 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2240 | else |
| 2241 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2242 | #line 2243 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2243 | #include "confdefs.h" |
| 2244 | #include <sys/types.h> |
| 2245 | #if STDC_HEADERS |
| 2246 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2247 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2248 | #endif |
| 2249 | EOF |
| 2250 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2251 | 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] | 2252 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2253 | ac_cv_type_pid_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2254 | else |
| 2255 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2256 | ac_cv_type_pid_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2257 | fi |
| 2258 | rm -f conftest* |
| 2259 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2260 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2261 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
| 2262 | if test $ac_cv_type_pid_t = no; then |
| 2263 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2264 | #define pid_t int |
| 2265 | EOF |
| 2266 | |
| 2267 | fi |
| 2268 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2269 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2270 | echo "configure:2271: checking return type of signal handlers" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2271 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2272 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2273 | else |
| 2274 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2275 | #line 2276 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2276 | #include "confdefs.h" |
| 2277 | #include <sys/types.h> |
| 2278 | #include <signal.h> |
| 2279 | #ifdef signal |
| 2280 | #undef signal |
| 2281 | #endif |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2282 | #ifdef __cplusplus |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2283 | extern "C" void (*signal (int, void (*)(int)))(int); |
| 2284 | #else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2285 | void (*signal ()) (); |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2286 | #endif |
| 2287 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2288 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2289 | int i; |
| 2290 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2291 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2292 | if { (eval echo configure:2293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2293 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2294 | ac_cv_type_signal=void |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2295 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2296 | echo "configure: failed program was:" >&5 |
| 2297 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2298 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2299 | ac_cv_type_signal=int |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2300 | fi |
| 2301 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2302 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2303 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2304 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2305 | cat >> confdefs.h <<EOF |
| 2306 | #define RETSIGTYPE $ac_cv_type_signal |
| 2307 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2308 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2309 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2310 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2311 | echo "configure:2312: checking for size_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2312 | 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] | 2313 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2314 | else |
| 2315 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2316 | #line 2317 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2317 | #include "confdefs.h" |
| 2318 | #include <sys/types.h> |
| 2319 | #if STDC_HEADERS |
| 2320 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2321 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2322 | #endif |
| 2323 | EOF |
| 2324 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2325 | egrep "(^|[^a-zA-Z_0-9])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] | 2326 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2327 | ac_cv_type_size_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2328 | else |
| 2329 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2330 | ac_cv_type_size_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2331 | fi |
| 2332 | rm -f conftest* |
| 2333 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2334 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2335 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
| 2336 | if test $ac_cv_type_size_t = no; then |
| 2337 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2338 | #define size_t unsigned |
| 2339 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2340 | |
| 2341 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2342 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2343 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2344 | echo "configure:2345: checking for uid_t in sys/types.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2345 | 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] | 2346 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2347 | else |
| 2348 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2349 | #line 2350 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2350 | #include "confdefs.h" |
| 2351 | #include <sys/types.h> |
| 2352 | EOF |
| 2353 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2354 | egrep "uid_t" >/dev/null 2>&1; then |
| 2355 | rm -rf conftest* |
| 2356 | ac_cv_type_uid_t=yes |
| 2357 | else |
| 2358 | rm -rf conftest* |
| 2359 | ac_cv_type_uid_t=no |
| 2360 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2361 | rm -f conftest* |
| 2362 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2363 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2364 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2365 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2366 | if test $ac_cv_type_uid_t = no; then |
| 2367 | cat >> confdefs.h <<\EOF |
| 2368 | #define uid_t int |
| 2369 | EOF |
| 2370 | |
| 2371 | cat >> confdefs.h <<\EOF |
| 2372 | #define gid_t int |
| 2373 | EOF |
| 2374 | |
| 2375 | fi |
| 2376 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2377 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2378 | # Sizes of various common basic types |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2379 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2380 | echo "configure:2381: checking size of int" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2381 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2382 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2383 | else |
| 2384 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2385 | ac_cv_sizeof_int=4 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2386 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2387 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2388 | #line 2389 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2389 | #include "confdefs.h" |
| 2390 | #include <stdio.h> |
| 2391 | main() |
| 2392 | { |
| 2393 | FILE *f=fopen("conftestval", "w"); |
| 2394 | if (!f) exit(1); |
| 2395 | fprintf(f, "%d\n", sizeof(int)); |
| 2396 | exit(0); |
| 2397 | } |
| 2398 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2399 | if { (eval echo configure:2400: \"$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] | 2400 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2401 | ac_cv_sizeof_int=`cat conftestval` |
| 2402 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2403 | echo "configure: failed program was:" >&5 |
| 2404 | cat conftest.$ac_ext >&5 |
| 2405 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2406 | ac_cv_sizeof_int=0 |
| 2407 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2408 | rm -fr conftest* |
| 2409 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2410 | |
| 2411 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2412 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
| 2413 | cat >> confdefs.h <<EOF |
| 2414 | #define SIZEOF_INT $ac_cv_sizeof_int |
| 2415 | EOF |
| 2416 | |
| 2417 | |
| 2418 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2419 | echo "configure:2420: checking size of long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2420 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2421 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2422 | else |
| 2423 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2424 | ac_cv_sizeof_long=4 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2425 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2426 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2427 | #line 2428 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2428 | #include "confdefs.h" |
| 2429 | #include <stdio.h> |
| 2430 | main() |
| 2431 | { |
| 2432 | FILE *f=fopen("conftestval", "w"); |
| 2433 | if (!f) exit(1); |
| 2434 | fprintf(f, "%d\n", sizeof(long)); |
| 2435 | exit(0); |
| 2436 | } |
| 2437 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2438 | if { (eval echo configure:2439: \"$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] | 2439 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2440 | ac_cv_sizeof_long=`cat conftestval` |
| 2441 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2442 | echo "configure: failed program was:" >&5 |
| 2443 | cat conftest.$ac_ext >&5 |
| 2444 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2445 | ac_cv_sizeof_long=0 |
| 2446 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2447 | rm -fr conftest* |
| 2448 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2449 | |
| 2450 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2451 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
| 2452 | cat >> confdefs.h <<EOF |
| 2453 | #define SIZEOF_LONG $ac_cv_sizeof_long |
| 2454 | EOF |
| 2455 | |
| 2456 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2457 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2458 | echo "configure:2459: checking size of void *" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2459 | 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] | 2460 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2461 | else |
| 2462 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2463 | ac_cv_sizeof_void_p=4 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2464 | else |
| 2465 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2466 | #line 2467 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2467 | #include "confdefs.h" |
| 2468 | #include <stdio.h> |
| 2469 | main() |
| 2470 | { |
| 2471 | FILE *f=fopen("conftestval", "w"); |
| 2472 | if (!f) exit(1); |
| 2473 | fprintf(f, "%d\n", sizeof(void *)); |
| 2474 | exit(0); |
| 2475 | } |
| 2476 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2477 | if { (eval echo configure:2478: \"$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] | 2478 | then |
| 2479 | ac_cv_sizeof_void_p=`cat conftestval` |
| 2480 | else |
| 2481 | echo "configure: failed program was:" >&5 |
| 2482 | cat conftest.$ac_ext >&5 |
| 2483 | rm -fr conftest* |
| 2484 | ac_cv_sizeof_void_p=0 |
| 2485 | fi |
| 2486 | rm -fr conftest* |
| 2487 | fi |
| 2488 | |
| 2489 | fi |
| 2490 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 |
| 2491 | cat >> confdefs.h <<EOF |
| 2492 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
| 2493 | EOF |
| 2494 | |
| 2495 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2496 | echo $ac_n "checking size of char""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2497 | echo "configure:2498: checking size of char" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2498 | if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2499 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2500 | else |
| 2501 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2502 | ac_cv_sizeof_char=1 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2503 | else |
| 2504 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2505 | #line 2506 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2506 | #include "confdefs.h" |
| 2507 | #include <stdio.h> |
| 2508 | main() |
| 2509 | { |
| 2510 | FILE *f=fopen("conftestval", "w"); |
| 2511 | if (!f) exit(1); |
| 2512 | fprintf(f, "%d\n", sizeof(char)); |
| 2513 | exit(0); |
| 2514 | } |
| 2515 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2516 | if { (eval echo configure:2517: \"$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] | 2517 | then |
| 2518 | ac_cv_sizeof_char=`cat conftestval` |
| 2519 | else |
| 2520 | echo "configure: failed program was:" >&5 |
| 2521 | cat conftest.$ac_ext >&5 |
| 2522 | rm -fr conftest* |
| 2523 | ac_cv_sizeof_char=0 |
| 2524 | fi |
| 2525 | rm -fr conftest* |
| 2526 | fi |
| 2527 | |
| 2528 | fi |
| 2529 | echo "$ac_t""$ac_cv_sizeof_char" 1>&6 |
| 2530 | cat >> confdefs.h <<EOF |
| 2531 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
| 2532 | EOF |
| 2533 | |
| 2534 | |
| 2535 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2536 | echo "configure:2537: checking size of short" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2537 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2538 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2539 | else |
| 2540 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2541 | ac_cv_sizeof_short=2 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2542 | else |
| 2543 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2544 | #line 2545 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2545 | #include "confdefs.h" |
| 2546 | #include <stdio.h> |
| 2547 | main() |
| 2548 | { |
| 2549 | FILE *f=fopen("conftestval", "w"); |
| 2550 | if (!f) exit(1); |
| 2551 | fprintf(f, "%d\n", sizeof(short)); |
| 2552 | exit(0); |
| 2553 | } |
| 2554 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2555 | if { (eval echo configure:2556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2556 | then |
| 2557 | ac_cv_sizeof_short=`cat conftestval` |
| 2558 | else |
| 2559 | echo "configure: failed program was:" >&5 |
| 2560 | cat conftest.$ac_ext >&5 |
| 2561 | rm -fr conftest* |
| 2562 | ac_cv_sizeof_short=0 |
| 2563 | fi |
| 2564 | rm -fr conftest* |
| 2565 | fi |
| 2566 | |
| 2567 | fi |
| 2568 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
| 2569 | cat >> confdefs.h <<EOF |
| 2570 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
| 2571 | EOF |
| 2572 | |
| 2573 | |
| 2574 | echo $ac_n "checking size of float""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2575 | echo "configure:2576: checking size of float" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2576 | if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2577 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2578 | else |
| 2579 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2580 | ac_cv_sizeof_float=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2581 | else |
| 2582 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2583 | #line 2584 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2584 | #include "confdefs.h" |
| 2585 | #include <stdio.h> |
| 2586 | main() |
| 2587 | { |
| 2588 | FILE *f=fopen("conftestval", "w"); |
| 2589 | if (!f) exit(1); |
| 2590 | fprintf(f, "%d\n", sizeof(float)); |
| 2591 | exit(0); |
| 2592 | } |
| 2593 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2594 | if { (eval echo configure:2595: \"$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] | 2595 | then |
| 2596 | ac_cv_sizeof_float=`cat conftestval` |
| 2597 | else |
| 2598 | echo "configure: failed program was:" >&5 |
| 2599 | cat conftest.$ac_ext >&5 |
| 2600 | rm -fr conftest* |
| 2601 | ac_cv_sizeof_float=0 |
| 2602 | fi |
| 2603 | rm -fr conftest* |
| 2604 | fi |
| 2605 | |
| 2606 | fi |
| 2607 | echo "$ac_t""$ac_cv_sizeof_float" 1>&6 |
| 2608 | cat >> confdefs.h <<EOF |
| 2609 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
| 2610 | EOF |
| 2611 | |
| 2612 | |
| 2613 | echo $ac_n "checking size of double""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2614 | echo "configure:2615: checking size of double" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2615 | if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2616 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2617 | else |
| 2618 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2619 | ac_cv_sizeof_double=8 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2620 | else |
| 2621 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2622 | #line 2623 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2623 | #include "confdefs.h" |
| 2624 | #include <stdio.h> |
| 2625 | main() |
| 2626 | { |
| 2627 | FILE *f=fopen("conftestval", "w"); |
| 2628 | if (!f) exit(1); |
| 2629 | fprintf(f, "%d\n", sizeof(double)); |
| 2630 | exit(0); |
| 2631 | } |
| 2632 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2633 | if { (eval echo configure:2634: \"$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] | 2634 | then |
| 2635 | ac_cv_sizeof_double=`cat conftestval` |
| 2636 | else |
| 2637 | echo "configure: failed program was:" >&5 |
| 2638 | cat conftest.$ac_ext >&5 |
| 2639 | rm -fr conftest* |
| 2640 | ac_cv_sizeof_double=0 |
| 2641 | fi |
| 2642 | rm -fr conftest* |
| 2643 | fi |
| 2644 | |
| 2645 | fi |
| 2646 | echo "$ac_t""$ac_cv_sizeof_double" 1>&6 |
| 2647 | cat >> confdefs.h <<EOF |
| 2648 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
| 2649 | EOF |
| 2650 | |
| 2651 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2652 | echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2653 | echo "configure:2654: checking size of fpos_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2654 | 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] | 2655 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2656 | else |
| 2657 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2658 | ac_cv_sizeof_fpos_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2659 | else |
| 2660 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2661 | #line 2662 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2662 | #include "confdefs.h" |
| 2663 | #include <stdio.h> |
| 2664 | main() |
| 2665 | { |
| 2666 | FILE *f=fopen("conftestval", "w"); |
| 2667 | if (!f) exit(1); |
| 2668 | fprintf(f, "%d\n", sizeof(fpos_t)); |
| 2669 | exit(0); |
| 2670 | } |
| 2671 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2672 | if { (eval echo configure:2673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2673 | then |
| 2674 | ac_cv_sizeof_fpos_t=`cat conftestval` |
| 2675 | else |
| 2676 | echo "configure: failed program was:" >&5 |
| 2677 | cat conftest.$ac_ext >&5 |
| 2678 | rm -fr conftest* |
| 2679 | ac_cv_sizeof_fpos_t=0 |
| 2680 | fi |
| 2681 | rm -fr conftest* |
| 2682 | fi |
| 2683 | |
| 2684 | fi |
| 2685 | echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6 |
| 2686 | cat >> confdefs.h <<EOF |
| 2687 | #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t |
| 2688 | EOF |
| 2689 | |
| 2690 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2691 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2692 | echo $ac_n "checking for long long support""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2693 | echo "configure:2694: checking for long long support" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2694 | have_long_long=no |
| 2695 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2696 | #line 2697 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2697 | #include "confdefs.h" |
| 2698 | |
| 2699 | int main() { |
| 2700 | long long x; x = (long long)0; |
| 2701 | ; return 0; } |
| 2702 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2703 | if { (eval echo configure:2704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2704 | rm -rf conftest* |
| 2705 | cat >> confdefs.h <<\EOF |
| 2706 | #define HAVE_LONG_LONG 1 |
| 2707 | EOF |
| 2708 | have_long_long=yes |
| 2709 | else |
| 2710 | echo "configure: failed program was:" >&5 |
| 2711 | cat conftest.$ac_ext >&5 |
| 2712 | fi |
| 2713 | rm -f conftest* |
| 2714 | echo "$ac_t""$have_long_long" 1>&6 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2715 | if test "$have_long_long" = yes ; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2716 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2717 | echo "configure:2718: checking size of long long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2718 | 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] | 2719 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2720 | else |
| 2721 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2722 | ac_cv_sizeof_long_long=8 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2723 | else |
| 2724 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2725 | #line 2726 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2726 | #include "confdefs.h" |
| 2727 | #include <stdio.h> |
| 2728 | main() |
| 2729 | { |
| 2730 | FILE *f=fopen("conftestval", "w"); |
| 2731 | if (!f) exit(1); |
| 2732 | fprintf(f, "%d\n", sizeof(long long)); |
| 2733 | exit(0); |
| 2734 | } |
| 2735 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2736 | if { (eval echo configure:2737: \"$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] | 2737 | then |
| 2738 | ac_cv_sizeof_long_long=`cat conftestval` |
| 2739 | else |
| 2740 | echo "configure: failed program was:" >&5 |
| 2741 | cat conftest.$ac_ext >&5 |
| 2742 | rm -fr conftest* |
| 2743 | ac_cv_sizeof_long_long=0 |
| 2744 | fi |
| 2745 | rm -fr conftest* |
| 2746 | fi |
| 2747 | |
| 2748 | fi |
| 2749 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
| 2750 | cat >> confdefs.h <<EOF |
| 2751 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 2752 | EOF |
| 2753 | |
| 2754 | |
| 2755 | fi |
| 2756 | |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2757 | echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2758 | echo "configure:2759: checking for uintptr_t support" >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2759 | have_uintptr_t=no |
| 2760 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2761 | #line 2762 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2762 | #include "confdefs.h" |
| 2763 | |
| 2764 | int main() { |
| 2765 | uintptr_t x; x = (uintptr_t)0; |
| 2766 | ; return 0; } |
| 2767 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2768 | if { (eval echo configure:2769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2769 | rm -rf conftest* |
| 2770 | cat >> confdefs.h <<\EOF |
| 2771 | #define HAVE_UINTPTR_T 1 |
| 2772 | EOF |
| 2773 | have_uintptr_t=yes |
| 2774 | else |
| 2775 | echo "configure: failed program was:" >&5 |
| 2776 | cat conftest.$ac_ext >&5 |
| 2777 | fi |
| 2778 | rm -f conftest* |
| 2779 | echo "$ac_t""$have_uintptr_t" 1>&6 |
| 2780 | if test "$have_uintptr_t" = yes ; then |
| 2781 | echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2782 | echo "configure:2783: checking size of uintptr_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2783 | if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2784 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2785 | else |
| 2786 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2787 | ac_cv_sizeof_uintptr_t=4 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2788 | else |
| 2789 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2790 | #line 2791 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2791 | #include "confdefs.h" |
| 2792 | #include <stdio.h> |
| 2793 | main() |
| 2794 | { |
| 2795 | FILE *f=fopen("conftestval", "w"); |
| 2796 | if (!f) exit(1); |
| 2797 | fprintf(f, "%d\n", sizeof(uintptr_t)); |
| 2798 | exit(0); |
| 2799 | } |
| 2800 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2801 | if { (eval echo configure:2802: \"$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] | 2802 | then |
| 2803 | ac_cv_sizeof_uintptr_t=`cat conftestval` |
| 2804 | else |
| 2805 | echo "configure: failed program was:" >&5 |
| 2806 | cat conftest.$ac_ext >&5 |
| 2807 | rm -fr conftest* |
| 2808 | ac_cv_sizeof_uintptr_t=0 |
| 2809 | fi |
| 2810 | rm -fr conftest* |
| 2811 | fi |
| 2812 | |
| 2813 | fi |
| 2814 | echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6 |
| 2815 | cat >> confdefs.h <<EOF |
| 2816 | #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t |
| 2817 | EOF |
| 2818 | |
| 2819 | |
| 2820 | fi |
| 2821 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2822 | # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>. |
| 2823 | echo $ac_n "checking size of off_t""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2824 | echo "configure:2825: checking size of off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2825 | 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] | 2826 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2827 | else |
| 2828 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2829 | ac_cv_sizeof_off_t=4 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2830 | else |
| 2831 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2832 | #line 2833 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2833 | #include "confdefs.h" |
| 2834 | #include <stdio.h> |
| 2835 | #include <sys/types.h> |
| 2836 | main() |
| 2837 | { |
| 2838 | FILE *f=fopen("conftestval", "w"); |
| 2839 | if (!f) exit(1); |
| 2840 | fprintf(f, "%d\n", sizeof(off_t)); |
| 2841 | exit(0); |
| 2842 | } |
| 2843 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2844 | if { (eval echo configure:2845: \"$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] | 2845 | then |
| 2846 | ac_cv_sizeof_off_t=`cat conftestval` |
| 2847 | else |
| 2848 | echo "configure: failed program was:" >&5 |
| 2849 | cat conftest.$ac_ext >&5 |
| 2850 | rm -fr conftest* |
| 2851 | ac_cv_sizeof_off_t=0 |
| 2852 | fi |
| 2853 | rm -fr conftest* |
| 2854 | fi |
| 2855 | |
| 2856 | |
| 2857 | fi |
| 2858 | |
| 2859 | echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6 |
| 2860 | cat >> confdefs.h <<EOF |
| 2861 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
| 2862 | EOF |
| 2863 | |
| 2864 | |
| 2865 | echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2866 | echo "configure:2867: checking whether to enable large file support" >&5 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2867 | if test "$have_long_long" = yes -a \ |
| 2868 | "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ |
| 2869 | "$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] | 2870 | cat >> confdefs.h <<\EOF |
| 2871 | #define HAVE_LARGEFILE_SUPPORT 1 |
| 2872 | EOF |
| 2873 | |
| 2874 | echo "$ac_t""yes" 1>&6 |
| 2875 | else |
| 2876 | echo "$ac_t""no" 1>&6 |
| 2877 | fi |
| 2878 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2879 | # AC_CHECK_SIZEOF() doesn't include <time.h>. |
| 2880 | echo $ac_n "checking size of time_t""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2881 | echo "configure:2882: checking size of time_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2882 | 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] | 2883 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2884 | else |
| 2885 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2886 | ac_cv_sizeof_time_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2887 | else |
| 2888 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2889 | #line 2890 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2890 | #include "confdefs.h" |
| 2891 | #include <stdio.h> |
| 2892 | #include <time.h> |
| 2893 | main() |
| 2894 | { |
| 2895 | FILE *f=fopen("conftestval", "w"); |
| 2896 | if (!f) exit(1); |
| 2897 | fprintf(f, "%d\n", sizeof(time_t)); |
| 2898 | exit(0); |
| 2899 | } |
| 2900 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2901 | if { (eval echo configure:2902: \"$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] | 2902 | then |
| 2903 | ac_cv_sizeof_time_t=`cat conftestval` |
| 2904 | else |
| 2905 | echo "configure: failed program was:" >&5 |
| 2906 | cat conftest.$ac_ext >&5 |
| 2907 | rm -fr conftest* |
| 2908 | ac_cv_sizeof_time_t=0 |
| 2909 | fi |
| 2910 | rm -fr conftest* |
| 2911 | fi |
| 2912 | |
| 2913 | |
| 2914 | fi |
| 2915 | |
| 2916 | echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 |
| 2917 | cat >> confdefs.h <<EOF |
| 2918 | #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
| 2919 | EOF |
| 2920 | |
| 2921 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2922 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2923 | # if have pthread_t then define SIZEOF_PTHREAD_T |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 2924 | ac_save_cc="$CC" |
| 2925 | if test "$ac_cv_kpthread" = "yes" |
| 2926 | then CC="$CC -Kpthread" |
| 2927 | fi |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2928 | echo $ac_n "checking for pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2929 | echo "configure:2930: checking for pthread_t" >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2930 | have_pthread_t=no |
| 2931 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2932 | #line 2933 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2933 | #include "confdefs.h" |
| 2934 | #include <pthread.h> |
| 2935 | int main() { |
Guido van Rossum | 1258049 | 2000-09-24 16:47:19 +0000 | [diff] [blame] | 2936 | pthread_t x; x = *(pthread_t*)0; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2937 | ; return 0; } |
| 2938 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2939 | if { (eval echo configure:2940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2940 | rm -rf conftest* |
| 2941 | have_pthread_t=yes |
| 2942 | else |
| 2943 | echo "configure: failed program was:" >&5 |
| 2944 | cat conftest.$ac_ext >&5 |
| 2945 | fi |
| 2946 | rm -f conftest* |
| 2947 | echo "$ac_t""$have_pthread_t" 1>&6 |
| 2948 | if test "$have_pthread_t" = yes ; then |
| 2949 | # AC_CHECK_SIZEOF() doesn't include <pthread.h>. |
| 2950 | echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2951 | echo "configure:2952: checking size of pthread_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2952 | if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2953 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2954 | else |
| 2955 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2956 | ac_cv_sizeof_pthread_t=4 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2957 | else |
| 2958 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2959 | #line 2960 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2960 | #include "confdefs.h" |
| 2961 | #include <stdio.h> |
| 2962 | #include <pthread.h> |
| 2963 | main() |
| 2964 | { |
| 2965 | FILE *f=fopen("conftestval", "w"); |
| 2966 | if (!f) exit(1); |
| 2967 | fprintf(f, "%d\n", sizeof(pthread_t)); |
| 2968 | exit(0); |
| 2969 | } |
| 2970 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2971 | if { (eval echo configure:2972: \"$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] | 2972 | then |
| 2973 | ac_cv_sizeof_pthread_t=`cat conftestval` |
| 2974 | else |
| 2975 | echo "configure: failed program was:" >&5 |
| 2976 | cat conftest.$ac_ext >&5 |
| 2977 | rm -fr conftest* |
| 2978 | ac_cv_sizeof_pthread_t=0 |
| 2979 | fi |
| 2980 | rm -fr conftest* |
| 2981 | fi |
| 2982 | |
| 2983 | |
| 2984 | fi |
| 2985 | |
| 2986 | echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6 |
| 2987 | cat >> confdefs.h <<EOF |
| 2988 | #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t |
| 2989 | EOF |
| 2990 | |
| 2991 | fi |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 2992 | CC="$ac_save_cc" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2993 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2994 | echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 2995 | echo "configure:2996: checking for --enable-toolbox-glue" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2996 | # Check whether --enable-toolbox-glue or --disable-toolbox-glue was given. |
| 2997 | if test "${enable_toolbox_glue+set}" = set; then |
| 2998 | enableval="$enable_toolbox_glue" |
| 2999 | : |
| 3000 | fi |
| 3001 | |
| 3002 | |
| 3003 | if test -z "$enable_toolbox_glue" |
| 3004 | then |
| 3005 | case $ac_sys_system/$ac_sys_release in |
| 3006 | Darwin/*) |
| 3007 | enable_toolbox_glue="yes";; |
| 3008 | *) |
| 3009 | enable_toolbox_glue="no";; |
| 3010 | esac |
| 3011 | fi |
| 3012 | case "$enable_toolbox_glue" in |
| 3013 | yes) |
| 3014 | extra_frameworks="-framework Carbon -framework Foundation" |
| 3015 | extra_machdep_objs="Python/mactoolboxglue.o" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3016 | extra_undefs="-u __dummy -u _PyMac_Error" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3017 | cat >> confdefs.h <<\EOF |
| 3018 | #define USE_TOOLBOX_OBJECT_GLUE 1 |
| 3019 | EOF |
| 3020 | |
| 3021 | ;; |
| 3022 | *) |
| 3023 | extra_frameworks="" |
| 3024 | extra_machdep_objs="" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3025 | extra_undefs="" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3026 | ;; |
| 3027 | esac |
| 3028 | echo "$ac_t""$enable_toolbox_glue" 1>&6 |
| 3029 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3030 | |
| 3031 | case $ac_sys_system/$ac_sys_release in |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3032 | Darwin/1.4*) |
| 3033 | ns_undef_sym='_environ' |
| 3034 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym" |
| 3035 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
| 3036 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 3037 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 3038 | Darwin/*) |
| 3039 | ns_undef_sym='_environ' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3040 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" |
| 3041 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
| 3042 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 3043 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3044 | esac |
| 3045 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3046 | echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3047 | echo "configure:3048: checking for --enable-framework" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3048 | if test "$enable_framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3049 | then |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 3050 | OPT="$OPT -fno-common -dynamic" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3051 | # -U __environ is needed since bundles don't have access |
| 3052 | # to crt0 when built but will always be linked against it |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3053 | # -F. is needed to allow linking to the framework while |
| 3054 | # in the build location. |
| 3055 | |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3056 | case $ac_sys_system/$ac_sys_release in |
| 3057 | Darwin/1.4*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";; |
| 3058 | Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";; |
| 3059 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3060 | cat >> confdefs.h <<\EOF |
| 3061 | #define WITH_NEXT_FRAMEWORK 1 |
| 3062 | EOF |
| 3063 | |
| 3064 | echo "$ac_t""yes" 1>&6 |
| 3065 | else |
| 3066 | echo "$ac_t""no" 1>&6 |
| 3067 | fi |
| 3068 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3069 | echo $ac_n "checking for dyld""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3070 | echo "configure:3071: checking for dyld" >&5 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3071 | case $ac_sys_system/$ac_sys_release in |
| 3072 | Darwin/*) |
| 3073 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3074 | #define WITH_DYLD 1 |
| 3075 | EOF |
| 3076 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3077 | echo "$ac_t""always on for Darwin" 1>&6 |
| 3078 | ;; |
| 3079 | *) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3080 | echo "$ac_t""no" 1>&6 |
| 3081 | ;; |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3082 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3083 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3084 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3085 | |
| 3086 | |
| 3087 | |
| 3088 | |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3089 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3090 | # SO is the extension of shared libraries `(including the dot!) |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3091 | # -- usually .so, .sl on HP-UX, .dll on Cygwin |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3092 | echo $ac_n "checking SO""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3093 | echo "configure:3094: checking SO" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3094 | if test -z "$SO" |
| 3095 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3096 | case $ac_sys_system in |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3097 | hp*|HP*) SO=.sl;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3098 | CYGWIN*) SO=.dll;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3099 | *) SO=.so;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3100 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3101 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3102 | echo "$ac_t""$SO" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3103 | # LDSHARED is the ld *command* used to create shared library |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3104 | # -- "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] | 3105 | # (Shared libraries in this instance are shared modules to be loaded into |
| 3106 | # Python, as opposed to building Python itself as a shared library.) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3107 | echo $ac_n "checking LDSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3108 | echo "configure:3109: checking LDSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3109 | if test -z "$LDSHARED" |
| 3110 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3111 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3112 | AIX*) |
| 3113 | BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" |
Guido van Rossum | ce608b0 | 2001-09-28 15:59:38 +0000 | [diff] [blame] | 3114 | LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3115 | ;; |
| 3116 | BeOS*) |
| 3117 | BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY" |
Guido van Rossum | ce608b0 | 2001-09-28 15:59:38 +0000 | [diff] [blame] | 3118 | LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3119 | ;; |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3120 | IRIX/5*) LDSHARED="ld -shared";; |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 3121 | IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3122 | SunOS/4*) LDSHARED="ld";; |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3123 | SunOS/5*) |
| 3124 | if test "$GCC" = "yes" |
Neil Schemenauer | 8ba9445 | 2001-02-19 18:18:48 +0000 | [diff] [blame] | 3125 | then LDSHARED='$(CC) -shared' |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3126 | else LDSHARED="$(CC) -G"; |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3127 | fi ;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3128 | hp*|HP*) LDSHARED="ld -b";; |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3129 | OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; |
| 3130 | DYNIX/ptx*) LDSHARED="ld -G";; |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3131 | Darwin/1.4*) |
| 3132 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3133 | if test "$enable_framework" ; then |
| 3134 | # Link against the framework. All externals should be defined. |
| 3135 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3136 | else |
| 3137 | # No framework. Ignore undefined symbols, assuming they come from Python |
| 3138 | LDSHARED="$LDSHARED -flat_namespace -undefined suppress" |
| 3139 | fi ;; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3140 | Darwin/*) |
| 3141 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3142 | if test "$enable_framework" ; then |
| 3143 | # Link against the framework. All externals should be defined. |
| 3144 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3145 | else |
| 3146 | # No framework. Ignore undefined symbols, assuming they come from Python |
| 3147 | LDSHARED="$LDSHARED -undefined suppress" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3148 | fi ;; |
Guido van Rossum | 81652ab | 1996-07-21 02:53:27 +0000 | [diff] [blame] | 3149 | Linux*) LDSHARED="gcc -shared";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 3150 | dgux*) LDSHARED="ld -G";; |
Guido van Rossum | 458e7fa | 1999-09-17 15:40:40 +0000 | [diff] [blame] | 3151 | BSD/OS*/4*) LDSHARED="gcc -shared";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3152 | OpenBSD*|NetBSD*|FreeBSD*) |
Jeremy Hylton | 4bcc7c5 | 2000-08-31 17:45:35 +0000 | [diff] [blame] | 3153 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3154 | then |
| 3155 | LDSHARED="cc -shared ${LDFLAGS}" |
| 3156 | else |
| 3157 | LDSHARED="ld -Bshareable ${LDFLAGS}" |
| 3158 | fi;; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3159 | OpenUNIX*|UnixWare*) |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3160 | if test "$GCC" = "yes" |
| 3161 | then LDSHARED="$(CC) -shared" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3162 | else LDSHARED="$(CC) -G" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3163 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3164 | SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3165 | Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3166 | CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3167 | *) LDSHARED="ld";; |
| 3168 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3169 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3170 | echo "$ac_t""$LDSHARED" 1>&6 |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3171 | BLDSHARED=${BLDSHARED-$LDSHARED} |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3172 | # 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] | 3173 | # library (module) -- this is only needed for a few systems |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3174 | echo $ac_n "checking CCSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3175 | echo "configure:3176: checking CCSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3176 | if test -z "$CCSHARED" |
| 3177 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3178 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 3179 | SunOS*) if test "$GCC" = yes; |
| 3180 | then CCSHARED="-fPIC"; |
| 3181 | fi;; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3182 | hp*|HP*) if test "$GCC" = yes; |
Martin v. Löwis | 703ad70 | 2001-09-05 08:36:52 +0000 | [diff] [blame] | 3183 | then CCSHARED="-fPIC"; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3184 | else CCSHARED="+z"; |
| 3185 | fi;; |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3186 | Linux*) CCSHARED="-fPIC";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3187 | BSD/OS*/4*) CCSHARED="-fpic";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3188 | FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3189 | OpenUNIX*|UnixWare*) |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3190 | if test "$GCC" = "yes" |
| 3191 | then CCSHARED="-fPIC" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3192 | else CCSHARED="-KPIC" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3193 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3194 | SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3195 | Monterey*) CCSHARED="-G";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3196 | IRIX*/6*) case $CC in |
| 3197 | *gcc*) CCSHARED="-shared";; |
Guido van Rossum | ee21f41 | 1998-04-20 18:51:54 +0000 | [diff] [blame] | 3198 | *) CCSHARED="";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3199 | esac;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3200 | CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3201 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3202 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3203 | echo "$ac_t""$CCSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3204 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3205 | # the python executable -- this is only needed for a few systems |
| 3206 | echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3207 | echo "configure:3208: checking LINKFORSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3208 | if test -z "$LINKFORSHARED" |
| 3209 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3210 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3211 | AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 3212 | hp*|HP*) |
Guido van Rossum | 304dd2d | 1997-10-20 23:10:56 +0000 | [diff] [blame] | 3213 | LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3214 | BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 2d9feed | 1997-11-24 17:36:21 +0000 | [diff] [blame] | 3215 | Linux*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3216 | # -u libsys_s pulls in all symbols in libsys |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3217 | Darwin/*) |
| 3218 | # -u __dummy makes the linker aware of the objc runtime |
| 3219 | # in System.framework; otherwise, __objcInit (referenced in |
| 3220 | # crt1.o) gets erroneously defined as common, which breaks dynamic |
| 3221 | # loading of any modules which reference it in System.framework. |
| 3222 | # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is |
| 3223 | # not used by the core itself but which needs to be in the core so |
| 3224 | # that dynamically loaded extension modules have access to it. |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3225 | LINKFORSHARED="$extra_undefs -framework System" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3226 | if test "$enable_framework" |
| 3227 | then |
| 3228 | LINKFORSHARED="$LINKFORSHARED -framework Python" |
| 3229 | fi |
| 3230 | LINKFORSHARED="$LINKFORSHARED $extra_frameworks";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3231 | OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3232 | SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3233 | ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3234 | FreeBSD*|NetBSD*|OpenBSD*) |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 3235 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 3236 | then |
| 3237 | LINKFORSHARED="-Wl,--export-dynamic" |
| 3238 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3239 | SunOS/5*) case $CC in |
| 3240 | *gcc*) |
Guido van Rossum | ff48418 | 2000-02-03 13:50:24 +0000 | [diff] [blame] | 3241 | if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 3242 | then |
| 3243 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3244 | fi;; |
| 3245 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3246 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3247 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3248 | echo "$ac_t""$LINKFORSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3249 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3250 | |
| 3251 | echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3252 | echo "configure:3253: checking CFLAGSFORSHARED" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3253 | if test ! "$LIBRARY" = "$LDLIBRARY" |
| 3254 | then |
Neil Schemenauer | 0c6141f | 2001-01-27 21:40:54 +0000 | [diff] [blame] | 3255 | case $ac_sys_system in |
| 3256 | CYGWIN*) |
| 3257 | # Cygwin needs CCSHARED when building extension DLLs |
| 3258 | # but not when building the interpreter DLL. |
| 3259 | CFLAGSFORSHARED='';; |
| 3260 | *) |
| 3261 | CFLAGSFORSHARED='$(CCSHARED)' |
| 3262 | esac |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3263 | fi |
| 3264 | echo "$ac_t""$CFLAGSFORSHARED" 1>&6 |
| 3265 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3266 | # checks for libraries |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3267 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3268 | echo "configure:3269: checking for dlopen in -ldl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3269 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3270 | 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] | 3271 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3272 | else |
| 3273 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3274 | LIBS="-ldl $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3275 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3276 | #line 3277 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3277 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3278 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3279 | /* We use char because int might match the return type of a gcc2 |
| 3280 | builtin and then its argument prototype would still apply. */ |
| 3281 | char dlopen(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3282 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3283 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3284 | dlopen() |
| 3285 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3286 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3287 | if { (eval echo configure:3288: \"$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] | 3288 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3289 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3290 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3291 | echo "configure: failed program was:" >&5 |
| 3292 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3293 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3294 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3295 | fi |
| 3296 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3297 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3298 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3299 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3300 | 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] | 3301 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3302 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3303 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3304 | cat >> confdefs.h <<EOF |
| 3305 | #define $ac_tr_lib 1 |
| 3306 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3307 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3308 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3309 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3310 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3311 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3312 | fi |
| 3313 | # Dynamic linking for SunOS/Solaris and SYSV |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3314 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3315 | echo "configure:3316: checking for shl_load in -ldld" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3316 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3317 | 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] | 3318 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3319 | else |
| 3320 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3321 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3322 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3323 | #line 3324 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3324 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3325 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3326 | /* We use char because int might match the return type of a gcc2 |
| 3327 | builtin and then its argument prototype would still apply. */ |
| 3328 | char shl_load(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3329 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3330 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3331 | shl_load() |
| 3332 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3333 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3334 | if { (eval echo configure:3335: \"$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] | 3335 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3336 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3337 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3338 | echo "configure: failed program was:" >&5 |
| 3339 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3340 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3341 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3342 | fi |
| 3343 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3344 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3345 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3346 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3347 | 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] | 3348 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3349 | ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3350 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3351 | cat >> confdefs.h <<EOF |
| 3352 | #define $ac_tr_lib 1 |
| 3353 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3354 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3355 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3356 | |
| 3357 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3358 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3359 | fi |
| 3360 | # Dynamic linking for HP-UX |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3361 | |
| 3362 | # checks for system dependent C++ extensions support |
| 3363 | case "$ac_sys_system" in |
| 3364 | AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3365 | echo "configure:3366: checking for genuine AIX C++ extensions support" >&5 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3366 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3367 | #line 3368 "configure" |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3368 | #include "confdefs.h" |
| 3369 | #include "/usr/lpp/xlC/include/load.h" |
| 3370 | int main() { |
| 3371 | loadAndInit("", 0, "") |
| 3372 | ; return 0; } |
| 3373 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3374 | if { (eval echo configure:3375: \"$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] | 3375 | rm -rf conftest* |
| 3376 | cat >> confdefs.h <<\EOF |
| 3377 | #define AIX_GENUINE_CPLUSPLUS 1 |
| 3378 | EOF |
| 3379 | |
| 3380 | echo "$ac_t""yes" 1>&6 |
| 3381 | else |
| 3382 | echo "configure: failed program was:" >&5 |
| 3383 | cat conftest.$ac_ext >&5 |
| 3384 | rm -rf conftest* |
| 3385 | echo "$ac_t""no" 1>&6 |
| 3386 | fi |
| 3387 | rm -f conftest*;; |
| 3388 | *) ;; |
| 3389 | esac |
| 3390 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3391 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
| 3392 | # However on SGI IRIX, these exist but are broken. |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3393 | # BeOS' sockets are stashed in libnet. |
| 3394 | case "$ac_sys_system" in |
| 3395 | IRIX*) ;; |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3396 | *) |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3397 | echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3398 | echo "configure:3399: checking for t_open in -lnsl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3399 | ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3400 | 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] | 3401 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3402 | else |
| 3403 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3404 | LIBS="-lnsl $LIBS" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3405 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3406 | #line 3407 "configure" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3407 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3408 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3409 | /* We use char because int might match the return type of a gcc2 |
| 3410 | builtin and then its argument prototype would still apply. */ |
| 3411 | char t_open(); |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3412 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3413 | int main() { |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3414 | t_open() |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3415 | ; return 0; } |
| 3416 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3417 | if { (eval echo configure:3418: \"$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] | 3418 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3419 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3420 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3421 | echo "configure: failed program was:" >&5 |
| 3422 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3423 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3424 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3425 | fi |
| 3426 | rm -f conftest* |
| 3427 | LIBS="$ac_save_LIBS" |
| 3428 | |
| 3429 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3430 | 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] | 3431 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3432 | LIBS="-lnsl $LIBS" |
| 3433 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3434 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3435 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3436 | # SVR4 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3437 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3438 | echo "configure:3439: checking for socket in -lsocket" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3439 | ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3440 | 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] | 3441 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3442 | else |
| 3443 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3444 | LIBS="-lsocket $LIBS $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3445 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3446 | #line 3447 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3447 | #include "confdefs.h" |
| 3448 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3449 | /* We use char because int might match the return type of a gcc2 |
| 3450 | builtin and then its argument prototype would still apply. */ |
| 3451 | char socket(); |
| 3452 | |
| 3453 | int main() { |
| 3454 | socket() |
| 3455 | ; return 0; } |
| 3456 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3457 | if { (eval echo configure:3458: \"$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] | 3458 | rm -rf conftest* |
| 3459 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3460 | else |
| 3461 | echo "configure: failed program was:" >&5 |
| 3462 | cat conftest.$ac_ext >&5 |
| 3463 | rm -rf conftest* |
| 3464 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3465 | fi |
| 3466 | rm -f conftest* |
| 3467 | LIBS="$ac_save_LIBS" |
| 3468 | |
| 3469 | fi |
| 3470 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3471 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3472 | LIBS="-lsocket $LIBS" |
| 3473 | else |
| 3474 | echo "$ac_t""no" 1>&6 |
| 3475 | fi |
| 3476 | # SVR4 sockets |
Jeremy Hylton | cb25d5e | 2000-07-27 21:23:28 +0000 | [diff] [blame] | 3477 | ;; |
| 3478 | esac |
| 3479 | case "$ac_sys_system" in |
| 3480 | BeOS*) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3481 | echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3482 | echo "configure:3483: checking for socket in -lnet" >&5 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3483 | ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3484 | 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] | 3485 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3486 | else |
| 3487 | ac_save_LIBS="$LIBS" |
| 3488 | LIBS="-lnet $LIBS $LIBS" |
| 3489 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3490 | #line 3491 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3491 | #include "confdefs.h" |
| 3492 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3493 | /* We use char because int might match the return type of a gcc2 |
| 3494 | builtin and then its argument prototype would still apply. */ |
| 3495 | char socket(); |
| 3496 | |
| 3497 | int main() { |
| 3498 | socket() |
| 3499 | ; return 0; } |
| 3500 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3501 | if { (eval echo configure:3502: \"$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] | 3502 | rm -rf conftest* |
| 3503 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3504 | else |
| 3505 | echo "configure: failed program was:" >&5 |
| 3506 | cat conftest.$ac_ext >&5 |
| 3507 | rm -rf conftest* |
| 3508 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3509 | fi |
| 3510 | rm -f conftest* |
| 3511 | LIBS="$ac_save_LIBS" |
| 3512 | |
| 3513 | fi |
| 3514 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3515 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3516 | LIBS="-lnet $LIBS" |
| 3517 | else |
| 3518 | echo "$ac_t""no" 1>&6 |
| 3519 | fi |
| 3520 | # BeOS |
| 3521 | ;; |
| 3522 | esac |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3523 | |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3524 | echo $ac_n "checking for --with-libs""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3525 | echo "configure:3526: checking for --with-libs" >&5 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3526 | # Check whether --with-libs or --without-libs was given. |
| 3527 | if test "${with_libs+set}" = set; then |
| 3528 | withval="$with_libs" |
| 3529 | |
| 3530 | echo "$ac_t""$withval" 1>&6 |
| 3531 | LIBS="$withval $LIBS" |
| 3532 | |
| 3533 | else |
| 3534 | echo "$ac_t""no" 1>&6 |
| 3535 | fi |
| 3536 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3537 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3538 | # Determine if signalmodule should be used. |
| 3539 | |
| 3540 | |
| 3541 | echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3542 | echo "configure:3543: checking for --with-signal-module" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3543 | # Check whether --with-signal-module or --without-signal-module was given. |
| 3544 | if test "${with_signal_module+set}" = set; then |
| 3545 | withval="$with_signal_module" |
| 3546 | : |
| 3547 | fi |
| 3548 | |
| 3549 | |
| 3550 | if test -z "$with_signal_module" |
| 3551 | then with_signal_module="yes" |
| 3552 | fi |
| 3553 | echo "$ac_t""$with_signal_module" 1>&6 |
| 3554 | |
| 3555 | if test "${with_signal_module}" = "yes"; then |
| 3556 | USE_SIGNAL_MODULE="" |
| 3557 | SIGNAL_OBJS="" |
| 3558 | else |
| 3559 | USE_SIGNAL_MODULE="#" |
| 3560 | SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o" |
| 3561 | fi |
| 3562 | |
Guido van Rossum | 3d15bd8 | 2001-01-10 18:53:48 +0000 | [diff] [blame] | 3563 | # This is used to generate Setup.config |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3564 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3565 | USE_THREAD_MODULE="" |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3566 | |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3567 | echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3568 | echo "configure:3569: checking for --with-dec-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3569 | |
| 3570 | # Check whether --with-dec-threads or --without-dec-threads was given. |
| 3571 | if test "${with_dec_threads+set}" = set; then |
| 3572 | withval="$with_dec_threads" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3573 | |
| 3574 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3575 | LDLAST=-threads |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3576 | if test "${with_thread+set}" != set; then |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3577 | with_thread="$withval"; |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3578 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3579 | else |
| 3580 | echo "$ac_t""no" 1>&6 |
| 3581 | fi |
| 3582 | |
| 3583 | |
| 3584 | echo $ac_n "checking for --with-threads""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3585 | echo "configure:3586: checking for --with-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3586 | # Check whether --with-threads or --without-threads was given. |
| 3587 | if test "${with_threads+set}" = set; then |
| 3588 | withval="$with_threads" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3589 | : |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3590 | fi |
| 3591 | |
| 3592 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3593 | # --with-thread is deprecated, but check for it anyway |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3594 | # Check whether --with-thread or --without-thread was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3595 | if test "${with_thread+set}" = set; then |
| 3596 | withval="$with_thread" |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 3597 | |
| 3598 | with_threads=$with_thread |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3599 | fi |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3600 | |
| 3601 | |
| 3602 | if test -z "$with_threads" |
| 3603 | then with_threads="yes" |
| 3604 | fi |
| 3605 | echo "$ac_t""$with_threads" 1>&6 |
| 3606 | |
| 3607 | if test "$with_threads" = "no" |
| 3608 | then |
| 3609 | USE_THREAD_MODULE="#" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3610 | elif test "$ac_cv_pthread_is_default" = yes |
| 3611 | then |
| 3612 | cat >> confdefs.h <<\EOF |
| 3613 | #define WITH_THREAD 1 |
| 3614 | EOF |
| 3615 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3616 | # Defining _REENTRANT on system with POSIX threads should not hurt. |
| 3617 | cat >> confdefs.h <<\EOF |
| 3618 | #define _REENTRANT 1 |
| 3619 | EOF |
| 3620 | |
| 3621 | posix_threads=yes |
| 3622 | LIBOBJS="$LIBOBJS thread.o" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3623 | elif test "$ac_cv_kpthread" = "yes" |
| 3624 | then |
| 3625 | CC="$CC -Kpthread" |
| 3626 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3627 | #define WITH_THREAD 1 |
| 3628 | EOF |
| 3629 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3630 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3631 | LIBOBJS="$LIBOBJS thread.o" |
| 3632 | else |
| 3633 | if test ! -z "$with_threads" -a -d "$with_threads" |
| 3634 | then LDFLAGS="$LDFLAGS -L$with_threads" |
| 3635 | fi |
| 3636 | if test ! -z "$withval" -a -d "$withval" |
| 3637 | then LDFLAGS="$LDFLAGS -L$withval" |
| 3638 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3639 | |
| 3640 | # According to the POSIX spec, a pthreads implementation must |
| 3641 | # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?) |
| 3642 | echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6 |
| 3643 | echo "configure:3644: checking for _POSIX_THREADS in unistd.h" >&5 |
| 3644 | cat > conftest.$ac_ext <<EOF |
| 3645 | #line 3646 "configure" |
| 3646 | #include "confdefs.h" |
| 3647 | #include <unistd.h> |
| 3648 | #ifdef _POSIX_THREADS |
| 3649 | yes |
| 3650 | #endif |
| 3651 | |
| 3652 | EOF |
| 3653 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 3654 | egrep "yes" >/dev/null 2>&1; then |
| 3655 | rm -rf conftest* |
| 3656 | unistd_defines_pthreads=yes |
| 3657 | else |
| 3658 | rm -rf conftest* |
| 3659 | unistd_defines_pthreads=no |
| 3660 | fi |
| 3661 | rm -f conftest* |
| 3662 | |
| 3663 | echo "$ac_t""$unistd_defines_pthreads" 1>&6 |
| 3664 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3665 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 3666 | #define _REENTRANT 1 |
| 3667 | EOF |
| 3668 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3669 | ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3670 | echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3671 | echo "configure:3672: checking for mach/cthreads.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3672 | 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] | 3673 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3674 | else |
| 3675 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3676 | #line 3677 "configure" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3677 | #include "confdefs.h" |
| 3678 | #include <mach/cthreads.h> |
| 3679 | EOF |
| 3680 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3681 | { (eval echo configure:3682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3682 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3683 | if test -z "$ac_err"; then |
| 3684 | rm -rf conftest* |
| 3685 | eval "ac_cv_header_$ac_safe=yes" |
| 3686 | else |
| 3687 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3688 | echo "configure: failed program was:" >&5 |
| 3689 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3690 | rm -rf conftest* |
| 3691 | eval "ac_cv_header_$ac_safe=no" |
| 3692 | fi |
| 3693 | rm -f conftest* |
| 3694 | fi |
| 3695 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3696 | echo "$ac_t""yes" 1>&6 |
| 3697 | cat >> confdefs.h <<\EOF |
| 3698 | #define WITH_THREAD 1 |
| 3699 | EOF |
| 3700 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3701 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3702 | #define C_THREADS 1 |
| 3703 | EOF |
| 3704 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3705 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3706 | else |
| 3707 | echo "$ac_t""no" 1>&6 |
| 3708 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3709 | echo $ac_n "checking for --with-pth""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3710 | echo "configure:3711: checking for --with-pth" >&5 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3711 | # Check whether --with-pth or --without-pth was given. |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3712 | if test "${with_pth+set}" = set; then |
| 3713 | withval="$with_pth" |
| 3714 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3715 | echo "$ac_t""$withval" 1>&6 |
| 3716 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3717 | #define WITH_THREAD 1 |
| 3718 | EOF |
| 3719 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3720 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3721 | #define HAVE_PTH 1 |
| 3722 | EOF |
| 3723 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3724 | LIBS="-lpth $LIBS" |
| 3725 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3726 | else |
| 3727 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3728 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3729 | |
| 3730 | # Just looking for pthread_create in libpthread is not enough: |
| 3731 | # on HP/UX, pthread.h renames pthread_create to a different symbol name. |
| 3732 | # So we really have to include pthread.h, and then link. |
| 3733 | _libs=$LIBS |
| 3734 | LIBS="$LIBS -lpthread" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3735 | echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3736 | echo "configure:3737: checking for pthread_create in -lpthread" >&5 |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3737 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3738 | #line 3739 "configure" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3739 | #include "confdefs.h" |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3740 | #include <pthread.h> |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3741 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3742 | void * start_routine (void *arg) { exit (0); } |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3743 | int main() { |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3744 | |
| 3745 | pthread_create (NULL, NULL, start_routine, NULL) |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3746 | ; return 0; } |
| 3747 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3748 | if { (eval echo configure:3749: \"$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] | 3749 | rm -rf conftest* |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3750 | |
| 3751 | echo "$ac_t""yes" 1>&6 |
| 3752 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3753 | #define WITH_THREAD 1 |
| 3754 | EOF |
| 3755 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3756 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3757 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3758 | else |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3759 | echo "configure: failed program was:" >&5 |
| 3760 | cat conftest.$ac_ext >&5 |
| 3761 | rm -rf conftest* |
| 3762 | |
| 3763 | LIBS=$_libs |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3764 | echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3765 | echo "configure:3766: checking for pthread_detach" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3766 | 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] | 3767 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3768 | else |
| 3769 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3770 | #line 3771 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3771 | #include "confdefs.h" |
| 3772 | /* System header to define __stub macros and hopefully few prototypes, |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3773 | which can conflict with char pthread_detach(); below. */ |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3774 | #include <assert.h> |
| 3775 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3776 | /* We use char because int might match the return type of a gcc2 |
| 3777 | builtin and then its argument prototype would still apply. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3778 | char pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3779 | |
| 3780 | int main() { |
| 3781 | |
| 3782 | /* The GNU C library defines this for functions which it implements |
| 3783 | to always fail with ENOSYS. Some functions are actually named |
| 3784 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3785 | #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3786 | choke me |
| 3787 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3788 | pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3789 | #endif |
| 3790 | |
| 3791 | ; return 0; } |
| 3792 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3793 | if { (eval echo configure:3794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3794 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3795 | eval "ac_cv_func_pthread_detach=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3796 | else |
| 3797 | echo "configure: failed program was:" >&5 |
| 3798 | cat conftest.$ac_ext >&5 |
| 3799 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3800 | eval "ac_cv_func_pthread_detach=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3801 | fi |
| 3802 | rm -f conftest* |
| 3803 | fi |
| 3804 | |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3805 | if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3806 | echo "$ac_t""yes" 1>&6 |
| 3807 | cat >> confdefs.h <<\EOF |
| 3808 | #define WITH_THREAD 1 |
| 3809 | EOF |
| 3810 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3811 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3812 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3813 | else |
| 3814 | echo "$ac_t""no" 1>&6 |
| 3815 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3816 | ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3817 | echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3818 | echo "configure:3819: checking for kernel/OS.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3819 | 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] | 3820 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3821 | else |
| 3822 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3823 | #line 3824 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3824 | #include "confdefs.h" |
| 3825 | #include <kernel/OS.h> |
| 3826 | EOF |
| 3827 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3828 | { (eval echo configure:3829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3829 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3830 | if test -z "$ac_err"; then |
| 3831 | rm -rf conftest* |
| 3832 | eval "ac_cv_header_$ac_safe=yes" |
| 3833 | else |
| 3834 | echo "$ac_err" >&5 |
| 3835 | echo "configure: failed program was:" >&5 |
| 3836 | cat conftest.$ac_ext >&5 |
| 3837 | rm -rf conftest* |
| 3838 | eval "ac_cv_header_$ac_safe=no" |
| 3839 | fi |
| 3840 | rm -f conftest* |
| 3841 | fi |
| 3842 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3843 | echo "$ac_t""yes" 1>&6 |
| 3844 | cat >> confdefs.h <<\EOF |
| 3845 | #define WITH_THREAD 1 |
| 3846 | EOF |
| 3847 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3848 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3849 | #define BEOS_THREADS 1 |
| 3850 | EOF |
| 3851 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3852 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3853 | else |
| 3854 | echo "$ac_t""no" 1>&6 |
| 3855 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3856 | echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3857 | echo "configure:3858: checking for pthread_create in -lpthreads" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3858 | ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3859 | 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] | 3860 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3861 | else |
| 3862 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3863 | LIBS="-lpthreads $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3864 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3865 | #line 3866 "configure" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3866 | #include "confdefs.h" |
| 3867 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3868 | /* We use char because int might match the return type of a gcc2 |
| 3869 | builtin and then its argument prototype would still apply. */ |
| 3870 | char pthread_create(); |
| 3871 | |
| 3872 | int main() { |
| 3873 | pthread_create() |
| 3874 | ; return 0; } |
| 3875 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3876 | if { (eval echo configure:3877: \"$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] | 3877 | rm -rf conftest* |
| 3878 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3879 | else |
| 3880 | echo "configure: failed program was:" >&5 |
| 3881 | cat conftest.$ac_ext >&5 |
| 3882 | rm -rf conftest* |
| 3883 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3884 | fi |
| 3885 | rm -f conftest* |
| 3886 | LIBS="$ac_save_LIBS" |
| 3887 | |
| 3888 | fi |
| 3889 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3890 | echo "$ac_t""yes" 1>&6 |
| 3891 | cat >> confdefs.h <<\EOF |
| 3892 | #define WITH_THREAD 1 |
| 3893 | EOF |
| 3894 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3895 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3896 | LIBS="$LIBS -lpthreads" |
| 3897 | LIBOBJS="$LIBOBJS thread.o" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3898 | else |
| 3899 | echo "$ac_t""no" 1>&6 |
| 3900 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3901 | echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3902 | echo "configure:3903: checking for pthread_create in -lc_r" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3903 | ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3904 | 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] | 3905 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3906 | else |
| 3907 | ac_save_LIBS="$LIBS" |
| 3908 | LIBS="-lc_r $LIBS" |
| 3909 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3910 | #line 3911 "configure" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3911 | #include "confdefs.h" |
| 3912 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3913 | /* We use char because int might match the return type of a gcc2 |
| 3914 | builtin and then its argument prototype would still apply. */ |
| 3915 | char pthread_create(); |
| 3916 | |
| 3917 | int main() { |
| 3918 | pthread_create() |
| 3919 | ; return 0; } |
| 3920 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3921 | if { (eval echo configure:3922: \"$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] | 3922 | rm -rf conftest* |
| 3923 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3924 | else |
| 3925 | echo "configure: failed program was:" >&5 |
| 3926 | cat conftest.$ac_ext >&5 |
| 3927 | rm -rf conftest* |
| 3928 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3929 | fi |
| 3930 | rm -f conftest* |
| 3931 | LIBS="$ac_save_LIBS" |
| 3932 | |
| 3933 | fi |
| 3934 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3935 | echo "$ac_t""yes" 1>&6 |
| 3936 | cat >> confdefs.h <<\EOF |
| 3937 | #define WITH_THREAD 1 |
| 3938 | EOF |
| 3939 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3940 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3941 | LIBS="$LIBS -lc_r" |
| 3942 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3943 | else |
| 3944 | echo "$ac_t""no" 1>&6 |
| 3945 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3946 | echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3947 | echo "configure:3948: checking for __d6_pthread_create in -lthread" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3948 | ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3949 | 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] | 3950 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3951 | else |
| 3952 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3953 | LIBS="-lthread $LIBS" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3954 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3955 | #line 3956 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3956 | #include "confdefs.h" |
| 3957 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3958 | /* We use char because int might match the return type of a gcc2 |
| 3959 | builtin and then its argument prototype would still apply. */ |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3960 | char __d6_pthread_create(); |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3961 | |
| 3962 | int main() { |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3963 | __d6_pthread_create() |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3964 | ; return 0; } |
| 3965 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3966 | if { (eval echo configure:3967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3967 | rm -rf conftest* |
| 3968 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3969 | else |
| 3970 | echo "configure: failed program was:" >&5 |
| 3971 | cat conftest.$ac_ext >&5 |
| 3972 | rm -rf conftest* |
| 3973 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3974 | fi |
| 3975 | rm -f conftest* |
| 3976 | LIBS="$ac_save_LIBS" |
| 3977 | |
| 3978 | fi |
| 3979 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3980 | echo "$ac_t""yes" 1>&6 |
| 3981 | cat >> confdefs.h <<\EOF |
| 3982 | #define WITH_THREAD 1 |
| 3983 | EOF |
| 3984 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3985 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3986 | LIBS="$LIBS -lthread" |
| 3987 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3988 | else |
| 3989 | echo "$ac_t""no" 1>&6 |
| 3990 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3991 | echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3992 | echo "configure:3993: checking for __pthread_create_system in -lpthread" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3993 | ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` |
| 3994 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3995 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3996 | else |
| 3997 | ac_save_LIBS="$LIBS" |
| 3998 | LIBS="-lpthread $LIBS" |
| 3999 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4000 | #line 4001 "configure" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4001 | #include "confdefs.h" |
| 4002 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4003 | /* We use char because int might match the return type of a gcc2 |
| 4004 | builtin and then its argument prototype would still apply. */ |
| 4005 | char __pthread_create_system(); |
| 4006 | |
| 4007 | int main() { |
| 4008 | __pthread_create_system() |
| 4009 | ; return 0; } |
| 4010 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4011 | if { (eval echo configure:4012: \"$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] | 4012 | rm -rf conftest* |
| 4013 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4014 | else |
| 4015 | echo "configure: failed program was:" >&5 |
| 4016 | cat conftest.$ac_ext >&5 |
| 4017 | rm -rf conftest* |
| 4018 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4019 | fi |
| 4020 | rm -f conftest* |
| 4021 | LIBS="$ac_save_LIBS" |
| 4022 | |
| 4023 | fi |
| 4024 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4025 | echo "$ac_t""yes" 1>&6 |
| 4026 | cat >> confdefs.h <<\EOF |
| 4027 | #define WITH_THREAD 1 |
| 4028 | EOF |
| 4029 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4030 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4031 | LIBS="$LIBS -lpthread" |
| 4032 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4033 | else |
| 4034 | echo "$ac_t""no" 1>&6 |
| 4035 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4036 | echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4037 | echo "configure:4038: checking for pthread_create in -lcma" >&5 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4038 | ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4039 | 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] | 4040 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4041 | else |
| 4042 | ac_save_LIBS="$LIBS" |
| 4043 | LIBS="-lcma $LIBS" |
| 4044 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4045 | #line 4046 "configure" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4046 | #include "confdefs.h" |
| 4047 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4048 | /* We use char because int might match the return type of a gcc2 |
| 4049 | builtin and then its argument prototype would still apply. */ |
| 4050 | char pthread_create(); |
| 4051 | |
| 4052 | int main() { |
| 4053 | pthread_create() |
| 4054 | ; return 0; } |
| 4055 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4056 | if { (eval echo configure:4057: \"$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] | 4057 | rm -rf conftest* |
| 4058 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4059 | else |
| 4060 | echo "configure: failed program was:" >&5 |
| 4061 | cat conftest.$ac_ext >&5 |
| 4062 | rm -rf conftest* |
| 4063 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4064 | fi |
| 4065 | rm -f conftest* |
| 4066 | LIBS="$ac_save_LIBS" |
| 4067 | |
| 4068 | fi |
| 4069 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4070 | echo "$ac_t""yes" 1>&6 |
| 4071 | cat >> confdefs.h <<\EOF |
| 4072 | #define WITH_THREAD 1 |
| 4073 | EOF |
| 4074 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4075 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4076 | LIBS="$LIBS -lcma" |
| 4077 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4078 | else |
| 4079 | echo "$ac_t""no" 1>&6 |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 4080 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4081 | USE_THREAD_MODULE="#" |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 4082 | fi |
| 4083 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4084 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4085 | fi |
| 4086 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 4087 | fi |
| 4088 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4089 | fi |
| 4090 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4091 | fi |
| 4092 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4093 | fi |
| 4094 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4095 | fi |
| 4096 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4097 | fi |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 4098 | rm -f conftest* |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4099 | fi |
| 4100 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4101 | fi |
| 4102 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4103 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4104 | if test "$posix_threads" = "yes"; then |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4105 | if test "$unistd_defines_pthreads" = "no"; then |
| 4106 | cat >> confdefs.h <<\EOF |
| 4107 | #define _POSIX_THREADS 1 |
| 4108 | EOF |
| 4109 | |
| 4110 | fi |
| 4111 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4112 | echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4113 | echo "configure:4114: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4114 | if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then |
| 4115 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4116 | else |
| 4117 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 4118 | ac_cv_pthread_system_supported=no |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4119 | else |
| 4120 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4121 | #line 4122 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4122 | #include "confdefs.h" |
| 4123 | #include <pthread.h> |
| 4124 | void *foo(void *parm) { |
| 4125 | return NULL; |
| 4126 | } |
| 4127 | main() { |
| 4128 | pthread_attr_t attr; |
| 4129 | if (pthread_attr_init(&attr)) exit(-1); |
| 4130 | if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1); |
| 4131 | if (pthread_create(NULL, &attr, foo, NULL)) exit(-1); |
| 4132 | exit(0); |
| 4133 | } |
| 4134 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4135 | if { (eval echo configure:4136: \"$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] | 4136 | then |
| 4137 | ac_cv_pthread_system_supported=yes |
| 4138 | else |
| 4139 | echo "configure: failed program was:" >&5 |
| 4140 | cat conftest.$ac_ext >&5 |
| 4141 | rm -fr conftest* |
| 4142 | ac_cv_pthread_system_supported=no |
| 4143 | fi |
| 4144 | rm -fr conftest* |
| 4145 | fi |
| 4146 | |
| 4147 | |
| 4148 | fi |
| 4149 | |
| 4150 | echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6 |
| 4151 | if test "$ac_cv_pthread_system_supported" = "yes"; then |
| 4152 | cat >> confdefs.h <<\EOF |
| 4153 | #define PTHREAD_SYSTEM_SCHED_SUPPORTED 1 |
| 4154 | EOF |
| 4155 | |
| 4156 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4157 | for ac_func in pthread_sigmask |
| 4158 | do |
| 4159 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
| 4160 | echo "configure:4161: checking for $ac_func" >&5 |
| 4161 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4162 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4163 | else |
| 4164 | cat > conftest.$ac_ext <<EOF |
| 4165 | #line 4166 "configure" |
| 4166 | #include "confdefs.h" |
| 4167 | /* System header to define __stub macros and hopefully few prototypes, |
| 4168 | which can conflict with char $ac_func(); below. */ |
| 4169 | #include <assert.h> |
| 4170 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4171 | /* We use char because int might match the return type of a gcc2 |
| 4172 | builtin and then its argument prototype would still apply. */ |
| 4173 | char $ac_func(); |
| 4174 | |
| 4175 | int main() { |
| 4176 | |
| 4177 | /* The GNU C library defines this for functions which it implements |
| 4178 | to always fail with ENOSYS. Some functions are actually named |
| 4179 | something starting with __ and the normal name is an alias. */ |
| 4180 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4181 | choke me |
| 4182 | #else |
| 4183 | $ac_func(); |
| 4184 | #endif |
| 4185 | |
| 4186 | ; return 0; } |
| 4187 | EOF |
| 4188 | if { (eval echo configure:4189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
| 4189 | rm -rf conftest* |
| 4190 | eval "ac_cv_func_$ac_func=yes" |
| 4191 | else |
| 4192 | echo "configure: failed program was:" >&5 |
| 4193 | cat conftest.$ac_ext >&5 |
| 4194 | rm -rf conftest* |
| 4195 | eval "ac_cv_func_$ac_func=no" |
| 4196 | fi |
| 4197 | rm -f conftest* |
| 4198 | fi |
| 4199 | |
| 4200 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4201 | echo "$ac_t""yes" 1>&6 |
| 4202 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4203 | cat >> confdefs.h <<EOF |
| 4204 | #define $ac_tr_func 1 |
| 4205 | EOF |
| 4206 | |
| 4207 | else |
| 4208 | echo "$ac_t""no" 1>&6 |
| 4209 | fi |
| 4210 | done |
| 4211 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4212 | fi |
| 4213 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4214 | echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4215 | echo "configure:4216: checking for usconfig in -lmpc" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4216 | ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4217 | 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] | 4218 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4219 | else |
| 4220 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4221 | LIBS="-lmpc $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4222 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4223 | #line 4224 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4224 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4225 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4226 | /* We use char because int might match the return type of a gcc2 |
| 4227 | builtin and then its argument prototype would still apply. */ |
| 4228 | char usconfig(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4229 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4230 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4231 | usconfig() |
| 4232 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4233 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4234 | if { (eval echo configure:4235: \"$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] | 4235 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4236 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4237 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4238 | echo "configure: failed program was:" >&5 |
| 4239 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4240 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4241 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4242 | fi |
| 4243 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4244 | LIBS="$ac_save_LIBS" |
| 4245 | |
| 4246 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4247 | 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] | 4248 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4249 | cat >> confdefs.h <<\EOF |
| 4250 | #define WITH_THREAD 1 |
| 4251 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4252 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4253 | LIBS="$LIBS -lmpc" |
| 4254 | LIBOBJS="$LIBOBJS thread.o" |
| 4255 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4256 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4257 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4258 | fi |
| 4259 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4260 | echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4261 | echo "configure:4262: checking for thr_create in -lthread" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4262 | ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4263 | 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] | 4264 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4265 | else |
| 4266 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4267 | LIBS="-lthread $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4268 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4269 | #line 4270 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4270 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4271 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4272 | /* We use char because int might match the return type of a gcc2 |
| 4273 | builtin and then its argument prototype would still apply. */ |
| 4274 | char thr_create(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4275 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4276 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4277 | thr_create() |
| 4278 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4279 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4280 | if { (eval echo configure:4281: \"$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] | 4281 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4282 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4283 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4284 | echo "configure: failed program was:" >&5 |
| 4285 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4286 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4287 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4288 | fi |
| 4289 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4290 | LIBS="$ac_save_LIBS" |
| 4291 | |
| 4292 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4293 | 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] | 4294 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4295 | cat >> confdefs.h <<\EOF |
| 4296 | #define WITH_THREAD 1 |
| 4297 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4298 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4299 | LIBS="$LIBS -lthread" |
| 4300 | LIBOBJS="$LIBOBJS thread.o" |
| 4301 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4302 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4303 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4304 | fi |
| 4305 | |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4306 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4307 | if test "$USE_THREAD_MODULE" != "#" |
| 4308 | then |
| 4309 | # If the above checks didn't disable threads, (at least) OSF1 |
| 4310 | # needs this '-threads' argument during linking. |
| 4311 | case $ac_sys_system in |
| 4312 | OSF1) LDLAST=-threads;; |
| 4313 | esac |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4314 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4315 | fi |
| 4316 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4317 | # Check for enable-ipv6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4318 | echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4319 | echo "configure:4320: checking if --enable-ipv6 is specified" >&5 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4320 | # Check whether --enable-ipv6 or --disable-ipv6 was given. |
| 4321 | if test "${enable_ipv6+set}" = set; then |
| 4322 | enableval="$enable_ipv6" |
| 4323 | case "$enableval" in |
| 4324 | no) |
| 4325 | echo "$ac_t""no" 1>&6 |
| 4326 | ipv6=no |
| 4327 | ;; |
| 4328 | *) echo "$ac_t""yes" 1>&6 |
| 4329 | cat >> confdefs.h <<\EOF |
| 4330 | #define ENABLE_IPV6 1 |
| 4331 | EOF |
| 4332 | |
| 4333 | ipv6=yes |
| 4334 | ;; |
| 4335 | esac |
| 4336 | else |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4337 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4338 | if test "$cross_compiling" = yes; then |
| 4339 | echo "$ac_t""no" 1>&6 |
| 4340 | ipv6=no |
| 4341 | |
| 4342 | else |
| 4343 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4344 | #line 4345 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4345 | #include "confdefs.h" |
| 4346 | /* AF_INET6 available check */ |
| 4347 | #include <sys/types.h> |
| 4348 | #include <sys/socket.h> |
| 4349 | main() |
| 4350 | { |
| 4351 | if (socket(AF_INET6, SOCK_STREAM, 0) < 0) |
| 4352 | exit(1); |
| 4353 | else |
| 4354 | exit(0); |
| 4355 | } |
| 4356 | |
| 4357 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4358 | if { (eval echo configure:4359: \"$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] | 4359 | then |
| 4360 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4361 | ipv6=yes |
| 4362 | else |
| 4363 | echo "configure: failed program was:" >&5 |
| 4364 | cat conftest.$ac_ext >&5 |
| 4365 | rm -fr conftest* |
| 4366 | echo "$ac_t""no" 1>&6 |
| 4367 | ipv6=no |
| 4368 | fi |
| 4369 | rm -fr conftest* |
| 4370 | fi |
| 4371 | |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4372 | |
| 4373 | if test "$ipv6" = "yes"; then |
| 4374 | echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4375 | echo "configure:4376: checking if RFC2553 API is available" >&5 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4376 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4377 | #line 4378 "configure" |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4378 | #include "confdefs.h" |
| 4379 | #include <sys/types.h> |
| 4380 | #include <netinet/in.h> |
| 4381 | int main() { |
| 4382 | struct sockaddr_in6 x; |
| 4383 | x.sin6_scope_id; |
| 4384 | ; return 0; } |
| 4385 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4386 | if { (eval echo configure:4387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4387 | rm -rf conftest* |
| 4388 | echo "$ac_t""yes" 1>&6 |
| 4389 | ipv6=yes |
| 4390 | else |
| 4391 | echo "configure: failed program was:" >&5 |
| 4392 | cat conftest.$ac_ext >&5 |
| 4393 | rm -rf conftest* |
| 4394 | echo "$ac_t""no" 1>&6 |
| 4395 | ipv6=no |
| 4396 | fi |
| 4397 | rm -f conftest* |
| 4398 | fi |
| 4399 | |
| 4400 | if test "$ipv6" = "yes"; then |
| 4401 | cat >> confdefs.h <<\EOF |
| 4402 | #define ENABLE_IPV6 1 |
| 4403 | EOF |
| 4404 | |
| 4405 | fi |
| 4406 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4407 | fi |
| 4408 | |
| 4409 | |
| 4410 | ipv6type=unknown |
| 4411 | ipv6lib=none |
| 4412 | ipv6trylibc=no |
| 4413 | |
| 4414 | if test "$ipv6" = "yes"; then |
| 4415 | echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4416 | echo "configure:4417: checking ipv6 stack type" >&5 |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 4417 | for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; |
| 4418 | do |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4419 | case $i in |
| 4420 | inria) |
| 4421 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4422 | #line 4423 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4423 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4424 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4425 | #include <netinet/in.h> |
| 4426 | #ifdef IPV6_INRIA_VERSION |
| 4427 | yes |
| 4428 | #endif |
| 4429 | EOF |
| 4430 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4431 | egrep "yes" >/dev/null 2>&1; then |
| 4432 | rm -rf conftest* |
| 4433 | ipv6type=$i; |
| 4434 | OPT="-DINET6 $OPT" |
| 4435 | fi |
| 4436 | rm -f conftest* |
| 4437 | |
| 4438 | ;; |
| 4439 | kame) |
| 4440 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4441 | #line 4442 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4442 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4443 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4444 | #include <netinet/in.h> |
| 4445 | #ifdef __KAME__ |
| 4446 | yes |
| 4447 | #endif |
| 4448 | EOF |
| 4449 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4450 | egrep "yes" >/dev/null 2>&1; then |
| 4451 | rm -rf conftest* |
| 4452 | ipv6type=$i; |
| 4453 | ipv6lib=inet6 |
| 4454 | ipv6libdir=/usr/local/v6/lib |
| 4455 | ipv6trylibc=yes |
| 4456 | OPT="-DINET6 $OPT" |
| 4457 | fi |
| 4458 | rm -f conftest* |
| 4459 | |
| 4460 | ;; |
| 4461 | linux-glibc) |
| 4462 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4463 | #line 4464 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4464 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4465 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4466 | #include <features.h> |
| 4467 | #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) |
| 4468 | yes |
| 4469 | #endif |
| 4470 | EOF |
| 4471 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4472 | egrep "yes" >/dev/null 2>&1; then |
| 4473 | rm -rf conftest* |
| 4474 | ipv6type=$i; |
| 4475 | ipv6trylibc=yes |
| 4476 | OPT="-DINET6 $OPT" |
| 4477 | fi |
| 4478 | rm -f conftest* |
| 4479 | |
| 4480 | ;; |
| 4481 | linux-inet6) |
| 4482 | if test -d /usr/inet6; then |
| 4483 | ipv6type=$i |
| 4484 | ipv6lib=inet6 |
| 4485 | ipv6libdir=/usr/inet6/lib |
| 4486 | OPT="-DINET6 -I/usr/inet6/include $OPT" |
| 4487 | fi |
| 4488 | ;; |
| 4489 | solaris) |
| 4490 | if test -f /etc/netconfig; then |
| 4491 | if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then |
| 4492 | ipv6type=$i |
| 4493 | ipv6trylibc=yes |
| 4494 | OPT="-DINET6 $OPT" |
| 4495 | fi |
| 4496 | fi |
| 4497 | ;; |
| 4498 | toshiba) |
| 4499 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4500 | #line 4501 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4501 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4502 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4503 | #include <sys/param.h> |
| 4504 | #ifdef _TOSHIBA_INET6 |
| 4505 | yes |
| 4506 | #endif |
| 4507 | EOF |
| 4508 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4509 | egrep "yes" >/dev/null 2>&1; then |
| 4510 | rm -rf conftest* |
| 4511 | ipv6type=$i; |
| 4512 | ipv6lib=inet6; |
| 4513 | ipv6libdir=/usr/local/v6/lib; |
| 4514 | OPT="-DINET6 $OPT" |
| 4515 | fi |
| 4516 | rm -f conftest* |
| 4517 | |
| 4518 | ;; |
| 4519 | v6d) |
| 4520 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4521 | #line 4522 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4522 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4523 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4524 | #include </usr/local/v6/include/sys/v6config.h> |
| 4525 | #ifdef __V6D__ |
| 4526 | yes |
| 4527 | #endif |
| 4528 | EOF |
| 4529 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4530 | egrep "yes" >/dev/null 2>&1; then |
| 4531 | rm -rf conftest* |
| 4532 | ipv6type=$i; |
| 4533 | ipv6lib=v6; |
| 4534 | ipv6libdir=/usr/local/v6/lib; |
| 4535 | OPT="-I/usr/local/v6/include $OPT" |
| 4536 | fi |
| 4537 | rm -f conftest* |
| 4538 | |
| 4539 | ;; |
| 4540 | zeta) |
| 4541 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4542 | #line 4543 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4543 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4544 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4545 | #include <sys/param.h> |
| 4546 | #ifdef _ZETA_MINAMI_INET6 |
| 4547 | yes |
| 4548 | #endif |
| 4549 | EOF |
| 4550 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4551 | egrep "yes" >/dev/null 2>&1; then |
| 4552 | rm -rf conftest* |
| 4553 | ipv6type=$i; |
| 4554 | ipv6lib=inet6; |
| 4555 | ipv6libdir=/usr/local/v6/lib; |
| 4556 | OPT="-DINET6 $OPT" |
| 4557 | fi |
| 4558 | rm -f conftest* |
| 4559 | |
| 4560 | ;; |
| 4561 | esac |
| 4562 | if test "$ipv6type" != "unknown"; then |
| 4563 | break |
| 4564 | fi |
| 4565 | done |
| 4566 | echo "$ac_t""$ipv6type" 1>&6 |
| 4567 | fi |
| 4568 | |
| 4569 | if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then |
| 4570 | if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then |
| 4571 | LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" |
| 4572 | echo "using lib$ipv6lib" |
| 4573 | else |
| 4574 | if test $ipv6trylibc = "yes"; then |
| 4575 | echo "using libc" |
| 4576 | else |
| 4577 | echo 'Fatal: no $ipv6lib library found. cannot continue.' |
| 4578 | echo "You need to fetch lib$ipv6lib.a from appropriate" |
| 4579 | echo 'ipv6 kit and compile beforehand.' |
| 4580 | exit 1 |
| 4581 | fi |
| 4582 | fi |
| 4583 | fi |
| 4584 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4585 | # Check for GC support |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4586 | echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4587 | echo "configure:4588: checking for --with-cycle-gc" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4588 | # Check whether --with-cycle-gc or --without-cycle-gc was given. |
| 4589 | if test "${with_cycle_gc+set}" = set; then |
| 4590 | withval="$with_cycle_gc" |
| 4591 | : |
| 4592 | fi |
| 4593 | |
| 4594 | |
| 4595 | if test -z "$with_cycle_gc" |
| 4596 | then with_cycle_gc="yes" |
| 4597 | fi |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame] | 4598 | if test "$with_cycle_gc" != "no" |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4599 | then |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4600 | cat >> confdefs.h <<\EOF |
| 4601 | #define WITH_CYCLE_GC 1 |
| 4602 | EOF |
| 4603 | |
| 4604 | fi |
| 4605 | echo "$ac_t""$with_cycle_gc" 1>&6 |
| 4606 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4607 | # Check for Python-specific malloc support |
| 4608 | echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4609 | echo "configure:4610: checking for --with-pymalloc" >&5 |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4610 | # Check whether --with-pymalloc or --without-pymalloc was given. |
| 4611 | if test "${with_pymalloc+set}" = set; then |
| 4612 | withval="$with_pymalloc" |
| 4613 | |
| 4614 | if test "$withval" != no |
| 4615 | then cat >> confdefs.h <<\EOF |
| 4616 | #define WITH_PYMALLOC 1 |
| 4617 | EOF |
| 4618 | echo "$ac_t""yes" 1>&6 |
| 4619 | else echo "$ac_t""no" 1>&6 |
| 4620 | fi |
| 4621 | else |
| 4622 | echo "$ac_t""no" 1>&6 |
| 4623 | fi |
| 4624 | |
| 4625 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4626 | # Check for --with-wctype-functions |
| 4627 | echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4628 | echo "configure:4629: checking for --with-wctype-functions" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4629 | # Check whether --with-wctype-functions or --without-wctype-functions was given. |
| 4630 | if test "${with_wctype_functions+set}" = set; then |
| 4631 | withval="$with_wctype_functions" |
| 4632 | |
| 4633 | if test "$withval" != no |
| 4634 | then cat >> confdefs.h <<\EOF |
| 4635 | #define WANT_WCTYPE_FUNCTIONS 1 |
| 4636 | EOF |
| 4637 | echo "$ac_t""yes" 1>&6 |
| 4638 | else echo "$ac_t""no" 1>&6 |
| 4639 | fi |
| 4640 | else |
| 4641 | echo "$ac_t""no" 1>&6 |
| 4642 | fi |
| 4643 | |
| 4644 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4645 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4646 | |
Guido van Rossum | 98935bf | 2001-09-05 19:13:16 +0000 | [diff] [blame] | 4647 | DLINCLDIR=. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4648 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4649 | echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4650 | echo "configure:4651: checking for --with-sgi-dl" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4651 | # Check whether --with-sgi-dl or --without-sgi-dl was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4652 | if test "${with_sgi_dl+set}" = set; then |
| 4653 | withval="$with_sgi_dl" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4654 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4655 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4656 | cat >> confdefs.h <<\EOF |
| 4657 | #define WITH_SGI_DL 1 |
| 4658 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4659 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4660 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4661 | dldir=$withval |
Guido van Rossum | 4095101 | 2000-10-07 16:21:27 +0000 | [diff] [blame] | 4662 | if test ! -z "$dldir" -a -d "$dldir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 4663 | then LDFLAGS="$LDFLAGS -L$dldir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4664 | 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] | 4665 | fi |
| 4666 | DLINCLDIR=${dldir} |
| 4667 | LIBS="$LIBS -ldl -lmld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4668 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4669 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4670 | fi |
| 4671 | |
| 4672 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4673 | echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4674 | echo "configure:4675: checking for --with-dl-dld" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4675 | # Check whether --with-dl-dld or --without-dl-dld was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4676 | if test "${with_dl_dld+set}" = set; then |
| 4677 | withval="$with_dl_dld" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4678 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4679 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4680 | cat >> confdefs.h <<\EOF |
| 4681 | #define WITH_DL_DLD 1 |
| 4682 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4683 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4684 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4685 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 4686 | dlddir=`echo "$withval" | sed 's/.*,//'` |
Barry Warsaw | 7d1219d | 2000-10-05 18:45:53 +0000 | [diff] [blame] | 4687 | 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] | 4688 | then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4689 | 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] | 4690 | fi |
| 4691 | DLINCLDIR=${dldir} |
| 4692 | LIBS="$LIBS -ldl -ldld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4693 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4694 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4695 | fi |
| 4696 | |
| 4697 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4698 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 4699 | # 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] | 4700 | for ac_func in dlopen |
| 4701 | do |
| 4702 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4703 | echo "configure:4704: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4704 | 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] | 4705 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4706 | else |
| 4707 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4708 | #line 4709 "configure" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4709 | #include "confdefs.h" |
| 4710 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4711 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4712 | #include <assert.h> |
| 4713 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4714 | /* We use char because int might match the return type of a gcc2 |
| 4715 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4716 | char $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4717 | |
| 4718 | int main() { |
| 4719 | |
| 4720 | /* The GNU C library defines this for functions which it implements |
| 4721 | to always fail with ENOSYS. Some functions are actually named |
| 4722 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4723 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4724 | choke me |
| 4725 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4726 | $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4727 | #endif |
| 4728 | |
| 4729 | ; return 0; } |
| 4730 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4731 | if { (eval echo configure:4732: \"$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] | 4732 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4733 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4734 | else |
| 4735 | echo "configure: failed program was:" >&5 |
| 4736 | cat conftest.$ac_ext >&5 |
| 4737 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4738 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4739 | fi |
| 4740 | rm -f conftest* |
| 4741 | fi |
| 4742 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4743 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4744 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4745 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4746 | cat >> confdefs.h <<EOF |
| 4747 | #define $ac_tr_func 1 |
| 4748 | EOF |
| 4749 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4750 | else |
| 4751 | echo "$ac_t""no" 1>&6 |
| 4752 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4753 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4754 | |
| 4755 | |
| 4756 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 4757 | # loading of modules. |
| 4758 | |
| 4759 | echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4760 | echo "configure:4761: checking DYNLOADFILE" >&5 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4761 | if test -z "$DYNLOADFILE" |
| 4762 | then |
| 4763 | case $ac_sys_system/$ac_sys_release in |
| 4764 | AIX*) DYNLOADFILE="dynload_aix.o";; |
| 4765 | BeOS*) DYNLOADFILE="dynload_beos.o";; |
| 4766 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4767 | Darwin/*) DYNLOADFILE="dynload_next.o";; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4768 | *) |
| 4769 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 4770 | # out any dynamic loading |
| 4771 | if test "$ac_cv_func_dlopen" = yes |
| 4772 | then DYNLOADFILE="dynload_shlib.o" |
| 4773 | else DYNLOADFILE="dynload_stub.o" |
| 4774 | fi |
| 4775 | ;; |
| 4776 | esac |
| 4777 | fi |
| 4778 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
| 4779 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 4780 | then |
| 4781 | cat >> confdefs.h <<\EOF |
| 4782 | #define HAVE_DYNAMIC_LOADING 1 |
| 4783 | EOF |
| 4784 | |
| 4785 | fi |
| 4786 | |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4787 | # MACHDEP_OBJS can be set to platform-specific object files needed by Python |
| 4788 | |
| 4789 | |
| 4790 | echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4791 | echo "configure:4792: checking MACHDEP_OBJS" >&5 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4792 | if test -z "$MACHDEP_OBJS" |
| 4793 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4794 | MACHDEP_OBJS=$extra_machdep_objs |
| 4795 | else |
| 4796 | MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4797 | fi |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4798 | echo "$ac_t""MACHDEP_OBJS" 1>&6 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4799 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4800 | # checks for library functions |
Martin v. Löwis | 244edc8 | 2001-10-04 22:44:26 +0000 | [diff] [blame] | 4801 | 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] | 4802 | flock fork fsync fdatasync fpathconf ftime ftruncate \ |
Martin v. Löwis | f95dd0a | 2001-08-15 17:14:33 +0000 | [diff] [blame] | 4803 | gai_strerror getgroups getlogin getpeername getpid getpwent getwd \ |
Martin v. Löwis | 864e9ff | 2001-08-04 22:32:03 +0000 | [diff] [blame] | 4804 | hstrerror inet_pton kill link lstat mkfifo mktime mremap \ |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 4805 | nice pathconf pause plock poll pthread_init \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4806 | putenv readlink \ |
Martin v. Löwis | 61c5edf | 2001-10-18 04:06:00 +0000 | [diff] [blame^] | 4807 | select setegid seteuid setgid setgroups \ |
Martin v. Löwis | 791bfda | 2001-07-24 06:33:08 +0000 | [diff] [blame] | 4808 | setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4809 | sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ |
Fred Drake | 89143df | 1999-12-09 22:03:25 +0000 | [diff] [blame] | 4810 | tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Thomas Wouters | c2c12dc | 2001-07-11 14:45:34 +0000 | [diff] [blame] | 4811 | truncate uname waitpid _getpty getpriority |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4812 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4813 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4814 | echo "configure:4815: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4815 | 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] | 4816 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4817 | else |
| 4818 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4819 | #line 4820 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4820 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4821 | /* System header to define __stub macros and hopefully few prototypes, |
| 4822 | which can conflict with char $ac_func(); below. */ |
| 4823 | #include <assert.h> |
| 4824 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4825 | /* We use char because int might match the return type of a gcc2 |
| 4826 | builtin and then its argument prototype would still apply. */ |
| 4827 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4828 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4829 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4830 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4831 | /* The GNU C library defines this for functions which it implements |
| 4832 | to always fail with ENOSYS. Some functions are actually named |
| 4833 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4834 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4835 | choke me |
| 4836 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4837 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4838 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4839 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4840 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4841 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4842 | if { (eval echo configure:4843: \"$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] | 4843 | rm -rf conftest* |
| 4844 | eval "ac_cv_func_$ac_func=yes" |
| 4845 | else |
| 4846 | echo "configure: failed program was:" >&5 |
| 4847 | cat conftest.$ac_ext >&5 |
| 4848 | rm -rf conftest* |
| 4849 | eval "ac_cv_func_$ac_func=no" |
| 4850 | fi |
| 4851 | rm -f conftest* |
| 4852 | fi |
| 4853 | |
| 4854 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4855 | echo "$ac_t""yes" 1>&6 |
| 4856 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4857 | cat >> confdefs.h <<EOF |
| 4858 | #define $ac_tr_func 1 |
| 4859 | EOF |
| 4860 | |
| 4861 | else |
| 4862 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4863 | fi |
| 4864 | done |
| 4865 | |
| 4866 | |
| 4867 | # check for openpty and forkpty |
| 4868 | |
| 4869 | for ac_func in openpty |
| 4870 | do |
| 4871 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4872 | echo "configure:4873: checking for $ac_func" >&5 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4873 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4874 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4875 | else |
| 4876 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4877 | #line 4878 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4878 | #include "confdefs.h" |
| 4879 | /* System header to define __stub macros and hopefully few prototypes, |
| 4880 | which can conflict with char $ac_func(); below. */ |
| 4881 | #include <assert.h> |
| 4882 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4883 | /* We use char because int might match the return type of a gcc2 |
| 4884 | builtin and then its argument prototype would still apply. */ |
| 4885 | char $ac_func(); |
| 4886 | |
| 4887 | int main() { |
| 4888 | |
| 4889 | /* The GNU C library defines this for functions which it implements |
| 4890 | to always fail with ENOSYS. Some functions are actually named |
| 4891 | something starting with __ and the normal name is an alias. */ |
| 4892 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4893 | choke me |
| 4894 | #else |
| 4895 | $ac_func(); |
| 4896 | #endif |
| 4897 | |
| 4898 | ; return 0; } |
| 4899 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4900 | if { (eval echo configure:4901: \"$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] | 4901 | rm -rf conftest* |
| 4902 | eval "ac_cv_func_$ac_func=yes" |
| 4903 | else |
| 4904 | echo "configure: failed program was:" >&5 |
| 4905 | cat conftest.$ac_ext >&5 |
| 4906 | rm -rf conftest* |
| 4907 | eval "ac_cv_func_$ac_func=no" |
| 4908 | fi |
| 4909 | rm -f conftest* |
| 4910 | fi |
| 4911 | |
| 4912 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4913 | echo "$ac_t""yes" 1>&6 |
| 4914 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4915 | cat >> confdefs.h <<EOF |
| 4916 | #define $ac_tr_func 1 |
| 4917 | EOF |
| 4918 | |
| 4919 | else |
| 4920 | echo "$ac_t""no" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4921 | echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4922 | echo "configure:4923: checking for openpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4923 | ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4924 | 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] | 4925 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4926 | else |
| 4927 | ac_save_LIBS="$LIBS" |
| 4928 | LIBS="-lutil $LIBS" |
| 4929 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4930 | #line 4931 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4931 | #include "confdefs.h" |
| 4932 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4933 | /* We use char because int might match the return type of a gcc2 |
| 4934 | builtin and then its argument prototype would still apply. */ |
| 4935 | char openpty(); |
| 4936 | |
| 4937 | int main() { |
| 4938 | openpty() |
| 4939 | ; return 0; } |
| 4940 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4941 | if { (eval echo configure:4942: \"$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] | 4942 | rm -rf conftest* |
| 4943 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4944 | else |
| 4945 | echo "configure: failed program was:" >&5 |
| 4946 | cat conftest.$ac_ext >&5 |
| 4947 | rm -rf conftest* |
| 4948 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4949 | fi |
| 4950 | rm -f conftest* |
| 4951 | LIBS="$ac_save_LIBS" |
| 4952 | |
| 4953 | fi |
| 4954 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4955 | echo "$ac_t""yes" 1>&6 |
| 4956 | cat >> confdefs.h <<\EOF |
| 4957 | #define HAVE_OPENPTY 1 |
| 4958 | EOF |
| 4959 | LIBS="$LIBS -lutil" |
| 4960 | else |
| 4961 | echo "$ac_t""no" 1>&6 |
| 4962 | fi |
| 4963 | |
| 4964 | fi |
| 4965 | done |
| 4966 | |
| 4967 | for ac_func in forkpty |
| 4968 | do |
| 4969 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4970 | echo "configure:4971: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4971 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4972 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4973 | else |
| 4974 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4975 | #line 4976 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4976 | #include "confdefs.h" |
| 4977 | /* System header to define __stub macros and hopefully few prototypes, |
| 4978 | which can conflict with char $ac_func(); below. */ |
| 4979 | #include <assert.h> |
| 4980 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4981 | /* We use char because int might match the return type of a gcc2 |
| 4982 | builtin and then its argument prototype would still apply. */ |
| 4983 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4984 | |
| 4985 | int main() { |
| 4986 | |
| 4987 | /* The GNU C library defines this for functions which it implements |
| 4988 | to always fail with ENOSYS. Some functions are actually named |
| 4989 | something starting with __ and the normal name is an alias. */ |
| 4990 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4991 | choke me |
| 4992 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4993 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4994 | #endif |
| 4995 | |
| 4996 | ; return 0; } |
| 4997 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4998 | if { (eval echo configure:4999: \"$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] | 4999 | rm -rf conftest* |
| 5000 | eval "ac_cv_func_$ac_func=yes" |
| 5001 | else |
| 5002 | echo "configure: failed program was:" >&5 |
| 5003 | cat conftest.$ac_ext >&5 |
| 5004 | rm -rf conftest* |
| 5005 | eval "ac_cv_func_$ac_func=no" |
| 5006 | fi |
| 5007 | rm -f conftest* |
| 5008 | fi |
| 5009 | |
| 5010 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5011 | echo "$ac_t""yes" 1>&6 |
| 5012 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5013 | cat >> confdefs.h <<EOF |
| 5014 | #define $ac_tr_func 1 |
| 5015 | EOF |
| 5016 | |
| 5017 | else |
| 5018 | echo "$ac_t""no" 1>&6 |
| 5019 | echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5020 | echo "configure:5021: checking for forkpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5021 | ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5022 | 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] | 5023 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5024 | else |
| 5025 | ac_save_LIBS="$LIBS" |
| 5026 | LIBS="-lutil $LIBS" |
| 5027 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5028 | #line 5029 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5029 | #include "confdefs.h" |
| 5030 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5031 | /* We use char because int might match the return type of a gcc2 |
| 5032 | builtin and then its argument prototype would still apply. */ |
| 5033 | char forkpty(); |
| 5034 | |
| 5035 | int main() { |
| 5036 | forkpty() |
| 5037 | ; return 0; } |
| 5038 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5039 | if { (eval echo configure:5040: \"$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] | 5040 | rm -rf conftest* |
| 5041 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 5042 | else |
| 5043 | echo "configure: failed program was:" >&5 |
| 5044 | cat conftest.$ac_ext >&5 |
| 5045 | rm -rf conftest* |
| 5046 | eval "ac_cv_lib_$ac_lib_var=no" |
| 5047 | fi |
| 5048 | rm -f conftest* |
| 5049 | LIBS="$ac_save_LIBS" |
| 5050 | |
| 5051 | fi |
| 5052 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5053 | echo "$ac_t""yes" 1>&6 |
| 5054 | cat >> confdefs.h <<\EOF |
| 5055 | #define HAVE_FORKPTY 1 |
| 5056 | EOF |
| 5057 | LIBS="$LIBS -lutil" |
| 5058 | else |
| 5059 | echo "$ac_t""no" 1>&6 |
| 5060 | fi |
| 5061 | |
| 5062 | fi |
| 5063 | done |
| 5064 | |
| 5065 | |
| 5066 | # check for long file support functions |
| 5067 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
| 5068 | do |
| 5069 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5070 | echo "configure:5071: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5071 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5072 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5073 | else |
| 5074 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5075 | #line 5076 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5076 | #include "confdefs.h" |
| 5077 | /* System header to define __stub macros and hopefully few prototypes, |
| 5078 | which can conflict with char $ac_func(); below. */ |
| 5079 | #include <assert.h> |
| 5080 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5081 | /* We use char because int might match the return type of a gcc2 |
| 5082 | builtin and then its argument prototype would still apply. */ |
| 5083 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5084 | |
| 5085 | int main() { |
| 5086 | |
| 5087 | /* The GNU C library defines this for functions which it implements |
| 5088 | to always fail with ENOSYS. Some functions are actually named |
| 5089 | something starting with __ and the normal name is an alias. */ |
| 5090 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5091 | choke me |
| 5092 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5093 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5094 | #endif |
| 5095 | |
| 5096 | ; return 0; } |
| 5097 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5098 | if { (eval echo configure:5099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5099 | rm -rf conftest* |
| 5100 | eval "ac_cv_func_$ac_func=yes" |
| 5101 | else |
| 5102 | echo "configure: failed program was:" >&5 |
| 5103 | cat conftest.$ac_ext >&5 |
| 5104 | rm -rf conftest* |
| 5105 | eval "ac_cv_func_$ac_func=no" |
| 5106 | fi |
| 5107 | rm -f conftest* |
| 5108 | fi |
| 5109 | |
| 5110 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5111 | echo "$ac_t""yes" 1>&6 |
| 5112 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5113 | cat >> confdefs.h <<EOF |
| 5114 | #define $ac_tr_func 1 |
| 5115 | EOF |
| 5116 | |
| 5117 | else |
| 5118 | echo "$ac_t""no" 1>&6 |
| 5119 | fi |
| 5120 | done |
| 5121 | |
| 5122 | |
| 5123 | for ac_func in dup2 getcwd strdup strerror memmove |
| 5124 | do |
| 5125 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5126 | echo "configure:5127: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5127 | 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] | 5128 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5129 | else |
| 5130 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5131 | #line 5132 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5132 | #include "confdefs.h" |
| 5133 | /* System header to define __stub macros and hopefully few prototypes, |
| 5134 | which can conflict with char $ac_func(); below. */ |
| 5135 | #include <assert.h> |
| 5136 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5137 | /* We use char because int might match the return type of a gcc2 |
| 5138 | builtin and then its argument prototype would still apply. */ |
| 5139 | char $ac_func(); |
| 5140 | |
| 5141 | int main() { |
| 5142 | |
| 5143 | /* The GNU C library defines this for functions which it implements |
| 5144 | to always fail with ENOSYS. Some functions are actually named |
| 5145 | something starting with __ and the normal name is an alias. */ |
| 5146 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5147 | choke me |
| 5148 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5149 | $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5150 | #endif |
| 5151 | |
| 5152 | ; return 0; } |
| 5153 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5154 | if { (eval echo configure:5155: \"$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] | 5155 | rm -rf conftest* |
| 5156 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5157 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5158 | echo "configure: failed program was:" >&5 |
| 5159 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5160 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5161 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5162 | fi |
| 5163 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5164 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5165 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5166 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5167 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5168 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5169 | cat >> confdefs.h <<EOF |
| 5170 | #define $ac_tr_func 1 |
| 5171 | EOF |
| 5172 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5173 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5174 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 5175 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5176 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5177 | done |
| 5178 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5179 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5180 | for ac_func in getpgrp |
| 5181 | do |
| 5182 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5183 | echo "configure:5184: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5184 | 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] | 5185 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5186 | else |
| 5187 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5188 | #line 5189 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5189 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5190 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5191 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5192 | #include <assert.h> |
| 5193 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5194 | /* We use char because int might match the return type of a gcc2 |
| 5195 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5196 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5197 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5198 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5199 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5200 | /* The GNU C library defines this for functions which it implements |
| 5201 | to always fail with ENOSYS. Some functions are actually named |
| 5202 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5203 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5204 | choke me |
| 5205 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5206 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5207 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5208 | |
| 5209 | ; return 0; } |
| 5210 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5211 | if { (eval echo configure:5212: \"$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] | 5212 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5213 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5214 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5215 | echo "configure: failed program was:" >&5 |
| 5216 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5217 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5218 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5219 | fi |
| 5220 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5221 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5222 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5223 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5224 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5225 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5226 | cat >> confdefs.h <<EOF |
| 5227 | #define $ac_tr_func 1 |
| 5228 | EOF |
| 5229 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5230 | #line 5231 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5231 | #include "confdefs.h" |
| 5232 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5233 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5234 | getpgrp(0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5235 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5236 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5237 | if { (eval echo configure:5238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5238 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5239 | cat >> confdefs.h <<\EOF |
| 5240 | #define GETPGRP_HAVE_ARG 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5241 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5242 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5243 | else |
| 5244 | echo "configure: failed program was:" >&5 |
| 5245 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5246 | fi |
| 5247 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5248 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5249 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5250 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5251 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5252 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5253 | for ac_func in setpgrp |
| 5254 | do |
| 5255 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5256 | echo "configure:5257: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5257 | 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] | 5258 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5259 | else |
| 5260 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5261 | #line 5262 "configure" |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5262 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5263 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5264 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5265 | #include <assert.h> |
| 5266 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5267 | /* We use char because int might match the return type of a gcc2 |
| 5268 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5269 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5270 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5271 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5272 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5273 | /* The GNU C library defines this for functions which it implements |
| 5274 | to always fail with ENOSYS. Some functions are actually named |
| 5275 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5276 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5277 | choke me |
| 5278 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5279 | $ac_func(); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5280 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5281 | |
| 5282 | ; return 0; } |
| 5283 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5284 | if { (eval echo configure:5285: \"$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] | 5285 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5286 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5287 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5288 | echo "configure: failed program was:" >&5 |
| 5289 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5290 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5291 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5292 | fi |
| 5293 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5294 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5295 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5296 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5297 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5298 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5299 | cat >> confdefs.h <<EOF |
| 5300 | #define $ac_tr_func 1 |
| 5301 | EOF |
| 5302 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5303 | #line 5304 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5304 | #include "confdefs.h" |
| 5305 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5306 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5307 | setpgrp(0,0); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5308 | ; return 0; } |
| 5309 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5310 | if { (eval echo configure:5311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5311 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5312 | cat >> confdefs.h <<\EOF |
| 5313 | #define SETPGRP_HAVE_ARG 1 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5314 | EOF |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5315 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5316 | else |
| 5317 | echo "configure: failed program was:" >&5 |
| 5318 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5319 | fi |
| 5320 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5321 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5322 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5323 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5324 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5325 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5326 | for ac_func in gettimeofday |
| 5327 | do |
| 5328 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5329 | echo "configure:5330: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5330 | 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] | 5331 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5332 | else |
| 5333 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5334 | #line 5335 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5335 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5336 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5337 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5338 | #include <assert.h> |
| 5339 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5340 | /* We use char because int might match the return type of a gcc2 |
| 5341 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5342 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5343 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5344 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5345 | |
| 5346 | /* The GNU C library defines this for functions which it implements |
| 5347 | to always fail with ENOSYS. Some functions are actually named |
| 5348 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5349 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5350 | choke me |
| 5351 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5352 | $ac_func(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5353 | #endif |
| 5354 | |
| 5355 | ; return 0; } |
| 5356 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5357 | if { (eval echo configure:5358: \"$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] | 5358 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5359 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5360 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5361 | echo "configure: failed program was:" >&5 |
| 5362 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5363 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5364 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5365 | fi |
| 5366 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5367 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5368 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5369 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5370 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5371 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5372 | cat >> confdefs.h <<EOF |
| 5373 | #define $ac_tr_func 1 |
| 5374 | EOF |
| 5375 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5376 | #line 5377 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5377 | #include "confdefs.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5378 | #include <sys/time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5379 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5380 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
| 5381 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5382 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5383 | if { (eval echo configure:5384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5384 | : |
| 5385 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5386 | echo "configure: failed program was:" >&5 |
| 5387 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5388 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5389 | cat >> confdefs.h <<\EOF |
| 5390 | #define GETTIMEOFDAY_NO_TZ 1 |
| 5391 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5392 | |
| 5393 | fi |
| 5394 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5395 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5396 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5397 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5398 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5399 | |
| 5400 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5401 | for ac_func in getaddrinfo |
| 5402 | do |
| 5403 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5404 | echo "configure:5405: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5405 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5406 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5407 | else |
| 5408 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5409 | #line 5410 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5410 | #include "confdefs.h" |
| 5411 | /* System header to define __stub macros and hopefully few prototypes, |
| 5412 | which can conflict with char $ac_func(); below. */ |
| 5413 | #include <assert.h> |
| 5414 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5415 | /* We use char because int might match the return type of a gcc2 |
| 5416 | builtin and then its argument prototype would still apply. */ |
| 5417 | char $ac_func(); |
| 5418 | |
| 5419 | int main() { |
| 5420 | |
| 5421 | /* The GNU C library defines this for functions which it implements |
| 5422 | to always fail with ENOSYS. Some functions are actually named |
| 5423 | something starting with __ and the normal name is an alias. */ |
| 5424 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5425 | choke me |
| 5426 | #else |
| 5427 | $ac_func(); |
| 5428 | #endif |
| 5429 | |
| 5430 | ; return 0; } |
| 5431 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5432 | if { (eval echo configure:5433: \"$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] | 5433 | rm -rf conftest* |
| 5434 | eval "ac_cv_func_$ac_func=yes" |
| 5435 | else |
| 5436 | echo "configure: failed program was:" >&5 |
| 5437 | cat conftest.$ac_ext >&5 |
| 5438 | rm -rf conftest* |
| 5439 | eval "ac_cv_func_$ac_func=no" |
| 5440 | fi |
| 5441 | rm -f conftest* |
| 5442 | fi |
| 5443 | |
| 5444 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5445 | echo "$ac_t""yes" 1>&6 |
| 5446 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5447 | cat >> confdefs.h <<EOF |
| 5448 | #define $ac_tr_func 1 |
| 5449 | EOF |
| 5450 | echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5451 | echo "configure:5452: checking getaddrinfo bug" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5452 | if test "$cross_compiling" = yes; then |
| 5453 | echo "$ac_t""buggy" 1>&6 |
| 5454 | buggygetaddrinfo=yes |
| 5455 | else |
| 5456 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5457 | #line 5458 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5458 | #include "confdefs.h" |
| 5459 | |
| 5460 | #include <sys/types.h> |
| 5461 | #include <netdb.h> |
| 5462 | #include <string.h> |
| 5463 | #include <sys/socket.h> |
| 5464 | #include <netinet/in.h> |
| 5465 | |
| 5466 | main() |
| 5467 | { |
| 5468 | int passive, gaierr, inet4 = 0, inet6 = 0; |
| 5469 | struct addrinfo hints, *ai, *aitop; |
| 5470 | char straddr[INET6_ADDRSTRLEN], strport[16]; |
| 5471 | |
| 5472 | for (passive = 0; passive <= 1; passive++) { |
| 5473 | memset(&hints, 0, sizeof(hints)); |
| 5474 | hints.ai_family = AF_UNSPEC; |
| 5475 | hints.ai_flags = passive ? AI_PASSIVE : 0; |
| 5476 | hints.ai_socktype = SOCK_STREAM; |
| 5477 | if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { |
| 5478 | (void)gai_strerror(gaierr); |
| 5479 | goto bad; |
| 5480 | } |
| 5481 | for (ai = aitop; ai; ai = ai->ai_next) { |
| 5482 | if (ai->ai_addr == NULL || |
| 5483 | ai->ai_addrlen == 0 || |
| 5484 | getnameinfo(ai->ai_addr, ai->ai_addrlen, |
| 5485 | straddr, sizeof(straddr), strport, sizeof(strport), |
| 5486 | NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
| 5487 | goto bad; |
| 5488 | } |
| 5489 | switch (ai->ai_family) { |
| 5490 | case AF_INET: |
| 5491 | if (strcmp(strport, "54321") != 0) { |
| 5492 | goto bad; |
| 5493 | } |
| 5494 | if (passive) { |
| 5495 | if (strcmp(straddr, "0.0.0.0") != 0) { |
| 5496 | goto bad; |
| 5497 | } |
| 5498 | } else { |
| 5499 | if (strcmp(straddr, "127.0.0.1") != 0) { |
| 5500 | goto bad; |
| 5501 | } |
| 5502 | } |
| 5503 | inet4++; |
| 5504 | break; |
| 5505 | case AF_INET6: |
| 5506 | if (strcmp(strport, "54321") != 0) { |
| 5507 | goto bad; |
| 5508 | } |
| 5509 | if (passive) { |
| 5510 | if (strcmp(straddr, "::") != 0) { |
| 5511 | goto bad; |
| 5512 | } |
| 5513 | } else { |
| 5514 | if (strcmp(straddr, "::1") != 0) { |
| 5515 | goto bad; |
| 5516 | } |
| 5517 | } |
| 5518 | inet6++; |
| 5519 | break; |
| 5520 | case AF_UNSPEC: |
| 5521 | goto bad; |
| 5522 | break; |
| 5523 | default: |
| 5524 | /* another family support? */ |
| 5525 | break; |
| 5526 | } |
| 5527 | } |
| 5528 | } |
| 5529 | |
| 5530 | if (!(inet4 == 0 || inet4 == 2)) |
| 5531 | goto bad; |
| 5532 | if (!(inet6 == 0 || inet6 == 2)) |
| 5533 | goto bad; |
| 5534 | |
| 5535 | if (aitop) |
| 5536 | freeaddrinfo(aitop); |
| 5537 | exit(0); |
| 5538 | |
| 5539 | bad: |
| 5540 | if (aitop) |
| 5541 | freeaddrinfo(aitop); |
| 5542 | exit(1); |
| 5543 | } |
| 5544 | |
| 5545 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5546 | if { (eval echo configure:5547: \"$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] | 5547 | then |
| 5548 | echo "$ac_t""good" 1>&6 |
| 5549 | buggygetaddrinfo=no |
| 5550 | else |
| 5551 | echo "configure: failed program was:" >&5 |
| 5552 | cat conftest.$ac_ext >&5 |
| 5553 | rm -fr conftest* |
| 5554 | echo "$ac_t""buggy" 1>&6 |
| 5555 | buggygetaddrinfo=yes |
| 5556 | fi |
| 5557 | rm -fr conftest* |
| 5558 | fi |
| 5559 | |
| 5560 | else |
| 5561 | echo "$ac_t""no" 1>&6 |
| 5562 | buggygetaddrinfo=yes |
| 5563 | fi |
| 5564 | done |
| 5565 | |
| 5566 | |
| 5567 | if test "$buggygetaddrinfo" = "yes"; then |
| 5568 | if test "$ipv6" = "yes"; then |
| 5569 | echo 'Fatal: You must get working getaddrinfo() function.' |
| 5570 | echo ' or you can specify "--disable-ipv6"'. |
| 5571 | exit 1 |
| 5572 | fi |
| 5573 | fi |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5574 | for ac_func in getnameinfo |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5575 | do |
| 5576 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5577 | echo "configure:5578: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5578 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5579 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5580 | else |
| 5581 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5582 | #line 5583 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5583 | #include "confdefs.h" |
| 5584 | /* System header to define __stub macros and hopefully few prototypes, |
| 5585 | which can conflict with char $ac_func(); below. */ |
| 5586 | #include <assert.h> |
| 5587 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5588 | /* We use char because int might match the return type of a gcc2 |
| 5589 | builtin and then its argument prototype would still apply. */ |
| 5590 | char $ac_func(); |
| 5591 | |
| 5592 | int main() { |
| 5593 | |
| 5594 | /* The GNU C library defines this for functions which it implements |
| 5595 | to always fail with ENOSYS. Some functions are actually named |
| 5596 | something starting with __ and the normal name is an alias. */ |
| 5597 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5598 | choke me |
| 5599 | #else |
| 5600 | $ac_func(); |
| 5601 | #endif |
| 5602 | |
| 5603 | ; return 0; } |
| 5604 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5605 | if { (eval echo configure:5606: \"$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] | 5606 | rm -rf conftest* |
| 5607 | eval "ac_cv_func_$ac_func=yes" |
| 5608 | else |
| 5609 | echo "configure: failed program was:" >&5 |
| 5610 | cat conftest.$ac_ext >&5 |
| 5611 | rm -rf conftest* |
| 5612 | eval "ac_cv_func_$ac_func=no" |
| 5613 | fi |
| 5614 | rm -f conftest* |
| 5615 | fi |
| 5616 | |
| 5617 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5618 | echo "$ac_t""yes" 1>&6 |
| 5619 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5620 | cat >> confdefs.h <<EOF |
| 5621 | #define $ac_tr_func 1 |
| 5622 | EOF |
| 5623 | |
| 5624 | else |
| 5625 | echo "$ac_t""no" 1>&6 |
| 5626 | fi |
| 5627 | done |
| 5628 | |
| 5629 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5630 | # checks for structures |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5631 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5632 | echo "configure:5633: 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] | 5633 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5634 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5635 | else |
| 5636 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5637 | #line 5638 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5638 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5639 | #include <sys/types.h> |
| 5640 | #include <sys/time.h> |
| 5641 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5642 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5643 | struct tm *tp; |
| 5644 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5645 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5646 | if { (eval echo configure:5647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5647 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5648 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5649 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5650 | echo "configure: failed program was:" >&5 |
| 5651 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5652 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5653 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5654 | fi |
| 5655 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5656 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5657 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5658 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5659 | if test $ac_cv_header_time = yes; then |
| 5660 | cat >> confdefs.h <<\EOF |
| 5661 | #define TIME_WITH_SYS_TIME 1 |
| 5662 | EOF |
| 5663 | |
| 5664 | fi |
| 5665 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5666 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5667 | echo "configure:5668: 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] | 5668 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5669 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5670 | else |
| 5671 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5672 | #line 5673 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5673 | #include "confdefs.h" |
| 5674 | #include <sys/types.h> |
| 5675 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5676 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5677 | struct tm *tp; tp->tm_sec; |
| 5678 | ; return 0; } |
| 5679 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5680 | if { (eval echo configure:5681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5681 | rm -rf conftest* |
| 5682 | ac_cv_struct_tm=time.h |
| 5683 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5684 | echo "configure: failed program was:" >&5 |
| 5685 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5686 | rm -rf conftest* |
| 5687 | ac_cv_struct_tm=sys/time.h |
| 5688 | fi |
| 5689 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5690 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5691 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5692 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5693 | if test $ac_cv_struct_tm = sys/time.h; then |
| 5694 | cat >> confdefs.h <<\EOF |
| 5695 | #define TM_IN_SYS_TIME 1 |
| 5696 | EOF |
| 5697 | |
| 5698 | fi |
| 5699 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5700 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5701 | echo "configure:5702: checking for tm_zone in struct tm" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5702 | 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] | 5703 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5704 | else |
| 5705 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5706 | #line 5707 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5707 | #include "confdefs.h" |
| 5708 | #include <sys/types.h> |
| 5709 | #include <$ac_cv_struct_tm> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5710 | int main() { |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5711 | struct tm tm; tm.tm_zone; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5712 | ; return 0; } |
| 5713 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5714 | if { (eval echo configure:5715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5715 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5716 | ac_cv_struct_tm_zone=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5717 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5718 | echo "configure: failed program was:" >&5 |
| 5719 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5720 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5721 | ac_cv_struct_tm_zone=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5722 | fi |
| 5723 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5724 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5725 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5726 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 |
| 5727 | if test "$ac_cv_struct_tm_zone" = yes; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5728 | cat >> confdefs.h <<\EOF |
| 5729 | #define HAVE_TM_ZONE 1 |
| 5730 | EOF |
| 5731 | |
| 5732 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5733 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5734 | echo "configure:5735: checking for tzname" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5735 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5736 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5737 | else |
| 5738 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5739 | #line 5740 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5740 | #include "confdefs.h" |
| 5741 | #include <time.h> |
| 5742 | #ifndef tzname /* For SGI. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5743 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5744 | #endif |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5745 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5746 | atoi(*tzname); |
| 5747 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5748 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5749 | if { (eval echo configure:5750: \"$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] | 5750 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5751 | ac_cv_var_tzname=yes |
| 5752 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5753 | echo "configure: failed program was:" >&5 |
| 5754 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5755 | rm -rf conftest* |
| 5756 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5757 | fi |
| 5758 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5759 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5760 | |
| 5761 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5762 | if test $ac_cv_var_tzname = yes; then |
| 5763 | cat >> confdefs.h <<\EOF |
| 5764 | #define HAVE_TZNAME 1 |
| 5765 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5766 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5767 | fi |
| 5768 | fi |
| 5769 | |
| 5770 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5771 | echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5772 | echo "configure:5773: checking for time.h that defines altzone" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5773 | 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] | 5774 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5775 | else |
| 5776 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5777 | #line 5778 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5778 | #include "confdefs.h" |
| 5779 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5780 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5781 | return altzone; |
| 5782 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5783 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5784 | if { (eval echo configure:5785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5785 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5786 | ac_cv_header_time_altzone=yes |
| 5787 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5788 | echo "configure: failed program was:" >&5 |
| 5789 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5790 | rm -rf conftest* |
| 5791 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5792 | fi |
| 5793 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5794 | fi |
| 5795 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5796 | echo "$ac_t""$ac_cv_header_time_altzone" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5797 | if test $ac_cv_header_time_altzone = yes; then |
| 5798 | cat >> confdefs.h <<\EOF |
| 5799 | #define HAVE_ALTZONE 1 |
| 5800 | EOF |
| 5801 | |
| 5802 | fi |
| 5803 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5804 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5805 | echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5806 | echo "configure:5807: 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] | 5807 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5808 | #line 5809 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5809 | #include "confdefs.h" |
| 5810 | |
| 5811 | #include <sys/types.h> |
| 5812 | #include <sys/select.h> |
| 5813 | #include <sys/time.h> |
| 5814 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5815 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5816 | ; |
| 5817 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5818 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5819 | if { (eval echo configure:5820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5820 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5821 | cat >> confdefs.h <<\EOF |
| 5822 | #define SYS_SELECT_WITH_SYS_TIME 1 |
| 5823 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5824 | was_it_defined=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5825 | else |
| 5826 | echo "configure: failed program was:" >&5 |
| 5827 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5828 | fi |
| 5829 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5830 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5831 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5832 | echo $ac_n "checking for addrinfo""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5833 | echo "configure:5834: checking for addrinfo" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5834 | if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then |
| 5835 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5836 | else |
| 5837 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5838 | #line 5839 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5839 | #include "confdefs.h" |
| 5840 | |
| 5841 | # include <netdb.h> |
| 5842 | int main() { |
| 5843 | struct addrinfo a |
| 5844 | ; return 0; } |
| 5845 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5846 | if { (eval echo configure:5847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5847 | rm -rf conftest* |
| 5848 | ac_cv_struct_addrinfo=yes |
| 5849 | else |
| 5850 | echo "configure: failed program was:" >&5 |
| 5851 | cat conftest.$ac_ext >&5 |
| 5852 | rm -rf conftest* |
| 5853 | ac_cv_struct_addrinfo=no |
| 5854 | fi |
| 5855 | rm -f conftest* |
| 5856 | fi |
| 5857 | |
| 5858 | echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6 |
| 5859 | if test $ac_cv_struct_addrinfo = yes; then |
| 5860 | cat >> confdefs.h <<\EOF |
| 5861 | #define HAVE_ADDRINFO 1 |
| 5862 | EOF |
| 5863 | |
| 5864 | fi |
| 5865 | |
| 5866 | echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5867 | echo "configure:5868: checking for sockaddr_storage" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5868 | if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then |
| 5869 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5870 | else |
| 5871 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5872 | #line 5873 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5873 | #include "confdefs.h" |
| 5874 | |
| 5875 | # include <sys/types.h> |
| 5876 | # include <sys/socket.h> |
| 5877 | int main() { |
| 5878 | struct sockaddr_storage s |
| 5879 | ; return 0; } |
| 5880 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5881 | if { (eval echo configure:5882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5882 | rm -rf conftest* |
| 5883 | ac_cv_struct_sockaddr_storage=yes |
| 5884 | else |
| 5885 | echo "configure: failed program was:" >&5 |
| 5886 | cat conftest.$ac_ext >&5 |
| 5887 | rm -rf conftest* |
| 5888 | ac_cv_struct_sockaddr_storage=no |
| 5889 | fi |
| 5890 | rm -f conftest* |
| 5891 | fi |
| 5892 | |
| 5893 | echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6 |
| 5894 | if test $ac_cv_struct_sockaddr_storage = yes; then |
| 5895 | cat >> confdefs.h <<\EOF |
| 5896 | #define HAVE_SOCKADDR_STORAGE 1 |
| 5897 | EOF |
| 5898 | |
| 5899 | fi |
| 5900 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5901 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5902 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5903 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5904 | echo "configure:5905: checking whether char is unsigned" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5905 | 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] | 5906 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5907 | else |
| 5908 | if test "$GCC" = yes; then |
| 5909 | # GCC predefines this symbol on systems where it applies. |
| 5910 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5911 | #line 5912 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5912 | #include "confdefs.h" |
| 5913 | #ifdef __CHAR_UNSIGNED__ |
| 5914 | yes |
| 5915 | #endif |
| 5916 | |
| 5917 | EOF |
| 5918 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 5919 | egrep "yes" >/dev/null 2>&1; then |
| 5920 | rm -rf conftest* |
| 5921 | ac_cv_c_char_unsigned=yes |
| 5922 | else |
| 5923 | rm -rf conftest* |
| 5924 | ac_cv_c_char_unsigned=no |
| 5925 | fi |
| 5926 | rm -f conftest* |
| 5927 | |
| 5928 | else |
| 5929 | if test "$cross_compiling" = yes; then |
| 5930 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5931 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5932 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5933 | #line 5934 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5934 | #include "confdefs.h" |
| 5935 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5936 | #if !defined(__STDC__) || __STDC__ != 1 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5937 | #define volatile |
| 5938 | #endif |
| 5939 | main() { |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5940 | volatile char c = 255; exit(c < 0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5941 | } |
| 5942 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5943 | if { (eval echo configure:5944: \"$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] | 5944 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5945 | ac_cv_c_char_unsigned=yes |
| 5946 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5947 | echo "configure: failed program was:" >&5 |
| 5948 | cat conftest.$ac_ext >&5 |
| 5949 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5950 | ac_cv_c_char_unsigned=no |
| 5951 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5952 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5953 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5954 | |
| 5955 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5956 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5957 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5958 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5959 | if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then |
| 5960 | cat >> confdefs.h <<\EOF |
| 5961 | #define __CHAR_UNSIGNED__ 1 |
| 5962 | EOF |
| 5963 | |
| 5964 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5965 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5966 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5967 | echo "configure:5968: checking for working const" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5968 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5969 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5970 | else |
| 5971 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 5972 | #line 5973 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5973 | #include "confdefs.h" |
| 5974 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5975 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5976 | |
| 5977 | /* Ultrix mips cc rejects this. */ |
Martin v. Löwis | 9db2f57 | 2001-07-23 01:30:10 +0000 | [diff] [blame] | 5978 | typedef int charset[2]; const charset x; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5979 | /* SunOS 4.1.1 cc rejects this. */ |
| 5980 | char const *const *ccp; |
| 5981 | char **p; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5982 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 5983 | struct point {int x, y;}; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5984 | static struct point const zero = {0,0}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5985 | /* AIX XL C 1.02.0.0 rejects this. |
| 5986 | It does not let you subtract one const X* pointer from another in an arm |
| 5987 | of an if-expression whose if-part is not a constant expression */ |
| 5988 | const char *g = "string"; |
| 5989 | ccp = &g + (g ? g-g : 0); |
| 5990 | /* HPUX 7.0 cc rejects these. */ |
| 5991 | ++ccp; |
| 5992 | p = (char**) ccp; |
| 5993 | ccp = (char const *const *) p; |
| 5994 | { /* SCO 3.2v4 cc rejects this. */ |
| 5995 | char *t; |
| 5996 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
| 5997 | |
| 5998 | *t++ = 0; |
| 5999 | } |
| 6000 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6001 | int x[] = {25, 17}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6002 | const int *foo = &x[0]; |
| 6003 | ++foo; |
| 6004 | } |
| 6005 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 6006 | typedef const int *iptr; |
| 6007 | iptr p = 0; |
| 6008 | ++p; |
| 6009 | } |
| 6010 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 6011 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 6012 | struct s { int j; const int *ap[3]; }; |
| 6013 | struct s *b; b->j = 5; |
| 6014 | } |
| 6015 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 6016 | const int foo = 10; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6017 | } |
| 6018 | |
| 6019 | ; return 0; } |
| 6020 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6021 | if { (eval echo configure:6022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6022 | rm -rf conftest* |
| 6023 | ac_cv_c_const=yes |
| 6024 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6025 | echo "configure: failed program was:" >&5 |
| 6026 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6027 | rm -rf conftest* |
| 6028 | ac_cv_c_const=no |
| 6029 | fi |
| 6030 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6031 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6032 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6033 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6034 | if test $ac_cv_c_const = no; then |
| 6035 | cat >> confdefs.h <<\EOF |
| 6036 | #define const |
| 6037 | EOF |
| 6038 | |
| 6039 | fi |
| 6040 | |
| 6041 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6042 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6043 | echo $ac_n "checking for working volatile""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6044 | echo "configure:6045: checking for working volatile" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6045 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6046 | #line 6047 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6047 | #include "confdefs.h" |
| 6048 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6049 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6050 | volatile int x; x = 0; |
| 6051 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6052 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6053 | if { (eval echo configure:6054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6054 | rm -rf conftest* |
| 6055 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6056 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6057 | echo "configure: failed program was:" >&5 |
| 6058 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6059 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6060 | cat >> confdefs.h <<\EOF |
| 6061 | #define volatile |
| 6062 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6063 | |
| 6064 | fi |
| 6065 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6066 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6067 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6068 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6069 | echo $ac_n "checking for working signed char""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6070 | echo "configure:6071: checking for working signed char" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6071 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6072 | #line 6073 "configure" |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6073 | #include "confdefs.h" |
| 6074 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6075 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6076 | signed char c; |
| 6077 | ; return 0; } |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6078 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6079 | if { (eval echo configure:6080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6080 | rm -rf conftest* |
| 6081 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6082 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6083 | echo "configure: failed program was:" >&5 |
| 6084 | cat conftest.$ac_ext >&5 |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6085 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6086 | cat >> confdefs.h <<\EOF |
| 6087 | #define signed |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6088 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6089 | |
| 6090 | fi |
| 6091 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6092 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6093 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6094 | have_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6095 | echo $ac_n "checking for prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6096 | echo "configure:6097: checking for prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6097 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6098 | #line 6099 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6099 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6100 | int foo(int x) { return 0; } |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6101 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6102 | return foo(10); |
| 6103 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6104 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6105 | if { (eval echo configure:6106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6106 | rm -rf conftest* |
| 6107 | cat >> confdefs.h <<\EOF |
| 6108 | #define HAVE_PROTOTYPES 1 |
| 6109 | EOF |
| 6110 | have_prototypes=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6111 | else |
| 6112 | echo "configure: failed program was:" >&5 |
| 6113 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6114 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6115 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6116 | echo "$ac_t""$have_prototypes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6117 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6118 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6119 | echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6120 | echo "configure:6121: checking for variable length prototypes and stdarg.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6121 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6122 | #line 6123 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6123 | #include "confdefs.h" |
| 6124 | |
| 6125 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6126 | int foo(int x, ...) { |
| 6127 | va_list va; |
| 6128 | va_start(va, x); |
| 6129 | va_arg(va, int); |
| 6130 | va_arg(va, char *); |
| 6131 | va_arg(va, double); |
| 6132 | return 0; |
| 6133 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6134 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6135 | int main() { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6136 | return foo(10, "", 3.14); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6137 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6138 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6139 | if { (eval echo configure:6140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6140 | rm -rf conftest* |
| 6141 | cat >> confdefs.h <<\EOF |
| 6142 | #define HAVE_STDARG_PROTOTYPES 1 |
| 6143 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6144 | works=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6145 | else |
| 6146 | echo "configure: failed program was:" >&5 |
| 6147 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6148 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6149 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6150 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6151 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6152 | if test "$have_prototypes" = yes; then |
| 6153 | bad_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6154 | echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6155 | echo "configure:6156: checking for bad exec* prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6156 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6157 | #line 6158 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6158 | #include "confdefs.h" |
| 6159 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6160 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6161 | char **t;execve("@",t,t); |
| 6162 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6163 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6164 | if { (eval echo configure:6165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6165 | : |
| 6166 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6167 | echo "configure: failed program was:" >&5 |
| 6168 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6169 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6170 | cat >> confdefs.h <<\EOF |
| 6171 | #define BAD_EXEC_PROTOTYPES 1 |
| 6172 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6173 | bad_prototypes=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6174 | fi |
| 6175 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6176 | echo "$ac_t""$bad_prototypes" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6177 | fi |
| 6178 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6179 | # check if sockaddr has sa_len member |
| 6180 | echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6181 | echo "configure:6182: checking if sockaddr has sa_len member" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6182 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6183 | #line 6184 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6184 | #include "confdefs.h" |
| 6185 | #include <sys/types.h> |
| 6186 | #include <sys/socket.h> |
| 6187 | int main() { |
| 6188 | struct sockaddr x; |
| 6189 | x.sa_len = 0; |
| 6190 | ; return 0; } |
| 6191 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6192 | if { (eval echo configure:6193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6193 | rm -rf conftest* |
| 6194 | echo "$ac_t""yes" 1>&6 |
| 6195 | cat >> confdefs.h <<\EOF |
| 6196 | #define HAVE_SOCKADDR_SA_LEN 1 |
| 6197 | EOF |
| 6198 | |
| 6199 | else |
| 6200 | echo "configure: failed program was:" >&5 |
| 6201 | cat conftest.$ac_ext >&5 |
| 6202 | rm -rf conftest* |
| 6203 | echo "$ac_t""no" 1>&6 |
| 6204 | fi |
| 6205 | rm -f conftest* |
| 6206 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6207 | echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6208 | echo "configure:6209: checking for bad static forward" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6209 | if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then |
| 6210 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6211 | else |
| 6212 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6213 | ac_cv_bad_static_forward=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6214 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6215 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6216 | #line 6217 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6217 | #include "confdefs.h" |
| 6218 | |
| 6219 | struct s { int a; int b; }; |
| 6220 | static struct s foo; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6221 | int foobar() { |
| 6222 | static int random; |
| 6223 | random = (int) &foo; |
| 6224 | return random; |
| 6225 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6226 | static struct s foo = { 1, 2 }; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6227 | main() { |
| 6228 | exit(!((int)&foo == foobar())); |
| 6229 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6230 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6231 | if { (eval echo configure:6232: \"$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] | 6232 | then |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6233 | ac_cv_bad_static_forward=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6234 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6235 | echo "configure: failed program was:" >&5 |
| 6236 | cat conftest.$ac_ext >&5 |
| 6237 | rm -fr conftest* |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6238 | ac_cv_bad_static_forward=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6239 | fi |
| 6240 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6241 | fi |
| 6242 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6243 | fi |
| 6244 | |
| 6245 | echo "$ac_t""$ac_cv_bad_static_forward" 1>&6 |
| 6246 | if test "$ac_cv_bad_static_forward" = yes |
| 6247 | then |
| 6248 | cat >> confdefs.h <<\EOF |
| 6249 | #define BAD_STATIC_FORWARD 1 |
| 6250 | EOF |
| 6251 | |
| 6252 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6253 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6254 | va_list_is_array=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6255 | echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6256 | echo "configure:6257: checking whether va_list is an array" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6257 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6258 | #line 6259 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6259 | #include "confdefs.h" |
| 6260 | |
| 6261 | #ifdef HAVE_STDARG_PROTOTYPES |
| 6262 | #include <stdarg.h> |
| 6263 | #else |
| 6264 | #include <varargs.h> |
| 6265 | #endif |
| 6266 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6267 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6268 | va_list list1, list2; list1 = list2; |
| 6269 | ; return 0; } |
| 6270 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6271 | if { (eval echo configure:6272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6272 | : |
| 6273 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6274 | echo "configure: failed program was:" >&5 |
| 6275 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6276 | rm -rf conftest* |
| 6277 | cat >> confdefs.h <<\EOF |
| 6278 | #define VA_LIST_IS_ARRAY 1 |
| 6279 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6280 | va_list_is_array=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6281 | fi |
| 6282 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6283 | echo "$ac_t""$va_list_is_array" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6284 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6285 | # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( |
| 6286 | echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6287 | echo "configure:6288: checking for gethostbyname_r" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6288 | 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] | 6289 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6290 | else |
| 6291 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6292 | #line 6293 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6293 | #include "confdefs.h" |
| 6294 | /* System header to define __stub macros and hopefully few prototypes, |
| 6295 | which can conflict with char gethostbyname_r(); below. */ |
| 6296 | #include <assert.h> |
| 6297 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6298 | /* We use char because int might match the return type of a gcc2 |
| 6299 | builtin and then its argument prototype would still apply. */ |
| 6300 | char gethostbyname_r(); |
| 6301 | |
| 6302 | int main() { |
| 6303 | |
| 6304 | /* The GNU C library defines this for functions which it implements |
| 6305 | to always fail with ENOSYS. Some functions are actually named |
| 6306 | something starting with __ and the normal name is an alias. */ |
| 6307 | #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) |
| 6308 | choke me |
| 6309 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6310 | gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6311 | #endif |
| 6312 | |
| 6313 | ; return 0; } |
| 6314 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6315 | if { (eval echo configure:6316: \"$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] | 6316 | rm -rf conftest* |
| 6317 | eval "ac_cv_func_gethostbyname_r=yes" |
| 6318 | else |
| 6319 | echo "configure: failed program was:" >&5 |
| 6320 | cat conftest.$ac_ext >&5 |
| 6321 | rm -rf conftest* |
| 6322 | eval "ac_cv_func_gethostbyname_r=no" |
| 6323 | fi |
| 6324 | rm -f conftest* |
| 6325 | fi |
| 6326 | |
| 6327 | if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then |
| 6328 | echo "$ac_t""yes" 1>&6 |
| 6329 | |
| 6330 | cat >> confdefs.h <<\EOF |
| 6331 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6332 | EOF |
| 6333 | |
| 6334 | echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6335 | echo "configure:6336: checking gethostbyname_r with 6 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6336 | OLD_CFLAGS=$CFLAGS |
| 6337 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
| 6338 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6339 | #line 6340 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6340 | #include "confdefs.h" |
| 6341 | |
| 6342 | # include <netdb.h> |
| 6343 | |
| 6344 | int main() { |
| 6345 | |
| 6346 | char *name; |
| 6347 | struct hostent *he, *res; |
| 6348 | char buffer[2048]; |
| 6349 | int buflen = 2048; |
| 6350 | int h_errnop; |
| 6351 | |
| 6352 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
| 6353 | |
| 6354 | ; return 0; } |
| 6355 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6356 | if { (eval echo configure:6357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6357 | rm -rf conftest* |
| 6358 | |
| 6359 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6360 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6361 | EOF |
| 6362 | |
| 6363 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6364 | #define HAVE_GETHOSTBYNAME_R_6_ARG 1 |
| 6365 | EOF |
| 6366 | |
| 6367 | echo "$ac_t""yes" 1>&6 |
| 6368 | |
| 6369 | else |
| 6370 | echo "configure: failed program was:" >&5 |
| 6371 | cat conftest.$ac_ext >&5 |
| 6372 | rm -rf conftest* |
| 6373 | |
| 6374 | echo "$ac_t""no" 1>&6 |
| 6375 | echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6376 | echo "configure:6377: checking gethostbyname_r with 5 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6377 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6378 | #line 6379 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6379 | #include "confdefs.h" |
| 6380 | |
| 6381 | # include <netdb.h> |
| 6382 | |
| 6383 | int main() { |
| 6384 | |
| 6385 | char *name; |
| 6386 | struct hostent *he; |
| 6387 | char buffer[2048]; |
| 6388 | int buflen = 2048; |
| 6389 | int h_errnop; |
| 6390 | |
| 6391 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
| 6392 | |
| 6393 | ; return 0; } |
| 6394 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6395 | if { (eval echo configure:6396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6396 | rm -rf conftest* |
| 6397 | |
| 6398 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6399 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6400 | EOF |
| 6401 | |
| 6402 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6403 | #define HAVE_GETHOSTBYNAME_R_5_ARG 1 |
| 6404 | EOF |
| 6405 | |
| 6406 | echo "$ac_t""yes" 1>&6 |
| 6407 | |
| 6408 | else |
| 6409 | echo "configure: failed program was:" >&5 |
| 6410 | cat conftest.$ac_ext >&5 |
| 6411 | rm -rf conftest* |
| 6412 | |
| 6413 | echo "$ac_t""no" 1>&6 |
| 6414 | echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6415 | echo "configure:6416: checking gethostbyname_r with 3 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6416 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6417 | #line 6418 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6418 | #include "confdefs.h" |
| 6419 | |
| 6420 | # include <netdb.h> |
| 6421 | |
| 6422 | int main() { |
| 6423 | |
| 6424 | char *name; |
| 6425 | struct hostent *he; |
| 6426 | struct hostent_data data; |
| 6427 | |
| 6428 | (void) gethostbyname_r(name, he, &data); |
| 6429 | |
| 6430 | ; return 0; } |
| 6431 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6432 | if { (eval echo configure:6433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6433 | rm -rf conftest* |
| 6434 | |
| 6435 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6436 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6437 | EOF |
| 6438 | |
| 6439 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6440 | #define HAVE_GETHOSTBYNAME_R_3_ARG 1 |
| 6441 | EOF |
| 6442 | |
| 6443 | echo "$ac_t""yes" 1>&6 |
| 6444 | |
| 6445 | else |
| 6446 | echo "configure: failed program was:" >&5 |
| 6447 | cat conftest.$ac_ext >&5 |
| 6448 | rm -rf conftest* |
| 6449 | |
| 6450 | echo "$ac_t""no" 1>&6 |
| 6451 | |
| 6452 | fi |
| 6453 | rm -f conftest* |
| 6454 | |
| 6455 | fi |
| 6456 | rm -f conftest* |
| 6457 | |
| 6458 | fi |
| 6459 | rm -f conftest* |
| 6460 | CFLAGS=$OLD_CFLAGS |
| 6461 | |
| 6462 | else |
| 6463 | echo "$ac_t""no" 1>&6 |
| 6464 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6465 | for ac_func in gethostbyname |
| 6466 | do |
| 6467 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6468 | echo "configure:6469: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6469 | 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] | 6470 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6471 | else |
| 6472 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6473 | #line 6474 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6474 | #include "confdefs.h" |
| 6475 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6476 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6477 | #include <assert.h> |
| 6478 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6479 | /* We use char because int might match the return type of a gcc2 |
| 6480 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6481 | char $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6482 | |
| 6483 | int main() { |
| 6484 | |
| 6485 | /* The GNU C library defines this for functions which it implements |
| 6486 | to always fail with ENOSYS. Some functions are actually named |
| 6487 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6488 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6489 | choke me |
| 6490 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6491 | $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6492 | #endif |
| 6493 | |
| 6494 | ; return 0; } |
| 6495 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6496 | if { (eval echo configure:6497: \"$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] | 6497 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6498 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6499 | else |
| 6500 | echo "configure: failed program was:" >&5 |
| 6501 | cat conftest.$ac_ext >&5 |
| 6502 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6503 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6504 | fi |
| 6505 | rm -f conftest* |
| 6506 | fi |
| 6507 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6508 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6509 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6510 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6511 | cat >> confdefs.h <<EOF |
| 6512 | #define $ac_tr_func 1 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6513 | EOF |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6514 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6515 | else |
| 6516 | echo "$ac_t""no" 1>&6 |
| 6517 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6518 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6519 | |
| 6520 | |
| 6521 | fi |
| 6522 | |
| 6523 | |
| 6524 | |
| 6525 | |
| 6526 | |
| 6527 | |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6528 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6529 | # checks for system services |
| 6530 | # (none yet) |
| 6531 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6532 | # Linux requires this for correct f.p. operations |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6533 | echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6534 | echo "configure:6535: checking for __fpu_control" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6535 | if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6536 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6537 | else |
| 6538 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6539 | #line 6540 "configure" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6540 | #include "confdefs.h" |
| 6541 | /* System header to define __stub macros and hopefully few prototypes, |
| 6542 | which can conflict with char __fpu_control(); below. */ |
| 6543 | #include <assert.h> |
| 6544 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6545 | /* We use char because int might match the return type of a gcc2 |
| 6546 | builtin and then its argument prototype would still apply. */ |
| 6547 | char __fpu_control(); |
| 6548 | |
| 6549 | int main() { |
| 6550 | |
| 6551 | /* The GNU C library defines this for functions which it implements |
| 6552 | to always fail with ENOSYS. Some functions are actually named |
| 6553 | something starting with __ and the normal name is an alias. */ |
| 6554 | #if defined (__stub___fpu_control) || defined (__stub_____fpu_control) |
| 6555 | choke me |
| 6556 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6557 | __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6558 | #endif |
| 6559 | |
| 6560 | ; return 0; } |
| 6561 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6562 | if { (eval echo configure:6563: \"$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] | 6563 | rm -rf conftest* |
| 6564 | eval "ac_cv_func___fpu_control=yes" |
| 6565 | else |
| 6566 | echo "configure: failed program was:" >&5 |
| 6567 | cat conftest.$ac_ext >&5 |
| 6568 | rm -rf conftest* |
| 6569 | eval "ac_cv_func___fpu_control=no" |
| 6570 | fi |
| 6571 | rm -f conftest* |
| 6572 | fi |
| 6573 | |
| 6574 | if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then |
| 6575 | echo "$ac_t""yes" 1>&6 |
| 6576 | : |
| 6577 | else |
| 6578 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6579 | echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6580 | echo "configure:6581: checking for __fpu_control in -lieee" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6581 | ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6582 | 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] | 6583 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6584 | else |
| 6585 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6586 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6587 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6588 | #line 6589 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6589 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6590 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6591 | /* We use char because int might match the return type of a gcc2 |
| 6592 | builtin and then its argument prototype would still apply. */ |
| 6593 | char __fpu_control(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6594 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6595 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6596 | __fpu_control() |
| 6597 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6598 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6599 | if { (eval echo configure:6600: \"$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] | 6600 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6601 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6602 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6603 | echo "configure: failed program was:" >&5 |
| 6604 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6605 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6606 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6607 | fi |
| 6608 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6609 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6610 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6611 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6612 | 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] | 6613 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6614 | ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 6615 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6616 | cat >> confdefs.h <<EOF |
| 6617 | #define $ac_tr_lib 1 |
| 6618 | EOF |
| 6619 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6620 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6621 | |
| 6622 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6623 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6624 | fi |
| 6625 | |
| 6626 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6627 | fi |
| 6628 | |
| 6629 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6630 | # Check for --with-fpectl |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6631 | echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6632 | echo "configure:6633: checking for --with-fpectl" >&5 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6633 | # Check whether --with-fpectl or --without-fpectl was given. |
| 6634 | if test "${with_fpectl+set}" = set; then |
| 6635 | withval="$with_fpectl" |
| 6636 | |
| 6637 | if test "$withval" != no |
| 6638 | then cat >> confdefs.h <<\EOF |
| 6639 | #define WANT_SIGFPE_HANDLER 1 |
| 6640 | EOF |
| 6641 | echo "$ac_t""yes" 1>&6 |
| 6642 | else echo "$ac_t""no" 1>&6 |
| 6643 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6644 | else |
| 6645 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6646 | fi |
| 6647 | |
| 6648 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6649 | # check for --with-libm=... |
| 6650 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6651 | case $ac_sys_system in |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 6652 | Darwin) ;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 6653 | BeOS) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6654 | *) LIBM=-lm |
| 6655 | esac |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6656 | echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6657 | echo "configure:6658: checking for --with-libm=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6658 | # Check whether --with-libm or --without-libm was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6659 | if test "${with_libm+set}" = set; then |
| 6660 | withval="$with_libm" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6661 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6662 | if test "$withval" = no |
| 6663 | then LIBM= |
| 6664 | echo "$ac_t""force LIBM empty" 1>&6 |
| 6665 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6666 | then LIBM=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6667 | echo "$ac_t""set LIBM=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6668 | 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] | 6669 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6670 | else |
| 6671 | echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6672 | fi |
| 6673 | |
| 6674 | |
| 6675 | # check for --with-libc=... |
| 6676 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6677 | echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6678 | echo "configure:6679: checking for --with-libc=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6679 | # Check whether --with-libc or --without-libc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6680 | if test "${with_libc+set}" = set; then |
| 6681 | withval="$with_libc" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6682 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6683 | if test "$withval" = no |
| 6684 | then LIBC= |
| 6685 | echo "$ac_t""force LIBC empty" 1>&6 |
| 6686 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6687 | then LIBC=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6688 | echo "$ac_t""set LIBC=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6689 | 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] | 6690 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6691 | else |
| 6692 | echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6693 | fi |
| 6694 | |
| 6695 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6696 | # check for hypot() in math library |
| 6697 | LIBS_SAVE=$LIBS |
| 6698 | LIBS="$LIBS $LIBM" |
| 6699 | for ac_func in hypot |
| 6700 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6701 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6702 | echo "configure:6703: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6703 | 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] | 6704 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6705 | else |
| 6706 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6707 | #line 6708 "configure" |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6708 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6709 | /* System header to define __stub macros and hopefully few prototypes, |
| 6710 | which can conflict with char $ac_func(); below. */ |
| 6711 | #include <assert.h> |
| 6712 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6713 | /* We use char because int might match the return type of a gcc2 |
| 6714 | builtin and then its argument prototype would still apply. */ |
| 6715 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6716 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6717 | int main() { |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6718 | |
| 6719 | /* The GNU C library defines this for functions which it implements |
| 6720 | to always fail with ENOSYS. Some functions are actually named |
| 6721 | something starting with __ and the normal name is an alias. */ |
| 6722 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 6723 | choke me |
| 6724 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6725 | $ac_func(); |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6726 | #endif |
| 6727 | |
| 6728 | ; return 0; } |
| 6729 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6730 | if { (eval echo configure:6731: \"$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] | 6731 | rm -rf conftest* |
| 6732 | eval "ac_cv_func_$ac_func=yes" |
| 6733 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6734 | echo "configure: failed program was:" >&5 |
| 6735 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6736 | rm -rf conftest* |
| 6737 | eval "ac_cv_func_$ac_func=no" |
| 6738 | fi |
| 6739 | rm -f conftest* |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6740 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6741 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6742 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 6743 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6744 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6745 | cat >> confdefs.h <<EOF |
| 6746 | #define $ac_tr_func 1 |
| 6747 | EOF |
| 6748 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6749 | else |
| 6750 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 6751 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6752 | fi |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6753 | done |
| 6754 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6755 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6756 | LIBS=$LIBS_SAVE |
| 6757 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6758 | # check whether malloc(0) returns NULL or not |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6759 | echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6760 | echo "configure:6761: checking what malloc(0) returns" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6761 | if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6762 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6763 | else |
| 6764 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6765 | ac_cv_malloc_zero=nonnull |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6766 | else |
| 6767 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6768 | #line 6769 "configure" |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6769 | #include "confdefs.h" |
| 6770 | #include <stdio.h> |
| 6771 | #ifdef HAVE_STDLIB |
| 6772 | #include <stdlib.h> |
| 6773 | #else |
| 6774 | char *malloc(), *realloc(); |
| 6775 | int *free(); |
| 6776 | #endif |
| 6777 | main() { |
| 6778 | char *p; |
| 6779 | p = malloc(0); |
| 6780 | if (p == NULL) exit(1); |
| 6781 | p = realloc(p, 0); |
| 6782 | if (p == NULL) exit(1); |
| 6783 | free(p); |
| 6784 | exit(0); |
| 6785 | } |
| 6786 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6787 | if { (eval echo configure:6788: \"$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] | 6788 | then |
| 6789 | ac_cv_malloc_zero=nonnull |
| 6790 | else |
| 6791 | echo "configure: failed program was:" >&5 |
| 6792 | cat conftest.$ac_ext >&5 |
| 6793 | rm -fr conftest* |
| 6794 | ac_cv_malloc_zero=null |
| 6795 | fi |
| 6796 | rm -fr conftest* |
| 6797 | fi |
| 6798 | |
| 6799 | fi |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6800 | # XXX arm cross-compile? |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6801 | echo "$ac_t""$ac_cv_malloc_zero" 1>&6 |
| 6802 | if test "$ac_cv_malloc_zero" = null |
| 6803 | then |
| 6804 | cat >> confdefs.h <<\EOF |
| 6805 | #define MALLOC_ZERO_RETURNS_NULL 1 |
| 6806 | EOF |
| 6807 | |
| 6808 | fi |
| 6809 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6810 | # check for wchar.h |
| 6811 | ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` |
| 6812 | echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6813 | echo "configure:6814: checking for wchar.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6814 | 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] | 6815 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6816 | else |
| 6817 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6818 | #line 6819 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6819 | #include "confdefs.h" |
| 6820 | #include <wchar.h> |
| 6821 | EOF |
| 6822 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6823 | { (eval echo configure:6824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6824 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 6825 | if test -z "$ac_err"; then |
| 6826 | rm -rf conftest* |
| 6827 | eval "ac_cv_header_$ac_safe=yes" |
| 6828 | else |
| 6829 | echo "$ac_err" >&5 |
| 6830 | echo "configure: failed program was:" >&5 |
| 6831 | cat conftest.$ac_ext >&5 |
| 6832 | rm -rf conftest* |
| 6833 | eval "ac_cv_header_$ac_safe=no" |
| 6834 | fi |
| 6835 | rm -f conftest* |
| 6836 | fi |
| 6837 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 6838 | echo "$ac_t""yes" 1>&6 |
| 6839 | cat >> confdefs.h <<\EOF |
| 6840 | #define HAVE_WCHAR_H 1 |
| 6841 | EOF |
| 6842 | wchar_h="yes" |
| 6843 | else |
| 6844 | echo "$ac_t""no" 1>&6 |
| 6845 | wchar_h="no" |
| 6846 | |
| 6847 | fi |
| 6848 | |
| 6849 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6850 | # determine wchar_t size |
| 6851 | if test "$wchar_h" = yes |
| 6852 | then |
| 6853 | echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6854 | echo "configure:6855: checking size of wchar_t" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6855 | if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then |
| 6856 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6857 | else |
| 6858 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6859 | ac_cv_sizeof_wchar_t=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6860 | else |
| 6861 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6862 | #line 6863 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6863 | #include "confdefs.h" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6864 | #include <stdio.h> |
| 6865 | main() |
| 6866 | { |
| 6867 | FILE *f=fopen("conftestval", "w"); |
| 6868 | if (!f) exit(1); |
| 6869 | fprintf(f, "%d\n", sizeof(wchar_t)); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6870 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6871 | } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6872 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6873 | if { (eval echo configure:6874: \"$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] | 6874 | then |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6875 | ac_cv_sizeof_wchar_t=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6876 | else |
| 6877 | echo "configure: failed program was:" >&5 |
| 6878 | cat conftest.$ac_ext >&5 |
| 6879 | rm -fr conftest* |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6880 | ac_cv_sizeof_wchar_t=0 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6881 | fi |
| 6882 | rm -fr conftest* |
| 6883 | fi |
| 6884 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6885 | fi |
| 6886 | echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 |
| 6887 | cat >> confdefs.h <<EOF |
| 6888 | #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t |
| 6889 | EOF |
| 6890 | |
| 6891 | |
| 6892 | fi |
| 6893 | |
| 6894 | echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6895 | echo "configure:6896: checking what type to use for unicode" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6896 | # Check whether --enable-unicode or --disable-unicode was given. |
| 6897 | if test "${enable_unicode+set}" = set; then |
| 6898 | enableval="$enable_unicode" |
| 6899 | : |
| 6900 | else |
| 6901 | enable_unicode=yes |
| 6902 | fi |
| 6903 | |
| 6904 | |
| 6905 | if test $enable_unicode = yes |
| 6906 | then |
Martin v. Löwis | fd91779 | 2001-06-27 20:22:04 +0000 | [diff] [blame] | 6907 | # Without any arguments, Py_UNICODE defaults to two-byte mode |
| 6908 | enable_unicode="ucs2" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6909 | fi |
| 6910 | |
| 6911 | case "$enable_unicode" in |
| 6912 | ucs2) unicode_size="2" |
| 6913 | cat >> confdefs.h <<\EOF |
| 6914 | #define Py_UNICODE_SIZE 2 |
| 6915 | EOF |
| 6916 | |
| 6917 | ;; |
| 6918 | ucs4) unicode_size="4" |
| 6919 | cat >> confdefs.h <<\EOF |
| 6920 | #define Py_UNICODE_SIZE 4 |
| 6921 | EOF |
| 6922 | |
| 6923 | ;; |
| 6924 | esac |
| 6925 | |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6926 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6927 | if test "$enable_unicode" = "no" |
| 6928 | then |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6929 | UNICODE_OBJS="" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6930 | echo "$ac_t""not used" 1>&6 |
| 6931 | else |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6932 | UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6933 | cat >> confdefs.h <<\EOF |
| 6934 | #define Py_USING_UNICODE 1 |
| 6935 | EOF |
| 6936 | |
| 6937 | if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" |
| 6938 | then |
| 6939 | PY_UNICODE_TYPE="wchar_t" |
| 6940 | cat >> confdefs.h <<\EOF |
| 6941 | #define HAVE_USABLE_WCHAR_T 1 |
| 6942 | EOF |
| 6943 | |
| 6944 | cat >> confdefs.h <<\EOF |
| 6945 | #define PY_UNICODE_TYPE wchar_t |
| 6946 | EOF |
| 6947 | |
| 6948 | elif test "$ac_cv_sizeof_short" = "$unicode_size" |
| 6949 | then |
| 6950 | PY_UNICODE_TYPE="unsigned short" |
| 6951 | cat >> confdefs.h <<\EOF |
| 6952 | #define PY_UNICODE_TYPE unsigned short |
| 6953 | EOF |
| 6954 | |
| 6955 | elif test "$ac_cv_sizeof_long" = "$unicode_size" |
| 6956 | then |
| 6957 | PY_UNICODE_TYPE="unsigned long" |
| 6958 | cat >> confdefs.h <<\EOF |
| 6959 | #define PY_UNICODE_TYPE unsigned long |
| 6960 | EOF |
| 6961 | |
| 6962 | else |
| 6963 | PY_UNICODE_TYPE="no type found" |
| 6964 | fi |
| 6965 | echo "$ac_t""$PY_UNICODE_TYPE" 1>&6 |
| 6966 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6967 | |
| 6968 | # check for endianness |
| 6969 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6970 | echo "configure:6971: checking whether byte ordering is bigendian" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6971 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6972 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6973 | else |
| 6974 | ac_cv_c_bigendian=unknown |
| 6975 | # See if sys/param.h defines the BYTE_ORDER macro. |
| 6976 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6977 | #line 6978 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6978 | #include "confdefs.h" |
| 6979 | #include <sys/types.h> |
| 6980 | #include <sys/param.h> |
| 6981 | int main() { |
| 6982 | |
| 6983 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 6984 | bogus endian macros |
| 6985 | #endif |
| 6986 | ; return 0; } |
| 6987 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6988 | if { (eval echo configure:6989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6989 | rm -rf conftest* |
| 6990 | # It does; now see whether it defined to BIG_ENDIAN or not. |
| 6991 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 6992 | #line 6993 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6993 | #include "confdefs.h" |
| 6994 | #include <sys/types.h> |
| 6995 | #include <sys/param.h> |
| 6996 | int main() { |
| 6997 | |
| 6998 | #if BYTE_ORDER != BIG_ENDIAN |
| 6999 | not big endian |
| 7000 | #endif |
| 7001 | ; return 0; } |
| 7002 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7003 | if { (eval echo configure:7004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7004 | rm -rf conftest* |
| 7005 | ac_cv_c_bigendian=yes |
| 7006 | else |
| 7007 | echo "configure: failed program was:" >&5 |
| 7008 | cat conftest.$ac_ext >&5 |
| 7009 | rm -rf conftest* |
| 7010 | ac_cv_c_bigendian=no |
| 7011 | fi |
| 7012 | rm -f conftest* |
| 7013 | else |
| 7014 | echo "configure: failed program was:" >&5 |
| 7015 | cat conftest.$ac_ext >&5 |
| 7016 | fi |
| 7017 | rm -f conftest* |
| 7018 | if test $ac_cv_c_bigendian = unknown; then |
| 7019 | if test "$cross_compiling" = yes; then |
| 7020 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 7021 | else |
| 7022 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7023 | #line 7024 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7024 | #include "confdefs.h" |
| 7025 | main () { |
| 7026 | /* Are we little or big endian? From Harbison&Steele. */ |
| 7027 | union |
| 7028 | { |
| 7029 | long l; |
| 7030 | char c[sizeof (long)]; |
| 7031 | } u; |
| 7032 | u.l = 1; |
| 7033 | exit (u.c[sizeof (long) - 1] == 1); |
| 7034 | } |
| 7035 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7036 | if { (eval echo configure:7037: \"$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] | 7037 | then |
| 7038 | ac_cv_c_bigendian=no |
| 7039 | else |
| 7040 | echo "configure: failed program was:" >&5 |
| 7041 | cat conftest.$ac_ext >&5 |
| 7042 | rm -fr conftest* |
| 7043 | ac_cv_c_bigendian=yes |
| 7044 | fi |
| 7045 | rm -fr conftest* |
| 7046 | fi |
| 7047 | |
| 7048 | fi |
| 7049 | fi |
| 7050 | |
| 7051 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 7052 | if test $ac_cv_c_bigendian = yes; then |
| 7053 | cat >> confdefs.h <<\EOF |
| 7054 | #define WORDS_BIGENDIAN 1 |
| 7055 | EOF |
| 7056 | |
| 7057 | fi |
| 7058 | |
| 7059 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7060 | # Check whether right shifting a negative integer extends the sign bit |
| 7061 | # or fills with zeros (like the Cray J90, according to Tim Peters). |
| 7062 | echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7063 | echo "configure:7064: checking whether right shift extends the sign bit" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7064 | if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7065 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7066 | else |
| 7067 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7068 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7069 | ac_cv_rshift_extends_sign=yes |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7070 | else |
| 7071 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7072 | #line 7073 "configure" |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7073 | #include "confdefs.h" |
| 7074 | |
| 7075 | int main() |
| 7076 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7077 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7078 | } |
| 7079 | |
| 7080 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7081 | if { (eval echo configure:7082: \"$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] | 7082 | then |
| 7083 | ac_cv_rshift_extends_sign=yes |
| 7084 | else |
| 7085 | echo "configure: failed program was:" >&5 |
| 7086 | cat conftest.$ac_ext >&5 |
| 7087 | rm -fr conftest* |
| 7088 | ac_cv_rshift_extends_sign=no |
| 7089 | fi |
| 7090 | rm -fr conftest* |
| 7091 | fi |
| 7092 | |
| 7093 | fi |
| 7094 | |
| 7095 | echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 |
| 7096 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7097 | then |
| 7098 | cat >> confdefs.h <<\EOF |
| 7099 | #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 |
| 7100 | EOF |
| 7101 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7102 | fi |
| 7103 | |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7104 | # check for getc_unlocked and related locking functions |
| 7105 | echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7106 | echo "configure:7107: checking for getc_unlocked() and friends" >&5 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7107 | if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then |
| 7108 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7109 | else |
| 7110 | |
| 7111 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7112 | #line 7113 "configure" |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7113 | #include "confdefs.h" |
| 7114 | #include <stdio.h> |
| 7115 | int main() { |
| 7116 | |
| 7117 | FILE *f = fopen("/dev/null", "r"); |
| 7118 | flockfile(f); |
| 7119 | getc_unlocked(f); |
| 7120 | funlockfile(f); |
| 7121 | |
| 7122 | ; return 0; } |
| 7123 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7124 | if { (eval echo configure:7125: \"$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] | 7125 | rm -rf conftest* |
| 7126 | ac_cv_have_getc_unlocked=yes |
| 7127 | else |
| 7128 | echo "configure: failed program was:" >&5 |
| 7129 | cat conftest.$ac_ext >&5 |
| 7130 | rm -rf conftest* |
| 7131 | ac_cv_have_getc_unlocked=no |
| 7132 | fi |
| 7133 | rm -f conftest* |
| 7134 | fi |
| 7135 | |
| 7136 | echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6 |
| 7137 | if test "$ac_cv_have_getc_unlocked" = yes |
| 7138 | then |
| 7139 | cat >> confdefs.h <<\EOF |
| 7140 | #define HAVE_GETC_UNLOCKED 1 |
| 7141 | EOF |
| 7142 | |
| 7143 | fi |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7144 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7145 | # check for readline 4.0 |
| 7146 | echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7147 | echo "configure:7148: checking for rl_pre_input_hook in -lreadline" >&5 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7148 | 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] | 7149 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7150 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7151 | else |
| 7152 | ac_save_LIBS="$LIBS" |
| 7153 | LIBS="-lreadline -ltermcap $LIBS" |
| 7154 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7155 | #line 7156 "configure" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7156 | #include "confdefs.h" |
| 7157 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7158 | /* We use char because int might match the return type of a gcc2 |
| 7159 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7160 | char rl_pre_input_hook(); |
| 7161 | |
| 7162 | int main() { |
| 7163 | rl_pre_input_hook() |
| 7164 | ; return 0; } |
| 7165 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7166 | if { (eval echo configure:7167: \"$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] | 7167 | rm -rf conftest* |
| 7168 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 7169 | else |
| 7170 | echo "configure: failed program was:" >&5 |
| 7171 | cat conftest.$ac_ext >&5 |
| 7172 | rm -rf conftest* |
| 7173 | eval "ac_cv_lib_$ac_lib_var=no" |
| 7174 | fi |
| 7175 | rm -f conftest* |
| 7176 | LIBS="$ac_save_LIBS" |
| 7177 | |
| 7178 | fi |
| 7179 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7180 | echo "$ac_t""yes" 1>&6 |
| 7181 | cat >> confdefs.h <<\EOF |
| 7182 | #define HAVE_RL_PRE_INPUT_HOOK 1 |
| 7183 | EOF |
| 7184 | |
| 7185 | else |
| 7186 | echo "$ac_t""no" 1>&6 |
| 7187 | fi |
| 7188 | |
| 7189 | |
| 7190 | # check for readline 4.2 |
| 7191 | echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7192 | echo "configure:7193: checking for rl_completion_matches in -lreadline" >&5 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7193 | ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` |
| 7194 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7195 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7196 | else |
| 7197 | ac_save_LIBS="$LIBS" |
| 7198 | LIBS="-lreadline -ltermcap $LIBS" |
| 7199 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7200 | #line 7201 "configure" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7201 | #include "confdefs.h" |
| 7202 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7203 | /* We use char because int might match the return type of a gcc2 |
| 7204 | builtin and then its argument prototype would still apply. */ |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7205 | char rl_completion_matches(); |
| 7206 | |
| 7207 | int main() { |
| 7208 | rl_completion_matches() |
| 7209 | ; return 0; } |
| 7210 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7211 | if { (eval echo configure:7212: \"$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] | 7212 | rm -rf conftest* |
| 7213 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 7214 | else |
| 7215 | echo "configure: failed program was:" >&5 |
| 7216 | cat conftest.$ac_ext >&5 |
| 7217 | rm -rf conftest* |
| 7218 | eval "ac_cv_lib_$ac_lib_var=no" |
| 7219 | fi |
| 7220 | rm -f conftest* |
| 7221 | LIBS="$ac_save_LIBS" |
| 7222 | |
| 7223 | fi |
| 7224 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7225 | echo "$ac_t""yes" 1>&6 |
| 7226 | cat >> confdefs.h <<\EOF |
| 7227 | #define HAVE_RL_COMPLETION_MATCHES 1 |
| 7228 | EOF |
| 7229 | |
| 7230 | else |
| 7231 | echo "$ac_t""no" 1>&6 |
| 7232 | fi |
| 7233 | |
| 7234 | |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7235 | echo $ac_n "checking for broken nice()""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7236 | echo "configure:7237: checking for broken nice()" >&5 |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7237 | if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then |
| 7238 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7239 | else |
| 7240 | |
| 7241 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7242 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7243 | else |
| 7244 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7245 | #line 7246 "configure" |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7246 | #include "confdefs.h" |
| 7247 | |
| 7248 | int main() |
| 7249 | { |
| 7250 | int val1 = nice(1); |
| 7251 | if (val1 != -1 && val1 == nice(2)) |
| 7252 | exit(0); |
| 7253 | exit(1); |
| 7254 | } |
| 7255 | |
| 7256 | EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7257 | if { (eval echo configure:7258: \"$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] | 7258 | then |
| 7259 | ac_cv_broken_nice=yes |
| 7260 | else |
| 7261 | echo "configure: failed program was:" >&5 |
| 7262 | cat conftest.$ac_ext >&5 |
| 7263 | rm -fr conftest* |
| 7264 | ac_cv_broken_nice=no |
| 7265 | fi |
| 7266 | rm -fr conftest* |
| 7267 | fi |
| 7268 | |
| 7269 | fi |
| 7270 | |
| 7271 | echo "$ac_t""$ac_cv_broken_nice" 1>&6 |
| 7272 | if test "$ac_cv_broken_nice" = yes |
| 7273 | then |
| 7274 | cat >> confdefs.h <<\EOF |
| 7275 | #define HAVE_BROKEN_NICE 1 |
| 7276 | EOF |
| 7277 | |
| 7278 | fi |
| 7279 | |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7280 | # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! |
| 7281 | # Add sys/socket.h to confdefs.h |
| 7282 | cat >> confdefs.h <<\EOF |
| 7283 | #ifdef HAVE_SYS_SOCKET_H |
| 7284 | #include <sys/socket.h> |
| 7285 | #endif |
| 7286 | EOF |
| 7287 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7288 | echo "configure:7289: checking for socklen_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7289 | 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] | 7290 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7291 | else |
| 7292 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7293 | #line 7294 "configure" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7294 | #include "confdefs.h" |
| 7295 | #include <sys/types.h> |
| 7296 | #if STDC_HEADERS |
| 7297 | #include <stdlib.h> |
| 7298 | #include <stddef.h> |
| 7299 | #endif |
| 7300 | EOF |
| 7301 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 7302 | egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 7303 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7304 | ac_cv_type_socklen_t=yes |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7305 | else |
| 7306 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7307 | ac_cv_type_socklen_t=no |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7308 | fi |
| 7309 | rm -f conftest* |
| 7310 | |
| 7311 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7312 | echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 |
| 7313 | if test $ac_cv_type_socklen_t = no; then |
| 7314 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7315 | #define socklen_t int |
| 7316 | EOF |
| 7317 | |
| 7318 | fi |
| 7319 | |
| 7320 | |
Neil Schemenauer | f25cf6c | 2001-03-04 06:39:33 +0000 | [diff] [blame] | 7321 | # Add Python/ prefix to LIBOBJS |
| 7322 | libobjs=$LIBOBJS |
| 7323 | LIBOBJS= |
| 7324 | for obj in $libobjs; do |
| 7325 | LIBOBJS="$LIBOBJS Python/$obj" |
| 7326 | done |
| 7327 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7328 | #AC_MSG_CHECKING(for Modules/Setup) |
| 7329 | #if test ! -f Modules/Setup ; then |
| 7330 | # if test ! -d Modules ; then |
| 7331 | # mkdir Modules |
| 7332 | # fi |
| 7333 | # cp "$srcdir/Modules/Setup.dist" Modules/Setup |
| 7334 | # AC_MSG_RESULT(creating) |
| 7335 | #else |
| 7336 | # AC_MSG_RESULT(already exists) |
| 7337 | #fi |
| 7338 | |
| 7339 | |
Neil Schemenauer | acbf9ef | 2001-02-27 02:15:14 +0000 | [diff] [blame] | 7340 | SRCDIRS="Parser Grammar Objects Python Modules" |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7341 | echo $ac_n "checking for build directories""... $ac_c" 1>&6 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 7342 | echo "configure:7343: checking for build directories" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7343 | for dir in $SRCDIRS; do |
| 7344 | if test ! -d $dir; then |
| 7345 | mkdir $dir |
Guido van Rossum | 262cf20 | 2000-11-02 19:33:53 +0000 | [diff] [blame] | 7346 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7347 | done |
| 7348 | echo "$ac_t""done" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 7349 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7350 | # generate output files |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7351 | trap '' 1 2 15 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7352 | cat > confcache <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7353 | # This file is a shell script that caches the results of configure |
| 7354 | # tests run on this system so they can be shared between configure |
| 7355 | # scripts and configure runs. It is not useful on other systems. |
| 7356 | # If it contains results you don't want to keep, you may remove or edit it. |
| 7357 | # |
| 7358 | # By default, configure uses ./config.cache as the cache file, |
| 7359 | # creating it if it does not exist already. You can give configure |
| 7360 | # the --cache-file=FILE option to use a different cache file; that is |
| 7361 | # what configure does when it calls configure scripts in |
| 7362 | # subdirectories, so they share the cache. |
| 7363 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| 7364 | # config.status only pays attention to the cache file if you give it the |
| 7365 | # --recheck option to rerun configure. |
| 7366 | # |
| 7367 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7368 | # The following way of writing the cache mishandles newlines in values, |
| 7369 | # but we know of no workaround that is simple, portable, and efficient. |
| 7370 | # So, don't put newlines in cache variables' values. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7371 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 7372 | # 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] | 7373 | (set) 2>&1 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7374 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7375 | *ac_space=\ *) |
| 7376 | # `set' does not quote correctly, so add quotes (double-quote substitution |
| 7377 | # turns \\\\ into \\, and sed turns \\ into \). |
| 7378 | sed -n \ |
| 7379 | -e "s/'/'\\\\''/g" \ |
| 7380 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| 7381 | ;; |
| 7382 | *) |
| 7383 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 7384 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| 7385 | ;; |
| 7386 | esac >> confcache |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7387 | if cmp -s $cache_file confcache; then |
| 7388 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7389 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7390 | if test -w $cache_file; then |
| 7391 | echo "updating cache $cache_file" |
| 7392 | cat confcache > $cache_file |
| 7393 | else |
| 7394 | echo "not updating unwritable cache $cache_file" |
| 7395 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7396 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7397 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7398 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7399 | 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] | 7400 | |
| 7401 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 7402 | # Let make expand exec_prefix. |
| 7403 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7404 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7405 | # Any assignment to VPATH causes Sun make to only execute |
| 7406 | # the first set of double-colon rules, so remove it if not needed. |
| 7407 | # If there is a colon in the path, we need to keep it. |
| 7408 | if test "x$srcdir" = x.; then |
| 7409 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
| 7410 | fi |
| 7411 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7412 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7413 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7414 | DEFS=-DHAVE_CONFIG_H |
| 7415 | |
| 7416 | # Without the "./", some shells look in PATH for config.status. |
| 7417 | : ${CONFIG_STATUS=./config.status} |
| 7418 | |
| 7419 | echo creating $CONFIG_STATUS |
| 7420 | rm -f $CONFIG_STATUS |
| 7421 | cat > $CONFIG_STATUS <<EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7422 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7423 | # Generated automatically by configure. |
| 7424 | # Run this file to recreate the current configuration. |
| 7425 | # This directory was configured as follows, |
| 7426 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 7427 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7428 | # $0 $ac_configure_args |
| 7429 | # |
| 7430 | # Compiler output produced by configure, useful for debugging |
| 7431 | # configure, is in ./config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7432 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7433 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7434 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7435 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7436 | case "\$ac_option" in |
| 7437 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7438 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
| 7439 | 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] | 7440 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7441 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7442 | exit 0 ;; |
| 7443 | -help | --help | --hel | --he | --h) |
| 7444 | echo "\$ac_cs_usage"; exit 0 ;; |
| 7445 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7446 | esac |
| 7447 | done |
| 7448 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7449 | ac_given_srcdir=$srcdir |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7450 | ac_given_INSTALL="$INSTALL" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7451 | |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7452 | 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] | 7453 | EOF |
| 7454 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7455 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7456 | # Protect against being on the right side of a sed subst in config.status. |
| 7457 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 7458 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7459 | $ac_vpsub |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7460 | $extrasub |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7461 | s%@SHELL@%$SHELL%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7462 | s%@CFLAGS@%$CFLAGS%g |
| 7463 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 7464 | s%@CXXFLAGS@%$CXXFLAGS%g |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7465 | s%@FFLAGS@%$FFLAGS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7466 | s%@DEFS@%$DEFS%g |
| 7467 | s%@LDFLAGS@%$LDFLAGS%g |
| 7468 | s%@LIBS@%$LIBS%g |
| 7469 | s%@exec_prefix@%$exec_prefix%g |
| 7470 | s%@prefix@%$prefix%g |
| 7471 | s%@program_transform_name@%$program_transform_name%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7472 | s%@bindir@%$bindir%g |
| 7473 | s%@sbindir@%$sbindir%g |
| 7474 | s%@libexecdir@%$libexecdir%g |
| 7475 | s%@datadir@%$datadir%g |
| 7476 | s%@sysconfdir@%$sysconfdir%g |
| 7477 | s%@sharedstatedir@%$sharedstatedir%g |
| 7478 | s%@localstatedir@%$localstatedir%g |
| 7479 | s%@libdir@%$libdir%g |
| 7480 | s%@includedir@%$includedir%g |
| 7481 | s%@oldincludedir@%$oldincludedir%g |
| 7482 | s%@infodir@%$infodir%g |
| 7483 | s%@mandir@%$mandir%g |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 7484 | s%@VERSION@%$VERSION%g |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 7485 | s%@CONFIG_ARGS@%$CONFIG_ARGS%g |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 7486 | s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g |
| 7487 | s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g |
| 7488 | s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g |
| 7489 | s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 7490 | s%@MACHDEP@%$MACHDEP%g |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 7491 | s%@SGI_ABI@%$SGI_ABI%g |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 7492 | s%@CXX@%$CXX%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7493 | s%@MAINOBJ@%$MAINOBJ%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7494 | s%@CC@%$CC%g |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 7495 | s%@CPP@%$CPP%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7496 | s%@EXEEXT@%$EXEEXT%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7497 | s%@LIBRARY@%$LIBRARY%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7498 | s%@LDLIBRARY@%$LDLIBRARY%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7499 | s%@DLLLIBRARY@%$DLLLIBRARY%g |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 7500 | s%@BLDLIBRARY@%$BLDLIBRARY%g |
| 7501 | s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 7502 | s%@LINKCC@%$LINKCC%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7503 | s%@RANLIB@%$RANLIB%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7504 | s%@AR@%$AR%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7505 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7506 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7507 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 7508 | s%@LN@%$LN%g |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 7509 | s%@OPT@%$OPT%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7510 | s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7511 | s%@SO@%$SO%g |
| 7512 | s%@LDSHARED@%$LDSHARED%g |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 7513 | s%@BLDSHARED@%$BLDSHARED%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7514 | s%@CCSHARED@%$CCSHARED%g |
| 7515 | s%@LINKFORSHARED@%$LINKFORSHARED%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7516 | s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7517 | s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g |
| 7518 | s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 7519 | s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 7520 | s%@LDLAST@%$LDLAST%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7521 | s%@DLINCLDIR@%$DLINCLDIR%g |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 7522 | s%@DYNLOADFILE@%$DYNLOADFILE%g |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 7523 | s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7524 | s%@LIBOBJS@%$LIBOBJS%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7525 | s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g |
| 7526 | s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g |
| 7527 | 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] | 7528 | s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7529 | s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7530 | s%@LIBM@%$LIBM%g |
| 7531 | s%@LIBC@%$LIBC%g |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7532 | s%@UNICODE_OBJS@%$UNICODE_OBJS%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7533 | s%@SRCDIRS@%$SRCDIRS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7534 | |
| 7535 | CEOF |
| 7536 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7537 | |
| 7538 | cat >> $CONFIG_STATUS <<\EOF |
| 7539 | |
| 7540 | # Split the substitutions into bite-sized pieces for seds with |
| 7541 | # small command number limits, like on Digital OSF/1 and HP-UX. |
| 7542 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 7543 | ac_file=1 # Number of current file. |
| 7544 | ac_beg=1 # First line for current file. |
| 7545 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 7546 | ac_more_lines=: |
| 7547 | ac_sed_cmds="" |
| 7548 | while $ac_more_lines; do |
| 7549 | if test $ac_beg -gt 1; then |
| 7550 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7551 | else |
| 7552 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7553 | fi |
| 7554 | if test ! -s conftest.s$ac_file; then |
| 7555 | ac_more_lines=false |
| 7556 | rm -f conftest.s$ac_file |
| 7557 | else |
| 7558 | if test -z "$ac_sed_cmds"; then |
| 7559 | ac_sed_cmds="sed -f conftest.s$ac_file" |
| 7560 | else |
| 7561 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
| 7562 | fi |
| 7563 | ac_file=`expr $ac_file + 1` |
| 7564 | ac_beg=$ac_end |
| 7565 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
| 7566 | fi |
| 7567 | done |
| 7568 | if test -z "$ac_sed_cmds"; then |
| 7569 | ac_sed_cmds=cat |
| 7570 | fi |
| 7571 | EOF |
| 7572 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7573 | cat >> $CONFIG_STATUS <<EOF |
| 7574 | |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7575 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"} |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7576 | EOF |
| 7577 | cat >> $CONFIG_STATUS <<\EOF |
| 7578 | 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] | 7579 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7580 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7581 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7582 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7583 | *) ac_file_in="${ac_file}.in" ;; |
| 7584 | esac |
| 7585 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7586 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7587 | |
| 7588 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7589 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7590 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7591 | # The file is in a subdirectory. |
| 7592 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7593 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7594 | # A "../" for each directory in $ac_dir_suffix. |
| 7595 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
| 7596 | else |
| 7597 | ac_dir_suffix= ac_dots= |
| 7598 | fi |
| 7599 | |
| 7600 | case "$ac_given_srcdir" in |
| 7601 | .) srcdir=. |
| 7602 | if test -z "$ac_dots"; then top_srcdir=. |
| 7603 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
| 7604 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; |
| 7605 | *) # Relative path. |
| 7606 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 7607 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
| 7608 | esac |
| 7609 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7610 | case "$ac_given_INSTALL" in |
| 7611 | [/$]*) INSTALL="$ac_given_INSTALL" ;; |
| 7612 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
| 7613 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7614 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7615 | echo creating "$ac_file" |
| 7616 | rm -f "$ac_file" |
| 7617 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
| 7618 | case "$ac_file" in |
| 7619 | *Makefile*) ac_comsub="1i\\ |
| 7620 | # $configure_input" ;; |
| 7621 | *) ac_comsub= ;; |
| 7622 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7623 | |
| 7624 | 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] | 7625 | sed -e "$ac_comsub |
| 7626 | s%@configure_input@%$configure_input%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7627 | s%@srcdir@%$srcdir%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7628 | s%@top_srcdir@%$top_srcdir%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7629 | s%@INSTALL@%$INSTALL%g |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7630 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7631 | fi; done |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7632 | rm -f conftest.s* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7633 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7634 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
| 7635 | # 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] | 7636 | # |
| 7637 | # ac_d sets the value in "#define NAME VALUE" lines. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7638 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 7639 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7640 | ac_dC='\3' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7641 | ac_dD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7642 | # 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] | 7643 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7644 | ac_uB='\([ ]\)%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7645 | ac_uC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7646 | ac_uD='\4%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7647 | # 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] | 7648 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7649 | ac_eB='$%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7650 | ac_eC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7651 | ac_eD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7652 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7653 | if test "${CONFIG_HEADERS+set}" != set; then |
| 7654 | EOF |
| 7655 | cat >> $CONFIG_STATUS <<EOF |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7656 | CONFIG_HEADERS="pyconfig.h" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7657 | EOF |
| 7658 | cat >> $CONFIG_STATUS <<\EOF |
| 7659 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7660 | 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] | 7661 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7662 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7663 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7664 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7665 | *) ac_file_in="${ac_file}.in" ;; |
| 7666 | esac |
| 7667 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7668 | echo creating $ac_file |
| 7669 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7670 | rm -f conftest.frag conftest.in conftest.out |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7671 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 7672 | cat $ac_file_inputs > conftest.in |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7673 | |
| 7674 | EOF |
| 7675 | |
| 7676 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
| 7677 | # 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] | 7678 | # 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] | 7679 | # Protect against being in an unquoted here document in config.status. |
| 7680 | rm -f conftest.vals |
| 7681 | cat > conftest.hdr <<\EOF |
| 7682 | s/[\\&%]/\\&/g |
| 7683 | s%[\\$`]%\\&%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7684 | 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] | 7685 | s%ac_d%ac_u%gp |
| 7686 | s%ac_u%ac_e%gp |
| 7687 | EOF |
| 7688 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
| 7689 | rm -f conftest.hdr |
| 7690 | |
| 7691 | # This sed command replaces #undef with comments. This is necessary, for |
| 7692 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 7693 | # on some systems where configure will not decide to define it. |
| 7694 | cat >> conftest.vals <<\EOF |
| 7695 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
| 7696 | EOF |
| 7697 | |
| 7698 | # Break up conftest.vals because some shells have a limit on |
| 7699 | # 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] | 7700 | |
| 7701 | rm -f conftest.tail |
| 7702 | while : |
| 7703 | do |
| 7704 | ac_lines=`grep -c . conftest.vals` |
| 7705 | # grep -c gives empty output for an empty file on some AIX systems. |
| 7706 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 7707 | # Write a limited-size here document to conftest.frag. |
| 7708 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
| 7709 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
| 7710 | echo 'CEOF |
| 7711 | sed -f conftest.frag conftest.in > conftest.out |
| 7712 | rm -f conftest.in |
| 7713 | mv conftest.out conftest.in |
| 7714 | ' >> $CONFIG_STATUS |
| 7715 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
| 7716 | rm -f conftest.vals |
| 7717 | mv conftest.tail conftest.vals |
| 7718 | done |
| 7719 | rm -f conftest.vals |
| 7720 | |
| 7721 | cat >> $CONFIG_STATUS <<\EOF |
| 7722 | rm -f conftest.frag conftest.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7723 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7724 | cat conftest.in >> conftest.h |
| 7725 | rm -f conftest.in |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7726 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7727 | echo "$ac_file is unchanged" |
| 7728 | rm -f conftest.h |
| 7729 | else |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7730 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7731 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7732 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7733 | # The file is in a subdirectory. |
| 7734 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 7735 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7736 | rm -f $ac_file |
| 7737 | mv conftest.h $ac_file |
| 7738 | fi |
| 7739 | fi; done |
| 7740 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7741 | EOF |
| 7742 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7743 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7744 | EOF |
| 7745 | cat >> $CONFIG_STATUS <<\EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7746 | |
| 7747 | exit 0 |
| 7748 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7749 | chmod +x $CONFIG_STATUS |
| 7750 | rm -fr confdefs* $ac_clean_files |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7751 | 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] | 7752 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7753 | |
| 7754 | echo "creating Setup" |
| 7755 | if test ! -f Modules/Setup |
| 7756 | then |
| 7757 | cp $srcdir/Modules/Setup.dist Modules/Setup |
| 7758 | fi |
| 7759 | |
| 7760 | echo "creating Setup.local" |
| 7761 | if test ! -f Modules/Setup.local |
| 7762 | then |
| 7763 | echo "# Edit this file for local setup changes" >Modules/Setup.local |
| 7764 | fi |
| 7765 | |
| 7766 | echo "creating Makefile" |
| 7767 | $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ |
| 7768 | -s Modules Modules/Setup.config \ |
Neil Schemenauer | f8b71c5 | 2001-04-21 17:41:16 +0000 | [diff] [blame] | 7769 | Modules/Setup.local Modules/Setup |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 7770 | mv config.c Modules |