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 | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3 | # From configure.in Revision: 1.263 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5 | # Guess values for system-dependent variables and create Makefiles. |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6 | # Generated automatically using autoconf version 2.13 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8 | # |
| 9 | # This configure script is free software; the Free Software Foundation |
| 10 | # gives unlimited permission to copy, distribute and modify it. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 11 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12 | # Defaults: |
| 13 | ac_help= |
| 14 | ac_default_prefix=/usr/local |
| 15 | # Any additions from configure.in: |
| 16 | ac_help="$ac_help |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 17 | --enable-framework[=INSTALLDIR] Build (MacOSX|Darwin) framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 18 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 19 | --without-gcc never use gcc" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 20 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 21 | --with-cxx=<compiler> enable C++ support" |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 22 | ac_help="$ac_help |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 23 | --with-suffix=.exe set executable suffix" |
| 24 | ac_help="$ac_help |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 25 | --with-pydebug build with Py_DEBUG defined" |
| 26 | ac_help="$ac_help |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 27 | --enable-toolbox-glue disable/enable MacOSX glue code for extensions" |
| 28 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 29 | --with-libs='lib1 ...' link against additional libs" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 30 | ac_help="$ac_help |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 31 | --with-signal-module disable/enable signal module" |
| 32 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 33 | --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries" |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 34 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 35 | --with(out)-threads[=DIRECTORY] disable/enable thread support" |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 36 | ac_help="$ac_help |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 37 | --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 38 | ac_help="$ac_help |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 39 | --with-pth use GNU pth threading libraries" |
| 40 | ac_help="$ac_help |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 41 | --enable-ipv6 Enable ipv6 (with ipv4) support |
| 42 | --disable-ipv6 Disable ipv6 support" |
| 43 | ac_help="$ac_help |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 44 | --with(out)-cycle-gc disable/enable garbage collection" |
| 45 | ac_help="$ac_help |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 46 | --with(out)-pymalloc disable/enable specialized mallocs" |
| 47 | ac_help="$ac_help |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 48 | --with-wctype-functions use wctype.h functions" |
| 49 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 50 | --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 51 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 52 | --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 53 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 54 | --with-fpectl enable SIGFPE catching" |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 55 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 56 | --with-libm=STRING math library" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 57 | ac_help="$ac_help |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 58 | --with-libc=STRING C library" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 59 | ac_help="$ac_help |
| 60 | --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 61 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 62 | # Initialize some variables set by options. |
| 63 | # The variables have the same names as the options, with |
| 64 | # dashes changed to underlines. |
| 65 | build=NONE |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 66 | cache_file=./config.cache |
| 67 | exec_prefix=NONE |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 68 | host=NONE |
| 69 | no_create= |
| 70 | nonopt=NONE |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 71 | no_recursion= |
| 72 | prefix=NONE |
| 73 | program_prefix=NONE |
| 74 | program_suffix=NONE |
| 75 | program_transform_name=s,x,x, |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 76 | silent= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 77 | site= |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 78 | srcdir= |
| 79 | target=NONE |
| 80 | verbose= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 81 | x_includes=NONE |
| 82 | x_libraries=NONE |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 83 | bindir='${exec_prefix}/bin' |
| 84 | sbindir='${exec_prefix}/sbin' |
| 85 | libexecdir='${exec_prefix}/libexec' |
| 86 | datadir='${prefix}/share' |
| 87 | sysconfdir='${prefix}/etc' |
| 88 | sharedstatedir='${prefix}/com' |
| 89 | localstatedir='${prefix}/var' |
| 90 | libdir='${exec_prefix}/lib' |
| 91 | includedir='${prefix}/include' |
| 92 | oldincludedir='/usr/include' |
| 93 | infodir='${prefix}/info' |
| 94 | mandir='${prefix}/man' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 95 | |
| 96 | # Initialize some other variables. |
| 97 | subdirs= |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 98 | MFLAGS= MAKEFLAGS= |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 99 | SHELL=${CONFIG_SHELL-/bin/sh} |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 100 | # Maximum number of lines to put in a shell here document. |
| 101 | ac_max_here_lines=12 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 102 | |
| 103 | ac_prev= |
| 104 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 105 | do |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 106 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 107 | # If the previous option needs an argument, assign it. |
| 108 | if test -n "$ac_prev"; then |
| 109 | eval "$ac_prev=\$ac_option" |
| 110 | ac_prev= |
| 111 | continue |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 112 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 113 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 114 | case "$ac_option" in |
| 115 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
| 116 | *) ac_optarg= ;; |
| 117 | esac |
| 118 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 119 | # Accept the important Cygnus configure options, so we can diagnose typos. |
| 120 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 121 | case "$ac_option" in |
| 122 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 123 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
| 124 | ac_prev=bindir ;; |
| 125 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) |
| 126 | bindir="$ac_optarg" ;; |
| 127 | |
| 128 | -build | --build | --buil | --bui | --bu) |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 129 | ac_prev=build ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 130 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 131 | build="$ac_optarg" ;; |
| 132 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 133 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
| 134 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) |
| 135 | ac_prev=cache_file ;; |
| 136 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ |
| 137 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) |
| 138 | cache_file="$ac_optarg" ;; |
| 139 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 140 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
| 141 | ac_prev=datadir ;; |
| 142 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ |
| 143 | | --da=*) |
| 144 | datadir="$ac_optarg" ;; |
| 145 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 146 | -disable-* | --disable-*) |
| 147 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 148 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 149 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 150 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 151 | fi |
| 152 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 153 | eval "enable_${ac_feature}=no" ;; |
| 154 | |
| 155 | -enable-* | --enable-*) |
| 156 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 157 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 158 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 159 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 160 | fi |
| 161 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 162 | case "$ac_option" in |
| 163 | *=*) ;; |
| 164 | *) ac_optarg=yes ;; |
| 165 | esac |
| 166 | eval "enable_${ac_feature}='$ac_optarg'" ;; |
| 167 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 168 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ |
| 169 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ |
| 170 | | --exec | --exe | --ex) |
| 171 | ac_prev=exec_prefix ;; |
| 172 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ |
| 173 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ |
| 174 | | --exec=* | --exe=* | --ex=*) |
| 175 | exec_prefix="$ac_optarg" ;; |
| 176 | |
| 177 | -gas | --gas | --ga | --g) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 178 | # Obsolete; use --with-gas. |
| 179 | with_gas=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 180 | |
| 181 | -help | --help | --hel | --he) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 182 | # Omit some internal or obsolete options to make the list less imposing. |
| 183 | # This message is too long to be a string in the A/UX 3.1 sh. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 184 | cat << EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 185 | Usage: configure [options] [host] |
| 186 | Options: [defaults in brackets after descriptions] |
| 187 | Configuration: |
| 188 | --cache-file=FILE cache test results in FILE |
| 189 | --help print this message |
| 190 | --no-create do not create output files |
| 191 | --quiet, --silent do not print \`checking...' messages |
| 192 | --version print the version of autoconf that created configure |
| 193 | Directory and file names: |
| 194 | --prefix=PREFIX install architecture-independent files in PREFIX |
| 195 | [$ac_default_prefix] |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 196 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 197 | [same as prefix] |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 198 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
| 199 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] |
| 200 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] |
| 201 | --datadir=DIR read-only architecture-independent data in DIR |
| 202 | [PREFIX/share] |
| 203 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] |
| 204 | --sharedstatedir=DIR modifiable architecture-independent data in DIR |
| 205 | [PREFIX/com] |
| 206 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] |
| 207 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] |
| 208 | --includedir=DIR C header files in DIR [PREFIX/include] |
| 209 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] |
| 210 | --infodir=DIR info documentation in DIR [PREFIX/info] |
| 211 | --mandir=DIR man documentation in DIR [PREFIX/man] |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 212 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
| 213 | --program-prefix=PREFIX prepend PREFIX to installed program names |
| 214 | --program-suffix=SUFFIX append SUFFIX to installed program names |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 215 | --program-transform-name=PROGRAM |
| 216 | run sed PROGRAM on installed program names |
| 217 | EOF |
| 218 | cat << EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 219 | Host type: |
| 220 | --build=BUILD configure for building on BUILD [BUILD=HOST] |
| 221 | --host=HOST configure for HOST [guessed] |
| 222 | --target=TARGET configure for TARGET [TARGET=HOST] |
| 223 | Features and packages: |
| 224 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
| 225 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
| 226 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
| 227 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
| 228 | --x-includes=DIR X include files are in DIR |
| 229 | --x-libraries=DIR X library files are in DIR |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 230 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 231 | if test -n "$ac_help"; then |
| 232 | echo "--enable and --with options recognized:$ac_help" |
| 233 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 234 | exit 0 ;; |
| 235 | |
| 236 | -host | --host | --hos | --ho) |
| 237 | ac_prev=host ;; |
| 238 | -host=* | --host=* | --hos=* | --ho=*) |
| 239 | host="$ac_optarg" ;; |
| 240 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 241 | -includedir | --includedir | --includedi | --included | --include \ |
| 242 | | --includ | --inclu | --incl | --inc) |
| 243 | ac_prev=includedir ;; |
| 244 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ |
| 245 | | --includ=* | --inclu=* | --incl=* | --inc=*) |
| 246 | includedir="$ac_optarg" ;; |
| 247 | |
| 248 | -infodir | --infodir | --infodi | --infod | --info | --inf) |
| 249 | ac_prev=infodir ;; |
| 250 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) |
| 251 | infodir="$ac_optarg" ;; |
| 252 | |
| 253 | -libdir | --libdir | --libdi | --libd) |
| 254 | ac_prev=libdir ;; |
| 255 | -libdir=* | --libdir=* | --libdi=* | --libd=*) |
| 256 | libdir="$ac_optarg" ;; |
| 257 | |
| 258 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ |
| 259 | | --libexe | --libex | --libe) |
| 260 | ac_prev=libexecdir ;; |
| 261 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ |
| 262 | | --libexe=* | --libex=* | --libe=*) |
| 263 | libexecdir="$ac_optarg" ;; |
| 264 | |
| 265 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
| 266 | | --localstate | --localstat | --localsta | --localst \ |
| 267 | | --locals | --local | --loca | --loc | --lo) |
| 268 | ac_prev=localstatedir ;; |
| 269 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ |
| 270 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ |
| 271 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) |
| 272 | localstatedir="$ac_optarg" ;; |
| 273 | |
| 274 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) |
| 275 | ac_prev=mandir ;; |
| 276 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) |
| 277 | mandir="$ac_optarg" ;; |
| 278 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 279 | -nfp | --nfp | --nf) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 280 | # Obsolete; use --without-fp. |
| 281 | with_fp=no ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 282 | |
| 283 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 284 | | --no-cr | --no-c) |
| 285 | no_create=yes ;; |
| 286 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 287 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 288 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) |
| 289 | no_recursion=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 290 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 291 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
| 292 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ |
| 293 | | --oldin | --oldi | --old | --ol | --o) |
| 294 | ac_prev=oldincludedir ;; |
| 295 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ |
| 296 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ |
| 297 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) |
| 298 | oldincludedir="$ac_optarg" ;; |
| 299 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 300 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
| 301 | ac_prev=prefix ;; |
| 302 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) |
| 303 | prefix="$ac_optarg" ;; |
| 304 | |
| 305 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ |
| 306 | | --program-pre | --program-pr | --program-p) |
| 307 | ac_prev=program_prefix ;; |
| 308 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ |
| 309 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) |
| 310 | program_prefix="$ac_optarg" ;; |
| 311 | |
| 312 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ |
| 313 | | --program-suf | --program-su | --program-s) |
| 314 | ac_prev=program_suffix ;; |
| 315 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ |
| 316 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) |
| 317 | program_suffix="$ac_optarg" ;; |
| 318 | |
| 319 | -program-transform-name | --program-transform-name \ |
| 320 | | --program-transform-nam | --program-transform-na \ |
| 321 | | --program-transform-n | --program-transform- \ |
| 322 | | --program-transform | --program-transfor \ |
| 323 | | --program-transfo | --program-transf \ |
| 324 | | --program-trans | --program-tran \ |
| 325 | | --progr-tra | --program-tr | --program-t) |
| 326 | ac_prev=program_transform_name ;; |
| 327 | -program-transform-name=* | --program-transform-name=* \ |
| 328 | | --program-transform-nam=* | --program-transform-na=* \ |
| 329 | | --program-transform-n=* | --program-transform-=* \ |
| 330 | | --program-transform=* | --program-transfor=* \ |
| 331 | | --program-transfo=* | --program-transf=* \ |
| 332 | | --program-trans=* | --program-tran=* \ |
| 333 | | --progr-tra=* | --program-tr=* | --program-t=*) |
| 334 | program_transform_name="$ac_optarg" ;; |
| 335 | |
| 336 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 337 | | -silent | --silent | --silen | --sile | --sil) |
| 338 | silent=yes ;; |
| 339 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 340 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
| 341 | ac_prev=sbindir ;; |
| 342 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ |
| 343 | | --sbi=* | --sb=*) |
| 344 | sbindir="$ac_optarg" ;; |
| 345 | |
| 346 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ |
| 347 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ |
| 348 | | --sharedst | --shareds | --shared | --share | --shar \ |
| 349 | | --sha | --sh) |
| 350 | ac_prev=sharedstatedir ;; |
| 351 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ |
| 352 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ |
| 353 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ |
| 354 | | --sha=* | --sh=*) |
| 355 | sharedstatedir="$ac_optarg" ;; |
| 356 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 357 | -site | --site | --sit) |
| 358 | ac_prev=site ;; |
| 359 | -site=* | --site=* | --sit=*) |
| 360 | site="$ac_optarg" ;; |
| 361 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 362 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
| 363 | ac_prev=srcdir ;; |
| 364 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
| 365 | srcdir="$ac_optarg" ;; |
| 366 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 367 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
| 368 | | --syscon | --sysco | --sysc | --sys | --sy) |
| 369 | ac_prev=sysconfdir ;; |
| 370 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ |
| 371 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) |
| 372 | sysconfdir="$ac_optarg" ;; |
| 373 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 374 | -target | --target | --targe | --targ | --tar | --ta | --t) |
| 375 | ac_prev=target ;; |
| 376 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
| 377 | target="$ac_optarg" ;; |
| 378 | |
| 379 | -v | -verbose | --verbose | --verbos | --verbo | --verb) |
| 380 | verbose=yes ;; |
| 381 | |
| 382 | -version | --version | --versio | --versi | --vers) |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 383 | echo "configure generated by autoconf version 2.13" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 384 | exit 0 ;; |
| 385 | |
| 386 | -with-* | --with-*) |
| 387 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 388 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 389 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 390 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 391 | fi |
| 392 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 393 | case "$ac_option" in |
| 394 | *=*) ;; |
| 395 | *) ac_optarg=yes ;; |
| 396 | esac |
| 397 | eval "with_${ac_package}='$ac_optarg'" ;; |
| 398 | |
| 399 | -without-* | --without-*) |
| 400 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 401 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 402 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 403 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 404 | fi |
| 405 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 406 | eval "with_${ac_package}=no" ;; |
| 407 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 408 | --x) |
| 409 | # Obsolete; use --with-x. |
| 410 | with_x=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 411 | |
| 412 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ |
| 413 | | --x-incl | --x-inc | --x-in | --x-i) |
| 414 | ac_prev=x_includes ;; |
| 415 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ |
| 416 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) |
| 417 | x_includes="$ac_optarg" ;; |
| 418 | |
| 419 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ |
| 420 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) |
| 421 | ac_prev=x_libraries ;; |
| 422 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ |
| 423 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) |
| 424 | x_libraries="$ac_optarg" ;; |
| 425 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 426 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 427 | ;; |
| 428 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 429 | *) |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 430 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 431 | echo "configure: warning: $ac_option: invalid host type" 1>&2 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 432 | fi |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 433 | if test "x$nonopt" != xNONE; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 434 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 435 | fi |
| 436 | nonopt="$ac_option" |
| 437 | ;; |
| 438 | |
| 439 | esac |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 440 | done |
| 441 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 442 | if test -n "$ac_prev"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 443 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 444 | fi |
| 445 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 446 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 447 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 448 | # File descriptor usage: |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 449 | # 0 standard input |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 450 | # 1 file creation |
| 451 | # 2 errors and warnings |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 452 | # 3 some systems may open it to /dev/tty |
| 453 | # 4 used on the Kubota Titan |
| 454 | # 6 checking for... messages and results |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 455 | # 5 compiler messages saved in config.log |
| 456 | if test "$silent" = yes; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 457 | exec 6>/dev/null |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 458 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 459 | exec 6>&1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 460 | fi |
| 461 | exec 5>./config.log |
| 462 | |
| 463 | echo "\ |
| 464 | This file contains any messages produced by compilers while |
| 465 | running configure, to aid debugging if configure makes a mistake. |
| 466 | " 1>&5 |
| 467 | |
| 468 | # Strip out --no-create and --no-recursion so they do not pile up. |
| 469 | # Also quote any args containing shell metacharacters. |
| 470 | ac_configure_args= |
| 471 | for ac_arg |
| 472 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 473 | case "$ac_arg" in |
| 474 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 475 | | --no-cr | --no-c) ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 476 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 477 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; |
| 478 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) |
| 479 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; |
| 480 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 481 | esac |
| 482 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 483 | |
| 484 | # NLS nuisances. |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 485 | # Only set these to C if already set. These must not be set unconditionally |
| 486 | # because not all systems understand e.g. LANG=C (notably SCO). |
| 487 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! |
| 488 | # Non-C LC_CTYPE values break the ctype check. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 489 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 490 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
| 491 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi |
| 492 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 493 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 494 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
| 495 | rm -rf conftest* confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 496 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. |
| 497 | echo > confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 498 | |
| 499 | # A filename unique to this package, relative to the directory that |
| 500 | # configure is in, which we can look for to find out if srcdir is correct. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 501 | ac_unique_file=Include/object.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 502 | |
| 503 | # Find the source files, if location was not specified. |
| 504 | if test -z "$srcdir"; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 505 | ac_srcdir_defaulted=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 506 | # Try the directory containing this script, then its parent. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 507 | ac_prog=$0 |
| 508 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` |
| 509 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. |
| 510 | srcdir=$ac_confdir |
| 511 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 512 | srcdir=.. |
| 513 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 514 | else |
| 515 | ac_srcdir_defaulted=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 516 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 517 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 518 | if test "$ac_srcdir_defaulted" = yes; then |
| 519 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 520 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 521 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 522 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 523 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 524 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
| 525 | |
| 526 | # Prefer explicitly selected file to automatically selected ones. |
| 527 | if test -z "$CONFIG_SITE"; then |
| 528 | if test "x$prefix" != xNONE; then |
| 529 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" |
| 530 | else |
| 531 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" |
| 532 | fi |
| 533 | fi |
| 534 | for ac_site_file in $CONFIG_SITE; do |
| 535 | if test -r "$ac_site_file"; then |
| 536 | echo "loading site script $ac_site_file" |
| 537 | . "$ac_site_file" |
| 538 | fi |
| 539 | done |
| 540 | |
| 541 | if test -r "$cache_file"; then |
| 542 | echo "loading cache $cache_file" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 543 | . $cache_file |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 544 | else |
| 545 | echo "creating cache $cache_file" |
| 546 | > $cache_file |
| 547 | fi |
| 548 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 549 | ac_ext=c |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 550 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 551 | ac_cpp='$CPP $CPPFLAGS' |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 552 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 553 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 554 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 555 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 556 | ac_exeext= |
| 557 | ac_objext=o |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 558 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
| 559 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. |
| 560 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then |
| 561 | ac_n= ac_c=' |
| 562 | ' ac_t=' ' |
| 563 | else |
| 564 | ac_n=-n ac_c= ac_t= |
| 565 | fi |
| 566 | else |
| 567 | ac_n= ac_c='\c' ac_t= |
| 568 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 569 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 570 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 571 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 572 | |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 573 | # Set VERSION so we only need to edit in one place (i.e., here) |
| 574 | |
Guido van Rossum | 6db412b | 2001-04-18 04:37:57 +0000 | [diff] [blame] | 575 | VERSION=2.2 |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 576 | |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 577 | # Arguments passed to configure. |
| 578 | |
| 579 | CONFIG_ARGS="$ac_configure_args" |
| 580 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 581 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 582 | # Check whether --enable-framework or --disable-framework was given. |
| 583 | if test "${enable_framework+set}" = set; then |
| 584 | enableval="$enable_framework" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 585 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 586 | case $enableval in |
| 587 | yes) |
| 588 | enableval=/Library/Frameworks |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 589 | esac |
| 590 | case $enableval in |
| 591 | no) |
| 592 | PYTHONFRAMEWORK= |
| 593 | PYTHONFRAMEWORKDIR=no-framework |
| 594 | PYTHONFRAMEWORKPREFIX= |
| 595 | PYTHONFRAMEWORKINSTALLDIR= |
| 596 | enable_framework= |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 597 | ;; |
| 598 | *) |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 599 | PYTHONFRAMEWORK=Python |
| 600 | PYTHONFRAMEWORKDIR=Python.framework |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 601 | PYTHONFRAMEWORKPREFIX=$enableval |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 602 | PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR |
| 603 | prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 604 | esac |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 605 | |
| 606 | else |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 607 | |
| 608 | PYTHONFRAMEWORK= |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 609 | PYTHONFRAMEWORKDIR=no-framework |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 610 | PYTHONFRAMEWORKPREFIX= |
| 611 | PYTHONFRAMEWORKINSTALLDIR= |
| 612 | enable_framework= |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 613 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 614 | fi |
| 615 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 616 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 617 | |
| 618 | |
| 619 | |
| 620 | |
| 621 | ##AC_ARG_WITH(dyld, |
| 622 | ##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,) |
| 623 | ## |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 624 | # Set name for machine-dependent library files |
| 625 | |
| 626 | echo $ac_n "checking MACHDEP""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 627 | echo "configure:628: checking MACHDEP" >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 628 | if test -z "$MACHDEP" |
| 629 | then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 630 | ac_sys_system=`uname -s` |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 631 | if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 632 | ac_sys_release=`uname -v` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 633 | else |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 634 | ac_sys_release=`uname -r` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 635 | fi |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 636 | ac_md_system=`echo $ac_sys_system | |
| 637 | tr -d '/ ' | tr '[A-Z]' '[a-z]'` |
| 638 | ac_md_release=`echo $ac_sys_release | |
| 639 | tr -d '/ ' | sed 's/\..*//'` |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 640 | MACHDEP="$ac_md_system$ac_md_release" |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 641 | |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 642 | case $MACHDEP in |
Andrew M. Kuchling | 5a3e4cb | 2001-07-20 19:29:04 +0000 | [diff] [blame] | 643 | cygwin*) MACHDEP="cygwin";; |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 644 | '') MACHDEP="unknown";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 645 | esac |
| 646 | fi |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 647 | |
| 648 | # |
| 649 | # SGI compilers allow the specification of the both the ABI and the |
| 650 | # ISA on the command line. Depending on the values of these switches, |
| 651 | # different and often incompatable code will be generated. |
| 652 | # |
| 653 | # The SGI_ABI variable can be used to modify the CC and LDFLAGS and |
| 654 | # thus supply support for various ABI/ISA combinations. The MACHDEP |
| 655 | # variable is also adjusted. |
| 656 | # |
| 657 | |
| 658 | if test ! -z "$SGI_ABI" |
| 659 | then |
| 660 | CC="cc $SGI_ABI" |
| 661 | LDFLAGS="$SGI_ABI $LDFLAGS" |
| 662 | MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'` |
| 663 | fi |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 664 | echo "$ac_t""$MACHDEP" 1>&6 |
| 665 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 666 | # checks for alternative programs |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 667 | echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 668 | echo "configure:669: checking for --without-gcc" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 669 | # Check whether --with-gcc or --without-gcc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 670 | if test "${with_gcc+set}" = set; then |
| 671 | withval="$with_gcc" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 672 | |
| 673 | case $withval in |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 674 | no) CC=cc |
| 675 | without_gcc=yes;; |
| 676 | yes) CC=gcc |
| 677 | without_gcc=no;; |
| 678 | *) CC=$withval |
| 679 | without_gcc=$withval;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 680 | esac |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 681 | else |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 682 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 683 | case $ac_sys_system in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 684 | AIX*) CC=cc_r |
| 685 | without_gcc=;; |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 686 | BeOS*) |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 687 | case $BE_HOST_CPU in |
| 688 | ppc) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 689 | CC=mwcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 690 | without_gcc=yes |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 691 | OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 692 | CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 693 | LDFLAGS="$LDFLAGS -nodup" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 694 | ;; |
| 695 | x86) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 696 | CC=gcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 697 | without_gcc=no |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 698 | OPT=-O |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 699 | ;; |
| 700 | *) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 701 | { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; } |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 702 | ;; |
| 703 | esac |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 704 | AR="\$(srcdir)/Modules/ar_beos" |
| 705 | RANLIB=: |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 706 | ;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 707 | Monterey*) |
| 708 | RANLIB=: |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 709 | without_gcc=;; |
| 710 | *) without_gcc=no;; |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 711 | esac |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 712 | fi |
| 713 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 714 | echo "$ac_t""$without_gcc" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 715 | |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 716 | |
| 717 | |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 718 | MAINOBJ=python.o |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 719 | echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 720 | echo "configure:721: checking for --with-cxx=<compiler>" >&5 |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 721 | # Check whether --with-cxx or --without-cxx was given. |
| 722 | if test "${with_cxx+set}" = set; then |
| 723 | withval="$with_cxx" |
| 724 | |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 725 | check_cxx=no |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 726 | case $withval in |
| 727 | no) CXX= |
| 728 | with_cxx=no;; |
| 729 | *) CXX=$withval |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 730 | MAINOBJ=ccpython.o |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 731 | with_cxx=$withval;; |
| 732 | esac |
| 733 | else |
| 734 | |
| 735 | with_cxx=no |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 736 | check_cxx=yes |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 737 | |
| 738 | fi |
| 739 | |
| 740 | echo "$ac_t""$with_cxx" 1>&6 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 741 | |
| 742 | |
| 743 | if test "$check_cxx" = "yes" |
| 744 | then |
| 745 | for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl |
| 746 | do |
| 747 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 748 | set dummy $ac_prog; ac_word=$2 |
| 749 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 750 | echo "configure:751: checking for $ac_word" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 751 | if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then |
| 752 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 753 | else |
| 754 | if test -n "$CXX"; then |
| 755 | ac_cv_prog_CXX="$CXX" # Let the user override the test. |
| 756 | else |
| 757 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 758 | ac_dummy="$PATH" |
| 759 | for ac_dir in $ac_dummy; do |
| 760 | test -z "$ac_dir" && ac_dir=. |
| 761 | if test -f $ac_dir/$ac_word; then |
| 762 | ac_cv_prog_CXX="$ac_prog" |
| 763 | break |
| 764 | fi |
| 765 | done |
| 766 | IFS="$ac_save_ifs" |
| 767 | fi |
| 768 | fi |
| 769 | CXX="$ac_cv_prog_CXX" |
| 770 | if test -n "$CXX"; then |
| 771 | echo "$ac_t""$CXX" 1>&6 |
| 772 | else |
| 773 | echo "$ac_t""no" 1>&6 |
| 774 | fi |
| 775 | |
| 776 | test -n "$CXX" && break |
| 777 | done |
| 778 | test -n "$CXX" || CXX="notfound" |
| 779 | |
| 780 | if test "$CXX" = "notfound" |
| 781 | then |
| 782 | CXX= |
| 783 | else |
| 784 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 785 | echo "configure:786: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 786 | |
| 787 | ac_ext=C |
| 788 | # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 789 | ac_cpp='$CXXCPP $CPPFLAGS' |
| 790 | ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 791 | ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 792 | cross_compiling=$ac_cv_prog_cxx_cross |
| 793 | |
| 794 | cat > conftest.$ac_ext << EOF |
| 795 | |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 796 | #line 797 "configure" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 797 | #include "confdefs.h" |
| 798 | |
| 799 | int main(){return(0);} |
| 800 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 801 | if { (eval echo configure:802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 802 | ac_cv_prog_cxx_works=yes |
| 803 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 804 | if (./conftest; exit) 2>/dev/null; then |
| 805 | ac_cv_prog_cxx_cross=no |
| 806 | else |
| 807 | ac_cv_prog_cxx_cross=yes |
| 808 | fi |
| 809 | else |
| 810 | echo "configure: failed program was:" >&5 |
| 811 | cat conftest.$ac_ext >&5 |
| 812 | ac_cv_prog_cxx_works=no |
| 813 | fi |
| 814 | rm -fr conftest* |
| 815 | ac_ext=c |
| 816 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 817 | ac_cpp='$CPP $CPPFLAGS' |
| 818 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 819 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 820 | cross_compiling=$ac_cv_prog_cc_cross |
| 821 | |
| 822 | echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 |
| 823 | if test $ac_cv_prog_cxx_works = no; then |
| 824 | { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } |
| 825 | fi |
| 826 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 827 | echo "configure:828: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 828 | echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 |
| 829 | cross_compiling=$ac_cv_prog_cxx_cross |
| 830 | |
| 831 | fi |
| 832 | fi |
| 833 | |
Guido van Rossum | 8b131c5 | 1995-03-09 14:10:13 +0000 | [diff] [blame] | 834 | # If the user switches compilers, we can't believe the cache |
| 835 | if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" |
| 836 | then |
| 837 | { echo "configure: error: cached CC is different -- throw away $cache_file |
| 838 | (it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; } |
| 839 | fi |
| 840 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 841 | # Extract the first word of "gcc", so it can be a program name with args. |
| 842 | set dummy gcc; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 843 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 844 | echo "configure:845: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 845 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 846 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 847 | else |
| 848 | if test -n "$CC"; then |
| 849 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 850 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 851 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 852 | ac_dummy="$PATH" |
| 853 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 854 | test -z "$ac_dir" && ac_dir=. |
| 855 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 856 | ac_cv_prog_CC="gcc" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 857 | break |
| 858 | fi |
| 859 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 860 | IFS="$ac_save_ifs" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 861 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 862 | fi |
| 863 | CC="$ac_cv_prog_CC" |
| 864 | if test -n "$CC"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 865 | echo "$ac_t""$CC" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 866 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 867 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 868 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 869 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 870 | if test -z "$CC"; then |
| 871 | # Extract the first word of "cc", so it can be a program name with args. |
| 872 | set dummy cc; ac_word=$2 |
| 873 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 874 | echo "configure:875: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 875 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 876 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 877 | else |
| 878 | if test -n "$CC"; then |
| 879 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 880 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 881 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 882 | ac_prog_rejected=no |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 883 | ac_dummy="$PATH" |
| 884 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 885 | test -z "$ac_dir" && ac_dir=. |
| 886 | if test -f $ac_dir/$ac_word; then |
| 887 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then |
| 888 | ac_prog_rejected=yes |
| 889 | continue |
| 890 | fi |
| 891 | ac_cv_prog_CC="cc" |
| 892 | break |
| 893 | fi |
| 894 | done |
| 895 | IFS="$ac_save_ifs" |
| 896 | if test $ac_prog_rejected = yes; then |
| 897 | # We found a bogon in the path, so make sure we never use it. |
| 898 | set dummy $ac_cv_prog_CC |
| 899 | shift |
| 900 | if test $# -gt 0; then |
| 901 | # We chose a different compiler from the bogus one. |
| 902 | # However, it has the same basename, so the bogon will be chosen |
| 903 | # first if we set CC to just the basename; use the full file name. |
| 904 | shift |
| 905 | set dummy "$ac_dir/$ac_word" "$@" |
| 906 | shift |
| 907 | ac_cv_prog_CC="$@" |
| 908 | fi |
| 909 | fi |
| 910 | fi |
| 911 | fi |
| 912 | CC="$ac_cv_prog_CC" |
| 913 | if test -n "$CC"; then |
| 914 | echo "$ac_t""$CC" 1>&6 |
| 915 | else |
| 916 | echo "$ac_t""no" 1>&6 |
| 917 | fi |
| 918 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 919 | if test -z "$CC"; then |
| 920 | case "`uname -s`" in |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 921 | *win32* | *WIN32*) |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 922 | # Extract the first word of "cl", so it can be a program name with args. |
| 923 | set dummy cl; ac_word=$2 |
| 924 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 925 | echo "configure:926: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 926 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 927 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 928 | else |
| 929 | if test -n "$CC"; then |
| 930 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 931 | else |
| 932 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 933 | ac_dummy="$PATH" |
| 934 | for ac_dir in $ac_dummy; do |
| 935 | test -z "$ac_dir" && ac_dir=. |
| 936 | if test -f $ac_dir/$ac_word; then |
| 937 | ac_cv_prog_CC="cl" |
| 938 | break |
| 939 | fi |
| 940 | done |
| 941 | IFS="$ac_save_ifs" |
| 942 | fi |
| 943 | fi |
| 944 | CC="$ac_cv_prog_CC" |
| 945 | if test -n "$CC"; then |
| 946 | echo "$ac_t""$CC" 1>&6 |
| 947 | else |
| 948 | echo "$ac_t""no" 1>&6 |
| 949 | fi |
| 950 | ;; |
| 951 | esac |
| 952 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 953 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
| 954 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 955 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 956 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 957 | echo "configure:958: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 958 | |
| 959 | ac_ext=c |
| 960 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 961 | ac_cpp='$CPP $CPPFLAGS' |
| 962 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 963 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 964 | cross_compiling=$ac_cv_prog_cc_cross |
| 965 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 966 | cat > conftest.$ac_ext << EOF |
| 967 | |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 968 | #line 969 "configure" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 969 | #include "confdefs.h" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 970 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 971 | main(){return(0);} |
| 972 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 973 | if { (eval echo configure:974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 974 | ac_cv_prog_cc_works=yes |
| 975 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 976 | if (./conftest; exit) 2>/dev/null; then |
| 977 | ac_cv_prog_cc_cross=no |
| 978 | else |
| 979 | ac_cv_prog_cc_cross=yes |
| 980 | fi |
| 981 | else |
| 982 | echo "configure: failed program was:" >&5 |
| 983 | cat conftest.$ac_ext >&5 |
| 984 | ac_cv_prog_cc_works=no |
| 985 | fi |
| 986 | rm -fr conftest* |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 987 | ac_ext=c |
| 988 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 989 | ac_cpp='$CPP $CPPFLAGS' |
| 990 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 991 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 992 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 993 | |
| 994 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
| 995 | if test $ac_cv_prog_cc_works = no; then |
| 996 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } |
| 997 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 998 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 999 | echo "configure:1000: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1000 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
| 1001 | cross_compiling=$ac_cv_prog_cc_cross |
| 1002 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1003 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1004 | echo "configure:1005: checking whether we are using GNU C" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1005 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1006 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1007 | else |
| 1008 | cat > conftest.c <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1009 | #ifdef __GNUC__ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1010 | yes; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1011 | #endif |
| 1012 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1013 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1014 | ac_cv_prog_gcc=yes |
| 1015 | else |
| 1016 | ac_cv_prog_gcc=no |
| 1017 | fi |
| 1018 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1019 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1020 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1021 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1022 | if test $ac_cv_prog_gcc = yes; then |
| 1023 | GCC=yes |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1024 | else |
| 1025 | GCC= |
| 1026 | fi |
| 1027 | |
| 1028 | ac_test_CFLAGS="${CFLAGS+set}" |
| 1029 | ac_save_CFLAGS="$CFLAGS" |
| 1030 | CFLAGS= |
| 1031 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1032 | echo "configure:1033: checking whether ${CC-cc} accepts -g" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1033 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1034 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1035 | else |
| 1036 | echo 'void f(){}' > conftest.c |
| 1037 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1038 | ac_cv_prog_cc_g=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1039 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1040 | ac_cv_prog_cc_g=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1041 | fi |
| 1042 | rm -f conftest* |
| 1043 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1044 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1045 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1046 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1047 | if test "$ac_test_CFLAGS" = set; then |
| 1048 | CFLAGS="$ac_save_CFLAGS" |
| 1049 | elif test $ac_cv_prog_cc_g = yes; then |
| 1050 | if test "$GCC" = yes; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1051 | CFLAGS="-g -O2" |
| 1052 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1053 | CFLAGS="-g" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1054 | fi |
| 1055 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1056 | if test "$GCC" = yes; then |
| 1057 | CFLAGS="-O2" |
| 1058 | else |
| 1059 | CFLAGS= |
| 1060 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1061 | fi |
| 1062 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1063 | |
| 1064 | # checks for UNIX variants that set C preprocessor variables |
| 1065 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1066 | echo "configure:1067: checking how to run the C preprocessor" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1067 | # On Suns, sometimes $CPP names a directory. |
| 1068 | if test -n "$CPP" && test -d "$CPP"; then |
| 1069 | CPP= |
| 1070 | fi |
| 1071 | if test -z "$CPP"; then |
| 1072 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
| 1073 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1074 | else |
| 1075 | # This must be in double quotes, not single quotes, because CPP may get |
| 1076 | # substituted into the Makefile and "${CC-cc}" will confuse make. |
| 1077 | CPP="${CC-cc} -E" |
| 1078 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 1079 | # not just through cpp. |
| 1080 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1081 | #line 1082 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1082 | #include "confdefs.h" |
| 1083 | #include <assert.h> |
| 1084 | Syntax Error |
| 1085 | EOF |
| 1086 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1087 | { (eval echo configure:1088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1088 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1089 | if test -z "$ac_err"; then |
| 1090 | : |
| 1091 | else |
| 1092 | echo "$ac_err" >&5 |
| 1093 | echo "configure: failed program was:" >&5 |
| 1094 | cat conftest.$ac_ext >&5 |
| 1095 | rm -rf conftest* |
| 1096 | CPP="${CC-cc} -E -traditional-cpp" |
| 1097 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1098 | #line 1099 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1099 | #include "confdefs.h" |
| 1100 | #include <assert.h> |
| 1101 | Syntax Error |
| 1102 | EOF |
| 1103 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1104 | { (eval echo configure:1105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1105 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1106 | if test -z "$ac_err"; then |
| 1107 | : |
| 1108 | else |
| 1109 | echo "$ac_err" >&5 |
| 1110 | echo "configure: failed program was:" >&5 |
| 1111 | cat conftest.$ac_ext >&5 |
| 1112 | rm -rf conftest* |
| 1113 | CPP="${CC-cc} -nologo -E" |
| 1114 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1115 | #line 1116 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1116 | #include "confdefs.h" |
| 1117 | #include <assert.h> |
| 1118 | Syntax Error |
| 1119 | EOF |
| 1120 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1121 | { (eval echo configure:1122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1122 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1123 | if test -z "$ac_err"; then |
| 1124 | : |
| 1125 | else |
| 1126 | echo "$ac_err" >&5 |
| 1127 | echo "configure: failed program was:" >&5 |
| 1128 | cat conftest.$ac_ext >&5 |
| 1129 | rm -rf conftest* |
| 1130 | CPP=/lib/cpp |
| 1131 | fi |
| 1132 | rm -f conftest* |
| 1133 | fi |
| 1134 | rm -f conftest* |
| 1135 | fi |
| 1136 | rm -f conftest* |
| 1137 | ac_cv_prog_CPP="$CPP" |
| 1138 | fi |
| 1139 | CPP="$ac_cv_prog_CPP" |
| 1140 | else |
| 1141 | ac_cv_prog_CPP="$CPP" |
| 1142 | fi |
| 1143 | echo "$ac_t""$CPP" 1>&6 |
| 1144 | |
| 1145 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1146 | echo "configure:1147: checking for AIX" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1147 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1148 | #line 1149 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1149 | #include "confdefs.h" |
| 1150 | #ifdef _AIX |
| 1151 | yes |
| 1152 | #endif |
| 1153 | |
| 1154 | EOF |
| 1155 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1156 | egrep "yes" >/dev/null 2>&1; then |
| 1157 | rm -rf conftest* |
| 1158 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF |
| 1159 | #define _ALL_SOURCE 1 |
| 1160 | EOF |
| 1161 | |
| 1162 | else |
| 1163 | rm -rf conftest* |
| 1164 | echo "$ac_t""no" 1>&6 |
| 1165 | fi |
| 1166 | rm -f conftest* |
| 1167 | |
| 1168 | |
| 1169 | ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` |
| 1170 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1171 | echo "configure:1172: checking for minix/config.h" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1172 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 1173 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1174 | else |
| 1175 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1176 | #line 1177 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1177 | #include "confdefs.h" |
| 1178 | #include <minix/config.h> |
| 1179 | EOF |
| 1180 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1181 | { (eval echo configure:1182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1182 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1183 | if test -z "$ac_err"; then |
| 1184 | rm -rf conftest* |
| 1185 | eval "ac_cv_header_$ac_safe=yes" |
| 1186 | else |
| 1187 | echo "$ac_err" >&5 |
| 1188 | echo "configure: failed program was:" >&5 |
| 1189 | cat conftest.$ac_ext >&5 |
| 1190 | rm -rf conftest* |
| 1191 | eval "ac_cv_header_$ac_safe=no" |
| 1192 | fi |
| 1193 | rm -f conftest* |
| 1194 | fi |
| 1195 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 1196 | echo "$ac_t""yes" 1>&6 |
| 1197 | MINIX=yes |
| 1198 | else |
| 1199 | echo "$ac_t""no" 1>&6 |
| 1200 | MINIX= |
| 1201 | fi |
| 1202 | |
| 1203 | if test "$MINIX" = yes; then |
| 1204 | cat >> confdefs.h <<\EOF |
| 1205 | #define _POSIX_SOURCE 1 |
| 1206 | EOF |
| 1207 | |
| 1208 | cat >> confdefs.h <<\EOF |
| 1209 | #define _POSIX_1_SOURCE 2 |
| 1210 | EOF |
| 1211 | |
| 1212 | cat >> confdefs.h <<\EOF |
| 1213 | #define _MINIX 1 |
| 1214 | EOF |
| 1215 | |
| 1216 | fi |
| 1217 | |
| 1218 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1219 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1220 | echo "configure:1221: checking for Cygwin environment" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1221 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
| 1222 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1223 | else |
| 1224 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1225 | #line 1226 "configure" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1226 | #include "confdefs.h" |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1227 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1228 | int main() { |
| 1229 | |
| 1230 | #ifndef __CYGWIN__ |
| 1231 | #define __CYGWIN__ __CYGWIN32__ |
| 1232 | #endif |
| 1233 | return __CYGWIN__; |
| 1234 | ; return 0; } |
| 1235 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1236 | if { (eval echo configure:1237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1237 | rm -rf conftest* |
| 1238 | ac_cv_cygwin=yes |
| 1239 | else |
| 1240 | echo "configure: failed program was:" >&5 |
| 1241 | cat conftest.$ac_ext >&5 |
| 1242 | rm -rf conftest* |
| 1243 | ac_cv_cygwin=no |
| 1244 | fi |
| 1245 | rm -f conftest* |
| 1246 | rm -f conftest* |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1247 | fi |
| 1248 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1249 | echo "$ac_t""$ac_cv_cygwin" 1>&6 |
| 1250 | CYGWIN= |
| 1251 | test "$ac_cv_cygwin" = yes && CYGWIN=yes |
| 1252 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1253 | echo "configure:1254: checking for mingw32 environment" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1254 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
| 1255 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1256 | else |
| 1257 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1258 | #line 1259 "configure" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1259 | #include "confdefs.h" |
| 1260 | |
| 1261 | int main() { |
| 1262 | return __MINGW32__; |
| 1263 | ; return 0; } |
| 1264 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1265 | if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1266 | rm -rf conftest* |
| 1267 | ac_cv_mingw32=yes |
| 1268 | else |
| 1269 | echo "configure: failed program was:" >&5 |
| 1270 | cat conftest.$ac_ext >&5 |
| 1271 | rm -rf conftest* |
| 1272 | ac_cv_mingw32=no |
| 1273 | fi |
| 1274 | rm -f conftest* |
| 1275 | rm -f conftest* |
| 1276 | fi |
| 1277 | |
| 1278 | echo "$ac_t""$ac_cv_mingw32" 1>&6 |
| 1279 | MINGW32= |
| 1280 | test "$ac_cv_mingw32" = yes && MINGW32=yes |
| 1281 | |
| 1282 | |
| 1283 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1284 | echo "configure:1285: checking for executable suffix" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1285 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
| 1286 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1287 | else |
| 1288 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then |
| 1289 | ac_cv_exeext=.exe |
| 1290 | else |
| 1291 | rm -f conftest* |
| 1292 | echo 'int main () { return 0; }' > conftest.$ac_ext |
| 1293 | ac_cv_exeext= |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1294 | if { (eval echo configure:1295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1295 | for file in conftest.*; do |
| 1296 | case $file in |
| 1297 | *.c | *.o | *.obj) ;; |
| 1298 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
| 1299 | esac |
| 1300 | done |
| 1301 | else |
| 1302 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } |
| 1303 | fi |
| 1304 | rm -f conftest* |
| 1305 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no |
| 1306 | fi |
| 1307 | fi |
| 1308 | |
| 1309 | EXEEXT="" |
| 1310 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} |
| 1311 | echo "$ac_t""${ac_cv_exeext}" 1>&6 |
| 1312 | ac_exeext=$EXEEXT |
| 1313 | |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1314 | echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1315 | echo "configure:1316: checking for --with-suffix" >&5 |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1316 | # Check whether --with-suffix or --without-suffix was given. |
| 1317 | if test "${with_suffix+set}" = set; then |
| 1318 | withval="$with_suffix" |
| 1319 | |
| 1320 | case $withval in |
| 1321 | no) EXEEXT=;; |
| 1322 | yes) EXEEXT=.exe;; |
| 1323 | *) EXEEXT=$withval;; |
| 1324 | esac |
| 1325 | fi |
| 1326 | |
| 1327 | echo "$ac_t""$EXEEXT" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1328 | # Test whether we're running on a non-case-sensitive system, in which |
| 1329 | # case we give a warning if no ext is given |
| 1330 | if test -d "python" -a -z "$EXEEXT" |
| 1331 | then |
| 1332 | echo "configure: warning: This filesystem is not case-sensitive so you should probably use --with-suffix" 1>&2 |
| 1333 | fi |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1334 | |
Guido van Rossum | dd997f7 | 1998-10-07 19:58:26 +0000 | [diff] [blame] | 1335 | case $MACHDEP in |
| 1336 | bsdos*) |
| 1337 | case $CC in |
| 1338 | gcc) CC="$CC -D_HAVE_BSDI";; |
| 1339 | esac;; |
| 1340 | esac |
| 1341 | |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1342 | case $ac_sys_system in |
| 1343 | hp*|HP*) |
| 1344 | case $CC in |
Guido van Rossum | cd5ff9f | 2000-09-22 16:15:54 +0000 | [diff] [blame] | 1345 | cc|*/cc) CC="$CC -Ae";; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1346 | esac;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1347 | Monterey*) |
| 1348 | case $CC in |
| 1349 | cc) CC="$CC -Wl,-Bexport";; |
| 1350 | esac;; |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1351 | SunOS*) |
| 1352 | # Some functions have a prototype only with that define, e.g. confstr |
| 1353 | cat >> confdefs.h <<\EOF |
| 1354 | #define __EXTENSIONS__ 1 |
| 1355 | EOF |
| 1356 | |
| 1357 | ;; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1358 | esac |
| 1359 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1360 | |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1361 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1362 | echo $ac_n "checking LIBRARY""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1363 | echo "configure:1364: checking LIBRARY" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1364 | if test -z "$LIBRARY" |
| 1365 | then |
| 1366 | LIBRARY='libpython$(VERSION).a' |
| 1367 | fi |
| 1368 | echo "$ac_t""$LIBRARY" 1>&6 |
| 1369 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1370 | # LDLIBRARY is the name of the library to link against (as opposed to the |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1371 | # name of the library into which to insert object files). BLDLIBRARY is also |
| 1372 | # the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY |
| 1373 | # is blank as the main program is not linked directly against LDLIBRARY. |
| 1374 | # LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On |
| 1375 | # systems without shared libraries, LDLIBRARY is the same as LIBRARY |
| 1376 | # (defined in the Makefiles). On Cygwin LDLIBRARY is the import library, |
| 1377 | # DLLLIBRARY is the shared (i.e., DLL) library. |
| 1378 | # |
| 1379 | |
| 1380 | |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1381 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1382 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1383 | LDLIBRARY="$LIBRARY" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1384 | BLDLIBRARY='$(LDLIBRARY)' |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 1385 | DLLLIBRARY='' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1386 | LDLIBRARYDIR='' |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1387 | |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1388 | # LINKCC is the command that links the python executable -- default is $(CC). |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1389 | # This is altered for AIX in order to build the export list before |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1390 | # linking. |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1391 | |
| 1392 | echo $ac_n "checking LINKCC""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1393 | echo "configure:1394: checking LINKCC" >&5 |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1394 | if test -z "$LINKCC" |
| 1395 | then |
| 1396 | case $ac_sys_system in |
| 1397 | AIX*) |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 1398 | LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 1399 | dgux*) |
| 1400 | LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1401 | Monterey64*) |
| 1402 | LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";; |
Guido van Rossum | 25f9303 | 1997-08-18 16:00:04 +0000 | [diff] [blame] | 1403 | *) LINKCC="\$(PURIFY) \$(CC)";; |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1404 | esac |
| 1405 | fi |
| 1406 | echo "$ac_t""$LINKCC" 1>&6 |
| 1407 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1408 | echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1409 | echo "configure:1410: checking LDLIBRARY" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1410 | |
| 1411 | # DG/UX requires some fancy ld contortions to produce a .so from an .a |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1412 | case $MACHDEP in |
| 1413 | dguxR4) |
| 1414 | LDLIBRARY='libpython$(VERSION).so' |
| 1415 | OPT="$OPT -pic" |
| 1416 | ;; |
| 1417 | beos*) |
| 1418 | LDLIBRARY='libpython$(VERSION).so' |
| 1419 | ;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1420 | cygwin*) |
| 1421 | LDLIBRARY='libpython$(VERSION).dll.a' |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1422 | DLLLIBRARY='libpython$(VERSION).dll' |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1423 | ;; |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1424 | esac |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1425 | |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 1426 | # MacOSX framework builds need more magic. LDLIBRARY is the dynamic |
| 1427 | # library that we build, but we do not want to link against it (we |
| 1428 | # will find it with a -framework option). For this reason there is an |
| 1429 | # extra variable BLDLIBRARY against which Python and the extension |
| 1430 | # modules are linked, BLDLIBRARY. This is normally the same as |
| 1431 | # LDLIBRARY, but empty for MacOSX framework builds. |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1432 | if test "$enable_framework" |
| 1433 | then |
| 1434 | LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
| 1435 | LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)' |
| 1436 | BLDLIBRARY='' |
| 1437 | else |
| 1438 | BLDLIBRARY='$(LDLIBRARY)' |
| 1439 | fi |
| 1440 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1441 | echo "$ac_t""$LDLIBRARY" 1>&6 |
| 1442 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1443 | # Extract the first word of "ranlib", so it can be a program name with args. |
| 1444 | set dummy ranlib; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1445 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1446 | echo "configure:1447: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1447 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1448 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1449 | else |
| 1450 | if test -n "$RANLIB"; then |
| 1451 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 1452 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1453 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1454 | ac_dummy="$PATH" |
| 1455 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1456 | test -z "$ac_dir" && ac_dir=. |
| 1457 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1458 | ac_cv_prog_RANLIB="ranlib" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1459 | break |
| 1460 | fi |
| 1461 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1462 | IFS="$ac_save_ifs" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1463 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1464 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1465 | fi |
| 1466 | RANLIB="$ac_cv_prog_RANLIB" |
| 1467 | if test -n "$RANLIB"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1468 | echo "$ac_t""$RANLIB" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1469 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1470 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1471 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1472 | |
| 1473 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1474 | for ac_prog in ar aal |
| 1475 | do |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1476 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 1477 | set dummy $ac_prog; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1478 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1479 | echo "configure:1480: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1480 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1481 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1482 | else |
| 1483 | if test -n "$AR"; then |
| 1484 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 1485 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1486 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1487 | ac_dummy="$PATH" |
| 1488 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1489 | test -z "$ac_dir" && ac_dir=. |
| 1490 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1491 | ac_cv_prog_AR="$ac_prog" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1492 | break |
| 1493 | fi |
| 1494 | done |
| 1495 | IFS="$ac_save_ifs" |
| 1496 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1497 | fi |
| 1498 | AR="$ac_cv_prog_AR" |
| 1499 | if test -n "$AR"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1500 | echo "$ac_t""$AR" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1501 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1502 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1503 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1504 | |
| 1505 | test -n "$AR" && break |
| 1506 | done |
| 1507 | test -n "$AR" || AR="ar" |
| 1508 | |
Neil Schemenauer | a42c827 | 2001-03-31 00:01:55 +0000 | [diff] [blame] | 1509 | |
| 1510 | case $MACHDEP in |
| 1511 | bsdos*) |
| 1512 | # install -d does not work on BSDI |
| 1513 | if test -z "$INSTALL" |
| 1514 | then |
| 1515 | INSTALL="${srcdir}/install-sh -c" |
| 1516 | fi |
| 1517 | esac |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1518 | ac_aux_dir= |
| 1519 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
| 1520 | if test -f $ac_dir/install-sh; then |
| 1521 | ac_aux_dir=$ac_dir |
| 1522 | ac_install_sh="$ac_aux_dir/install-sh -c" |
| 1523 | break |
| 1524 | elif test -f $ac_dir/install.sh; then |
| 1525 | ac_aux_dir=$ac_dir |
| 1526 | ac_install_sh="$ac_aux_dir/install.sh -c" |
| 1527 | break |
| 1528 | fi |
| 1529 | done |
| 1530 | if test -z "$ac_aux_dir"; then |
| 1531 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1532 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1533 | ac_config_guess=$ac_aux_dir/config.guess |
| 1534 | ac_config_sub=$ac_aux_dir/config.sub |
| 1535 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. |
| 1536 | |
| 1537 | # Find a good install program. We prefer a C program (faster), |
| 1538 | # so one script is as good as another. But avoid the broken or |
| 1539 | # incompatible versions: |
| 1540 | # SysV /etc/install, /usr/sbin/install |
| 1541 | # SunOS /usr/etc/install |
| 1542 | # IRIX /sbin/install |
| 1543 | # AIX /bin/install |
| 1544 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
| 1545 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
| 1546 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
| 1547 | # ./install, which can be erroneously created by make from ./install.sh. |
| 1548 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1549 | echo "configure:1550: checking for a BSD compatible install" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1550 | if test -z "$INSTALL"; then |
| 1551 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
| 1552 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1553 | else |
| 1554 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" |
| 1555 | for ac_dir in $PATH; do |
| 1556 | # Account for people who put trailing slashes in PATH elements. |
| 1557 | case "$ac_dir/" in |
| 1558 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; |
| 1559 | *) |
| 1560 | # OSF1 and SCO ODT 3.0 have their own names for install. |
| 1561 | # Don't use installbsd from OSF since it installs stuff as root |
| 1562 | # by default. |
| 1563 | for ac_prog in ginstall scoinst install; do |
| 1564 | if test -f $ac_dir/$ac_prog; then |
| 1565 | if test $ac_prog = install && |
| 1566 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then |
| 1567 | # AIX install. It has an incompatible calling convention. |
| 1568 | : |
| 1569 | else |
| 1570 | ac_cv_path_install="$ac_dir/$ac_prog -c" |
| 1571 | break 2 |
| 1572 | fi |
| 1573 | fi |
| 1574 | done |
| 1575 | ;; |
| 1576 | esac |
| 1577 | done |
| 1578 | IFS="$ac_save_IFS" |
| 1579 | |
| 1580 | fi |
| 1581 | if test "${ac_cv_path_install+set}" = set; then |
| 1582 | INSTALL="$ac_cv_path_install" |
| 1583 | else |
| 1584 | # As a last resort, use the slow shell script. We don't cache a |
| 1585 | # path for INSTALL within a source directory, because that will |
| 1586 | # break other packages using the cache if that directory is |
| 1587 | # removed, or if the path is relative. |
| 1588 | INSTALL="$ac_install_sh" |
| 1589 | fi |
| 1590 | fi |
| 1591 | echo "$ac_t""$INSTALL" 1>&6 |
| 1592 | |
| 1593 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
| 1594 | # It thinks the first close brace ends the variable substitution. |
| 1595 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' |
| 1596 | |
| 1597 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
| 1598 | |
| 1599 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
| 1600 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1601 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1602 | # Not every filesystem supports hard links |
| 1603 | |
| 1604 | if test -z "$LN" ; then |
| 1605 | case $ac_sys_system in |
| 1606 | BeOS*) LN="ln -s";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1607 | CYGWIN*) LN="ln -s";; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1608 | *) LN=ln;; |
| 1609 | esac |
| 1610 | fi |
| 1611 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1612 | # Check for --with-pydebug |
| 1613 | echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1614 | echo "configure:1615: checking for --with-pydebug" >&5 |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1615 | # Check whether --with-pydebug or --without-pydebug was given. |
| 1616 | if test "${with_pydebug+set}" = set; then |
| 1617 | withval="$with_pydebug" |
| 1618 | |
| 1619 | if test "$withval" != no |
| 1620 | then cat >> confdefs.h <<\EOF |
| 1621 | #define Py_DEBUG 1 |
| 1622 | EOF |
| 1623 | echo "$ac_t""yes" 1>&6; Py_DEBUG='true' |
| 1624 | else echo "$ac_t""no" 1>&6; Py_DEBUG='false' |
| 1625 | fi |
| 1626 | else |
| 1627 | echo "$ac_t""no" 1>&6 |
| 1628 | fi |
| 1629 | |
| 1630 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1631 | # Optimizer/debugger flags |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1632 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1633 | if test -z "$OPT" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1634 | then |
Guido van Rossum | edca74a | 1997-07-18 23:29:40 +0000 | [diff] [blame] | 1635 | case $GCC in |
| 1636 | yes) |
| 1637 | case $ac_cv_prog_cc_g in |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1638 | yes) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1639 | if test "$Py_DEBUG" = 'true' ; then |
| 1640 | # Optimization messes up debuggers, so turn it off for |
| 1641 | # debug builds. |
| 1642 | OPT="-g -Wall -Wstrict-prototypes" |
| 1643 | else |
| 1644 | OPT="-g -O3 -Wall -Wstrict-prototypes" |
| 1645 | fi;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1646 | *) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1647 | OPT="-O3 -Wall -Wstrict-prototypes";; |
| 1648 | esac |
| 1649 | ;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1650 | *) |
| 1651 | case $ac_sys_system in |
| 1652 | UnixWare*) |
| 1653 | OPT="-O -K pentium,host,inline,loop_unroll,alloca ";; |
| 1654 | *) |
| 1655 | OPT="-O";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1656 | esac |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1657 | esac |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 1658 | case $ac_sys_system in |
| 1659 | Darwin*) |
| 1660 | OPT="$OPT -no-cpp-precomp";; |
| 1661 | esac |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1662 | fi |
| 1663 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1664 | # The current (beta) Monterey compiler dies with optimizations |
| 1665 | case $ac_sys_system in |
| 1666 | Monterey*) OPT="";; |
| 1667 | esac |
| 1668 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 1669 | if test "$ac_arch_flags" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 1670 | then |
| 1671 | OPT="$OPT $ac_arch_flags" |
| 1672 | fi |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1673 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1674 | echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1675 | echo "configure:1676: checking whether $CC accepts -OPT:Olimit=0" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1676 | if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1677 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1678 | else |
| 1679 | ac_save_cc="$CC" |
| 1680 | CC="$CC -OPT:Olimit=0" |
| 1681 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 1682 | ac_cv_opt_olimit_ok=no |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1683 | else |
| 1684 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1685 | #line 1686 "configure" |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1686 | #include "confdefs.h" |
| 1687 | int main() { return 0; } |
| 1688 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1689 | if { (eval echo configure:1690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1690 | then |
| 1691 | ac_cv_opt_olimit_ok=yes |
| 1692 | else |
| 1693 | echo "configure: failed program was:" >&5 |
| 1694 | cat conftest.$ac_ext >&5 |
| 1695 | rm -fr conftest* |
| 1696 | ac_cv_opt_olimit_ok=no |
| 1697 | fi |
| 1698 | rm -fr conftest* |
| 1699 | fi |
| 1700 | |
| 1701 | CC="$ac_save_cc" |
| 1702 | fi |
| 1703 | |
| 1704 | echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6 |
Guido van Rossum | 2efa34b | 1997-10-23 17:43:11 +0000 | [diff] [blame] | 1705 | if test $ac_cv_opt_olimit_ok = yes; then |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 1706 | case $ac_sys_system in |
| 1707 | Darwin*) OPT="$OPT" ;; |
| 1708 | *) OPT="$OPT -OPT:Olimit=0";; |
| 1709 | esac |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1710 | else |
| 1711 | echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1712 | echo "configure:1713: checking whether $CC accepts -Olimit 1500" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1713 | if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1714 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1715 | else |
| 1716 | ac_save_cc="$CC" |
| 1717 | CC="$CC -Olimit 1500" |
| 1718 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 1719 | ac_cv_olimit_ok=no |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1720 | else |
| 1721 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1722 | #line 1723 "configure" |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1723 | #include "confdefs.h" |
| 1724 | int main() { return 0; } |
| 1725 | EOF |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 1726 | if { (eval echo configure:1727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1727 | then |
| 1728 | ac_cv_olimit_ok=yes |
| 1729 | else |
| 1730 | echo "configure: failed program was:" >&5 |
| 1731 | cat conftest.$ac_ext >&5 |
| 1732 | rm -fr conftest* |
| 1733 | ac_cv_olimit_ok=no |
Guido van Rossum | 201afe5 | 1997-05-14 21:14:44 +0000 | [diff] [blame] | 1734 | fi |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1735 | rm -fr conftest* |
| 1736 | fi |
| 1737 | |
| 1738 | CC="$ac_save_cc" |
| 1739 | fi |
| 1740 | |
| 1741 | echo "$ac_t""$ac_cv_olimit_ok" 1>&6 |
| 1742 | if test $ac_cv_olimit_ok = yes; then |
| 1743 | OPT="$OPT -Olimit 1500" |
| 1744 | fi |
| 1745 | fi |
| 1746 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1747 | # -Kpthread, if available, provides the right #defines |
| 1748 | # and linker options to make pthread_create available |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1749 | # Some compilers won't report that they do not support -Kpthread, |
| 1750 | # so we need to run a program to see whether it really made the |
| 1751 | # function available. |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1752 | echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1753 | echo "configure:1754: checking whether $CC accepts -Kpthread" >&5 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1754 | if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then |
| 1755 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1756 | else |
| 1757 | ac_save_cc="$CC" |
| 1758 | CC="$CC -Kpthread" |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1759 | if test "$cross_compiling" = yes; then |
| 1760 | ac_cv_kpthread=no |
| 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 | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1780 | ac_cv_kpthread=yes |
| 1781 | else |
| 1782 | echo "configure: failed program was:" >&5 |
| 1783 | cat conftest.$ac_ext >&5 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1784 | rm -fr conftest* |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1785 | ac_cv_kpthread=no |
| 1786 | fi |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1787 | rm -fr conftest* |
| 1788 | fi |
| 1789 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1790 | CC="$ac_save_cc" |
| 1791 | fi |
| 1792 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1793 | echo "$ac_t""$ac_cv_kpthread" 1>&6 |
| 1794 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1795 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1796 | # checks for header files |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1797 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1798 | echo "configure:1799: checking for ANSI C header files" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1799 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1800 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1801 | else |
| 1802 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1803 | #line 1804 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1804 | #include "confdefs.h" |
| 1805 | #include <stdlib.h> |
| 1806 | #include <stdarg.h> |
| 1807 | #include <string.h> |
| 1808 | #include <float.h> |
| 1809 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1810 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1811 | { (eval echo configure:1812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1812 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1813 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1814 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1815 | ac_cv_header_stdc=yes |
| 1816 | else |
| 1817 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1818 | echo "configure: failed program was:" >&5 |
| 1819 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1820 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1821 | ac_cv_header_stdc=no |
| 1822 | fi |
| 1823 | rm -f conftest* |
| 1824 | |
| 1825 | if test $ac_cv_header_stdc = yes; then |
| 1826 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 1827 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1828 | #line 1829 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1829 | #include "confdefs.h" |
| 1830 | #include <string.h> |
| 1831 | EOF |
| 1832 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1833 | egrep "memchr" >/dev/null 2>&1; then |
| 1834 | : |
| 1835 | else |
| 1836 | rm -rf conftest* |
| 1837 | ac_cv_header_stdc=no |
| 1838 | fi |
| 1839 | rm -f conftest* |
| 1840 | |
| 1841 | fi |
| 1842 | |
| 1843 | if test $ac_cv_header_stdc = yes; then |
| 1844 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 1845 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1846 | #line 1847 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1847 | #include "confdefs.h" |
| 1848 | #include <stdlib.h> |
| 1849 | EOF |
| 1850 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1851 | egrep "free" >/dev/null 2>&1; then |
| 1852 | : |
| 1853 | else |
| 1854 | rm -rf conftest* |
| 1855 | ac_cv_header_stdc=no |
| 1856 | fi |
| 1857 | rm -f conftest* |
| 1858 | |
| 1859 | fi |
| 1860 | |
| 1861 | if test $ac_cv_header_stdc = yes; then |
| 1862 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| 1863 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1864 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1865 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1866 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1867 | #line 1868 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1868 | #include "confdefs.h" |
| 1869 | #include <ctype.h> |
| 1870 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 1871 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1872 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1873 | int main () { int i; for (i = 0; i < 256; i++) |
| 1874 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 1875 | exit (0); } |
| 1876 | |
| 1877 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1878 | if { (eval echo configure:1879: \"$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] | 1879 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1880 | : |
| 1881 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1882 | echo "configure: failed program was:" >&5 |
| 1883 | cat conftest.$ac_ext >&5 |
| 1884 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1885 | ac_cv_header_stdc=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1886 | fi |
| 1887 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1888 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1889 | |
| 1890 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1891 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1892 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1893 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1894 | if test $ac_cv_header_stdc = yes; then |
| 1895 | cat >> confdefs.h <<\EOF |
| 1896 | #define STDC_HEADERS 1 |
| 1897 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1898 | |
| 1899 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1900 | |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1901 | for ac_hdr in dlfcn.h fcntl.h limits.h langinfo.h locale.h \ |
| 1902 | ncurses.h poll.h pthread.h \ |
Eric S. Raymond | d2d75d3 | 2001-01-16 15:26:34 +0000 | [diff] [blame] | 1903 | 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] | 1904 | 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] | 1905 | sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \ |
Fred Drake | ae90f8d | 2000-09-15 03:38:12 +0000 | [diff] [blame] | 1906 | sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ |
Martin v. Löwis | f24b2f3 | 2001-08-10 20:29:40 +0000 | [diff] [blame] | 1907 | 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] | 1908 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1909 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1910 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1911 | echo "configure:1912: checking for $ac_hdr" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1912 | 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] | 1913 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1914 | else |
| 1915 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1916 | #line 1917 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1917 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1918 | #include <$ac_hdr> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1919 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1920 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1921 | { (eval echo configure:1922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1922 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1923 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1924 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1925 | eval "ac_cv_header_$ac_safe=yes" |
| 1926 | else |
| 1927 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1928 | echo "configure: failed program was:" >&5 |
| 1929 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1930 | rm -rf conftest* |
| 1931 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1932 | fi |
| 1933 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1934 | fi |
| 1935 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1936 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1937 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1938 | cat >> confdefs.h <<EOF |
| 1939 | #define $ac_tr_hdr 1 |
| 1940 | EOF |
| 1941 | |
| 1942 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1943 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1944 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1945 | done |
| 1946 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1947 | ac_header_dirent=no |
| 1948 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h |
| 1949 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1950 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1951 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1952 | echo "configure:1953: checking for $ac_hdr that defines DIR" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1953 | 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] | 1954 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1955 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1956 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1957 | #line 1958 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1958 | #include "confdefs.h" |
| 1959 | #include <sys/types.h> |
| 1960 | #include <$ac_hdr> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1961 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1962 | DIR *dirp = 0; |
| 1963 | ; return 0; } |
| 1964 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1965 | if { (eval echo configure:1966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1966 | rm -rf conftest* |
| 1967 | eval "ac_cv_header_dirent_$ac_safe=yes" |
| 1968 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1969 | echo "configure: failed program was:" >&5 |
| 1970 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1971 | rm -rf conftest* |
| 1972 | eval "ac_cv_header_dirent_$ac_safe=no" |
| 1973 | fi |
| 1974 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1975 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1976 | 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] | 1977 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1978 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1979 | cat >> confdefs.h <<EOF |
| 1980 | #define $ac_tr_hdr 1 |
| 1981 | EOF |
| 1982 | ac_header_dirent=$ac_hdr; break |
| 1983 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1984 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1985 | fi |
| 1986 | done |
| 1987 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| 1988 | if test $ac_header_dirent = dirent.h; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1989 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1990 | echo "configure:1991: checking for opendir in -ldir" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1991 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1992 | 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] | 1993 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1994 | else |
| 1995 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1996 | LIBS="-ldir $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1997 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 1998 | #line 1999 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1999 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2000 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2001 | /* We use char because int might match the return type of a gcc2 |
| 2002 | builtin and then its argument prototype would still apply. */ |
| 2003 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2004 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2005 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2006 | opendir() |
| 2007 | ; return 0; } |
| 2008 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2009 | if { (eval echo configure:2010: \"$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] | 2010 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2011 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2012 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2013 | echo "configure: failed program was:" >&5 |
| 2014 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2015 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2016 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2017 | fi |
| 2018 | rm -f conftest* |
| 2019 | LIBS="$ac_save_LIBS" |
| 2020 | |
| 2021 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2022 | 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] | 2023 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2024 | LIBS="$LIBS -ldir" |
| 2025 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2026 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2027 | fi |
| 2028 | |
| 2029 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2030 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2031 | echo "configure:2032: checking for opendir in -lx" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2032 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2033 | 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] | 2034 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2035 | else |
| 2036 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2037 | LIBS="-lx $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2038 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2039 | #line 2040 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2040 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2041 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2042 | /* We use char because int might match the return type of a gcc2 |
| 2043 | builtin and then its argument prototype would still apply. */ |
| 2044 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2045 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2046 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2047 | opendir() |
| 2048 | ; return 0; } |
| 2049 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2050 | if { (eval echo configure:2051: \"$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] | 2051 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2052 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2053 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2054 | echo "configure: failed program was:" >&5 |
| 2055 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2056 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2057 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2058 | fi |
| 2059 | rm -f conftest* |
| 2060 | LIBS="$ac_save_LIBS" |
| 2061 | |
| 2062 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2063 | 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] | 2064 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2065 | LIBS="$LIBS -lx" |
| 2066 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2067 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2068 | fi |
| 2069 | |
| 2070 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2071 | |
| 2072 | |
| 2073 | # checks for typedefs |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2074 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2075 | echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2076 | echo "configure:2077: checking for clock_t in time.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2077 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2078 | #line 2079 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2079 | #include "confdefs.h" |
| 2080 | #include <time.h> |
| 2081 | EOF |
| 2082 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2083 | egrep "clock_t" >/dev/null 2>&1; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2084 | rm -rf conftest* |
| 2085 | was_it_defined=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2086 | else |
| 2087 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2088 | cat >> confdefs.h <<\EOF |
| 2089 | #define clock_t long |
| 2090 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2091 | |
| 2092 | fi |
| 2093 | rm -f conftest* |
| 2094 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2095 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2096 | |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 2097 | # Two defines needed to enable largefile support on various platforms |
| 2098 | # These may affect some typedefs |
| 2099 | cat >> confdefs.h <<\EOF |
| 2100 | #define _LARGEFILE_SOURCE 1 |
| 2101 | EOF |
| 2102 | |
| 2103 | cat >> confdefs.h <<\EOF |
| 2104 | #define _FILE_OFFSET_BITS 64 |
| 2105 | EOF |
| 2106 | |
| 2107 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2108 | # Add some code to confdefs.h so that the test for off_t works on SCO |
| 2109 | cat >> confdefs.h <<\EOF |
| 2110 | #if defined(SCO_DS) |
| 2111 | #undef _OFF_T |
| 2112 | #endif |
| 2113 | EOF |
| 2114 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2115 | # Type availability checks |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2116 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2117 | echo "configure:2118: checking for mode_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2118 | 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] | 2119 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2120 | else |
| 2121 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2122 | #line 2123 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2123 | #include "confdefs.h" |
| 2124 | #include <sys/types.h> |
| 2125 | #if STDC_HEADERS |
| 2126 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2127 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2128 | #endif |
| 2129 | EOF |
| 2130 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2131 | 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] | 2132 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2133 | ac_cv_type_mode_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2134 | else |
| 2135 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2136 | ac_cv_type_mode_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2137 | fi |
| 2138 | rm -f conftest* |
| 2139 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2140 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2141 | echo "$ac_t""$ac_cv_type_mode_t" 1>&6 |
| 2142 | if test $ac_cv_type_mode_t = no; then |
| 2143 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2144 | #define mode_t int |
| 2145 | EOF |
| 2146 | |
| 2147 | fi |
| 2148 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2149 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2150 | echo "configure:2151: checking for off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2151 | 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] | 2152 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2153 | else |
| 2154 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2155 | #line 2156 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2156 | #include "confdefs.h" |
| 2157 | #include <sys/types.h> |
| 2158 | #if STDC_HEADERS |
| 2159 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2160 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2161 | #endif |
| 2162 | EOF |
| 2163 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2164 | 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] | 2165 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2166 | ac_cv_type_off_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2167 | else |
| 2168 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2169 | ac_cv_type_off_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2170 | fi |
| 2171 | rm -f conftest* |
| 2172 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2173 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2174 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
| 2175 | if test $ac_cv_type_off_t = no; then |
| 2176 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2177 | #define off_t long |
| 2178 | EOF |
| 2179 | |
| 2180 | fi |
| 2181 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2182 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2183 | echo "configure:2184: checking for pid_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2184 | 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] | 2185 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2186 | else |
| 2187 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2188 | #line 2189 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2189 | #include "confdefs.h" |
| 2190 | #include <sys/types.h> |
| 2191 | #if STDC_HEADERS |
| 2192 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2193 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2194 | #endif |
| 2195 | EOF |
| 2196 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2197 | 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] | 2198 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2199 | ac_cv_type_pid_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2200 | else |
| 2201 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2202 | ac_cv_type_pid_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2203 | fi |
| 2204 | rm -f conftest* |
| 2205 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2206 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2207 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
| 2208 | if test $ac_cv_type_pid_t = no; then |
| 2209 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2210 | #define pid_t int |
| 2211 | EOF |
| 2212 | |
| 2213 | fi |
| 2214 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2215 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2216 | echo "configure:2217: checking return type of signal handlers" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2217 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2218 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2219 | else |
| 2220 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2221 | #line 2222 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2222 | #include "confdefs.h" |
| 2223 | #include <sys/types.h> |
| 2224 | #include <signal.h> |
| 2225 | #ifdef signal |
| 2226 | #undef signal |
| 2227 | #endif |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2228 | #ifdef __cplusplus |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2229 | extern "C" void (*signal (int, void (*)(int)))(int); |
| 2230 | #else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2231 | void (*signal ()) (); |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2232 | #endif |
| 2233 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2234 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2235 | int i; |
| 2236 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2237 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2238 | if { (eval echo configure:2239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2239 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2240 | ac_cv_type_signal=void |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2241 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2242 | echo "configure: failed program was:" >&5 |
| 2243 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2244 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2245 | ac_cv_type_signal=int |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2246 | fi |
| 2247 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2248 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2249 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2250 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2251 | cat >> confdefs.h <<EOF |
| 2252 | #define RETSIGTYPE $ac_cv_type_signal |
| 2253 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2254 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2255 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2256 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2257 | echo "configure:2258: checking for size_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2258 | 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] | 2259 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2260 | else |
| 2261 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2262 | #line 2263 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2263 | #include "confdefs.h" |
| 2264 | #include <sys/types.h> |
| 2265 | #if STDC_HEADERS |
| 2266 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2267 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2268 | #endif |
| 2269 | EOF |
| 2270 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2271 | 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] | 2272 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2273 | ac_cv_type_size_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2274 | else |
| 2275 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2276 | ac_cv_type_size_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2277 | fi |
| 2278 | rm -f conftest* |
| 2279 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2280 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2281 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
| 2282 | if test $ac_cv_type_size_t = no; then |
| 2283 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2284 | #define size_t unsigned |
| 2285 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2286 | |
| 2287 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2288 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2289 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2290 | echo "configure:2291: checking for uid_t in sys/types.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2291 | 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] | 2292 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2293 | else |
| 2294 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2295 | #line 2296 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2296 | #include "confdefs.h" |
| 2297 | #include <sys/types.h> |
| 2298 | EOF |
| 2299 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2300 | egrep "uid_t" >/dev/null 2>&1; then |
| 2301 | rm -rf conftest* |
| 2302 | ac_cv_type_uid_t=yes |
| 2303 | else |
| 2304 | rm -rf conftest* |
| 2305 | ac_cv_type_uid_t=no |
| 2306 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2307 | rm -f conftest* |
| 2308 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2309 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2310 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2311 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2312 | if test $ac_cv_type_uid_t = no; then |
| 2313 | cat >> confdefs.h <<\EOF |
| 2314 | #define uid_t int |
| 2315 | EOF |
| 2316 | |
| 2317 | cat >> confdefs.h <<\EOF |
| 2318 | #define gid_t int |
| 2319 | EOF |
| 2320 | |
| 2321 | fi |
| 2322 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2323 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2324 | # Sizes of various common basic types |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2325 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2326 | echo "configure:2327: checking size of int" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2327 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2328 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2329 | else |
| 2330 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2331 | ac_cv_sizeof_int=4 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2332 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2333 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2334 | #line 2335 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2335 | #include "confdefs.h" |
| 2336 | #include <stdio.h> |
| 2337 | main() |
| 2338 | { |
| 2339 | FILE *f=fopen("conftestval", "w"); |
| 2340 | if (!f) exit(1); |
| 2341 | fprintf(f, "%d\n", sizeof(int)); |
| 2342 | exit(0); |
| 2343 | } |
| 2344 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2345 | if { (eval echo configure:2346: \"$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] | 2346 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2347 | ac_cv_sizeof_int=`cat conftestval` |
| 2348 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2349 | echo "configure: failed program was:" >&5 |
| 2350 | cat conftest.$ac_ext >&5 |
| 2351 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2352 | ac_cv_sizeof_int=0 |
| 2353 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2354 | rm -fr conftest* |
| 2355 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2356 | |
| 2357 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2358 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
| 2359 | cat >> confdefs.h <<EOF |
| 2360 | #define SIZEOF_INT $ac_cv_sizeof_int |
| 2361 | EOF |
| 2362 | |
| 2363 | |
| 2364 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2365 | echo "configure:2366: checking size of long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2366 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2367 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2368 | else |
| 2369 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2370 | ac_cv_sizeof_long=4 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2371 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2372 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2373 | #line 2374 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2374 | #include "confdefs.h" |
| 2375 | #include <stdio.h> |
| 2376 | main() |
| 2377 | { |
| 2378 | FILE *f=fopen("conftestval", "w"); |
| 2379 | if (!f) exit(1); |
| 2380 | fprintf(f, "%d\n", sizeof(long)); |
| 2381 | exit(0); |
| 2382 | } |
| 2383 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2384 | if { (eval echo configure:2385: \"$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] | 2385 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2386 | ac_cv_sizeof_long=`cat conftestval` |
| 2387 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2388 | echo "configure: failed program was:" >&5 |
| 2389 | cat conftest.$ac_ext >&5 |
| 2390 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2391 | ac_cv_sizeof_long=0 |
| 2392 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2393 | rm -fr conftest* |
| 2394 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2395 | |
| 2396 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2397 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
| 2398 | cat >> confdefs.h <<EOF |
| 2399 | #define SIZEOF_LONG $ac_cv_sizeof_long |
| 2400 | EOF |
| 2401 | |
| 2402 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2403 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2404 | echo "configure:2405: checking size of void *" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2405 | 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] | 2406 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2407 | else |
| 2408 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2409 | ac_cv_sizeof_void_p=4 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2410 | else |
| 2411 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2412 | #line 2413 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2413 | #include "confdefs.h" |
| 2414 | #include <stdio.h> |
| 2415 | main() |
| 2416 | { |
| 2417 | FILE *f=fopen("conftestval", "w"); |
| 2418 | if (!f) exit(1); |
| 2419 | fprintf(f, "%d\n", sizeof(void *)); |
| 2420 | exit(0); |
| 2421 | } |
| 2422 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2423 | if { (eval echo configure:2424: \"$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] | 2424 | then |
| 2425 | ac_cv_sizeof_void_p=`cat conftestval` |
| 2426 | else |
| 2427 | echo "configure: failed program was:" >&5 |
| 2428 | cat conftest.$ac_ext >&5 |
| 2429 | rm -fr conftest* |
| 2430 | ac_cv_sizeof_void_p=0 |
| 2431 | fi |
| 2432 | rm -fr conftest* |
| 2433 | fi |
| 2434 | |
| 2435 | fi |
| 2436 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 |
| 2437 | cat >> confdefs.h <<EOF |
| 2438 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
| 2439 | EOF |
| 2440 | |
| 2441 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2442 | echo $ac_n "checking size of char""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2443 | echo "configure:2444: checking size of char" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2444 | if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2445 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2446 | else |
| 2447 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2448 | ac_cv_sizeof_char=1 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2449 | else |
| 2450 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2451 | #line 2452 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2452 | #include "confdefs.h" |
| 2453 | #include <stdio.h> |
| 2454 | main() |
| 2455 | { |
| 2456 | FILE *f=fopen("conftestval", "w"); |
| 2457 | if (!f) exit(1); |
| 2458 | fprintf(f, "%d\n", sizeof(char)); |
| 2459 | exit(0); |
| 2460 | } |
| 2461 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2462 | if { (eval echo configure:2463: \"$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] | 2463 | then |
| 2464 | ac_cv_sizeof_char=`cat conftestval` |
| 2465 | else |
| 2466 | echo "configure: failed program was:" >&5 |
| 2467 | cat conftest.$ac_ext >&5 |
| 2468 | rm -fr conftest* |
| 2469 | ac_cv_sizeof_char=0 |
| 2470 | fi |
| 2471 | rm -fr conftest* |
| 2472 | fi |
| 2473 | |
| 2474 | fi |
| 2475 | echo "$ac_t""$ac_cv_sizeof_char" 1>&6 |
| 2476 | cat >> confdefs.h <<EOF |
| 2477 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
| 2478 | EOF |
| 2479 | |
| 2480 | |
| 2481 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2482 | echo "configure:2483: checking size of short" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2483 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2484 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2485 | else |
| 2486 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2487 | ac_cv_sizeof_short=2 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2488 | else |
| 2489 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2490 | #line 2491 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2491 | #include "confdefs.h" |
| 2492 | #include <stdio.h> |
| 2493 | main() |
| 2494 | { |
| 2495 | FILE *f=fopen("conftestval", "w"); |
| 2496 | if (!f) exit(1); |
| 2497 | fprintf(f, "%d\n", sizeof(short)); |
| 2498 | exit(0); |
| 2499 | } |
| 2500 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2501 | if { (eval echo configure:2502: \"$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] | 2502 | then |
| 2503 | ac_cv_sizeof_short=`cat conftestval` |
| 2504 | else |
| 2505 | echo "configure: failed program was:" >&5 |
| 2506 | cat conftest.$ac_ext >&5 |
| 2507 | rm -fr conftest* |
| 2508 | ac_cv_sizeof_short=0 |
| 2509 | fi |
| 2510 | rm -fr conftest* |
| 2511 | fi |
| 2512 | |
| 2513 | fi |
| 2514 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
| 2515 | cat >> confdefs.h <<EOF |
| 2516 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
| 2517 | EOF |
| 2518 | |
| 2519 | |
| 2520 | echo $ac_n "checking size of float""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2521 | echo "configure:2522: checking size of float" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2522 | if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2523 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2524 | else |
| 2525 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2526 | ac_cv_sizeof_float=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2527 | else |
| 2528 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2529 | #line 2530 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2530 | #include "confdefs.h" |
| 2531 | #include <stdio.h> |
| 2532 | main() |
| 2533 | { |
| 2534 | FILE *f=fopen("conftestval", "w"); |
| 2535 | if (!f) exit(1); |
| 2536 | fprintf(f, "%d\n", sizeof(float)); |
| 2537 | exit(0); |
| 2538 | } |
| 2539 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2540 | if { (eval echo configure:2541: \"$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] | 2541 | then |
| 2542 | ac_cv_sizeof_float=`cat conftestval` |
| 2543 | else |
| 2544 | echo "configure: failed program was:" >&5 |
| 2545 | cat conftest.$ac_ext >&5 |
| 2546 | rm -fr conftest* |
| 2547 | ac_cv_sizeof_float=0 |
| 2548 | fi |
| 2549 | rm -fr conftest* |
| 2550 | fi |
| 2551 | |
| 2552 | fi |
| 2553 | echo "$ac_t""$ac_cv_sizeof_float" 1>&6 |
| 2554 | cat >> confdefs.h <<EOF |
| 2555 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
| 2556 | EOF |
| 2557 | |
| 2558 | |
| 2559 | echo $ac_n "checking size of double""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2560 | echo "configure:2561: checking size of double" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2561 | if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2562 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2563 | else |
| 2564 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2565 | ac_cv_sizeof_double=8 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2566 | else |
| 2567 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2568 | #line 2569 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2569 | #include "confdefs.h" |
| 2570 | #include <stdio.h> |
| 2571 | main() |
| 2572 | { |
| 2573 | FILE *f=fopen("conftestval", "w"); |
| 2574 | if (!f) exit(1); |
| 2575 | fprintf(f, "%d\n", sizeof(double)); |
| 2576 | exit(0); |
| 2577 | } |
| 2578 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2579 | if { (eval echo configure:2580: \"$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] | 2580 | then |
| 2581 | ac_cv_sizeof_double=`cat conftestval` |
| 2582 | else |
| 2583 | echo "configure: failed program was:" >&5 |
| 2584 | cat conftest.$ac_ext >&5 |
| 2585 | rm -fr conftest* |
| 2586 | ac_cv_sizeof_double=0 |
| 2587 | fi |
| 2588 | rm -fr conftest* |
| 2589 | fi |
| 2590 | |
| 2591 | fi |
| 2592 | echo "$ac_t""$ac_cv_sizeof_double" 1>&6 |
| 2593 | cat >> confdefs.h <<EOF |
| 2594 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
| 2595 | EOF |
| 2596 | |
| 2597 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2598 | echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2599 | echo "configure:2600: checking size of fpos_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2600 | 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] | 2601 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2602 | else |
| 2603 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2604 | ac_cv_sizeof_fpos_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2605 | else |
| 2606 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2607 | #line 2608 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2608 | #include "confdefs.h" |
| 2609 | #include <stdio.h> |
| 2610 | main() |
| 2611 | { |
| 2612 | FILE *f=fopen("conftestval", "w"); |
| 2613 | if (!f) exit(1); |
| 2614 | fprintf(f, "%d\n", sizeof(fpos_t)); |
| 2615 | exit(0); |
| 2616 | } |
| 2617 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2618 | if { (eval echo configure:2619: \"$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] | 2619 | then |
| 2620 | ac_cv_sizeof_fpos_t=`cat conftestval` |
| 2621 | else |
| 2622 | echo "configure: failed program was:" >&5 |
| 2623 | cat conftest.$ac_ext >&5 |
| 2624 | rm -fr conftest* |
| 2625 | ac_cv_sizeof_fpos_t=0 |
| 2626 | fi |
| 2627 | rm -fr conftest* |
| 2628 | fi |
| 2629 | |
| 2630 | fi |
| 2631 | echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6 |
| 2632 | cat >> confdefs.h <<EOF |
| 2633 | #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t |
| 2634 | EOF |
| 2635 | |
| 2636 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2637 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2638 | echo $ac_n "checking for long long support""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2639 | echo "configure:2640: checking for long long support" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2640 | have_long_long=no |
| 2641 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2642 | #line 2643 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2643 | #include "confdefs.h" |
| 2644 | |
| 2645 | int main() { |
| 2646 | long long x; x = (long long)0; |
| 2647 | ; return 0; } |
| 2648 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2649 | if { (eval echo configure:2650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2650 | rm -rf conftest* |
| 2651 | cat >> confdefs.h <<\EOF |
| 2652 | #define HAVE_LONG_LONG 1 |
| 2653 | EOF |
| 2654 | have_long_long=yes |
| 2655 | else |
| 2656 | echo "configure: failed program was:" >&5 |
| 2657 | cat conftest.$ac_ext >&5 |
| 2658 | fi |
| 2659 | rm -f conftest* |
| 2660 | echo "$ac_t""$have_long_long" 1>&6 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2661 | if test "$have_long_long" = yes ; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2662 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2663 | echo "configure:2664: checking size of long long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2664 | 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] | 2665 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2666 | else |
| 2667 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2668 | ac_cv_sizeof_long_long=8 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2669 | else |
| 2670 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2671 | #line 2672 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2672 | #include "confdefs.h" |
| 2673 | #include <stdio.h> |
| 2674 | main() |
| 2675 | { |
| 2676 | FILE *f=fopen("conftestval", "w"); |
| 2677 | if (!f) exit(1); |
| 2678 | fprintf(f, "%d\n", sizeof(long long)); |
| 2679 | exit(0); |
| 2680 | } |
| 2681 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2682 | if { (eval echo configure:2683: \"$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] | 2683 | then |
| 2684 | ac_cv_sizeof_long_long=`cat conftestval` |
| 2685 | else |
| 2686 | echo "configure: failed program was:" >&5 |
| 2687 | cat conftest.$ac_ext >&5 |
| 2688 | rm -fr conftest* |
| 2689 | ac_cv_sizeof_long_long=0 |
| 2690 | fi |
| 2691 | rm -fr conftest* |
| 2692 | fi |
| 2693 | |
| 2694 | fi |
| 2695 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
| 2696 | cat >> confdefs.h <<EOF |
| 2697 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 2698 | EOF |
| 2699 | |
| 2700 | |
| 2701 | fi |
| 2702 | |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2703 | echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2704 | echo "configure:2705: checking for uintptr_t support" >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2705 | have_uintptr_t=no |
| 2706 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2707 | #line 2708 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2708 | #include "confdefs.h" |
| 2709 | |
| 2710 | int main() { |
| 2711 | uintptr_t x; x = (uintptr_t)0; |
| 2712 | ; return 0; } |
| 2713 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2714 | if { (eval echo configure:2715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2715 | rm -rf conftest* |
| 2716 | cat >> confdefs.h <<\EOF |
| 2717 | #define HAVE_UINTPTR_T 1 |
| 2718 | EOF |
| 2719 | have_uintptr_t=yes |
| 2720 | else |
| 2721 | echo "configure: failed program was:" >&5 |
| 2722 | cat conftest.$ac_ext >&5 |
| 2723 | fi |
| 2724 | rm -f conftest* |
| 2725 | echo "$ac_t""$have_uintptr_t" 1>&6 |
| 2726 | if test "$have_uintptr_t" = yes ; then |
| 2727 | echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2728 | echo "configure:2729: checking size of uintptr_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2729 | if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2730 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2731 | else |
| 2732 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2733 | ac_cv_sizeof_uintptr_t=4 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2734 | else |
| 2735 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2736 | #line 2737 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2737 | #include "confdefs.h" |
| 2738 | #include <stdio.h> |
| 2739 | main() |
| 2740 | { |
| 2741 | FILE *f=fopen("conftestval", "w"); |
| 2742 | if (!f) exit(1); |
| 2743 | fprintf(f, "%d\n", sizeof(uintptr_t)); |
| 2744 | exit(0); |
| 2745 | } |
| 2746 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2747 | if { (eval echo configure:2748: \"$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] | 2748 | then |
| 2749 | ac_cv_sizeof_uintptr_t=`cat conftestval` |
| 2750 | else |
| 2751 | echo "configure: failed program was:" >&5 |
| 2752 | cat conftest.$ac_ext >&5 |
| 2753 | rm -fr conftest* |
| 2754 | ac_cv_sizeof_uintptr_t=0 |
| 2755 | fi |
| 2756 | rm -fr conftest* |
| 2757 | fi |
| 2758 | |
| 2759 | fi |
| 2760 | echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6 |
| 2761 | cat >> confdefs.h <<EOF |
| 2762 | #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t |
| 2763 | EOF |
| 2764 | |
| 2765 | |
| 2766 | fi |
| 2767 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2768 | # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>. |
| 2769 | echo $ac_n "checking size of off_t""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2770 | echo "configure:2771: checking size of off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2771 | 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] | 2772 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2773 | else |
| 2774 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2775 | ac_cv_sizeof_off_t=4 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2776 | else |
| 2777 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2778 | #line 2779 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2779 | #include "confdefs.h" |
| 2780 | #include <stdio.h> |
| 2781 | #include <sys/types.h> |
| 2782 | main() |
| 2783 | { |
| 2784 | FILE *f=fopen("conftestval", "w"); |
| 2785 | if (!f) exit(1); |
| 2786 | fprintf(f, "%d\n", sizeof(off_t)); |
| 2787 | exit(0); |
| 2788 | } |
| 2789 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2790 | if { (eval echo configure:2791: \"$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] | 2791 | then |
| 2792 | ac_cv_sizeof_off_t=`cat conftestval` |
| 2793 | else |
| 2794 | echo "configure: failed program was:" >&5 |
| 2795 | cat conftest.$ac_ext >&5 |
| 2796 | rm -fr conftest* |
| 2797 | ac_cv_sizeof_off_t=0 |
| 2798 | fi |
| 2799 | rm -fr conftest* |
| 2800 | fi |
| 2801 | |
| 2802 | |
| 2803 | fi |
| 2804 | |
| 2805 | echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6 |
| 2806 | cat >> confdefs.h <<EOF |
| 2807 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
| 2808 | EOF |
| 2809 | |
| 2810 | |
| 2811 | echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2812 | echo "configure:2813: checking whether to enable large file support" >&5 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2813 | if test "$have_long_long" = yes -a \ |
| 2814 | "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ |
| 2815 | "$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] | 2816 | cat >> confdefs.h <<\EOF |
| 2817 | #define HAVE_LARGEFILE_SUPPORT 1 |
| 2818 | EOF |
| 2819 | |
| 2820 | echo "$ac_t""yes" 1>&6 |
| 2821 | else |
| 2822 | echo "$ac_t""no" 1>&6 |
| 2823 | fi |
| 2824 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2825 | # AC_CHECK_SIZEOF() doesn't include <time.h>. |
| 2826 | echo $ac_n "checking size of time_t""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2827 | echo "configure:2828: checking size of time_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2828 | 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] | 2829 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2830 | else |
| 2831 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2832 | ac_cv_sizeof_time_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2833 | else |
| 2834 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2835 | #line 2836 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2836 | #include "confdefs.h" |
| 2837 | #include <stdio.h> |
| 2838 | #include <time.h> |
| 2839 | main() |
| 2840 | { |
| 2841 | FILE *f=fopen("conftestval", "w"); |
| 2842 | if (!f) exit(1); |
| 2843 | fprintf(f, "%d\n", sizeof(time_t)); |
| 2844 | exit(0); |
| 2845 | } |
| 2846 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2847 | if { (eval echo configure:2848: \"$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] | 2848 | then |
| 2849 | ac_cv_sizeof_time_t=`cat conftestval` |
| 2850 | else |
| 2851 | echo "configure: failed program was:" >&5 |
| 2852 | cat conftest.$ac_ext >&5 |
| 2853 | rm -fr conftest* |
| 2854 | ac_cv_sizeof_time_t=0 |
| 2855 | fi |
| 2856 | rm -fr conftest* |
| 2857 | fi |
| 2858 | |
| 2859 | |
| 2860 | fi |
| 2861 | |
| 2862 | echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 |
| 2863 | cat >> confdefs.h <<EOF |
| 2864 | #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
| 2865 | EOF |
| 2866 | |
| 2867 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2868 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2869 | # if have pthread_t then define SIZEOF_PTHREAD_T |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 2870 | ac_save_cc="$CC" |
| 2871 | if test "$ac_cv_kpthread" = "yes" |
| 2872 | then CC="$CC -Kpthread" |
| 2873 | fi |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2874 | echo $ac_n "checking for pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2875 | echo "configure:2876: checking for pthread_t" >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2876 | have_pthread_t=no |
| 2877 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2878 | #line 2879 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2879 | #include "confdefs.h" |
| 2880 | #include <pthread.h> |
| 2881 | int main() { |
Guido van Rossum | 1258049 | 2000-09-24 16:47:19 +0000 | [diff] [blame] | 2882 | pthread_t x; x = *(pthread_t*)0; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2883 | ; return 0; } |
| 2884 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2885 | if { (eval echo configure:2886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2886 | rm -rf conftest* |
| 2887 | have_pthread_t=yes |
| 2888 | else |
| 2889 | echo "configure: failed program was:" >&5 |
| 2890 | cat conftest.$ac_ext >&5 |
| 2891 | fi |
| 2892 | rm -f conftest* |
| 2893 | echo "$ac_t""$have_pthread_t" 1>&6 |
| 2894 | if test "$have_pthread_t" = yes ; then |
| 2895 | # AC_CHECK_SIZEOF() doesn't include <pthread.h>. |
| 2896 | echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2897 | echo "configure:2898: checking size of pthread_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2898 | if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2899 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2900 | else |
| 2901 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2902 | ac_cv_sizeof_pthread_t=4 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2903 | else |
| 2904 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2905 | #line 2906 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2906 | #include "confdefs.h" |
| 2907 | #include <stdio.h> |
| 2908 | #include <pthread.h> |
| 2909 | main() |
| 2910 | { |
| 2911 | FILE *f=fopen("conftestval", "w"); |
| 2912 | if (!f) exit(1); |
| 2913 | fprintf(f, "%d\n", sizeof(pthread_t)); |
| 2914 | exit(0); |
| 2915 | } |
| 2916 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2917 | if { (eval echo configure:2918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2918 | then |
| 2919 | ac_cv_sizeof_pthread_t=`cat conftestval` |
| 2920 | else |
| 2921 | echo "configure: failed program was:" >&5 |
| 2922 | cat conftest.$ac_ext >&5 |
| 2923 | rm -fr conftest* |
| 2924 | ac_cv_sizeof_pthread_t=0 |
| 2925 | fi |
| 2926 | rm -fr conftest* |
| 2927 | fi |
| 2928 | |
| 2929 | |
| 2930 | fi |
| 2931 | |
| 2932 | echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6 |
| 2933 | cat >> confdefs.h <<EOF |
| 2934 | #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t |
| 2935 | EOF |
| 2936 | |
| 2937 | fi |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 2938 | CC="$ac_save_cc" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2939 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2940 | echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2941 | echo "configure:2942: checking for --enable-toolbox-glue" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2942 | # Check whether --enable-toolbox-glue or --disable-toolbox-glue was given. |
| 2943 | if test "${enable_toolbox_glue+set}" = set; then |
| 2944 | enableval="$enable_toolbox_glue" |
| 2945 | : |
| 2946 | fi |
| 2947 | |
| 2948 | |
| 2949 | if test -z "$enable_toolbox_glue" |
| 2950 | then |
| 2951 | case $ac_sys_system/$ac_sys_release in |
| 2952 | Darwin/*) |
| 2953 | enable_toolbox_glue="yes";; |
| 2954 | *) |
| 2955 | enable_toolbox_glue="no";; |
| 2956 | esac |
| 2957 | fi |
| 2958 | case "$enable_toolbox_glue" in |
| 2959 | yes) |
| 2960 | extra_frameworks="-framework Carbon -framework Foundation" |
| 2961 | extra_machdep_objs="Python/mactoolboxglue.o" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 2962 | extra_undefs="-u __dummy -u _PyMac_Error" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2963 | cat >> confdefs.h <<\EOF |
| 2964 | #define USE_TOOLBOX_OBJECT_GLUE 1 |
| 2965 | EOF |
| 2966 | |
| 2967 | ;; |
| 2968 | *) |
| 2969 | extra_frameworks="" |
| 2970 | extra_machdep_objs="" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 2971 | extra_undefs="" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2972 | ;; |
| 2973 | esac |
| 2974 | echo "$ac_t""$enable_toolbox_glue" 1>&6 |
| 2975 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2976 | |
| 2977 | case $ac_sys_system/$ac_sys_release in |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 2978 | Darwin/1.4*) |
| 2979 | ns_undef_sym='_environ' |
| 2980 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym" |
| 2981 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
| 2982 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 2983 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 2984 | Darwin/*) |
| 2985 | ns_undef_sym='_environ' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2986 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" |
| 2987 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
| 2988 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 2989 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2990 | esac |
| 2991 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2992 | echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 2993 | echo "configure:2994: checking for --enable-framework" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2994 | if test "$enable_framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2995 | then |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 2996 | OPT="$OPT -fno-common -dynamic" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2997 | # -U __environ is needed since bundles don't have access |
| 2998 | # to crt0 when built but will always be linked against it |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2999 | # -F. is needed to allow linking to the framework while |
| 3000 | # in the build location. |
| 3001 | |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3002 | case $ac_sys_system/$ac_sys_release in |
| 3003 | Darwin/1.4*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";; |
| 3004 | Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";; |
| 3005 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3006 | cat >> confdefs.h <<\EOF |
| 3007 | #define WITH_NEXT_FRAMEWORK 1 |
| 3008 | EOF |
| 3009 | |
| 3010 | echo "$ac_t""yes" 1>&6 |
| 3011 | else |
| 3012 | echo "$ac_t""no" 1>&6 |
| 3013 | fi |
| 3014 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3015 | echo $ac_n "checking for dyld""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3016 | echo "configure:3017: checking for dyld" >&5 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3017 | case $ac_sys_system/$ac_sys_release in |
| 3018 | Darwin/*) |
| 3019 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3020 | #define WITH_DYLD 1 |
| 3021 | EOF |
| 3022 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3023 | echo "$ac_t""always on for Darwin" 1>&6 |
| 3024 | ;; |
| 3025 | *) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3026 | echo "$ac_t""no" 1>&6 |
| 3027 | ;; |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3028 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3029 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3030 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3031 | |
| 3032 | |
| 3033 | |
| 3034 | |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3035 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3036 | # SO is the extension of shared libraries `(including the dot!) |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3037 | # -- usually .so, .sl on HP-UX, .dll on Cygwin |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3038 | echo $ac_n "checking SO""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3039 | echo "configure:3040: checking SO" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3040 | if test -z "$SO" |
| 3041 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3042 | case $ac_sys_system in |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3043 | hp*|HP*) SO=.sl;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3044 | CYGWIN*) SO=.dll;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3045 | *) SO=.so;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3046 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3047 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3048 | echo "$ac_t""$SO" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3049 | # LDSHARED is the ld *command* used to create shared library |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3050 | # -- "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] | 3051 | # (Shared libraries in this instance are shared modules to be loaded into |
| 3052 | # Python, as opposed to building Python itself as a shared library.) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3053 | echo $ac_n "checking LDSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3054 | echo "configure:3055: checking LDSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3055 | if test -z "$LDSHARED" |
| 3056 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3057 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3058 | AIX*) |
| 3059 | BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" |
Guido van Rossum | ce608b0 | 2001-09-28 15:59:38 +0000 | [diff] [blame] | 3060 | LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3061 | ;; |
| 3062 | BeOS*) |
| 3063 | BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY" |
Guido van Rossum | ce608b0 | 2001-09-28 15:59:38 +0000 | [diff] [blame] | 3064 | LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3065 | ;; |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3066 | IRIX/5*) LDSHARED="ld -shared";; |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 3067 | IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3068 | SunOS/4*) LDSHARED="ld";; |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3069 | SunOS/5*) |
| 3070 | if test "$GCC" = "yes" |
Neil Schemenauer | 8ba9445 | 2001-02-19 18:18:48 +0000 | [diff] [blame] | 3071 | then LDSHARED='$(CC) -shared' |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3072 | else LDSHARED="$(CC) -G"; |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3073 | fi ;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3074 | hp*|HP*) LDSHARED="ld -b";; |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3075 | OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; |
| 3076 | DYNIX/ptx*) LDSHARED="ld -G";; |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3077 | Darwin/1.4*) |
| 3078 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3079 | if test "$enable_framework" ; then |
| 3080 | # Link against the framework. All externals should be defined. |
| 3081 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3082 | else |
| 3083 | # No framework. Ignore undefined symbols, assuming they come from Python |
| 3084 | LDSHARED="$LDSHARED -flat_namespace -undefined suppress" |
| 3085 | fi ;; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3086 | Darwin/*) |
| 3087 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3088 | if test "$enable_framework" ; then |
| 3089 | # Link against the framework. All externals should be defined. |
| 3090 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3091 | else |
| 3092 | # No framework. Ignore undefined symbols, assuming they come from Python |
| 3093 | LDSHARED="$LDSHARED -undefined suppress" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3094 | fi ;; |
Guido van Rossum | 81652ab | 1996-07-21 02:53:27 +0000 | [diff] [blame] | 3095 | Linux*) LDSHARED="gcc -shared";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 3096 | dgux*) LDSHARED="ld -G";; |
Guido van Rossum | 458e7fa | 1999-09-17 15:40:40 +0000 | [diff] [blame] | 3097 | BSD/OS*/4*) LDSHARED="gcc -shared";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3098 | OpenBSD*|NetBSD*|FreeBSD*) |
Jeremy Hylton | 4bcc7c5 | 2000-08-31 17:45:35 +0000 | [diff] [blame] | 3099 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3100 | then |
| 3101 | LDSHARED="cc -shared ${LDFLAGS}" |
| 3102 | else |
| 3103 | LDSHARED="ld -Bshareable ${LDFLAGS}" |
| 3104 | fi;; |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3105 | UnixWare*) |
| 3106 | if test "$GCC" = "yes" |
| 3107 | then LDSHARED="$(CC) -shared" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3108 | else LDSHARED="$(CC) -G" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3109 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3110 | SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3111 | Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3112 | CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3113 | *) LDSHARED="ld";; |
| 3114 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3115 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3116 | echo "$ac_t""$LDSHARED" 1>&6 |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3117 | BLDSHARED=${BLDSHARED-$LDSHARED} |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3118 | # 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] | 3119 | # library (module) -- this is only needed for a few systems |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3120 | echo $ac_n "checking CCSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3121 | echo "configure:3122: checking CCSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3122 | if test -z "$CCSHARED" |
| 3123 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3124 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 3125 | SunOS*) if test "$GCC" = yes; |
| 3126 | then CCSHARED="-fPIC"; |
| 3127 | fi;; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3128 | hp*|HP*) if test "$GCC" = yes; |
Martin v. Löwis | 703ad70 | 2001-09-05 08:36:52 +0000 | [diff] [blame] | 3129 | then CCSHARED="-fPIC"; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3130 | else CCSHARED="+z"; |
| 3131 | fi;; |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3132 | Linux*) CCSHARED="-fPIC";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3133 | BSD/OS*/4*) CCSHARED="-fpic";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3134 | FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";; |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3135 | UnixWare*) |
| 3136 | if test "$GCC" = "yes" |
| 3137 | then CCSHARED="-fPIC" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3138 | else CCSHARED="-KPIC" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3139 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3140 | SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3141 | Monterey*) CCSHARED="-G";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3142 | IRIX*/6*) case $CC in |
| 3143 | *gcc*) CCSHARED="-shared";; |
Guido van Rossum | ee21f41 | 1998-04-20 18:51:54 +0000 | [diff] [blame] | 3144 | *) CCSHARED="";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3145 | esac;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3146 | CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3147 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3148 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3149 | echo "$ac_t""$CCSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3150 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3151 | # the python executable -- this is only needed for a few systems |
| 3152 | echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3153 | echo "configure:3154: checking LINKFORSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3154 | if test -z "$LINKFORSHARED" |
| 3155 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3156 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3157 | AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 3158 | hp*|HP*) |
Guido van Rossum | 304dd2d | 1997-10-20 23:10:56 +0000 | [diff] [blame] | 3159 | LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3160 | BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 2d9feed | 1997-11-24 17:36:21 +0000 | [diff] [blame] | 3161 | Linux*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3162 | # -u libsys_s pulls in all symbols in libsys |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3163 | Darwin/*) |
| 3164 | # -u __dummy makes the linker aware of the objc runtime |
| 3165 | # in System.framework; otherwise, __objcInit (referenced in |
| 3166 | # crt1.o) gets erroneously defined as common, which breaks dynamic |
| 3167 | # loading of any modules which reference it in System.framework. |
| 3168 | # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is |
| 3169 | # not used by the core itself but which needs to be in the core so |
| 3170 | # that dynamically loaded extension modules have access to it. |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3171 | LINKFORSHARED="$extra_undefs -framework System" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3172 | if test "$enable_framework" |
| 3173 | then |
| 3174 | LINKFORSHARED="$LINKFORSHARED -framework Python" |
| 3175 | fi |
| 3176 | LINKFORSHARED="$LINKFORSHARED $extra_frameworks";; |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3177 | UnixWare*) LINKFORSHARED="-Wl,-Bexport";; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3178 | SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3179 | ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3180 | FreeBSD*|NetBSD*|OpenBSD*) |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 3181 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 3182 | then |
| 3183 | LINKFORSHARED="-Wl,--export-dynamic" |
| 3184 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3185 | SunOS/5*) case $CC in |
| 3186 | *gcc*) |
Guido van Rossum | ff48418 | 2000-02-03 13:50:24 +0000 | [diff] [blame] | 3187 | if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 3188 | then |
| 3189 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3190 | fi;; |
| 3191 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3192 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3193 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3194 | echo "$ac_t""$LINKFORSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3195 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3196 | |
| 3197 | echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3198 | echo "configure:3199: checking CFLAGSFORSHARED" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3199 | if test ! "$LIBRARY" = "$LDLIBRARY" |
| 3200 | then |
Neil Schemenauer | 0c6141f | 2001-01-27 21:40:54 +0000 | [diff] [blame] | 3201 | case $ac_sys_system in |
| 3202 | CYGWIN*) |
| 3203 | # Cygwin needs CCSHARED when building extension DLLs |
| 3204 | # but not when building the interpreter DLL. |
| 3205 | CFLAGSFORSHARED='';; |
| 3206 | *) |
| 3207 | CFLAGSFORSHARED='$(CCSHARED)' |
| 3208 | esac |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3209 | fi |
| 3210 | echo "$ac_t""$CFLAGSFORSHARED" 1>&6 |
| 3211 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3212 | # checks for libraries |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3213 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3214 | echo "configure:3215: checking for dlopen in -ldl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3215 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3216 | 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] | 3217 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3218 | else |
| 3219 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3220 | LIBS="-ldl $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3221 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3222 | #line 3223 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3223 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3224 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3225 | /* We use char because int might match the return type of a gcc2 |
| 3226 | builtin and then its argument prototype would still apply. */ |
| 3227 | char dlopen(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3228 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3229 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3230 | dlopen() |
| 3231 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3232 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3233 | if { (eval echo configure:3234: \"$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] | 3234 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3235 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3236 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3237 | echo "configure: failed program was:" >&5 |
| 3238 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3239 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3240 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3241 | fi |
| 3242 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3243 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3244 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3245 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3246 | 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] | 3247 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3248 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3249 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3250 | cat >> confdefs.h <<EOF |
| 3251 | #define $ac_tr_lib 1 |
| 3252 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3253 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3254 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3255 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3256 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3257 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3258 | fi |
| 3259 | # Dynamic linking for SunOS/Solaris and SYSV |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3260 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3261 | echo "configure:3262: checking for shl_load in -ldld" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3262 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3263 | 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] | 3264 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3265 | else |
| 3266 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3267 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3268 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3269 | #line 3270 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3270 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3271 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3272 | /* We use char because int might match the return type of a gcc2 |
| 3273 | builtin and then its argument prototype would still apply. */ |
| 3274 | char shl_load(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3275 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3276 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3277 | shl_load() |
| 3278 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3279 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3280 | if { (eval echo configure:3281: \"$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] | 3281 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3282 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3283 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3284 | echo "configure: failed program was:" >&5 |
| 3285 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3286 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3287 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3288 | fi |
| 3289 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3290 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3291 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3292 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3293 | 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] | 3294 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3295 | ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3296 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3297 | cat >> confdefs.h <<EOF |
| 3298 | #define $ac_tr_lib 1 |
| 3299 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3300 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3301 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3302 | |
| 3303 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3304 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3305 | fi |
| 3306 | # Dynamic linking for HP-UX |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3307 | |
| 3308 | # checks for system dependent C++ extensions support |
| 3309 | case "$ac_sys_system" in |
| 3310 | AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3311 | echo "configure:3312: checking for genuine AIX C++ extensions support" >&5 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3312 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3313 | #line 3314 "configure" |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3314 | #include "confdefs.h" |
| 3315 | #include "/usr/lpp/xlC/include/load.h" |
| 3316 | int main() { |
| 3317 | loadAndInit("", 0, "") |
| 3318 | ; return 0; } |
| 3319 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3320 | if { (eval echo configure:3321: \"$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] | 3321 | rm -rf conftest* |
| 3322 | cat >> confdefs.h <<\EOF |
| 3323 | #define AIX_GENUINE_CPLUSPLUS 1 |
| 3324 | EOF |
| 3325 | |
| 3326 | echo "$ac_t""yes" 1>&6 |
| 3327 | else |
| 3328 | echo "configure: failed program was:" >&5 |
| 3329 | cat conftest.$ac_ext >&5 |
| 3330 | rm -rf conftest* |
| 3331 | echo "$ac_t""no" 1>&6 |
| 3332 | fi |
| 3333 | rm -f conftest*;; |
| 3334 | *) ;; |
| 3335 | esac |
| 3336 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3337 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
| 3338 | # However on SGI IRIX, these exist but are broken. |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3339 | # BeOS' sockets are stashed in libnet. |
| 3340 | case "$ac_sys_system" in |
| 3341 | IRIX*) ;; |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3342 | *) |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3343 | echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3344 | echo "configure:3345: checking for t_open in -lnsl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3345 | ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3346 | 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] | 3347 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3348 | else |
| 3349 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3350 | LIBS="-lnsl $LIBS" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3351 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3352 | #line 3353 "configure" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3353 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3354 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3355 | /* We use char because int might match the return type of a gcc2 |
| 3356 | builtin and then its argument prototype would still apply. */ |
| 3357 | char t_open(); |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3358 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3359 | int main() { |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3360 | t_open() |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3361 | ; return 0; } |
| 3362 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3363 | if { (eval echo configure:3364: \"$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] | 3364 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3365 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3366 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3367 | echo "configure: failed program was:" >&5 |
| 3368 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3369 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3370 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3371 | fi |
| 3372 | rm -f conftest* |
| 3373 | LIBS="$ac_save_LIBS" |
| 3374 | |
| 3375 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3376 | 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] | 3377 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3378 | LIBS="-lnsl $LIBS" |
| 3379 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3380 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3381 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3382 | # SVR4 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3383 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3384 | echo "configure:3385: checking for socket in -lsocket" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3385 | ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3386 | 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] | 3387 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3388 | else |
| 3389 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3390 | LIBS="-lsocket $LIBS $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3391 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3392 | #line 3393 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3393 | #include "confdefs.h" |
| 3394 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3395 | /* We use char because int might match the return type of a gcc2 |
| 3396 | builtin and then its argument prototype would still apply. */ |
| 3397 | char socket(); |
| 3398 | |
| 3399 | int main() { |
| 3400 | socket() |
| 3401 | ; return 0; } |
| 3402 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3403 | if { (eval echo configure:3404: \"$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] | 3404 | rm -rf conftest* |
| 3405 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3406 | else |
| 3407 | echo "configure: failed program was:" >&5 |
| 3408 | cat conftest.$ac_ext >&5 |
| 3409 | rm -rf conftest* |
| 3410 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3411 | fi |
| 3412 | rm -f conftest* |
| 3413 | LIBS="$ac_save_LIBS" |
| 3414 | |
| 3415 | fi |
| 3416 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3417 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3418 | LIBS="-lsocket $LIBS" |
| 3419 | else |
| 3420 | echo "$ac_t""no" 1>&6 |
| 3421 | fi |
| 3422 | # SVR4 sockets |
Jeremy Hylton | cb25d5e | 2000-07-27 21:23:28 +0000 | [diff] [blame] | 3423 | ;; |
| 3424 | esac |
| 3425 | case "$ac_sys_system" in |
| 3426 | BeOS*) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3427 | echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3428 | echo "configure:3429: checking for socket in -lnet" >&5 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3429 | ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3430 | 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] | 3431 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3432 | else |
| 3433 | ac_save_LIBS="$LIBS" |
| 3434 | LIBS="-lnet $LIBS $LIBS" |
| 3435 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3436 | #line 3437 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3437 | #include "confdefs.h" |
| 3438 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3439 | /* We use char because int might match the return type of a gcc2 |
| 3440 | builtin and then its argument prototype would still apply. */ |
| 3441 | char socket(); |
| 3442 | |
| 3443 | int main() { |
| 3444 | socket() |
| 3445 | ; return 0; } |
| 3446 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3447 | if { (eval echo configure:3448: \"$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] | 3448 | rm -rf conftest* |
| 3449 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3450 | else |
| 3451 | echo "configure: failed program was:" >&5 |
| 3452 | cat conftest.$ac_ext >&5 |
| 3453 | rm -rf conftest* |
| 3454 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3455 | fi |
| 3456 | rm -f conftest* |
| 3457 | LIBS="$ac_save_LIBS" |
| 3458 | |
| 3459 | fi |
| 3460 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3461 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3462 | LIBS="-lnet $LIBS" |
| 3463 | else |
| 3464 | echo "$ac_t""no" 1>&6 |
| 3465 | fi |
| 3466 | # BeOS |
| 3467 | ;; |
| 3468 | esac |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3469 | |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3470 | echo $ac_n "checking for --with-libs""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3471 | echo "configure:3472: checking for --with-libs" >&5 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3472 | # Check whether --with-libs or --without-libs was given. |
| 3473 | if test "${with_libs+set}" = set; then |
| 3474 | withval="$with_libs" |
| 3475 | |
| 3476 | echo "$ac_t""$withval" 1>&6 |
| 3477 | LIBS="$withval $LIBS" |
| 3478 | |
| 3479 | else |
| 3480 | echo "$ac_t""no" 1>&6 |
| 3481 | fi |
| 3482 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3483 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3484 | # Determine if signalmodule should be used. |
| 3485 | |
| 3486 | |
| 3487 | echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3488 | echo "configure:3489: checking for --with-signal-module" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3489 | # Check whether --with-signal-module or --without-signal-module was given. |
| 3490 | if test "${with_signal_module+set}" = set; then |
| 3491 | withval="$with_signal_module" |
| 3492 | : |
| 3493 | fi |
| 3494 | |
| 3495 | |
| 3496 | if test -z "$with_signal_module" |
| 3497 | then with_signal_module="yes" |
| 3498 | fi |
| 3499 | echo "$ac_t""$with_signal_module" 1>&6 |
| 3500 | |
| 3501 | if test "${with_signal_module}" = "yes"; then |
| 3502 | USE_SIGNAL_MODULE="" |
| 3503 | SIGNAL_OBJS="" |
| 3504 | else |
| 3505 | USE_SIGNAL_MODULE="#" |
| 3506 | SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o" |
| 3507 | fi |
| 3508 | |
Guido van Rossum | 3d15bd8 | 2001-01-10 18:53:48 +0000 | [diff] [blame] | 3509 | # This is used to generate Setup.config |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3510 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3511 | USE_THREAD_MODULE="" |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3512 | |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3513 | echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3514 | echo "configure:3515: checking for --with-dec-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3515 | |
| 3516 | # Check whether --with-dec-threads or --without-dec-threads was given. |
| 3517 | if test "${with_dec_threads+set}" = set; then |
| 3518 | withval="$with_dec_threads" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3519 | |
| 3520 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3521 | LDLAST=-threads |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3522 | if test "${with_thread+set}" != set; then |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3523 | with_thread="$withval"; |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3524 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3525 | else |
| 3526 | echo "$ac_t""no" 1>&6 |
| 3527 | fi |
| 3528 | |
| 3529 | |
| 3530 | echo $ac_n "checking for --with-threads""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3531 | echo "configure:3532: checking for --with-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3532 | # Check whether --with-threads or --without-threads was given. |
| 3533 | if test "${with_threads+set}" = set; then |
| 3534 | withval="$with_threads" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3535 | : |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3536 | fi |
| 3537 | |
| 3538 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3539 | # --with-thread is deprecated, but check for it anyway |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3540 | # Check whether --with-thread or --without-thread was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3541 | if test "${with_thread+set}" = set; then |
| 3542 | withval="$with_thread" |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 3543 | |
| 3544 | with_threads=$with_thread |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3545 | fi |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3546 | |
| 3547 | |
| 3548 | if test -z "$with_threads" |
| 3549 | then with_threads="yes" |
| 3550 | fi |
| 3551 | echo "$ac_t""$with_threads" 1>&6 |
| 3552 | |
| 3553 | if test "$with_threads" = "no" |
| 3554 | then |
| 3555 | USE_THREAD_MODULE="#" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3556 | elif test "$ac_cv_kpthread" = "yes" |
| 3557 | then |
| 3558 | CC="$CC -Kpthread" |
| 3559 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3560 | #define WITH_THREAD 1 |
| 3561 | EOF |
| 3562 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3563 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3564 | #define _POSIX_THREADS 1 |
| 3565 | EOF |
| 3566 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3567 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3568 | LIBOBJS="$LIBOBJS thread.o" |
| 3569 | else |
| 3570 | if test ! -z "$with_threads" -a -d "$with_threads" |
| 3571 | then LDFLAGS="$LDFLAGS -L$with_threads" |
| 3572 | fi |
| 3573 | if test ! -z "$withval" -a -d "$withval" |
| 3574 | then LDFLAGS="$LDFLAGS -L$withval" |
| 3575 | fi |
| 3576 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 3577 | #define _REENTRANT 1 |
| 3578 | EOF |
| 3579 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3580 | ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3581 | echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3582 | echo "configure:3583: checking for mach/cthreads.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3583 | 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] | 3584 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3585 | else |
| 3586 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3587 | #line 3588 "configure" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3588 | #include "confdefs.h" |
| 3589 | #include <mach/cthreads.h> |
| 3590 | EOF |
| 3591 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3592 | { (eval echo configure:3593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3593 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3594 | if test -z "$ac_err"; then |
| 3595 | rm -rf conftest* |
| 3596 | eval "ac_cv_header_$ac_safe=yes" |
| 3597 | else |
| 3598 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3599 | echo "configure: failed program was:" >&5 |
| 3600 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3601 | rm -rf conftest* |
| 3602 | eval "ac_cv_header_$ac_safe=no" |
| 3603 | fi |
| 3604 | rm -f conftest* |
| 3605 | fi |
| 3606 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3607 | echo "$ac_t""yes" 1>&6 |
| 3608 | cat >> confdefs.h <<\EOF |
| 3609 | #define WITH_THREAD 1 |
| 3610 | EOF |
| 3611 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3612 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3613 | #define C_THREADS 1 |
| 3614 | EOF |
| 3615 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3616 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3617 | else |
| 3618 | echo "$ac_t""no" 1>&6 |
| 3619 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3620 | echo $ac_n "checking for --with-pth""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3621 | echo "configure:3622: checking for --with-pth" >&5 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3622 | # Check whether --with-pth or --without-pth was given. |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3623 | if test "${with_pth+set}" = set; then |
| 3624 | withval="$with_pth" |
| 3625 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3626 | echo "$ac_t""$withval" 1>&6 |
| 3627 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3628 | #define WITH_THREAD 1 |
| 3629 | EOF |
| 3630 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3631 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3632 | #define HAVE_PTH 1 |
| 3633 | EOF |
| 3634 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3635 | LIBS="-lpth $LIBS" |
| 3636 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3637 | else |
| 3638 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3639 | echo "$ac_t""no" 1>&6 |
| 3640 | echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3641 | echo "configure:3642: checking for pthread_create in -lpthread" >&5 |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3642 | ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3643 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3644 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3645 | else |
| 3646 | ac_save_LIBS="$LIBS" |
| 3647 | LIBS="-lpthread $LIBS" |
| 3648 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3649 | #line 3650 "configure" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3650 | #include "confdefs.h" |
| 3651 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3652 | /* We use char because int might match the return type of a gcc2 |
| 3653 | builtin and then its argument prototype would still apply. */ |
| 3654 | char pthread_create(); |
| 3655 | |
| 3656 | int main() { |
| 3657 | pthread_create() |
| 3658 | ; return 0; } |
| 3659 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3660 | if { (eval echo configure:3661: \"$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] | 3661 | rm -rf conftest* |
| 3662 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3663 | else |
| 3664 | echo "configure: failed program was:" >&5 |
| 3665 | cat conftest.$ac_ext >&5 |
| 3666 | rm -rf conftest* |
| 3667 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3668 | fi |
| 3669 | rm -f conftest* |
| 3670 | LIBS="$ac_save_LIBS" |
| 3671 | |
| 3672 | fi |
| 3673 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3674 | echo "$ac_t""yes" 1>&6 |
| 3675 | cat >> confdefs.h <<\EOF |
| 3676 | #define WITH_THREAD 1 |
| 3677 | EOF |
| 3678 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3679 | case $ac_sys_system in |
| 3680 | Darwin*) ;; |
| 3681 | *) cat >> confdefs.h <<\EOF |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3682 | #define _POSIX_THREADS 1 |
| 3683 | EOF |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3684 | |
| 3685 | posix_threads=yes |
| 3686 | ;; |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3687 | esac |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3688 | LIBS="-lpthread $LIBS" |
| 3689 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3690 | else |
| 3691 | echo "$ac_t""no" 1>&6 |
| 3692 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3693 | echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3694 | echo "configure:3695: checking for pthread_detach" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3695 | 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] | 3696 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3697 | else |
| 3698 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3699 | #line 3700 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3700 | #include "confdefs.h" |
| 3701 | /* System header to define __stub macros and hopefully few prototypes, |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3702 | which can conflict with char pthread_detach(); below. */ |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3703 | #include <assert.h> |
| 3704 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3705 | /* We use char because int might match the return type of a gcc2 |
| 3706 | builtin and then its argument prototype would still apply. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3707 | char pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3708 | |
| 3709 | int main() { |
| 3710 | |
| 3711 | /* The GNU C library defines this for functions which it implements |
| 3712 | to always fail with ENOSYS. Some functions are actually named |
| 3713 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3714 | #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3715 | choke me |
| 3716 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3717 | pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3718 | #endif |
| 3719 | |
| 3720 | ; return 0; } |
| 3721 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3722 | if { (eval echo configure:3723: \"$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] | 3723 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3724 | eval "ac_cv_func_pthread_detach=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3725 | else |
| 3726 | echo "configure: failed program was:" >&5 |
| 3727 | cat conftest.$ac_ext >&5 |
| 3728 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3729 | eval "ac_cv_func_pthread_detach=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3730 | fi |
| 3731 | rm -f conftest* |
| 3732 | fi |
| 3733 | |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3734 | if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3735 | echo "$ac_t""yes" 1>&6 |
| 3736 | cat >> confdefs.h <<\EOF |
| 3737 | #define WITH_THREAD 1 |
| 3738 | EOF |
| 3739 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3740 | case $ac_sys_system in |
| 3741 | Darwin*) ;; |
| 3742 | *) cat >> confdefs.h <<\EOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3743 | #define _POSIX_THREADS 1 |
| 3744 | EOF |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3745 | |
| 3746 | posix_threads=yes |
| 3747 | ;; |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3748 | esac |
| 3749 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3750 | else |
| 3751 | echo "$ac_t""no" 1>&6 |
| 3752 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3753 | ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3754 | echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3755 | echo "configure:3756: checking for kernel/OS.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3756 | 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] | 3757 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3758 | else |
| 3759 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3760 | #line 3761 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3761 | #include "confdefs.h" |
| 3762 | #include <kernel/OS.h> |
| 3763 | EOF |
| 3764 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3765 | { (eval echo configure:3766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3766 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3767 | if test -z "$ac_err"; then |
| 3768 | rm -rf conftest* |
| 3769 | eval "ac_cv_header_$ac_safe=yes" |
| 3770 | else |
| 3771 | echo "$ac_err" >&5 |
| 3772 | echo "configure: failed program was:" >&5 |
| 3773 | cat conftest.$ac_ext >&5 |
| 3774 | rm -rf conftest* |
| 3775 | eval "ac_cv_header_$ac_safe=no" |
| 3776 | fi |
| 3777 | rm -f conftest* |
| 3778 | fi |
| 3779 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3780 | echo "$ac_t""yes" 1>&6 |
| 3781 | cat >> confdefs.h <<\EOF |
| 3782 | #define WITH_THREAD 1 |
| 3783 | EOF |
| 3784 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3785 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3786 | #define BEOS_THREADS 1 |
| 3787 | EOF |
| 3788 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3789 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3790 | else |
| 3791 | echo "$ac_t""no" 1>&6 |
| 3792 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3793 | echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3794 | echo "configure:3795: checking for pthread_create in -lpthreads" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3795 | ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3796 | 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] | 3797 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3798 | else |
| 3799 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3800 | LIBS="-lpthreads $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3801 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3802 | #line 3803 "configure" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3803 | #include "confdefs.h" |
| 3804 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3805 | /* We use char because int might match the return type of a gcc2 |
| 3806 | builtin and then its argument prototype would still apply. */ |
| 3807 | char pthread_create(); |
| 3808 | |
| 3809 | int main() { |
| 3810 | pthread_create() |
| 3811 | ; return 0; } |
| 3812 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3813 | if { (eval echo configure:3814: \"$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] | 3814 | rm -rf conftest* |
| 3815 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3816 | else |
| 3817 | echo "configure: failed program was:" >&5 |
| 3818 | cat conftest.$ac_ext >&5 |
| 3819 | rm -rf conftest* |
| 3820 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3821 | fi |
| 3822 | rm -f conftest* |
| 3823 | LIBS="$ac_save_LIBS" |
| 3824 | |
| 3825 | fi |
| 3826 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3827 | echo "$ac_t""yes" 1>&6 |
| 3828 | cat >> confdefs.h <<\EOF |
| 3829 | #define WITH_THREAD 1 |
| 3830 | EOF |
| 3831 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3832 | cat >> confdefs.h <<\EOF |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3833 | #define _POSIX_THREADS 1 |
| 3834 | EOF |
| 3835 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3836 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3837 | LIBS="$LIBS -lpthreads" |
| 3838 | LIBOBJS="$LIBOBJS thread.o" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3839 | else |
| 3840 | echo "$ac_t""no" 1>&6 |
| 3841 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3842 | echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3843 | echo "configure:3844: checking for pthread_create in -lc_r" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3844 | ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3845 | 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] | 3846 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3847 | else |
| 3848 | ac_save_LIBS="$LIBS" |
| 3849 | LIBS="-lc_r $LIBS" |
| 3850 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3851 | #line 3852 "configure" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3852 | #include "confdefs.h" |
| 3853 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3854 | /* We use char because int might match the return type of a gcc2 |
| 3855 | builtin and then its argument prototype would still apply. */ |
| 3856 | char pthread_create(); |
| 3857 | |
| 3858 | int main() { |
| 3859 | pthread_create() |
| 3860 | ; return 0; } |
| 3861 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3862 | if { (eval echo configure:3863: \"$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] | 3863 | rm -rf conftest* |
| 3864 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3865 | else |
| 3866 | echo "configure: failed program was:" >&5 |
| 3867 | cat conftest.$ac_ext >&5 |
| 3868 | rm -rf conftest* |
| 3869 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3870 | fi |
| 3871 | rm -f conftest* |
| 3872 | LIBS="$ac_save_LIBS" |
| 3873 | |
| 3874 | fi |
| 3875 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3876 | echo "$ac_t""yes" 1>&6 |
| 3877 | cat >> confdefs.h <<\EOF |
| 3878 | #define WITH_THREAD 1 |
| 3879 | EOF |
| 3880 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3881 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3882 | #define _POSIX_THREADS 1 |
| 3883 | EOF |
| 3884 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3885 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3886 | LIBS="$LIBS -lc_r" |
| 3887 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3888 | else |
| 3889 | echo "$ac_t""no" 1>&6 |
| 3890 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3891 | echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3892 | echo "configure:3893: checking for __d6_pthread_create in -lthread" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3893 | ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3894 | 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] | 3895 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3896 | else |
| 3897 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3898 | LIBS="-lthread $LIBS" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3899 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3900 | #line 3901 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3901 | #include "confdefs.h" |
| 3902 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3903 | /* We use char because int might match the return type of a gcc2 |
| 3904 | builtin and then its argument prototype would still apply. */ |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3905 | char __d6_pthread_create(); |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3906 | |
| 3907 | int main() { |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3908 | __d6_pthread_create() |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3909 | ; return 0; } |
| 3910 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3911 | if { (eval echo configure:3912: \"$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] | 3912 | rm -rf conftest* |
| 3913 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3914 | else |
| 3915 | echo "configure: failed program was:" >&5 |
| 3916 | cat conftest.$ac_ext >&5 |
| 3917 | rm -rf conftest* |
| 3918 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3919 | fi |
| 3920 | rm -f conftest* |
| 3921 | LIBS="$ac_save_LIBS" |
| 3922 | |
| 3923 | fi |
| 3924 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3925 | echo "$ac_t""yes" 1>&6 |
| 3926 | cat >> confdefs.h <<\EOF |
| 3927 | #define WITH_THREAD 1 |
| 3928 | EOF |
| 3929 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3930 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3931 | #define _POSIX_THREADS 1 |
| 3932 | EOF |
| 3933 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3934 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3935 | LIBS="$LIBS -lthread" |
| 3936 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3937 | else |
| 3938 | echo "$ac_t""no" 1>&6 |
| 3939 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3940 | echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3941 | echo "configure:3942: checking for __pthread_create_system in -lpthread" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3942 | ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` |
| 3943 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3944 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3945 | else |
| 3946 | ac_save_LIBS="$LIBS" |
| 3947 | LIBS="-lpthread $LIBS" |
| 3948 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3949 | #line 3950 "configure" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3950 | #include "confdefs.h" |
| 3951 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3952 | /* We use char because int might match the return type of a gcc2 |
| 3953 | builtin and then its argument prototype would still apply. */ |
| 3954 | char __pthread_create_system(); |
| 3955 | |
| 3956 | int main() { |
| 3957 | __pthread_create_system() |
| 3958 | ; return 0; } |
| 3959 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3960 | if { (eval echo configure:3961: \"$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] | 3961 | rm -rf conftest* |
| 3962 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3963 | else |
| 3964 | echo "configure: failed program was:" >&5 |
| 3965 | cat conftest.$ac_ext >&5 |
| 3966 | rm -rf conftest* |
| 3967 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3968 | fi |
| 3969 | rm -f conftest* |
| 3970 | LIBS="$ac_save_LIBS" |
| 3971 | |
| 3972 | fi |
| 3973 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3974 | echo "$ac_t""yes" 1>&6 |
| 3975 | cat >> confdefs.h <<\EOF |
| 3976 | #define WITH_THREAD 1 |
| 3977 | EOF |
| 3978 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3979 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3980 | #define _POSIX_THREADS 1 |
| 3981 | EOF |
| 3982 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3983 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3984 | LIBS="$LIBS -lpthread" |
| 3985 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3986 | else |
| 3987 | echo "$ac_t""no" 1>&6 |
| 3988 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3989 | echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3990 | echo "configure:3991: checking for pthread_create in -lcma" >&5 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3991 | ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3992 | 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] | 3993 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3994 | else |
| 3995 | ac_save_LIBS="$LIBS" |
| 3996 | LIBS="-lcma $LIBS" |
| 3997 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 3998 | #line 3999 "configure" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3999 | #include "confdefs.h" |
| 4000 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4001 | /* We use char because int might match the return type of a gcc2 |
| 4002 | builtin and then its argument prototype would still apply. */ |
| 4003 | char pthread_create(); |
| 4004 | |
| 4005 | int main() { |
| 4006 | pthread_create() |
| 4007 | ; return 0; } |
| 4008 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4009 | if { (eval echo configure:4010: \"$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] | 4010 | rm -rf conftest* |
| 4011 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4012 | else |
| 4013 | echo "configure: failed program was:" >&5 |
| 4014 | cat conftest.$ac_ext >&5 |
| 4015 | rm -rf conftest* |
| 4016 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4017 | fi |
| 4018 | rm -f conftest* |
| 4019 | LIBS="$ac_save_LIBS" |
| 4020 | |
| 4021 | fi |
| 4022 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4023 | echo "$ac_t""yes" 1>&6 |
| 4024 | cat >> confdefs.h <<\EOF |
| 4025 | #define WITH_THREAD 1 |
| 4026 | EOF |
| 4027 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4028 | cat >> confdefs.h <<\EOF |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4029 | #define _POSIX_THREADS 1 |
| 4030 | EOF |
| 4031 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4032 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4033 | LIBS="$LIBS -lcma" |
| 4034 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4035 | else |
| 4036 | echo "$ac_t""no" 1>&6 |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 4037 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4038 | USE_THREAD_MODULE="#" |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 4039 | fi |
| 4040 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4041 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4042 | fi |
| 4043 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 4044 | fi |
| 4045 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4046 | fi |
| 4047 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4048 | fi |
| 4049 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4050 | fi |
| 4051 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4052 | fi |
| 4053 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4054 | fi |
| 4055 | |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4056 | fi |
| 4057 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4058 | fi |
| 4059 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4060 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4061 | if test "$posix_threads" = "yes"; then |
| 4062 | echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4063 | echo "configure:4064: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4064 | if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then |
| 4065 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4066 | else |
| 4067 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 4068 | ac_cv_pthread_system_supported=no |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4069 | else |
| 4070 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4071 | #line 4072 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4072 | #include "confdefs.h" |
| 4073 | #include <pthread.h> |
| 4074 | void *foo(void *parm) { |
| 4075 | return NULL; |
| 4076 | } |
| 4077 | main() { |
| 4078 | pthread_attr_t attr; |
| 4079 | if (pthread_attr_init(&attr)) exit(-1); |
| 4080 | if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1); |
| 4081 | if (pthread_create(NULL, &attr, foo, NULL)) exit(-1); |
| 4082 | exit(0); |
| 4083 | } |
| 4084 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4085 | if { (eval echo configure:4086: \"$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] | 4086 | then |
| 4087 | ac_cv_pthread_system_supported=yes |
| 4088 | else |
| 4089 | echo "configure: failed program was:" >&5 |
| 4090 | cat conftest.$ac_ext >&5 |
| 4091 | rm -fr conftest* |
| 4092 | ac_cv_pthread_system_supported=no |
| 4093 | fi |
| 4094 | rm -fr conftest* |
| 4095 | fi |
| 4096 | |
| 4097 | |
| 4098 | fi |
| 4099 | |
| 4100 | echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6 |
| 4101 | if test "$ac_cv_pthread_system_supported" = "yes"; then |
| 4102 | cat >> confdefs.h <<\EOF |
| 4103 | #define PTHREAD_SYSTEM_SCHED_SUPPORTED 1 |
| 4104 | EOF |
| 4105 | |
| 4106 | fi |
| 4107 | fi |
| 4108 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4109 | echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4110 | echo "configure:4111: checking for usconfig in -lmpc" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4111 | ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4112 | 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] | 4113 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4114 | else |
| 4115 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4116 | LIBS="-lmpc $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4117 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4118 | #line 4119 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4119 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4120 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4121 | /* We use char because int might match the return type of a gcc2 |
| 4122 | builtin and then its argument prototype would still apply. */ |
| 4123 | char usconfig(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4124 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4125 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4126 | usconfig() |
| 4127 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4128 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4129 | if { (eval echo configure:4130: \"$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] | 4130 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4131 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4132 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4133 | echo "configure: failed program was:" >&5 |
| 4134 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4135 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4136 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4137 | fi |
| 4138 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4139 | LIBS="$ac_save_LIBS" |
| 4140 | |
| 4141 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4142 | 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] | 4143 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4144 | cat >> confdefs.h <<\EOF |
| 4145 | #define WITH_THREAD 1 |
| 4146 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4147 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4148 | LIBS="$LIBS -lmpc" |
| 4149 | LIBOBJS="$LIBOBJS thread.o" |
| 4150 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4151 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4152 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4153 | fi |
| 4154 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4155 | echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4156 | echo "configure:4157: checking for thr_create in -lthread" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4157 | ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4158 | 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] | 4159 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4160 | else |
| 4161 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4162 | LIBS="-lthread $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4163 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4164 | #line 4165 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4165 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4166 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4167 | /* We use char because int might match the return type of a gcc2 |
| 4168 | builtin and then its argument prototype would still apply. */ |
| 4169 | char thr_create(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4170 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4171 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4172 | thr_create() |
| 4173 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4174 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4175 | if { (eval echo configure:4176: \"$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] | 4176 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4177 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4178 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4179 | echo "configure: failed program was:" >&5 |
| 4180 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4181 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4182 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4183 | fi |
| 4184 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4185 | LIBS="$ac_save_LIBS" |
| 4186 | |
| 4187 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4188 | 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] | 4189 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4190 | cat >> confdefs.h <<\EOF |
| 4191 | #define WITH_THREAD 1 |
| 4192 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4193 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4194 | LIBS="$LIBS -lthread" |
| 4195 | LIBOBJS="$LIBOBJS thread.o" |
| 4196 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4197 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4198 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4199 | fi |
| 4200 | |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4201 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4202 | if test "$USE_THREAD_MODULE" != "#" |
| 4203 | then |
| 4204 | # If the above checks didn't disable threads, (at least) OSF1 |
| 4205 | # needs this '-threads' argument during linking. |
| 4206 | case $ac_sys_system in |
| 4207 | OSF1) LDLAST=-threads;; |
| 4208 | esac |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4209 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4210 | fi |
| 4211 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4212 | # Check for enable-ipv6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4213 | echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4214 | echo "configure:4215: checking if --enable-ipv6 is specified" >&5 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4215 | # Check whether --enable-ipv6 or --disable-ipv6 was given. |
| 4216 | if test "${enable_ipv6+set}" = set; then |
| 4217 | enableval="$enable_ipv6" |
| 4218 | case "$enableval" in |
| 4219 | no) |
| 4220 | echo "$ac_t""no" 1>&6 |
| 4221 | ipv6=no |
| 4222 | ;; |
| 4223 | *) echo "$ac_t""yes" 1>&6 |
| 4224 | cat >> confdefs.h <<\EOF |
| 4225 | #define ENABLE_IPV6 1 |
| 4226 | EOF |
| 4227 | |
| 4228 | ipv6=yes |
| 4229 | ;; |
| 4230 | esac |
| 4231 | else |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4232 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4233 | if test "$cross_compiling" = yes; then |
| 4234 | echo "$ac_t""no" 1>&6 |
| 4235 | ipv6=no |
| 4236 | |
| 4237 | else |
| 4238 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4239 | #line 4240 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4240 | #include "confdefs.h" |
| 4241 | /* AF_INET6 available check */ |
| 4242 | #include <sys/types.h> |
| 4243 | #include <sys/socket.h> |
| 4244 | main() |
| 4245 | { |
| 4246 | if (socket(AF_INET6, SOCK_STREAM, 0) < 0) |
| 4247 | exit(1); |
| 4248 | else |
| 4249 | exit(0); |
| 4250 | } |
| 4251 | |
| 4252 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4253 | if { (eval echo configure:4254: \"$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] | 4254 | then |
| 4255 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4256 | ipv6=yes |
| 4257 | else |
| 4258 | echo "configure: failed program was:" >&5 |
| 4259 | cat conftest.$ac_ext >&5 |
| 4260 | rm -fr conftest* |
| 4261 | echo "$ac_t""no" 1>&6 |
| 4262 | ipv6=no |
| 4263 | fi |
| 4264 | rm -fr conftest* |
| 4265 | fi |
| 4266 | |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4267 | |
| 4268 | if test "$ipv6" = "yes"; then |
| 4269 | echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4270 | echo "configure:4271: checking if RFC2553 API is available" >&5 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4271 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4272 | #line 4273 "configure" |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4273 | #include "confdefs.h" |
| 4274 | #include <sys/types.h> |
| 4275 | #include <netinet/in.h> |
| 4276 | int main() { |
| 4277 | struct sockaddr_in6 x; |
| 4278 | x.sin6_scope_id; |
| 4279 | ; return 0; } |
| 4280 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4281 | if { (eval echo configure:4282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4282 | rm -rf conftest* |
| 4283 | echo "$ac_t""yes" 1>&6 |
| 4284 | ipv6=yes |
| 4285 | else |
| 4286 | echo "configure: failed program was:" >&5 |
| 4287 | cat conftest.$ac_ext >&5 |
| 4288 | rm -rf conftest* |
| 4289 | echo "$ac_t""no" 1>&6 |
| 4290 | ipv6=no |
| 4291 | fi |
| 4292 | rm -f conftest* |
| 4293 | fi |
| 4294 | |
| 4295 | if test "$ipv6" = "yes"; then |
| 4296 | cat >> confdefs.h <<\EOF |
| 4297 | #define ENABLE_IPV6 1 |
| 4298 | EOF |
| 4299 | |
| 4300 | fi |
| 4301 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4302 | fi |
| 4303 | |
| 4304 | |
| 4305 | ipv6type=unknown |
| 4306 | ipv6lib=none |
| 4307 | ipv6trylibc=no |
| 4308 | |
| 4309 | if test "$ipv6" = "yes"; then |
| 4310 | echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4311 | echo "configure:4312: checking ipv6 stack type" >&5 |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 4312 | for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; |
| 4313 | do |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4314 | case $i in |
| 4315 | inria) |
| 4316 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4317 | #line 4318 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4318 | #include "confdefs.h" |
| 4319 | dnl |
| 4320 | #include <netinet/in.h> |
| 4321 | #ifdef IPV6_INRIA_VERSION |
| 4322 | yes |
| 4323 | #endif |
| 4324 | EOF |
| 4325 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4326 | egrep "yes" >/dev/null 2>&1; then |
| 4327 | rm -rf conftest* |
| 4328 | ipv6type=$i; |
| 4329 | OPT="-DINET6 $OPT" |
| 4330 | fi |
| 4331 | rm -f conftest* |
| 4332 | |
| 4333 | ;; |
| 4334 | kame) |
| 4335 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4336 | #line 4337 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4337 | #include "confdefs.h" |
| 4338 | dnl |
| 4339 | #include <netinet/in.h> |
| 4340 | #ifdef __KAME__ |
| 4341 | yes |
| 4342 | #endif |
| 4343 | EOF |
| 4344 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4345 | egrep "yes" >/dev/null 2>&1; then |
| 4346 | rm -rf conftest* |
| 4347 | ipv6type=$i; |
| 4348 | ipv6lib=inet6 |
| 4349 | ipv6libdir=/usr/local/v6/lib |
| 4350 | ipv6trylibc=yes |
| 4351 | OPT="-DINET6 $OPT" |
| 4352 | fi |
| 4353 | rm -f conftest* |
| 4354 | |
| 4355 | ;; |
| 4356 | linux-glibc) |
| 4357 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4358 | #line 4359 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4359 | #include "confdefs.h" |
| 4360 | dnl |
| 4361 | #include <features.h> |
| 4362 | #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) |
| 4363 | yes |
| 4364 | #endif |
| 4365 | EOF |
| 4366 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4367 | egrep "yes" >/dev/null 2>&1; then |
| 4368 | rm -rf conftest* |
| 4369 | ipv6type=$i; |
| 4370 | ipv6trylibc=yes |
| 4371 | OPT="-DINET6 $OPT" |
| 4372 | fi |
| 4373 | rm -f conftest* |
| 4374 | |
| 4375 | ;; |
| 4376 | linux-inet6) |
| 4377 | if test -d /usr/inet6; then |
| 4378 | ipv6type=$i |
| 4379 | ipv6lib=inet6 |
| 4380 | ipv6libdir=/usr/inet6/lib |
| 4381 | OPT="-DINET6 -I/usr/inet6/include $OPT" |
| 4382 | fi |
| 4383 | ;; |
| 4384 | solaris) |
| 4385 | if test -f /etc/netconfig; then |
| 4386 | if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then |
| 4387 | ipv6type=$i |
| 4388 | ipv6trylibc=yes |
| 4389 | OPT="-DINET6 $OPT" |
| 4390 | fi |
| 4391 | fi |
| 4392 | ;; |
| 4393 | toshiba) |
| 4394 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4395 | #line 4396 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4396 | #include "confdefs.h" |
| 4397 | dnl |
| 4398 | #include <sys/param.h> |
| 4399 | #ifdef _TOSHIBA_INET6 |
| 4400 | yes |
| 4401 | #endif |
| 4402 | EOF |
| 4403 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4404 | egrep "yes" >/dev/null 2>&1; then |
| 4405 | rm -rf conftest* |
| 4406 | ipv6type=$i; |
| 4407 | ipv6lib=inet6; |
| 4408 | ipv6libdir=/usr/local/v6/lib; |
| 4409 | OPT="-DINET6 $OPT" |
| 4410 | fi |
| 4411 | rm -f conftest* |
| 4412 | |
| 4413 | ;; |
| 4414 | v6d) |
| 4415 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4416 | #line 4417 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4417 | #include "confdefs.h" |
| 4418 | dnl |
| 4419 | #include </usr/local/v6/include/sys/v6config.h> |
| 4420 | #ifdef __V6D__ |
| 4421 | yes |
| 4422 | #endif |
| 4423 | EOF |
| 4424 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4425 | egrep "yes" >/dev/null 2>&1; then |
| 4426 | rm -rf conftest* |
| 4427 | ipv6type=$i; |
| 4428 | ipv6lib=v6; |
| 4429 | ipv6libdir=/usr/local/v6/lib; |
| 4430 | OPT="-I/usr/local/v6/include $OPT" |
| 4431 | fi |
| 4432 | rm -f conftest* |
| 4433 | |
| 4434 | ;; |
| 4435 | zeta) |
| 4436 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4437 | #line 4438 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4438 | #include "confdefs.h" |
| 4439 | dnl |
| 4440 | #include <sys/param.h> |
| 4441 | #ifdef _ZETA_MINAMI_INET6 |
| 4442 | yes |
| 4443 | #endif |
| 4444 | EOF |
| 4445 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4446 | egrep "yes" >/dev/null 2>&1; then |
| 4447 | rm -rf conftest* |
| 4448 | ipv6type=$i; |
| 4449 | ipv6lib=inet6; |
| 4450 | ipv6libdir=/usr/local/v6/lib; |
| 4451 | OPT="-DINET6 $OPT" |
| 4452 | fi |
| 4453 | rm -f conftest* |
| 4454 | |
| 4455 | ;; |
| 4456 | esac |
| 4457 | if test "$ipv6type" != "unknown"; then |
| 4458 | break |
| 4459 | fi |
| 4460 | done |
| 4461 | echo "$ac_t""$ipv6type" 1>&6 |
| 4462 | fi |
| 4463 | |
| 4464 | if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then |
| 4465 | if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then |
| 4466 | LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" |
| 4467 | echo "using lib$ipv6lib" |
| 4468 | else |
| 4469 | if test $ipv6trylibc = "yes"; then |
| 4470 | echo "using libc" |
| 4471 | else |
| 4472 | echo 'Fatal: no $ipv6lib library found. cannot continue.' |
| 4473 | echo "You need to fetch lib$ipv6lib.a from appropriate" |
| 4474 | echo 'ipv6 kit and compile beforehand.' |
| 4475 | exit 1 |
| 4476 | fi |
| 4477 | fi |
| 4478 | fi |
| 4479 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4480 | # Check for GC support |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4481 | echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4482 | echo "configure:4483: checking for --with-cycle-gc" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4483 | # Check whether --with-cycle-gc or --without-cycle-gc was given. |
| 4484 | if test "${with_cycle_gc+set}" = set; then |
| 4485 | withval="$with_cycle_gc" |
| 4486 | : |
| 4487 | fi |
| 4488 | |
| 4489 | |
| 4490 | if test -z "$with_cycle_gc" |
| 4491 | then with_cycle_gc="yes" |
| 4492 | fi |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame] | 4493 | if test "$with_cycle_gc" != "no" |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4494 | then |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4495 | cat >> confdefs.h <<\EOF |
| 4496 | #define WITH_CYCLE_GC 1 |
| 4497 | EOF |
| 4498 | |
| 4499 | fi |
| 4500 | echo "$ac_t""$with_cycle_gc" 1>&6 |
| 4501 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4502 | # Check for Python-specific malloc support |
| 4503 | echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4504 | echo "configure:4505: checking for --with-pymalloc" >&5 |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4505 | # Check whether --with-pymalloc or --without-pymalloc was given. |
| 4506 | if test "${with_pymalloc+set}" = set; then |
| 4507 | withval="$with_pymalloc" |
| 4508 | |
| 4509 | if test "$withval" != no |
| 4510 | then cat >> confdefs.h <<\EOF |
| 4511 | #define WITH_PYMALLOC 1 |
| 4512 | EOF |
| 4513 | echo "$ac_t""yes" 1>&6 |
| 4514 | else echo "$ac_t""no" 1>&6 |
| 4515 | fi |
| 4516 | else |
| 4517 | echo "$ac_t""no" 1>&6 |
| 4518 | fi |
| 4519 | |
| 4520 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4521 | # Check for --with-wctype-functions |
| 4522 | echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4523 | echo "configure:4524: checking for --with-wctype-functions" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4524 | # Check whether --with-wctype-functions or --without-wctype-functions was given. |
| 4525 | if test "${with_wctype_functions+set}" = set; then |
| 4526 | withval="$with_wctype_functions" |
| 4527 | |
| 4528 | if test "$withval" != no |
| 4529 | then cat >> confdefs.h <<\EOF |
| 4530 | #define WANT_WCTYPE_FUNCTIONS 1 |
| 4531 | EOF |
| 4532 | echo "$ac_t""yes" 1>&6 |
| 4533 | else echo "$ac_t""no" 1>&6 |
| 4534 | fi |
| 4535 | else |
| 4536 | echo "$ac_t""no" 1>&6 |
| 4537 | fi |
| 4538 | |
| 4539 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4540 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4541 | |
Guido van Rossum | 98935bf | 2001-09-05 19:13:16 +0000 | [diff] [blame] | 4542 | DLINCLDIR=. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4543 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4544 | echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4545 | echo "configure:4546: checking for --with-sgi-dl" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4546 | # Check whether --with-sgi-dl or --without-sgi-dl was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4547 | if test "${with_sgi_dl+set}" = set; then |
| 4548 | withval="$with_sgi_dl" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4549 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4550 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4551 | cat >> confdefs.h <<\EOF |
| 4552 | #define WITH_SGI_DL 1 |
| 4553 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4554 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4555 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4556 | dldir=$withval |
Guido van Rossum | 4095101 | 2000-10-07 16:21:27 +0000 | [diff] [blame] | 4557 | if test ! -z "$dldir" -a -d "$dldir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 4558 | then LDFLAGS="$LDFLAGS -L$dldir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4559 | 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] | 4560 | fi |
| 4561 | DLINCLDIR=${dldir} |
| 4562 | LIBS="$LIBS -ldl -lmld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4563 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4564 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4565 | fi |
| 4566 | |
| 4567 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4568 | echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4569 | echo "configure:4570: checking for --with-dl-dld" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4570 | # Check whether --with-dl-dld or --without-dl-dld was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4571 | if test "${with_dl_dld+set}" = set; then |
| 4572 | withval="$with_dl_dld" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4573 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4574 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4575 | cat >> confdefs.h <<\EOF |
| 4576 | #define WITH_DL_DLD 1 |
| 4577 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4578 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4579 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4580 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 4581 | dlddir=`echo "$withval" | sed 's/.*,//'` |
Barry Warsaw | 7d1219d | 2000-10-05 18:45:53 +0000 | [diff] [blame] | 4582 | 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] | 4583 | then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4584 | 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] | 4585 | fi |
| 4586 | DLINCLDIR=${dldir} |
| 4587 | LIBS="$LIBS -ldl -ldld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4588 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4589 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4590 | fi |
| 4591 | |
| 4592 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4593 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 4594 | # 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] | 4595 | for ac_func in dlopen |
| 4596 | do |
| 4597 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4598 | echo "configure:4599: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4599 | 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] | 4600 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4601 | else |
| 4602 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4603 | #line 4604 "configure" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4604 | #include "confdefs.h" |
| 4605 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4606 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4607 | #include <assert.h> |
| 4608 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4609 | /* We use char because int might match the return type of a gcc2 |
| 4610 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4611 | char $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4612 | |
| 4613 | int main() { |
| 4614 | |
| 4615 | /* The GNU C library defines this for functions which it implements |
| 4616 | to always fail with ENOSYS. Some functions are actually named |
| 4617 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4618 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4619 | choke me |
| 4620 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4621 | $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4622 | #endif |
| 4623 | |
| 4624 | ; return 0; } |
| 4625 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4626 | if { (eval echo configure:4627: \"$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] | 4627 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4628 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4629 | else |
| 4630 | echo "configure: failed program was:" >&5 |
| 4631 | cat conftest.$ac_ext >&5 |
| 4632 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4633 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4634 | fi |
| 4635 | rm -f conftest* |
| 4636 | fi |
| 4637 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4638 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4639 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4640 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4641 | cat >> confdefs.h <<EOF |
| 4642 | #define $ac_tr_func 1 |
| 4643 | EOF |
| 4644 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4645 | else |
| 4646 | echo "$ac_t""no" 1>&6 |
| 4647 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4648 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4649 | |
| 4650 | |
| 4651 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 4652 | # loading of modules. |
| 4653 | |
| 4654 | echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4655 | echo "configure:4656: checking DYNLOADFILE" >&5 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4656 | if test -z "$DYNLOADFILE" |
| 4657 | then |
| 4658 | case $ac_sys_system/$ac_sys_release in |
| 4659 | AIX*) DYNLOADFILE="dynload_aix.o";; |
| 4660 | BeOS*) DYNLOADFILE="dynload_beos.o";; |
| 4661 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4662 | Darwin/*) DYNLOADFILE="dynload_next.o";; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4663 | *) |
| 4664 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 4665 | # out any dynamic loading |
| 4666 | if test "$ac_cv_func_dlopen" = yes |
| 4667 | then DYNLOADFILE="dynload_shlib.o" |
| 4668 | else DYNLOADFILE="dynload_stub.o" |
| 4669 | fi |
| 4670 | ;; |
| 4671 | esac |
| 4672 | fi |
| 4673 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
| 4674 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 4675 | then |
| 4676 | cat >> confdefs.h <<\EOF |
| 4677 | #define HAVE_DYNAMIC_LOADING 1 |
| 4678 | EOF |
| 4679 | |
| 4680 | fi |
| 4681 | |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4682 | # MACHDEP_OBJS can be set to platform-specific object files needed by Python |
| 4683 | |
| 4684 | |
| 4685 | echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4686 | echo "configure:4687: checking MACHDEP_OBJS" >&5 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4687 | if test -z "$MACHDEP_OBJS" |
| 4688 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4689 | MACHDEP_OBJS=$extra_machdep_objs |
| 4690 | else |
| 4691 | MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4692 | fi |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4693 | echo "$ac_t""MACHDEP_OBJS" 1>&6 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4694 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4695 | # checks for library functions |
Martin v. Löwis | 244edc8 | 2001-10-04 22:44:26 +0000 | [diff] [blame] | 4696 | 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] | 4697 | flock fork fsync fdatasync fpathconf ftime ftruncate \ |
Martin v. Löwis | f95dd0a | 2001-08-15 17:14:33 +0000 | [diff] [blame] | 4698 | gai_strerror getgroups getlogin getpeername getpid getpwent getwd \ |
Martin v. Löwis | 864e9ff | 2001-08-04 22:32:03 +0000 | [diff] [blame] | 4699 | hstrerror inet_pton kill link lstat mkfifo mktime mremap \ |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 4700 | nice pathconf pause plock poll pthread_init \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4701 | putenv readlink \ |
Andrew M. Kuchling | 8d2f2b2 | 2000-07-13 01:26:58 +0000 | [diff] [blame] | 4702 | select setegid seteuid setgid \ |
Martin v. Löwis | 791bfda | 2001-07-24 06:33:08 +0000 | [diff] [blame] | 4703 | setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4704 | sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ |
Fred Drake | 89143df | 1999-12-09 22:03:25 +0000 | [diff] [blame] | 4705 | tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Thomas Wouters | c2c12dc | 2001-07-11 14:45:34 +0000 | [diff] [blame] | 4706 | truncate uname waitpid _getpty getpriority |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4707 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4708 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4709 | echo "configure:4710: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4710 | 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] | 4711 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4712 | else |
| 4713 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4714 | #line 4715 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4715 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4716 | /* System header to define __stub macros and hopefully few prototypes, |
| 4717 | which can conflict with char $ac_func(); below. */ |
| 4718 | #include <assert.h> |
| 4719 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4720 | /* We use char because int might match the return type of a gcc2 |
| 4721 | builtin and then its argument prototype would still apply. */ |
| 4722 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4723 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4724 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4725 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4726 | /* The GNU C library defines this for functions which it implements |
| 4727 | to always fail with ENOSYS. Some functions are actually named |
| 4728 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4729 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4730 | choke me |
| 4731 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4732 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4733 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4734 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4735 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4736 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4737 | if { (eval echo configure:4738: \"$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] | 4738 | rm -rf conftest* |
| 4739 | eval "ac_cv_func_$ac_func=yes" |
| 4740 | else |
| 4741 | echo "configure: failed program was:" >&5 |
| 4742 | cat conftest.$ac_ext >&5 |
| 4743 | rm -rf conftest* |
| 4744 | eval "ac_cv_func_$ac_func=no" |
| 4745 | fi |
| 4746 | rm -f conftest* |
| 4747 | fi |
| 4748 | |
| 4749 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4750 | echo "$ac_t""yes" 1>&6 |
| 4751 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4752 | cat >> confdefs.h <<EOF |
| 4753 | #define $ac_tr_func 1 |
| 4754 | EOF |
| 4755 | |
| 4756 | else |
| 4757 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4758 | fi |
| 4759 | done |
| 4760 | |
| 4761 | |
| 4762 | # check for openpty and forkpty |
| 4763 | |
| 4764 | for ac_func in openpty |
| 4765 | do |
| 4766 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4767 | echo "configure:4768: checking for $ac_func" >&5 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4768 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4769 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4770 | else |
| 4771 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4772 | #line 4773 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4773 | #include "confdefs.h" |
| 4774 | /* System header to define __stub macros and hopefully few prototypes, |
| 4775 | which can conflict with char $ac_func(); below. */ |
| 4776 | #include <assert.h> |
| 4777 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4778 | /* We use char because int might match the return type of a gcc2 |
| 4779 | builtin and then its argument prototype would still apply. */ |
| 4780 | char $ac_func(); |
| 4781 | |
| 4782 | int main() { |
| 4783 | |
| 4784 | /* The GNU C library defines this for functions which it implements |
| 4785 | to always fail with ENOSYS. Some functions are actually named |
| 4786 | something starting with __ and the normal name is an alias. */ |
| 4787 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4788 | choke me |
| 4789 | #else |
| 4790 | $ac_func(); |
| 4791 | #endif |
| 4792 | |
| 4793 | ; return 0; } |
| 4794 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4795 | if { (eval echo configure:4796: \"$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] | 4796 | rm -rf conftest* |
| 4797 | eval "ac_cv_func_$ac_func=yes" |
| 4798 | else |
| 4799 | echo "configure: failed program was:" >&5 |
| 4800 | cat conftest.$ac_ext >&5 |
| 4801 | rm -rf conftest* |
| 4802 | eval "ac_cv_func_$ac_func=no" |
| 4803 | fi |
| 4804 | rm -f conftest* |
| 4805 | fi |
| 4806 | |
| 4807 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4808 | echo "$ac_t""yes" 1>&6 |
| 4809 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4810 | cat >> confdefs.h <<EOF |
| 4811 | #define $ac_tr_func 1 |
| 4812 | EOF |
| 4813 | |
| 4814 | else |
| 4815 | echo "$ac_t""no" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4816 | echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4817 | echo "configure:4818: checking for openpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4818 | ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4819 | 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] | 4820 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4821 | else |
| 4822 | ac_save_LIBS="$LIBS" |
| 4823 | LIBS="-lutil $LIBS" |
| 4824 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4825 | #line 4826 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4826 | #include "confdefs.h" |
| 4827 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4828 | /* We use char because int might match the return type of a gcc2 |
| 4829 | builtin and then its argument prototype would still apply. */ |
| 4830 | char openpty(); |
| 4831 | |
| 4832 | int main() { |
| 4833 | openpty() |
| 4834 | ; return 0; } |
| 4835 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4836 | if { (eval echo configure:4837: \"$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] | 4837 | rm -rf conftest* |
| 4838 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4839 | else |
| 4840 | echo "configure: failed program was:" >&5 |
| 4841 | cat conftest.$ac_ext >&5 |
| 4842 | rm -rf conftest* |
| 4843 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4844 | fi |
| 4845 | rm -f conftest* |
| 4846 | LIBS="$ac_save_LIBS" |
| 4847 | |
| 4848 | fi |
| 4849 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4850 | echo "$ac_t""yes" 1>&6 |
| 4851 | cat >> confdefs.h <<\EOF |
| 4852 | #define HAVE_OPENPTY 1 |
| 4853 | EOF |
| 4854 | LIBS="$LIBS -lutil" |
| 4855 | else |
| 4856 | echo "$ac_t""no" 1>&6 |
| 4857 | fi |
| 4858 | |
| 4859 | fi |
| 4860 | done |
| 4861 | |
| 4862 | for ac_func in forkpty |
| 4863 | do |
| 4864 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4865 | echo "configure:4866: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4866 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4867 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4868 | else |
| 4869 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4870 | #line 4871 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4871 | #include "confdefs.h" |
| 4872 | /* System header to define __stub macros and hopefully few prototypes, |
| 4873 | which can conflict with char $ac_func(); below. */ |
| 4874 | #include <assert.h> |
| 4875 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4876 | /* We use char because int might match the return type of a gcc2 |
| 4877 | builtin and then its argument prototype would still apply. */ |
| 4878 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4879 | |
| 4880 | int main() { |
| 4881 | |
| 4882 | /* The GNU C library defines this for functions which it implements |
| 4883 | to always fail with ENOSYS. Some functions are actually named |
| 4884 | something starting with __ and the normal name is an alias. */ |
| 4885 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4886 | choke me |
| 4887 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4888 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4889 | #endif |
| 4890 | |
| 4891 | ; return 0; } |
| 4892 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4893 | if { (eval echo configure:4894: \"$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] | 4894 | rm -rf conftest* |
| 4895 | eval "ac_cv_func_$ac_func=yes" |
| 4896 | else |
| 4897 | echo "configure: failed program was:" >&5 |
| 4898 | cat conftest.$ac_ext >&5 |
| 4899 | rm -rf conftest* |
| 4900 | eval "ac_cv_func_$ac_func=no" |
| 4901 | fi |
| 4902 | rm -f conftest* |
| 4903 | fi |
| 4904 | |
| 4905 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4906 | echo "$ac_t""yes" 1>&6 |
| 4907 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4908 | cat >> confdefs.h <<EOF |
| 4909 | #define $ac_tr_func 1 |
| 4910 | EOF |
| 4911 | |
| 4912 | else |
| 4913 | echo "$ac_t""no" 1>&6 |
| 4914 | echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4915 | echo "configure:4916: checking for forkpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4916 | ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4917 | 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] | 4918 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4919 | else |
| 4920 | ac_save_LIBS="$LIBS" |
| 4921 | LIBS="-lutil $LIBS" |
| 4922 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4923 | #line 4924 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4924 | #include "confdefs.h" |
| 4925 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4926 | /* We use char because int might match the return type of a gcc2 |
| 4927 | builtin and then its argument prototype would still apply. */ |
| 4928 | char forkpty(); |
| 4929 | |
| 4930 | int main() { |
| 4931 | forkpty() |
| 4932 | ; return 0; } |
| 4933 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4934 | if { (eval echo configure:4935: \"$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] | 4935 | rm -rf conftest* |
| 4936 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4937 | else |
| 4938 | echo "configure: failed program was:" >&5 |
| 4939 | cat conftest.$ac_ext >&5 |
| 4940 | rm -rf conftest* |
| 4941 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4942 | fi |
| 4943 | rm -f conftest* |
| 4944 | LIBS="$ac_save_LIBS" |
| 4945 | |
| 4946 | fi |
| 4947 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4948 | echo "$ac_t""yes" 1>&6 |
| 4949 | cat >> confdefs.h <<\EOF |
| 4950 | #define HAVE_FORKPTY 1 |
| 4951 | EOF |
| 4952 | LIBS="$LIBS -lutil" |
| 4953 | else |
| 4954 | echo "$ac_t""no" 1>&6 |
| 4955 | fi |
| 4956 | |
| 4957 | fi |
| 4958 | done |
| 4959 | |
| 4960 | |
| 4961 | # check for long file support functions |
| 4962 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
| 4963 | do |
| 4964 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4965 | echo "configure:4966: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4966 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4967 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4968 | else |
| 4969 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4970 | #line 4971 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4971 | #include "confdefs.h" |
| 4972 | /* System header to define __stub macros and hopefully few prototypes, |
| 4973 | which can conflict with char $ac_func(); below. */ |
| 4974 | #include <assert.h> |
| 4975 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4976 | /* We use char because int might match the return type of a gcc2 |
| 4977 | builtin and then its argument prototype would still apply. */ |
| 4978 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4979 | |
| 4980 | int main() { |
| 4981 | |
| 4982 | /* The GNU C library defines this for functions which it implements |
| 4983 | to always fail with ENOSYS. Some functions are actually named |
| 4984 | something starting with __ and the normal name is an alias. */ |
| 4985 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4986 | choke me |
| 4987 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4988 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4989 | #endif |
| 4990 | |
| 4991 | ; return 0; } |
| 4992 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 4993 | if { (eval echo configure:4994: \"$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] | 4994 | rm -rf conftest* |
| 4995 | eval "ac_cv_func_$ac_func=yes" |
| 4996 | else |
| 4997 | echo "configure: failed program was:" >&5 |
| 4998 | cat conftest.$ac_ext >&5 |
| 4999 | rm -rf conftest* |
| 5000 | eval "ac_cv_func_$ac_func=no" |
| 5001 | fi |
| 5002 | rm -f conftest* |
| 5003 | fi |
| 5004 | |
| 5005 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5006 | echo "$ac_t""yes" 1>&6 |
| 5007 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5008 | cat >> confdefs.h <<EOF |
| 5009 | #define $ac_tr_func 1 |
| 5010 | EOF |
| 5011 | |
| 5012 | else |
| 5013 | echo "$ac_t""no" 1>&6 |
| 5014 | fi |
| 5015 | done |
| 5016 | |
| 5017 | |
| 5018 | for ac_func in dup2 getcwd strdup strerror memmove |
| 5019 | do |
| 5020 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5021 | echo "configure:5022: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5022 | 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] | 5023 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5024 | else |
| 5025 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5026 | #line 5027 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5027 | #include "confdefs.h" |
| 5028 | /* System header to define __stub macros and hopefully few prototypes, |
| 5029 | which can conflict with char $ac_func(); below. */ |
| 5030 | #include <assert.h> |
| 5031 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5032 | /* We use char because int might match the return type of a gcc2 |
| 5033 | builtin and then its argument prototype would still apply. */ |
| 5034 | char $ac_func(); |
| 5035 | |
| 5036 | int main() { |
| 5037 | |
| 5038 | /* The GNU C library defines this for functions which it implements |
| 5039 | to always fail with ENOSYS. Some functions are actually named |
| 5040 | something starting with __ and the normal name is an alias. */ |
| 5041 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5042 | choke me |
| 5043 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5044 | $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5045 | #endif |
| 5046 | |
| 5047 | ; return 0; } |
| 5048 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5049 | if { (eval echo configure:5050: \"$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] | 5050 | rm -rf conftest* |
| 5051 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5052 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5053 | echo "configure: failed program was:" >&5 |
| 5054 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5055 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5056 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5057 | fi |
| 5058 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5059 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5060 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5061 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5062 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5063 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5064 | cat >> confdefs.h <<EOF |
| 5065 | #define $ac_tr_func 1 |
| 5066 | EOF |
| 5067 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5068 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5069 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 5070 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5071 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5072 | done |
| 5073 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5074 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5075 | for ac_func in getpgrp |
| 5076 | do |
| 5077 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5078 | echo "configure:5079: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5079 | 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] | 5080 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5081 | else |
| 5082 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5083 | #line 5084 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5084 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5085 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5086 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5087 | #include <assert.h> |
| 5088 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5089 | /* We use char because int might match the return type of a gcc2 |
| 5090 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5091 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5092 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5093 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5094 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5095 | /* The GNU C library defines this for functions which it implements |
| 5096 | to always fail with ENOSYS. Some functions are actually named |
| 5097 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5098 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5099 | choke me |
| 5100 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5101 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5102 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5103 | |
| 5104 | ; return 0; } |
| 5105 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5106 | if { (eval echo configure:5107: \"$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] | 5107 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5108 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5109 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5110 | echo "configure: failed program was:" >&5 |
| 5111 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5112 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5113 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5114 | fi |
| 5115 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5116 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5117 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5118 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5119 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5120 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5121 | cat >> confdefs.h <<EOF |
| 5122 | #define $ac_tr_func 1 |
| 5123 | EOF |
| 5124 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5125 | #line 5126 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5126 | #include "confdefs.h" |
| 5127 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5128 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5129 | getpgrp(0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5130 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5131 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5132 | if { (eval echo configure:5133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5133 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5134 | cat >> confdefs.h <<\EOF |
| 5135 | #define GETPGRP_HAVE_ARG 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5136 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5137 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5138 | else |
| 5139 | echo "configure: failed program was:" >&5 |
| 5140 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5141 | fi |
| 5142 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5143 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5144 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5145 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5146 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5147 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5148 | for ac_func in setpgrp |
| 5149 | do |
| 5150 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5151 | echo "configure:5152: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5152 | 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] | 5153 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5154 | else |
| 5155 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5156 | #line 5157 "configure" |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5157 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5158 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5159 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5160 | #include <assert.h> |
| 5161 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5162 | /* We use char because int might match the return type of a gcc2 |
| 5163 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5164 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5165 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5166 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5167 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5168 | /* The GNU C library defines this for functions which it implements |
| 5169 | to always fail with ENOSYS. Some functions are actually named |
| 5170 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5171 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5172 | choke me |
| 5173 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5174 | $ac_func(); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5175 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5176 | |
| 5177 | ; return 0; } |
| 5178 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5179 | if { (eval echo configure:5180: \"$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] | 5180 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5181 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5182 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5183 | echo "configure: failed program was:" >&5 |
| 5184 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5185 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5186 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5187 | fi |
| 5188 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5189 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5190 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5191 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5192 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5193 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5194 | cat >> confdefs.h <<EOF |
| 5195 | #define $ac_tr_func 1 |
| 5196 | EOF |
| 5197 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5198 | #line 5199 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5199 | #include "confdefs.h" |
| 5200 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5201 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5202 | setpgrp(0,0); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5203 | ; return 0; } |
| 5204 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5205 | if { (eval echo configure:5206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5206 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5207 | cat >> confdefs.h <<\EOF |
| 5208 | #define SETPGRP_HAVE_ARG 1 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5209 | EOF |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5210 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5211 | else |
| 5212 | echo "configure: failed program was:" >&5 |
| 5213 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5214 | fi |
| 5215 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5216 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5217 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5218 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5219 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5220 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5221 | for ac_func in gettimeofday |
| 5222 | do |
| 5223 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5224 | echo "configure:5225: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5225 | 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] | 5226 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5227 | else |
| 5228 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5229 | #line 5230 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5230 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5231 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5232 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5233 | #include <assert.h> |
| 5234 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5235 | /* We use char because int might match the return type of a gcc2 |
| 5236 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5237 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5238 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5239 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5240 | |
| 5241 | /* The GNU C library defines this for functions which it implements |
| 5242 | to always fail with ENOSYS. Some functions are actually named |
| 5243 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5244 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5245 | choke me |
| 5246 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5247 | $ac_func(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5248 | #endif |
| 5249 | |
| 5250 | ; return 0; } |
| 5251 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5252 | if { (eval echo configure:5253: \"$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] | 5253 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5254 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5255 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5256 | echo "configure: failed program was:" >&5 |
| 5257 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5258 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5259 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5260 | fi |
| 5261 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5262 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5263 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5264 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5265 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5266 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5267 | cat >> confdefs.h <<EOF |
| 5268 | #define $ac_tr_func 1 |
| 5269 | EOF |
| 5270 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5271 | #line 5272 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5272 | #include "confdefs.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5273 | #include <sys/time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5274 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5275 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
| 5276 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5277 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5278 | if { (eval echo configure:5279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5279 | : |
| 5280 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5281 | echo "configure: failed program was:" >&5 |
| 5282 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5283 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5284 | cat >> confdefs.h <<\EOF |
| 5285 | #define GETTIMEOFDAY_NO_TZ 1 |
| 5286 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5287 | |
| 5288 | fi |
| 5289 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5290 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5291 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5292 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5293 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5294 | |
| 5295 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5296 | for ac_func in getaddrinfo |
| 5297 | do |
| 5298 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5299 | echo "configure:5300: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5300 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5301 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5302 | else |
| 5303 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5304 | #line 5305 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5305 | #include "confdefs.h" |
| 5306 | /* System header to define __stub macros and hopefully few prototypes, |
| 5307 | which can conflict with char $ac_func(); below. */ |
| 5308 | #include <assert.h> |
| 5309 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5310 | /* We use char because int might match the return type of a gcc2 |
| 5311 | builtin and then its argument prototype would still apply. */ |
| 5312 | char $ac_func(); |
| 5313 | |
| 5314 | int main() { |
| 5315 | |
| 5316 | /* The GNU C library defines this for functions which it implements |
| 5317 | to always fail with ENOSYS. Some functions are actually named |
| 5318 | something starting with __ and the normal name is an alias. */ |
| 5319 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5320 | choke me |
| 5321 | #else |
| 5322 | $ac_func(); |
| 5323 | #endif |
| 5324 | |
| 5325 | ; return 0; } |
| 5326 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5327 | if { (eval echo configure:5328: \"$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] | 5328 | rm -rf conftest* |
| 5329 | eval "ac_cv_func_$ac_func=yes" |
| 5330 | else |
| 5331 | echo "configure: failed program was:" >&5 |
| 5332 | cat conftest.$ac_ext >&5 |
| 5333 | rm -rf conftest* |
| 5334 | eval "ac_cv_func_$ac_func=no" |
| 5335 | fi |
| 5336 | rm -f conftest* |
| 5337 | fi |
| 5338 | |
| 5339 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5340 | echo "$ac_t""yes" 1>&6 |
| 5341 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5342 | cat >> confdefs.h <<EOF |
| 5343 | #define $ac_tr_func 1 |
| 5344 | EOF |
| 5345 | echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5346 | echo "configure:5347: checking getaddrinfo bug" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5347 | if test "$cross_compiling" = yes; then |
| 5348 | echo "$ac_t""buggy" 1>&6 |
| 5349 | buggygetaddrinfo=yes |
| 5350 | else |
| 5351 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5352 | #line 5353 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5353 | #include "confdefs.h" |
| 5354 | |
| 5355 | #include <sys/types.h> |
| 5356 | #include <netdb.h> |
| 5357 | #include <string.h> |
| 5358 | #include <sys/socket.h> |
| 5359 | #include <netinet/in.h> |
| 5360 | |
| 5361 | main() |
| 5362 | { |
| 5363 | int passive, gaierr, inet4 = 0, inet6 = 0; |
| 5364 | struct addrinfo hints, *ai, *aitop; |
| 5365 | char straddr[INET6_ADDRSTRLEN], strport[16]; |
| 5366 | |
| 5367 | for (passive = 0; passive <= 1; passive++) { |
| 5368 | memset(&hints, 0, sizeof(hints)); |
| 5369 | hints.ai_family = AF_UNSPEC; |
| 5370 | hints.ai_flags = passive ? AI_PASSIVE : 0; |
| 5371 | hints.ai_socktype = SOCK_STREAM; |
| 5372 | if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { |
| 5373 | (void)gai_strerror(gaierr); |
| 5374 | goto bad; |
| 5375 | } |
| 5376 | for (ai = aitop; ai; ai = ai->ai_next) { |
| 5377 | if (ai->ai_addr == NULL || |
| 5378 | ai->ai_addrlen == 0 || |
| 5379 | getnameinfo(ai->ai_addr, ai->ai_addrlen, |
| 5380 | straddr, sizeof(straddr), strport, sizeof(strport), |
| 5381 | NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
| 5382 | goto bad; |
| 5383 | } |
| 5384 | switch (ai->ai_family) { |
| 5385 | case AF_INET: |
| 5386 | if (strcmp(strport, "54321") != 0) { |
| 5387 | goto bad; |
| 5388 | } |
| 5389 | if (passive) { |
| 5390 | if (strcmp(straddr, "0.0.0.0") != 0) { |
| 5391 | goto bad; |
| 5392 | } |
| 5393 | } else { |
| 5394 | if (strcmp(straddr, "127.0.0.1") != 0) { |
| 5395 | goto bad; |
| 5396 | } |
| 5397 | } |
| 5398 | inet4++; |
| 5399 | break; |
| 5400 | case AF_INET6: |
| 5401 | if (strcmp(strport, "54321") != 0) { |
| 5402 | goto bad; |
| 5403 | } |
| 5404 | if (passive) { |
| 5405 | if (strcmp(straddr, "::") != 0) { |
| 5406 | goto bad; |
| 5407 | } |
| 5408 | } else { |
| 5409 | if (strcmp(straddr, "::1") != 0) { |
| 5410 | goto bad; |
| 5411 | } |
| 5412 | } |
| 5413 | inet6++; |
| 5414 | break; |
| 5415 | case AF_UNSPEC: |
| 5416 | goto bad; |
| 5417 | break; |
| 5418 | default: |
| 5419 | /* another family support? */ |
| 5420 | break; |
| 5421 | } |
| 5422 | } |
| 5423 | } |
| 5424 | |
| 5425 | if (!(inet4 == 0 || inet4 == 2)) |
| 5426 | goto bad; |
| 5427 | if (!(inet6 == 0 || inet6 == 2)) |
| 5428 | goto bad; |
| 5429 | |
| 5430 | if (aitop) |
| 5431 | freeaddrinfo(aitop); |
| 5432 | exit(0); |
| 5433 | |
| 5434 | bad: |
| 5435 | if (aitop) |
| 5436 | freeaddrinfo(aitop); |
| 5437 | exit(1); |
| 5438 | } |
| 5439 | |
| 5440 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5441 | if { (eval echo configure:5442: \"$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] | 5442 | then |
| 5443 | echo "$ac_t""good" 1>&6 |
| 5444 | buggygetaddrinfo=no |
| 5445 | else |
| 5446 | echo "configure: failed program was:" >&5 |
| 5447 | cat conftest.$ac_ext >&5 |
| 5448 | rm -fr conftest* |
| 5449 | echo "$ac_t""buggy" 1>&6 |
| 5450 | buggygetaddrinfo=yes |
| 5451 | fi |
| 5452 | rm -fr conftest* |
| 5453 | fi |
| 5454 | |
| 5455 | else |
| 5456 | echo "$ac_t""no" 1>&6 |
| 5457 | buggygetaddrinfo=yes |
| 5458 | fi |
| 5459 | done |
| 5460 | |
| 5461 | |
| 5462 | if test "$buggygetaddrinfo" = "yes"; then |
| 5463 | if test "$ipv6" = "yes"; then |
| 5464 | echo 'Fatal: You must get working getaddrinfo() function.' |
| 5465 | echo ' or you can specify "--disable-ipv6"'. |
| 5466 | exit 1 |
| 5467 | fi |
| 5468 | fi |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5469 | for ac_func in getnameinfo |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5470 | do |
| 5471 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5472 | echo "configure:5473: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5473 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5474 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5475 | else |
| 5476 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5477 | #line 5478 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5478 | #include "confdefs.h" |
| 5479 | /* System header to define __stub macros and hopefully few prototypes, |
| 5480 | which can conflict with char $ac_func(); below. */ |
| 5481 | #include <assert.h> |
| 5482 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5483 | /* We use char because int might match the return type of a gcc2 |
| 5484 | builtin and then its argument prototype would still apply. */ |
| 5485 | char $ac_func(); |
| 5486 | |
| 5487 | int main() { |
| 5488 | |
| 5489 | /* The GNU C library defines this for functions which it implements |
| 5490 | to always fail with ENOSYS. Some functions are actually named |
| 5491 | something starting with __ and the normal name is an alias. */ |
| 5492 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5493 | choke me |
| 5494 | #else |
| 5495 | $ac_func(); |
| 5496 | #endif |
| 5497 | |
| 5498 | ; return 0; } |
| 5499 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5500 | if { (eval echo configure:5501: \"$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] | 5501 | rm -rf conftest* |
| 5502 | eval "ac_cv_func_$ac_func=yes" |
| 5503 | else |
| 5504 | echo "configure: failed program was:" >&5 |
| 5505 | cat conftest.$ac_ext >&5 |
| 5506 | rm -rf conftest* |
| 5507 | eval "ac_cv_func_$ac_func=no" |
| 5508 | fi |
| 5509 | rm -f conftest* |
| 5510 | fi |
| 5511 | |
| 5512 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5513 | echo "$ac_t""yes" 1>&6 |
| 5514 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5515 | cat >> confdefs.h <<EOF |
| 5516 | #define $ac_tr_func 1 |
| 5517 | EOF |
| 5518 | |
| 5519 | else |
| 5520 | echo "$ac_t""no" 1>&6 |
| 5521 | fi |
| 5522 | done |
| 5523 | |
| 5524 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5525 | # checks for structures |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5526 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5527 | echo "configure:5528: 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] | 5528 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5529 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5530 | else |
| 5531 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5532 | #line 5533 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5533 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5534 | #include <sys/types.h> |
| 5535 | #include <sys/time.h> |
| 5536 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5537 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5538 | struct tm *tp; |
| 5539 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5540 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5541 | if { (eval echo configure:5542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5542 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5543 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5544 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5545 | echo "configure: failed program was:" >&5 |
| 5546 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5547 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5548 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5549 | fi |
| 5550 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5551 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5552 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5553 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5554 | if test $ac_cv_header_time = yes; then |
| 5555 | cat >> confdefs.h <<\EOF |
| 5556 | #define TIME_WITH_SYS_TIME 1 |
| 5557 | EOF |
| 5558 | |
| 5559 | fi |
| 5560 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5561 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5562 | echo "configure:5563: 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] | 5563 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5564 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5565 | else |
| 5566 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5567 | #line 5568 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5568 | #include "confdefs.h" |
| 5569 | #include <sys/types.h> |
| 5570 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5571 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5572 | struct tm *tp; tp->tm_sec; |
| 5573 | ; return 0; } |
| 5574 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5575 | if { (eval echo configure:5576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5576 | rm -rf conftest* |
| 5577 | ac_cv_struct_tm=time.h |
| 5578 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5579 | echo "configure: failed program was:" >&5 |
| 5580 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5581 | rm -rf conftest* |
| 5582 | ac_cv_struct_tm=sys/time.h |
| 5583 | fi |
| 5584 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5585 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5586 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5587 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5588 | if test $ac_cv_struct_tm = sys/time.h; then |
| 5589 | cat >> confdefs.h <<\EOF |
| 5590 | #define TM_IN_SYS_TIME 1 |
| 5591 | EOF |
| 5592 | |
| 5593 | fi |
| 5594 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5595 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5596 | echo "configure:5597: checking for tm_zone in struct tm" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5597 | 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] | 5598 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5599 | else |
| 5600 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5601 | #line 5602 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5602 | #include "confdefs.h" |
| 5603 | #include <sys/types.h> |
| 5604 | #include <$ac_cv_struct_tm> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5605 | int main() { |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5606 | struct tm tm; tm.tm_zone; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5607 | ; return 0; } |
| 5608 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5609 | if { (eval echo configure:5610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5610 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5611 | ac_cv_struct_tm_zone=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5612 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5613 | echo "configure: failed program was:" >&5 |
| 5614 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5615 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5616 | ac_cv_struct_tm_zone=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5617 | fi |
| 5618 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5619 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5620 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5621 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 |
| 5622 | if test "$ac_cv_struct_tm_zone" = yes; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5623 | cat >> confdefs.h <<\EOF |
| 5624 | #define HAVE_TM_ZONE 1 |
| 5625 | EOF |
| 5626 | |
| 5627 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5628 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5629 | echo "configure:5630: checking for tzname" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5630 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5631 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5632 | else |
| 5633 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5634 | #line 5635 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5635 | #include "confdefs.h" |
| 5636 | #include <time.h> |
| 5637 | #ifndef tzname /* For SGI. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5638 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5639 | #endif |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5640 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5641 | atoi(*tzname); |
| 5642 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5643 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5644 | if { (eval echo configure:5645: \"$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] | 5645 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5646 | ac_cv_var_tzname=yes |
| 5647 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5648 | echo "configure: failed program was:" >&5 |
| 5649 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5650 | rm -rf conftest* |
| 5651 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5652 | fi |
| 5653 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5654 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5655 | |
| 5656 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5657 | if test $ac_cv_var_tzname = yes; then |
| 5658 | cat >> confdefs.h <<\EOF |
| 5659 | #define HAVE_TZNAME 1 |
| 5660 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5661 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5662 | fi |
| 5663 | fi |
| 5664 | |
| 5665 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5666 | echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5667 | echo "configure:5668: checking for time.h that defines altzone" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5668 | 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] | 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 | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5672 | #line 5673 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5673 | #include "confdefs.h" |
| 5674 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5675 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5676 | return altzone; |
| 5677 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5678 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5679 | if { (eval echo configure:5680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5680 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5681 | ac_cv_header_time_altzone=yes |
| 5682 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5683 | echo "configure: failed program was:" >&5 |
| 5684 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5685 | rm -rf conftest* |
| 5686 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5687 | fi |
| 5688 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5689 | fi |
| 5690 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5691 | echo "$ac_t""$ac_cv_header_time_altzone" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5692 | if test $ac_cv_header_time_altzone = yes; then |
| 5693 | cat >> confdefs.h <<\EOF |
| 5694 | #define HAVE_ALTZONE 1 |
| 5695 | EOF |
| 5696 | |
| 5697 | fi |
| 5698 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5699 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5700 | echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5701 | echo "configure:5702: 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] | 5702 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5703 | #line 5704 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5704 | #include "confdefs.h" |
| 5705 | |
| 5706 | #include <sys/types.h> |
| 5707 | #include <sys/select.h> |
| 5708 | #include <sys/time.h> |
| 5709 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5710 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5711 | ; |
| 5712 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5713 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5714 | if { (eval echo configure:5715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5715 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5716 | cat >> confdefs.h <<\EOF |
| 5717 | #define SYS_SELECT_WITH_SYS_TIME 1 |
| 5718 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5719 | was_it_defined=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5720 | else |
| 5721 | echo "configure: failed program was:" >&5 |
| 5722 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5723 | fi |
| 5724 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5725 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5726 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5727 | echo $ac_n "checking for addrinfo""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5728 | echo "configure:5729: checking for addrinfo" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5729 | if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then |
| 5730 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5731 | else |
| 5732 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5733 | #line 5734 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5734 | #include "confdefs.h" |
| 5735 | |
| 5736 | # include <netdb.h> |
| 5737 | int main() { |
| 5738 | struct addrinfo a |
| 5739 | ; return 0; } |
| 5740 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5741 | if { (eval echo configure:5742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5742 | rm -rf conftest* |
| 5743 | ac_cv_struct_addrinfo=yes |
| 5744 | else |
| 5745 | echo "configure: failed program was:" >&5 |
| 5746 | cat conftest.$ac_ext >&5 |
| 5747 | rm -rf conftest* |
| 5748 | ac_cv_struct_addrinfo=no |
| 5749 | fi |
| 5750 | rm -f conftest* |
| 5751 | fi |
| 5752 | |
| 5753 | echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6 |
| 5754 | if test $ac_cv_struct_addrinfo = yes; then |
| 5755 | cat >> confdefs.h <<\EOF |
| 5756 | #define HAVE_ADDRINFO 1 |
| 5757 | EOF |
| 5758 | |
| 5759 | fi |
| 5760 | |
| 5761 | echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5762 | echo "configure:5763: checking for sockaddr_storage" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5763 | if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then |
| 5764 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5765 | else |
| 5766 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5767 | #line 5768 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5768 | #include "confdefs.h" |
| 5769 | |
| 5770 | # include <sys/types.h> |
| 5771 | # include <sys/socket.h> |
| 5772 | int main() { |
| 5773 | struct sockaddr_storage s |
| 5774 | ; return 0; } |
| 5775 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5776 | if { (eval echo configure:5777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5777 | rm -rf conftest* |
| 5778 | ac_cv_struct_sockaddr_storage=yes |
| 5779 | else |
| 5780 | echo "configure: failed program was:" >&5 |
| 5781 | cat conftest.$ac_ext >&5 |
| 5782 | rm -rf conftest* |
| 5783 | ac_cv_struct_sockaddr_storage=no |
| 5784 | fi |
| 5785 | rm -f conftest* |
| 5786 | fi |
| 5787 | |
| 5788 | echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6 |
| 5789 | if test $ac_cv_struct_sockaddr_storage = yes; then |
| 5790 | cat >> confdefs.h <<\EOF |
| 5791 | #define HAVE_SOCKADDR_STORAGE 1 |
| 5792 | EOF |
| 5793 | |
| 5794 | fi |
| 5795 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5796 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5797 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5798 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5799 | echo "configure:5800: checking whether char is unsigned" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5800 | 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] | 5801 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5802 | else |
| 5803 | if test "$GCC" = yes; then |
| 5804 | # GCC predefines this symbol on systems where it applies. |
| 5805 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5806 | #line 5807 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5807 | #include "confdefs.h" |
| 5808 | #ifdef __CHAR_UNSIGNED__ |
| 5809 | yes |
| 5810 | #endif |
| 5811 | |
| 5812 | EOF |
| 5813 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 5814 | egrep "yes" >/dev/null 2>&1; then |
| 5815 | rm -rf conftest* |
| 5816 | ac_cv_c_char_unsigned=yes |
| 5817 | else |
| 5818 | rm -rf conftest* |
| 5819 | ac_cv_c_char_unsigned=no |
| 5820 | fi |
| 5821 | rm -f conftest* |
| 5822 | |
| 5823 | else |
| 5824 | if test "$cross_compiling" = yes; then |
| 5825 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5826 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5827 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5828 | #line 5829 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5829 | #include "confdefs.h" |
| 5830 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5831 | #if !defined(__STDC__) || __STDC__ != 1 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5832 | #define volatile |
| 5833 | #endif |
| 5834 | main() { |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5835 | volatile char c = 255; exit(c < 0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5836 | } |
| 5837 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5838 | if { (eval echo configure:5839: \"$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] | 5839 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5840 | ac_cv_c_char_unsigned=yes |
| 5841 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5842 | echo "configure: failed program was:" >&5 |
| 5843 | cat conftest.$ac_ext >&5 |
| 5844 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5845 | ac_cv_c_char_unsigned=no |
| 5846 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5847 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5848 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5849 | |
| 5850 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5851 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5852 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5853 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5854 | if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then |
| 5855 | cat >> confdefs.h <<\EOF |
| 5856 | #define __CHAR_UNSIGNED__ 1 |
| 5857 | EOF |
| 5858 | |
| 5859 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5860 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5861 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5862 | echo "configure:5863: checking for working const" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5863 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5864 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5865 | else |
| 5866 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5867 | #line 5868 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5868 | #include "confdefs.h" |
| 5869 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5870 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5871 | |
| 5872 | /* Ultrix mips cc rejects this. */ |
Martin v. Löwis | 9db2f57 | 2001-07-23 01:30:10 +0000 | [diff] [blame] | 5873 | typedef int charset[2]; const charset x; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5874 | /* SunOS 4.1.1 cc rejects this. */ |
| 5875 | char const *const *ccp; |
| 5876 | char **p; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5877 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 5878 | struct point {int x, y;}; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5879 | static struct point const zero = {0,0}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5880 | /* AIX XL C 1.02.0.0 rejects this. |
| 5881 | It does not let you subtract one const X* pointer from another in an arm |
| 5882 | of an if-expression whose if-part is not a constant expression */ |
| 5883 | const char *g = "string"; |
| 5884 | ccp = &g + (g ? g-g : 0); |
| 5885 | /* HPUX 7.0 cc rejects these. */ |
| 5886 | ++ccp; |
| 5887 | p = (char**) ccp; |
| 5888 | ccp = (char const *const *) p; |
| 5889 | { /* SCO 3.2v4 cc rejects this. */ |
| 5890 | char *t; |
| 5891 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
| 5892 | |
| 5893 | *t++ = 0; |
| 5894 | } |
| 5895 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5896 | int x[] = {25, 17}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5897 | const int *foo = &x[0]; |
| 5898 | ++foo; |
| 5899 | } |
| 5900 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 5901 | typedef const int *iptr; |
| 5902 | iptr p = 0; |
| 5903 | ++p; |
| 5904 | } |
| 5905 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 5906 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 5907 | struct s { int j; const int *ap[3]; }; |
| 5908 | struct s *b; b->j = 5; |
| 5909 | } |
| 5910 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 5911 | const int foo = 10; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5912 | } |
| 5913 | |
| 5914 | ; return 0; } |
| 5915 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5916 | if { (eval echo configure:5917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5917 | rm -rf conftest* |
| 5918 | ac_cv_c_const=yes |
| 5919 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5920 | echo "configure: failed program was:" >&5 |
| 5921 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5922 | rm -rf conftest* |
| 5923 | ac_cv_c_const=no |
| 5924 | fi |
| 5925 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5926 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5927 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5928 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5929 | if test $ac_cv_c_const = no; then |
| 5930 | cat >> confdefs.h <<\EOF |
| 5931 | #define const |
| 5932 | EOF |
| 5933 | |
| 5934 | fi |
| 5935 | |
| 5936 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5937 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5938 | echo $ac_n "checking for working volatile""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5939 | echo "configure:5940: checking for working volatile" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5940 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5941 | #line 5942 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5942 | #include "confdefs.h" |
| 5943 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5944 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5945 | volatile int x; x = 0; |
| 5946 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5947 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5948 | if { (eval echo configure:5949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5949 | rm -rf conftest* |
| 5950 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5951 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5952 | echo "configure: failed program was:" >&5 |
| 5953 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5954 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5955 | cat >> confdefs.h <<\EOF |
| 5956 | #define volatile |
| 5957 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5958 | |
| 5959 | fi |
| 5960 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5961 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5962 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5963 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5964 | echo $ac_n "checking for working signed char""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5965 | echo "configure:5966: checking for working signed char" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5966 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5967 | #line 5968 "configure" |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5968 | #include "confdefs.h" |
| 5969 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5970 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5971 | signed char c; |
| 5972 | ; return 0; } |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5973 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5974 | if { (eval echo configure:5975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5975 | rm -rf conftest* |
| 5976 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5977 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5978 | echo "configure: failed program was:" >&5 |
| 5979 | cat conftest.$ac_ext >&5 |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5980 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5981 | cat >> confdefs.h <<\EOF |
| 5982 | #define signed |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5983 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5984 | |
| 5985 | fi |
| 5986 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5987 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5988 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5989 | have_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5990 | echo $ac_n "checking for prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5991 | echo "configure:5992: checking for prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5992 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 5993 | #line 5994 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5994 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5995 | int foo(int x) { return 0; } |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5996 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5997 | return foo(10); |
| 5998 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5999 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6000 | if { (eval echo configure:6001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6001 | rm -rf conftest* |
| 6002 | cat >> confdefs.h <<\EOF |
| 6003 | #define HAVE_PROTOTYPES 1 |
| 6004 | EOF |
| 6005 | have_prototypes=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6006 | else |
| 6007 | echo "configure: failed program was:" >&5 |
| 6008 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6009 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6010 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6011 | echo "$ac_t""$have_prototypes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6012 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6013 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6014 | echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6015 | echo "configure:6016: checking for variable length prototypes and stdarg.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6016 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6017 | #line 6018 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6018 | #include "confdefs.h" |
| 6019 | |
| 6020 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6021 | int foo(int x, ...) { |
| 6022 | va_list va; |
| 6023 | va_start(va, x); |
| 6024 | va_arg(va, int); |
| 6025 | va_arg(va, char *); |
| 6026 | va_arg(va, double); |
| 6027 | return 0; |
| 6028 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6029 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6030 | int main() { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6031 | return foo(10, "", 3.14); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6032 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6033 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6034 | if { (eval echo configure:6035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6035 | rm -rf conftest* |
| 6036 | cat >> confdefs.h <<\EOF |
| 6037 | #define HAVE_STDARG_PROTOTYPES 1 |
| 6038 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6039 | works=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6040 | else |
| 6041 | echo "configure: failed program was:" >&5 |
| 6042 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6043 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6044 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6045 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6046 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6047 | if test "$have_prototypes" = yes; then |
| 6048 | bad_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6049 | echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6050 | echo "configure:6051: checking for bad exec* prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6051 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6052 | #line 6053 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6053 | #include "confdefs.h" |
| 6054 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6055 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6056 | char **t;execve("@",t,t); |
| 6057 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6058 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6059 | if { (eval echo configure:6060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6060 | : |
| 6061 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6062 | echo "configure: failed program was:" >&5 |
| 6063 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6064 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6065 | cat >> confdefs.h <<\EOF |
| 6066 | #define BAD_EXEC_PROTOTYPES 1 |
| 6067 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6068 | bad_prototypes=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6069 | fi |
| 6070 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6071 | echo "$ac_t""$bad_prototypes" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6072 | fi |
| 6073 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6074 | # check if sockaddr has sa_len member |
| 6075 | echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6076 | echo "configure:6077: checking if sockaddr has sa_len member" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6077 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6078 | #line 6079 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6079 | #include "confdefs.h" |
| 6080 | #include <sys/types.h> |
| 6081 | #include <sys/socket.h> |
| 6082 | int main() { |
| 6083 | struct sockaddr x; |
| 6084 | x.sa_len = 0; |
| 6085 | ; return 0; } |
| 6086 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6087 | if { (eval echo configure:6088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6088 | rm -rf conftest* |
| 6089 | echo "$ac_t""yes" 1>&6 |
| 6090 | cat >> confdefs.h <<\EOF |
| 6091 | #define HAVE_SOCKADDR_SA_LEN 1 |
| 6092 | EOF |
| 6093 | |
| 6094 | else |
| 6095 | echo "configure: failed program was:" >&5 |
| 6096 | cat conftest.$ac_ext >&5 |
| 6097 | rm -rf conftest* |
| 6098 | echo "$ac_t""no" 1>&6 |
| 6099 | fi |
| 6100 | rm -f conftest* |
| 6101 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6102 | echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6103 | echo "configure:6104: checking for bad static forward" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6104 | if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then |
| 6105 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6106 | else |
| 6107 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6108 | ac_cv_bad_static_forward=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6109 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6110 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6111 | #line 6112 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6112 | #include "confdefs.h" |
| 6113 | |
| 6114 | struct s { int a; int b; }; |
| 6115 | static struct s foo; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6116 | int foobar() { |
| 6117 | static int random; |
| 6118 | random = (int) &foo; |
| 6119 | return random; |
| 6120 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6121 | static struct s foo = { 1, 2 }; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6122 | main() { |
| 6123 | exit(!((int)&foo == foobar())); |
| 6124 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6125 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6126 | if { (eval echo configure:6127: \"$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] | 6127 | then |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6128 | ac_cv_bad_static_forward=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6129 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6130 | echo "configure: failed program was:" >&5 |
| 6131 | cat conftest.$ac_ext >&5 |
| 6132 | rm -fr conftest* |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6133 | ac_cv_bad_static_forward=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6134 | fi |
| 6135 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6136 | fi |
| 6137 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6138 | fi |
| 6139 | |
| 6140 | echo "$ac_t""$ac_cv_bad_static_forward" 1>&6 |
| 6141 | if test "$ac_cv_bad_static_forward" = yes |
| 6142 | then |
| 6143 | cat >> confdefs.h <<\EOF |
| 6144 | #define BAD_STATIC_FORWARD 1 |
| 6145 | EOF |
| 6146 | |
| 6147 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6148 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6149 | va_list_is_array=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6150 | echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6151 | echo "configure:6152: checking whether va_list is an array" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6152 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6153 | #line 6154 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6154 | #include "confdefs.h" |
| 6155 | |
| 6156 | #ifdef HAVE_STDARG_PROTOTYPES |
| 6157 | #include <stdarg.h> |
| 6158 | #else |
| 6159 | #include <varargs.h> |
| 6160 | #endif |
| 6161 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6162 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6163 | va_list list1, list2; list1 = list2; |
| 6164 | ; return 0; } |
| 6165 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6166 | if { (eval echo configure:6167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6167 | : |
| 6168 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6169 | echo "configure: failed program was:" >&5 |
| 6170 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6171 | rm -rf conftest* |
| 6172 | cat >> confdefs.h <<\EOF |
| 6173 | #define VA_LIST_IS_ARRAY 1 |
| 6174 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6175 | va_list_is_array=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6176 | fi |
| 6177 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6178 | echo "$ac_t""$va_list_is_array" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6179 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6180 | # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( |
| 6181 | echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6182 | echo "configure:6183: checking for gethostbyname_r" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6183 | 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] | 6184 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6185 | else |
| 6186 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6187 | #line 6188 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6188 | #include "confdefs.h" |
| 6189 | /* System header to define __stub macros and hopefully few prototypes, |
| 6190 | which can conflict with char gethostbyname_r(); below. */ |
| 6191 | #include <assert.h> |
| 6192 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6193 | /* We use char because int might match the return type of a gcc2 |
| 6194 | builtin and then its argument prototype would still apply. */ |
| 6195 | char gethostbyname_r(); |
| 6196 | |
| 6197 | int main() { |
| 6198 | |
| 6199 | /* The GNU C library defines this for functions which it implements |
| 6200 | to always fail with ENOSYS. Some functions are actually named |
| 6201 | something starting with __ and the normal name is an alias. */ |
| 6202 | #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) |
| 6203 | choke me |
| 6204 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6205 | gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6206 | #endif |
| 6207 | |
| 6208 | ; return 0; } |
| 6209 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6210 | if { (eval echo configure:6211: \"$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] | 6211 | rm -rf conftest* |
| 6212 | eval "ac_cv_func_gethostbyname_r=yes" |
| 6213 | else |
| 6214 | echo "configure: failed program was:" >&5 |
| 6215 | cat conftest.$ac_ext >&5 |
| 6216 | rm -rf conftest* |
| 6217 | eval "ac_cv_func_gethostbyname_r=no" |
| 6218 | fi |
| 6219 | rm -f conftest* |
| 6220 | fi |
| 6221 | |
| 6222 | if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then |
| 6223 | echo "$ac_t""yes" 1>&6 |
| 6224 | |
| 6225 | cat >> confdefs.h <<\EOF |
| 6226 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6227 | EOF |
| 6228 | |
| 6229 | echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6230 | echo "configure:6231: checking gethostbyname_r with 6 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6231 | OLD_CFLAGS=$CFLAGS |
| 6232 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
| 6233 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6234 | #line 6235 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6235 | #include "confdefs.h" |
| 6236 | |
| 6237 | # include <netdb.h> |
| 6238 | |
| 6239 | int main() { |
| 6240 | |
| 6241 | char *name; |
| 6242 | struct hostent *he, *res; |
| 6243 | char buffer[2048]; |
| 6244 | int buflen = 2048; |
| 6245 | int h_errnop; |
| 6246 | |
| 6247 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
| 6248 | |
| 6249 | ; return 0; } |
| 6250 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6251 | if { (eval echo configure:6252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6252 | rm -rf conftest* |
| 6253 | |
| 6254 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6255 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6256 | EOF |
| 6257 | |
| 6258 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6259 | #define HAVE_GETHOSTBYNAME_R_6_ARG 1 |
| 6260 | EOF |
| 6261 | |
| 6262 | echo "$ac_t""yes" 1>&6 |
| 6263 | |
| 6264 | else |
| 6265 | echo "configure: failed program was:" >&5 |
| 6266 | cat conftest.$ac_ext >&5 |
| 6267 | rm -rf conftest* |
| 6268 | |
| 6269 | echo "$ac_t""no" 1>&6 |
| 6270 | echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6271 | echo "configure:6272: checking gethostbyname_r with 5 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6272 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6273 | #line 6274 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6274 | #include "confdefs.h" |
| 6275 | |
| 6276 | # include <netdb.h> |
| 6277 | |
| 6278 | int main() { |
| 6279 | |
| 6280 | char *name; |
| 6281 | struct hostent *he; |
| 6282 | char buffer[2048]; |
| 6283 | int buflen = 2048; |
| 6284 | int h_errnop; |
| 6285 | |
| 6286 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
| 6287 | |
| 6288 | ; return 0; } |
| 6289 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6290 | if { (eval echo configure:6291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6291 | rm -rf conftest* |
| 6292 | |
| 6293 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6294 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6295 | EOF |
| 6296 | |
| 6297 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6298 | #define HAVE_GETHOSTBYNAME_R_5_ARG 1 |
| 6299 | EOF |
| 6300 | |
| 6301 | echo "$ac_t""yes" 1>&6 |
| 6302 | |
| 6303 | else |
| 6304 | echo "configure: failed program was:" >&5 |
| 6305 | cat conftest.$ac_ext >&5 |
| 6306 | rm -rf conftest* |
| 6307 | |
| 6308 | echo "$ac_t""no" 1>&6 |
| 6309 | echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6310 | echo "configure:6311: checking gethostbyname_r with 3 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6311 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6312 | #line 6313 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6313 | #include "confdefs.h" |
| 6314 | |
| 6315 | # include <netdb.h> |
| 6316 | |
| 6317 | int main() { |
| 6318 | |
| 6319 | char *name; |
| 6320 | struct hostent *he; |
| 6321 | struct hostent_data data; |
| 6322 | |
| 6323 | (void) gethostbyname_r(name, he, &data); |
| 6324 | |
| 6325 | ; return 0; } |
| 6326 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6327 | if { (eval echo configure:6328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6328 | rm -rf conftest* |
| 6329 | |
| 6330 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6331 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6332 | EOF |
| 6333 | |
| 6334 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6335 | #define HAVE_GETHOSTBYNAME_R_3_ARG 1 |
| 6336 | EOF |
| 6337 | |
| 6338 | echo "$ac_t""yes" 1>&6 |
| 6339 | |
| 6340 | else |
| 6341 | echo "configure: failed program was:" >&5 |
| 6342 | cat conftest.$ac_ext >&5 |
| 6343 | rm -rf conftest* |
| 6344 | |
| 6345 | echo "$ac_t""no" 1>&6 |
| 6346 | |
| 6347 | fi |
| 6348 | rm -f conftest* |
| 6349 | |
| 6350 | fi |
| 6351 | rm -f conftest* |
| 6352 | |
| 6353 | fi |
| 6354 | rm -f conftest* |
| 6355 | CFLAGS=$OLD_CFLAGS |
| 6356 | |
| 6357 | else |
| 6358 | echo "$ac_t""no" 1>&6 |
| 6359 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6360 | for ac_func in gethostbyname |
| 6361 | do |
| 6362 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6363 | echo "configure:6364: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6364 | 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] | 6365 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6366 | else |
| 6367 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6368 | #line 6369 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6369 | #include "confdefs.h" |
| 6370 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6371 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6372 | #include <assert.h> |
| 6373 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6374 | /* We use char because int might match the return type of a gcc2 |
| 6375 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6376 | char $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6377 | |
| 6378 | int main() { |
| 6379 | |
| 6380 | /* The GNU C library defines this for functions which it implements |
| 6381 | to always fail with ENOSYS. Some functions are actually named |
| 6382 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6383 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6384 | choke me |
| 6385 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6386 | $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6387 | #endif |
| 6388 | |
| 6389 | ; return 0; } |
| 6390 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6391 | if { (eval echo configure:6392: \"$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] | 6392 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6393 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6394 | else |
| 6395 | echo "configure: failed program was:" >&5 |
| 6396 | cat conftest.$ac_ext >&5 |
| 6397 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6398 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6399 | fi |
| 6400 | rm -f conftest* |
| 6401 | fi |
| 6402 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6403 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6404 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6405 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6406 | cat >> confdefs.h <<EOF |
| 6407 | #define $ac_tr_func 1 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6408 | EOF |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6409 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6410 | else |
| 6411 | echo "$ac_t""no" 1>&6 |
| 6412 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6413 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6414 | |
| 6415 | |
| 6416 | fi |
| 6417 | |
| 6418 | |
| 6419 | |
| 6420 | |
| 6421 | |
| 6422 | |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6423 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6424 | # checks for system services |
| 6425 | # (none yet) |
| 6426 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6427 | # Linux requires this for correct f.p. operations |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6428 | echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6429 | echo "configure:6430: checking for __fpu_control" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6430 | if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6431 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6432 | else |
| 6433 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6434 | #line 6435 "configure" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6435 | #include "confdefs.h" |
| 6436 | /* System header to define __stub macros and hopefully few prototypes, |
| 6437 | which can conflict with char __fpu_control(); below. */ |
| 6438 | #include <assert.h> |
| 6439 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6440 | /* We use char because int might match the return type of a gcc2 |
| 6441 | builtin and then its argument prototype would still apply. */ |
| 6442 | char __fpu_control(); |
| 6443 | |
| 6444 | int main() { |
| 6445 | |
| 6446 | /* The GNU C library defines this for functions which it implements |
| 6447 | to always fail with ENOSYS. Some functions are actually named |
| 6448 | something starting with __ and the normal name is an alias. */ |
| 6449 | #if defined (__stub___fpu_control) || defined (__stub_____fpu_control) |
| 6450 | choke me |
| 6451 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6452 | __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6453 | #endif |
| 6454 | |
| 6455 | ; return 0; } |
| 6456 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6457 | if { (eval echo configure:6458: \"$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] | 6458 | rm -rf conftest* |
| 6459 | eval "ac_cv_func___fpu_control=yes" |
| 6460 | else |
| 6461 | echo "configure: failed program was:" >&5 |
| 6462 | cat conftest.$ac_ext >&5 |
| 6463 | rm -rf conftest* |
| 6464 | eval "ac_cv_func___fpu_control=no" |
| 6465 | fi |
| 6466 | rm -f conftest* |
| 6467 | fi |
| 6468 | |
| 6469 | if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then |
| 6470 | echo "$ac_t""yes" 1>&6 |
| 6471 | : |
| 6472 | else |
| 6473 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6474 | echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6475 | echo "configure:6476: checking for __fpu_control in -lieee" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6476 | ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6477 | 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] | 6478 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6479 | else |
| 6480 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6481 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6482 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6483 | #line 6484 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6484 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6485 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6486 | /* We use char because int might match the return type of a gcc2 |
| 6487 | builtin and then its argument prototype would still apply. */ |
| 6488 | char __fpu_control(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6489 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6490 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6491 | __fpu_control() |
| 6492 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6493 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6494 | if { (eval echo configure:6495: \"$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] | 6495 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6496 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6497 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6498 | echo "configure: failed program was:" >&5 |
| 6499 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6500 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6501 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6502 | fi |
| 6503 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6504 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6505 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6506 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6507 | 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] | 6508 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6509 | ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 6510 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6511 | cat >> confdefs.h <<EOF |
| 6512 | #define $ac_tr_lib 1 |
| 6513 | EOF |
| 6514 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6515 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6516 | |
| 6517 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6518 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6519 | fi |
| 6520 | |
| 6521 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6522 | fi |
| 6523 | |
| 6524 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6525 | # Check for --with-fpectl |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6526 | echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6527 | echo "configure:6528: checking for --with-fpectl" >&5 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6528 | # Check whether --with-fpectl or --without-fpectl was given. |
| 6529 | if test "${with_fpectl+set}" = set; then |
| 6530 | withval="$with_fpectl" |
| 6531 | |
| 6532 | if test "$withval" != no |
| 6533 | then cat >> confdefs.h <<\EOF |
| 6534 | #define WANT_SIGFPE_HANDLER 1 |
| 6535 | EOF |
| 6536 | echo "$ac_t""yes" 1>&6 |
| 6537 | else echo "$ac_t""no" 1>&6 |
| 6538 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6539 | else |
| 6540 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6541 | fi |
| 6542 | |
| 6543 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6544 | # check for --with-libm=... |
| 6545 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6546 | case $ac_sys_system in |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 6547 | Darwin) ;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 6548 | BeOS) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6549 | *) LIBM=-lm |
| 6550 | esac |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6551 | echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6552 | echo "configure:6553: checking for --with-libm=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6553 | # Check whether --with-libm or --without-libm was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6554 | if test "${with_libm+set}" = set; then |
| 6555 | withval="$with_libm" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6556 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6557 | if test "$withval" = no |
| 6558 | then LIBM= |
| 6559 | echo "$ac_t""force LIBM empty" 1>&6 |
| 6560 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6561 | then LIBM=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6562 | echo "$ac_t""set LIBM=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6563 | 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] | 6564 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6565 | else |
| 6566 | echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6567 | fi |
| 6568 | |
| 6569 | |
| 6570 | # check for --with-libc=... |
| 6571 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6572 | echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6573 | echo "configure:6574: checking for --with-libc=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6574 | # Check whether --with-libc or --without-libc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6575 | if test "${with_libc+set}" = set; then |
| 6576 | withval="$with_libc" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6577 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6578 | if test "$withval" = no |
| 6579 | then LIBC= |
| 6580 | echo "$ac_t""force LIBC empty" 1>&6 |
| 6581 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6582 | then LIBC=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6583 | echo "$ac_t""set LIBC=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6584 | 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] | 6585 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6586 | else |
| 6587 | echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6588 | fi |
| 6589 | |
| 6590 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6591 | # check for hypot() in math library |
| 6592 | LIBS_SAVE=$LIBS |
| 6593 | LIBS="$LIBS $LIBM" |
| 6594 | for ac_func in hypot |
| 6595 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6596 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6597 | echo "configure:6598: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6598 | 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] | 6599 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6600 | else |
| 6601 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6602 | #line 6603 "configure" |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6603 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6604 | /* System header to define __stub macros and hopefully few prototypes, |
| 6605 | which can conflict with char $ac_func(); below. */ |
| 6606 | #include <assert.h> |
| 6607 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6608 | /* We use char because int might match the return type of a gcc2 |
| 6609 | builtin and then its argument prototype would still apply. */ |
| 6610 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6611 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6612 | int main() { |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6613 | |
| 6614 | /* The GNU C library defines this for functions which it implements |
| 6615 | to always fail with ENOSYS. Some functions are actually named |
| 6616 | something starting with __ and the normal name is an alias. */ |
| 6617 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 6618 | choke me |
| 6619 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6620 | $ac_func(); |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6621 | #endif |
| 6622 | |
| 6623 | ; return 0; } |
| 6624 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6625 | if { (eval echo configure:6626: \"$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] | 6626 | rm -rf conftest* |
| 6627 | eval "ac_cv_func_$ac_func=yes" |
| 6628 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6629 | echo "configure: failed program was:" >&5 |
| 6630 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6631 | rm -rf conftest* |
| 6632 | eval "ac_cv_func_$ac_func=no" |
| 6633 | fi |
| 6634 | rm -f conftest* |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6635 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6636 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6637 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 6638 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6639 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6640 | cat >> confdefs.h <<EOF |
| 6641 | #define $ac_tr_func 1 |
| 6642 | EOF |
| 6643 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6644 | else |
| 6645 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 6646 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6647 | fi |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6648 | done |
| 6649 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6650 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6651 | LIBS=$LIBS_SAVE |
| 6652 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6653 | # check whether malloc(0) returns NULL or not |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6654 | echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6655 | echo "configure:6656: checking what malloc(0) returns" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6656 | if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6657 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6658 | else |
| 6659 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6660 | ac_cv_malloc_zero=nonnull |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6661 | else |
| 6662 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6663 | #line 6664 "configure" |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6664 | #include "confdefs.h" |
| 6665 | #include <stdio.h> |
| 6666 | #ifdef HAVE_STDLIB |
| 6667 | #include <stdlib.h> |
| 6668 | #else |
| 6669 | char *malloc(), *realloc(); |
| 6670 | int *free(); |
| 6671 | #endif |
| 6672 | main() { |
| 6673 | char *p; |
| 6674 | p = malloc(0); |
| 6675 | if (p == NULL) exit(1); |
| 6676 | p = realloc(p, 0); |
| 6677 | if (p == NULL) exit(1); |
| 6678 | free(p); |
| 6679 | exit(0); |
| 6680 | } |
| 6681 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6682 | if { (eval echo configure:6683: \"$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] | 6683 | then |
| 6684 | ac_cv_malloc_zero=nonnull |
| 6685 | else |
| 6686 | echo "configure: failed program was:" >&5 |
| 6687 | cat conftest.$ac_ext >&5 |
| 6688 | rm -fr conftest* |
| 6689 | ac_cv_malloc_zero=null |
| 6690 | fi |
| 6691 | rm -fr conftest* |
| 6692 | fi |
| 6693 | |
| 6694 | fi |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6695 | # XXX arm cross-compile? |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6696 | echo "$ac_t""$ac_cv_malloc_zero" 1>&6 |
| 6697 | if test "$ac_cv_malloc_zero" = null |
| 6698 | then |
| 6699 | cat >> confdefs.h <<\EOF |
| 6700 | #define MALLOC_ZERO_RETURNS_NULL 1 |
| 6701 | EOF |
| 6702 | |
| 6703 | fi |
| 6704 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6705 | # check for wchar.h |
| 6706 | ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` |
| 6707 | echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6708 | echo "configure:6709: checking for wchar.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6709 | 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] | 6710 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6711 | else |
| 6712 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6713 | #line 6714 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6714 | #include "confdefs.h" |
| 6715 | #include <wchar.h> |
| 6716 | EOF |
| 6717 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6718 | { (eval echo configure:6719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6719 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 6720 | if test -z "$ac_err"; then |
| 6721 | rm -rf conftest* |
| 6722 | eval "ac_cv_header_$ac_safe=yes" |
| 6723 | else |
| 6724 | echo "$ac_err" >&5 |
| 6725 | echo "configure: failed program was:" >&5 |
| 6726 | cat conftest.$ac_ext >&5 |
| 6727 | rm -rf conftest* |
| 6728 | eval "ac_cv_header_$ac_safe=no" |
| 6729 | fi |
| 6730 | rm -f conftest* |
| 6731 | fi |
| 6732 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 6733 | echo "$ac_t""yes" 1>&6 |
| 6734 | cat >> confdefs.h <<\EOF |
| 6735 | #define HAVE_WCHAR_H 1 |
| 6736 | EOF |
| 6737 | wchar_h="yes" |
| 6738 | else |
| 6739 | echo "$ac_t""no" 1>&6 |
| 6740 | wchar_h="no" |
| 6741 | |
| 6742 | fi |
| 6743 | |
| 6744 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6745 | # determine wchar_t size |
| 6746 | if test "$wchar_h" = yes |
| 6747 | then |
| 6748 | echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6749 | echo "configure:6750: checking size of wchar_t" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6750 | if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then |
| 6751 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6752 | else |
| 6753 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6754 | ac_cv_sizeof_wchar_t=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6755 | else |
| 6756 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6757 | #line 6758 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6758 | #include "confdefs.h" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6759 | #include <stdio.h> |
| 6760 | main() |
| 6761 | { |
| 6762 | FILE *f=fopen("conftestval", "w"); |
| 6763 | if (!f) exit(1); |
| 6764 | fprintf(f, "%d\n", sizeof(wchar_t)); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6765 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6766 | } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6767 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6768 | if { (eval echo configure:6769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6769 | then |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6770 | ac_cv_sizeof_wchar_t=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6771 | else |
| 6772 | echo "configure: failed program was:" >&5 |
| 6773 | cat conftest.$ac_ext >&5 |
| 6774 | rm -fr conftest* |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6775 | ac_cv_sizeof_wchar_t=0 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6776 | fi |
| 6777 | rm -fr conftest* |
| 6778 | fi |
| 6779 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6780 | fi |
| 6781 | echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 |
| 6782 | cat >> confdefs.h <<EOF |
| 6783 | #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t |
| 6784 | EOF |
| 6785 | |
| 6786 | |
| 6787 | fi |
| 6788 | |
| 6789 | echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6790 | echo "configure:6791: checking what type to use for unicode" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6791 | # Check whether --enable-unicode or --disable-unicode was given. |
| 6792 | if test "${enable_unicode+set}" = set; then |
| 6793 | enableval="$enable_unicode" |
| 6794 | : |
| 6795 | else |
| 6796 | enable_unicode=yes |
| 6797 | fi |
| 6798 | |
| 6799 | |
| 6800 | if test $enable_unicode = yes |
| 6801 | then |
Martin v. Löwis | fd91779 | 2001-06-27 20:22:04 +0000 | [diff] [blame] | 6802 | # Without any arguments, Py_UNICODE defaults to two-byte mode |
| 6803 | enable_unicode="ucs2" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6804 | fi |
| 6805 | |
| 6806 | case "$enable_unicode" in |
| 6807 | ucs2) unicode_size="2" |
| 6808 | cat >> confdefs.h <<\EOF |
| 6809 | #define Py_UNICODE_SIZE 2 |
| 6810 | EOF |
| 6811 | |
| 6812 | ;; |
| 6813 | ucs4) unicode_size="4" |
| 6814 | cat >> confdefs.h <<\EOF |
| 6815 | #define Py_UNICODE_SIZE 4 |
| 6816 | EOF |
| 6817 | |
| 6818 | ;; |
| 6819 | esac |
| 6820 | |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6821 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6822 | if test "$enable_unicode" = "no" |
| 6823 | then |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6824 | UNICODE_OBJS="" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6825 | echo "$ac_t""not used" 1>&6 |
| 6826 | else |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6827 | UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6828 | cat >> confdefs.h <<\EOF |
| 6829 | #define Py_USING_UNICODE 1 |
| 6830 | EOF |
| 6831 | |
| 6832 | if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" |
| 6833 | then |
| 6834 | PY_UNICODE_TYPE="wchar_t" |
| 6835 | cat >> confdefs.h <<\EOF |
| 6836 | #define HAVE_USABLE_WCHAR_T 1 |
| 6837 | EOF |
| 6838 | |
| 6839 | cat >> confdefs.h <<\EOF |
| 6840 | #define PY_UNICODE_TYPE wchar_t |
| 6841 | EOF |
| 6842 | |
| 6843 | elif test "$ac_cv_sizeof_short" = "$unicode_size" |
| 6844 | then |
| 6845 | PY_UNICODE_TYPE="unsigned short" |
| 6846 | cat >> confdefs.h <<\EOF |
| 6847 | #define PY_UNICODE_TYPE unsigned short |
| 6848 | EOF |
| 6849 | |
| 6850 | elif test "$ac_cv_sizeof_long" = "$unicode_size" |
| 6851 | then |
| 6852 | PY_UNICODE_TYPE="unsigned long" |
| 6853 | cat >> confdefs.h <<\EOF |
| 6854 | #define PY_UNICODE_TYPE unsigned long |
| 6855 | EOF |
| 6856 | |
| 6857 | else |
| 6858 | PY_UNICODE_TYPE="no type found" |
| 6859 | fi |
| 6860 | echo "$ac_t""$PY_UNICODE_TYPE" 1>&6 |
| 6861 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6862 | |
| 6863 | # check for endianness |
| 6864 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6865 | echo "configure:6866: checking whether byte ordering is bigendian" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6866 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6867 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6868 | else |
| 6869 | ac_cv_c_bigendian=unknown |
| 6870 | # See if sys/param.h defines the BYTE_ORDER macro. |
| 6871 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6872 | #line 6873 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6873 | #include "confdefs.h" |
| 6874 | #include <sys/types.h> |
| 6875 | #include <sys/param.h> |
| 6876 | int main() { |
| 6877 | |
| 6878 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 6879 | bogus endian macros |
| 6880 | #endif |
| 6881 | ; return 0; } |
| 6882 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6883 | if { (eval echo configure:6884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6884 | rm -rf conftest* |
| 6885 | # It does; now see whether it defined to BIG_ENDIAN or not. |
| 6886 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6887 | #line 6888 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6888 | #include "confdefs.h" |
| 6889 | #include <sys/types.h> |
| 6890 | #include <sys/param.h> |
| 6891 | int main() { |
| 6892 | |
| 6893 | #if BYTE_ORDER != BIG_ENDIAN |
| 6894 | not big endian |
| 6895 | #endif |
| 6896 | ; return 0; } |
| 6897 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6898 | if { (eval echo configure:6899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6899 | rm -rf conftest* |
| 6900 | ac_cv_c_bigendian=yes |
| 6901 | else |
| 6902 | echo "configure: failed program was:" >&5 |
| 6903 | cat conftest.$ac_ext >&5 |
| 6904 | rm -rf conftest* |
| 6905 | ac_cv_c_bigendian=no |
| 6906 | fi |
| 6907 | rm -f conftest* |
| 6908 | else |
| 6909 | echo "configure: failed program was:" >&5 |
| 6910 | cat conftest.$ac_ext >&5 |
| 6911 | fi |
| 6912 | rm -f conftest* |
| 6913 | if test $ac_cv_c_bigendian = unknown; then |
| 6914 | if test "$cross_compiling" = yes; then |
| 6915 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6916 | else |
| 6917 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6918 | #line 6919 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6919 | #include "confdefs.h" |
| 6920 | main () { |
| 6921 | /* Are we little or big endian? From Harbison&Steele. */ |
| 6922 | union |
| 6923 | { |
| 6924 | long l; |
| 6925 | char c[sizeof (long)]; |
| 6926 | } u; |
| 6927 | u.l = 1; |
| 6928 | exit (u.c[sizeof (long) - 1] == 1); |
| 6929 | } |
| 6930 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6931 | if { (eval echo configure:6932: \"$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] | 6932 | then |
| 6933 | ac_cv_c_bigendian=no |
| 6934 | else |
| 6935 | echo "configure: failed program was:" >&5 |
| 6936 | cat conftest.$ac_ext >&5 |
| 6937 | rm -fr conftest* |
| 6938 | ac_cv_c_bigendian=yes |
| 6939 | fi |
| 6940 | rm -fr conftest* |
| 6941 | fi |
| 6942 | |
| 6943 | fi |
| 6944 | fi |
| 6945 | |
| 6946 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 6947 | if test $ac_cv_c_bigendian = yes; then |
| 6948 | cat >> confdefs.h <<\EOF |
| 6949 | #define WORDS_BIGENDIAN 1 |
| 6950 | EOF |
| 6951 | |
| 6952 | fi |
| 6953 | |
| 6954 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6955 | # Check whether right shifting a negative integer extends the sign bit |
| 6956 | # or fills with zeros (like the Cray J90, according to Tim Peters). |
| 6957 | echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6958 | echo "configure:6959: checking whether right shift extends the sign bit" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6959 | if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 6960 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6961 | else |
| 6962 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6963 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6964 | ac_cv_rshift_extends_sign=yes |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6965 | else |
| 6966 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6967 | #line 6968 "configure" |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6968 | #include "confdefs.h" |
| 6969 | |
| 6970 | int main() |
| 6971 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 6972 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6973 | } |
| 6974 | |
| 6975 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 6976 | if { (eval echo configure:6977: \"$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] | 6977 | then |
| 6978 | ac_cv_rshift_extends_sign=yes |
| 6979 | else |
| 6980 | echo "configure: failed program was:" >&5 |
| 6981 | cat conftest.$ac_ext >&5 |
| 6982 | rm -fr conftest* |
| 6983 | ac_cv_rshift_extends_sign=no |
| 6984 | fi |
| 6985 | rm -fr conftest* |
| 6986 | fi |
| 6987 | |
| 6988 | fi |
| 6989 | |
| 6990 | echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 |
| 6991 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6992 | then |
| 6993 | cat >> confdefs.h <<\EOF |
| 6994 | #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 |
| 6995 | EOF |
| 6996 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6997 | fi |
| 6998 | |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6999 | # check for getc_unlocked and related locking functions |
| 7000 | echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 7001 | echo "configure:7002: checking for getc_unlocked() and friends" >&5 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7002 | if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then |
| 7003 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7004 | else |
| 7005 | |
| 7006 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 7007 | #line 7008 "configure" |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7008 | #include "confdefs.h" |
| 7009 | #include <stdio.h> |
| 7010 | int main() { |
| 7011 | |
| 7012 | FILE *f = fopen("/dev/null", "r"); |
| 7013 | flockfile(f); |
| 7014 | getc_unlocked(f); |
| 7015 | funlockfile(f); |
| 7016 | |
| 7017 | ; return 0; } |
| 7018 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 7019 | if { (eval echo configure:7020: \"$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] | 7020 | rm -rf conftest* |
| 7021 | ac_cv_have_getc_unlocked=yes |
| 7022 | else |
| 7023 | echo "configure: failed program was:" >&5 |
| 7024 | cat conftest.$ac_ext >&5 |
| 7025 | rm -rf conftest* |
| 7026 | ac_cv_have_getc_unlocked=no |
| 7027 | fi |
| 7028 | rm -f conftest* |
| 7029 | fi |
| 7030 | |
| 7031 | echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6 |
| 7032 | if test "$ac_cv_have_getc_unlocked" = yes |
| 7033 | then |
| 7034 | cat >> confdefs.h <<\EOF |
| 7035 | #define HAVE_GETC_UNLOCKED 1 |
| 7036 | EOF |
| 7037 | |
| 7038 | fi |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7039 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7040 | # check for readline 4.0 |
| 7041 | echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 7042 | echo "configure:7043: checking for rl_pre_input_hook in -lreadline" >&5 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7043 | 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] | 7044 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7045 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7046 | else |
| 7047 | ac_save_LIBS="$LIBS" |
| 7048 | LIBS="-lreadline -ltermcap $LIBS" |
| 7049 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 7050 | #line 7051 "configure" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7051 | #include "confdefs.h" |
| 7052 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7053 | /* We use char because int might match the return type of a gcc2 |
| 7054 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7055 | char rl_pre_input_hook(); |
| 7056 | |
| 7057 | int main() { |
| 7058 | rl_pre_input_hook() |
| 7059 | ; return 0; } |
| 7060 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 7061 | if { (eval echo configure:7062: \"$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] | 7062 | rm -rf conftest* |
| 7063 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 7064 | else |
| 7065 | echo "configure: failed program was:" >&5 |
| 7066 | cat conftest.$ac_ext >&5 |
| 7067 | rm -rf conftest* |
| 7068 | eval "ac_cv_lib_$ac_lib_var=no" |
| 7069 | fi |
| 7070 | rm -f conftest* |
| 7071 | LIBS="$ac_save_LIBS" |
| 7072 | |
| 7073 | fi |
| 7074 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7075 | echo "$ac_t""yes" 1>&6 |
| 7076 | cat >> confdefs.h <<\EOF |
| 7077 | #define HAVE_RL_PRE_INPUT_HOOK 1 |
| 7078 | EOF |
| 7079 | |
| 7080 | else |
| 7081 | echo "$ac_t""no" 1>&6 |
| 7082 | fi |
| 7083 | |
| 7084 | |
| 7085 | # check for readline 4.2 |
| 7086 | echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 7087 | echo "configure:7088: checking for rl_completion_matches in -lreadline" >&5 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7088 | ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` |
| 7089 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7090 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7091 | else |
| 7092 | ac_save_LIBS="$LIBS" |
| 7093 | LIBS="-lreadline -ltermcap $LIBS" |
| 7094 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 7095 | #line 7096 "configure" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7096 | #include "confdefs.h" |
| 7097 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7098 | /* We use char because int might match the return type of a gcc2 |
| 7099 | builtin and then its argument prototype would still apply. */ |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7100 | char rl_completion_matches(); |
| 7101 | |
| 7102 | int main() { |
| 7103 | rl_completion_matches() |
| 7104 | ; return 0; } |
| 7105 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 7106 | if { (eval echo configure:7107: \"$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] | 7107 | rm -rf conftest* |
| 7108 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 7109 | else |
| 7110 | echo "configure: failed program was:" >&5 |
| 7111 | cat conftest.$ac_ext >&5 |
| 7112 | rm -rf conftest* |
| 7113 | eval "ac_cv_lib_$ac_lib_var=no" |
| 7114 | fi |
| 7115 | rm -f conftest* |
| 7116 | LIBS="$ac_save_LIBS" |
| 7117 | |
| 7118 | fi |
| 7119 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7120 | echo "$ac_t""yes" 1>&6 |
| 7121 | cat >> confdefs.h <<\EOF |
| 7122 | #define HAVE_RL_COMPLETION_MATCHES 1 |
| 7123 | EOF |
| 7124 | |
| 7125 | else |
| 7126 | echo "$ac_t""no" 1>&6 |
| 7127 | fi |
| 7128 | |
| 7129 | |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7130 | echo $ac_n "checking for broken nice()""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 7131 | echo "configure:7132: checking for broken nice()" >&5 |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7132 | if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then |
| 7133 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7134 | else |
| 7135 | |
| 7136 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7137 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7138 | else |
| 7139 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 7140 | #line 7141 "configure" |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7141 | #include "confdefs.h" |
| 7142 | |
| 7143 | int main() |
| 7144 | { |
| 7145 | int val1 = nice(1); |
| 7146 | if (val1 != -1 && val1 == nice(2)) |
| 7147 | exit(0); |
| 7148 | exit(1); |
| 7149 | } |
| 7150 | |
| 7151 | EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 7152 | if { (eval echo configure:7153: \"$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] | 7153 | then |
| 7154 | ac_cv_broken_nice=yes |
| 7155 | else |
| 7156 | echo "configure: failed program was:" >&5 |
| 7157 | cat conftest.$ac_ext >&5 |
| 7158 | rm -fr conftest* |
| 7159 | ac_cv_broken_nice=no |
| 7160 | fi |
| 7161 | rm -fr conftest* |
| 7162 | fi |
| 7163 | |
| 7164 | fi |
| 7165 | |
| 7166 | echo "$ac_t""$ac_cv_broken_nice" 1>&6 |
| 7167 | if test "$ac_cv_broken_nice" = yes |
| 7168 | then |
| 7169 | cat >> confdefs.h <<\EOF |
| 7170 | #define HAVE_BROKEN_NICE 1 |
| 7171 | EOF |
| 7172 | |
| 7173 | fi |
| 7174 | |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7175 | # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! |
| 7176 | # Add sys/socket.h to confdefs.h |
| 7177 | cat >> confdefs.h <<\EOF |
| 7178 | #ifdef HAVE_SYS_SOCKET_H |
| 7179 | #include <sys/socket.h> |
| 7180 | #endif |
| 7181 | EOF |
| 7182 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 7183 | echo "configure:7184: checking for socklen_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7184 | 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] | 7185 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7186 | else |
| 7187 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 7188 | #line 7189 "configure" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7189 | #include "confdefs.h" |
| 7190 | #include <sys/types.h> |
| 7191 | #if STDC_HEADERS |
| 7192 | #include <stdlib.h> |
| 7193 | #include <stddef.h> |
| 7194 | #endif |
| 7195 | EOF |
| 7196 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 7197 | egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 7198 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7199 | ac_cv_type_socklen_t=yes |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7200 | else |
| 7201 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7202 | ac_cv_type_socklen_t=no |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7203 | fi |
| 7204 | rm -f conftest* |
| 7205 | |
| 7206 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7207 | echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 |
| 7208 | if test $ac_cv_type_socklen_t = no; then |
| 7209 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7210 | #define socklen_t int |
| 7211 | EOF |
| 7212 | |
| 7213 | fi |
| 7214 | |
| 7215 | |
Neil Schemenauer | f25cf6c | 2001-03-04 06:39:33 +0000 | [diff] [blame] | 7216 | # Add Python/ prefix to LIBOBJS |
| 7217 | libobjs=$LIBOBJS |
| 7218 | LIBOBJS= |
| 7219 | for obj in $libobjs; do |
| 7220 | LIBOBJS="$LIBOBJS Python/$obj" |
| 7221 | done |
| 7222 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7223 | #AC_MSG_CHECKING(for Modules/Setup) |
| 7224 | #if test ! -f Modules/Setup ; then |
| 7225 | # if test ! -d Modules ; then |
| 7226 | # mkdir Modules |
| 7227 | # fi |
| 7228 | # cp "$srcdir/Modules/Setup.dist" Modules/Setup |
| 7229 | # AC_MSG_RESULT(creating) |
| 7230 | #else |
| 7231 | # AC_MSG_RESULT(already exists) |
| 7232 | #fi |
| 7233 | |
| 7234 | |
Neil Schemenauer | acbf9ef | 2001-02-27 02:15:14 +0000 | [diff] [blame] | 7235 | SRCDIRS="Parser Grammar Objects Python Modules" |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7236 | echo $ac_n "checking for build directories""... $ac_c" 1>&6 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame^] | 7237 | echo "configure:7238: checking for build directories" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7238 | for dir in $SRCDIRS; do |
| 7239 | if test ! -d $dir; then |
| 7240 | mkdir $dir |
Guido van Rossum | 262cf20 | 2000-11-02 19:33:53 +0000 | [diff] [blame] | 7241 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7242 | done |
| 7243 | echo "$ac_t""done" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 7244 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7245 | # generate output files |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7246 | trap '' 1 2 15 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7247 | cat > confcache <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7248 | # This file is a shell script that caches the results of configure |
| 7249 | # tests run on this system so they can be shared between configure |
| 7250 | # scripts and configure runs. It is not useful on other systems. |
| 7251 | # If it contains results you don't want to keep, you may remove or edit it. |
| 7252 | # |
| 7253 | # By default, configure uses ./config.cache as the cache file, |
| 7254 | # creating it if it does not exist already. You can give configure |
| 7255 | # the --cache-file=FILE option to use a different cache file; that is |
| 7256 | # what configure does when it calls configure scripts in |
| 7257 | # subdirectories, so they share the cache. |
| 7258 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| 7259 | # config.status only pays attention to the cache file if you give it the |
| 7260 | # --recheck option to rerun configure. |
| 7261 | # |
| 7262 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7263 | # The following way of writing the cache mishandles newlines in values, |
| 7264 | # but we know of no workaround that is simple, portable, and efficient. |
| 7265 | # So, don't put newlines in cache variables' values. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7266 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 7267 | # 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] | 7268 | (set) 2>&1 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7269 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7270 | *ac_space=\ *) |
| 7271 | # `set' does not quote correctly, so add quotes (double-quote substitution |
| 7272 | # turns \\\\ into \\, and sed turns \\ into \). |
| 7273 | sed -n \ |
| 7274 | -e "s/'/'\\\\''/g" \ |
| 7275 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| 7276 | ;; |
| 7277 | *) |
| 7278 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 7279 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| 7280 | ;; |
| 7281 | esac >> confcache |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7282 | if cmp -s $cache_file confcache; then |
| 7283 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7284 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7285 | if test -w $cache_file; then |
| 7286 | echo "updating cache $cache_file" |
| 7287 | cat confcache > $cache_file |
| 7288 | else |
| 7289 | echo "not updating unwritable cache $cache_file" |
| 7290 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7291 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7292 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7293 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7294 | 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] | 7295 | |
| 7296 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 7297 | # Let make expand exec_prefix. |
| 7298 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7299 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7300 | # Any assignment to VPATH causes Sun make to only execute |
| 7301 | # the first set of double-colon rules, so remove it if not needed. |
| 7302 | # If there is a colon in the path, we need to keep it. |
| 7303 | if test "x$srcdir" = x.; then |
| 7304 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
| 7305 | fi |
| 7306 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7307 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7308 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7309 | DEFS=-DHAVE_CONFIG_H |
| 7310 | |
| 7311 | # Without the "./", some shells look in PATH for config.status. |
| 7312 | : ${CONFIG_STATUS=./config.status} |
| 7313 | |
| 7314 | echo creating $CONFIG_STATUS |
| 7315 | rm -f $CONFIG_STATUS |
| 7316 | cat > $CONFIG_STATUS <<EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7317 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7318 | # Generated automatically by configure. |
| 7319 | # Run this file to recreate the current configuration. |
| 7320 | # This directory was configured as follows, |
| 7321 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 7322 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7323 | # $0 $ac_configure_args |
| 7324 | # |
| 7325 | # Compiler output produced by configure, useful for debugging |
| 7326 | # configure, is in ./config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7327 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7328 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7329 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7330 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7331 | case "\$ac_option" in |
| 7332 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7333 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
| 7334 | 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] | 7335 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7336 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7337 | exit 0 ;; |
| 7338 | -help | --help | --hel | --he | --h) |
| 7339 | echo "\$ac_cs_usage"; exit 0 ;; |
| 7340 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7341 | esac |
| 7342 | done |
| 7343 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7344 | ac_given_srcdir=$srcdir |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7345 | ac_given_INSTALL="$INSTALL" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7346 | |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7347 | 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] | 7348 | EOF |
| 7349 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7350 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7351 | # Protect against being on the right side of a sed subst in config.status. |
| 7352 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 7353 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7354 | $ac_vpsub |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7355 | $extrasub |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7356 | s%@SHELL@%$SHELL%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7357 | s%@CFLAGS@%$CFLAGS%g |
| 7358 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 7359 | s%@CXXFLAGS@%$CXXFLAGS%g |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7360 | s%@FFLAGS@%$FFLAGS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7361 | s%@DEFS@%$DEFS%g |
| 7362 | s%@LDFLAGS@%$LDFLAGS%g |
| 7363 | s%@LIBS@%$LIBS%g |
| 7364 | s%@exec_prefix@%$exec_prefix%g |
| 7365 | s%@prefix@%$prefix%g |
| 7366 | s%@program_transform_name@%$program_transform_name%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7367 | s%@bindir@%$bindir%g |
| 7368 | s%@sbindir@%$sbindir%g |
| 7369 | s%@libexecdir@%$libexecdir%g |
| 7370 | s%@datadir@%$datadir%g |
| 7371 | s%@sysconfdir@%$sysconfdir%g |
| 7372 | s%@sharedstatedir@%$sharedstatedir%g |
| 7373 | s%@localstatedir@%$localstatedir%g |
| 7374 | s%@libdir@%$libdir%g |
| 7375 | s%@includedir@%$includedir%g |
| 7376 | s%@oldincludedir@%$oldincludedir%g |
| 7377 | s%@infodir@%$infodir%g |
| 7378 | s%@mandir@%$mandir%g |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 7379 | s%@VERSION@%$VERSION%g |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 7380 | s%@CONFIG_ARGS@%$CONFIG_ARGS%g |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 7381 | s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g |
| 7382 | s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g |
| 7383 | s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g |
| 7384 | s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 7385 | s%@MACHDEP@%$MACHDEP%g |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 7386 | s%@SGI_ABI@%$SGI_ABI%g |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 7387 | s%@CXX@%$CXX%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7388 | s%@MAINOBJ@%$MAINOBJ%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7389 | s%@CC@%$CC%g |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 7390 | s%@CPP@%$CPP%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7391 | s%@EXEEXT@%$EXEEXT%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7392 | s%@LIBRARY@%$LIBRARY%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7393 | s%@LDLIBRARY@%$LDLIBRARY%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7394 | s%@DLLLIBRARY@%$DLLLIBRARY%g |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 7395 | s%@BLDLIBRARY@%$BLDLIBRARY%g |
| 7396 | s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 7397 | s%@LINKCC@%$LINKCC%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7398 | s%@RANLIB@%$RANLIB%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7399 | s%@AR@%$AR%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7400 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7401 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7402 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 7403 | s%@LN@%$LN%g |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 7404 | s%@OPT@%$OPT%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7405 | s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7406 | s%@SO@%$SO%g |
| 7407 | s%@LDSHARED@%$LDSHARED%g |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 7408 | s%@BLDSHARED@%$BLDSHARED%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7409 | s%@CCSHARED@%$CCSHARED%g |
| 7410 | s%@LINKFORSHARED@%$LINKFORSHARED%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7411 | s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7412 | s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g |
| 7413 | s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 7414 | s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 7415 | s%@LDLAST@%$LDLAST%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7416 | s%@DLINCLDIR@%$DLINCLDIR%g |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 7417 | s%@DYNLOADFILE@%$DYNLOADFILE%g |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 7418 | s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7419 | s%@LIBOBJS@%$LIBOBJS%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7420 | s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g |
| 7421 | s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g |
| 7422 | 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] | 7423 | s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7424 | s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7425 | s%@LIBM@%$LIBM%g |
| 7426 | s%@LIBC@%$LIBC%g |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7427 | s%@UNICODE_OBJS@%$UNICODE_OBJS%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7428 | s%@SRCDIRS@%$SRCDIRS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7429 | |
| 7430 | CEOF |
| 7431 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7432 | |
| 7433 | cat >> $CONFIG_STATUS <<\EOF |
| 7434 | |
| 7435 | # Split the substitutions into bite-sized pieces for seds with |
| 7436 | # small command number limits, like on Digital OSF/1 and HP-UX. |
| 7437 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 7438 | ac_file=1 # Number of current file. |
| 7439 | ac_beg=1 # First line for current file. |
| 7440 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 7441 | ac_more_lines=: |
| 7442 | ac_sed_cmds="" |
| 7443 | while $ac_more_lines; do |
| 7444 | if test $ac_beg -gt 1; then |
| 7445 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7446 | else |
| 7447 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7448 | fi |
| 7449 | if test ! -s conftest.s$ac_file; then |
| 7450 | ac_more_lines=false |
| 7451 | rm -f conftest.s$ac_file |
| 7452 | else |
| 7453 | if test -z "$ac_sed_cmds"; then |
| 7454 | ac_sed_cmds="sed -f conftest.s$ac_file" |
| 7455 | else |
| 7456 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
| 7457 | fi |
| 7458 | ac_file=`expr $ac_file + 1` |
| 7459 | ac_beg=$ac_end |
| 7460 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
| 7461 | fi |
| 7462 | done |
| 7463 | if test -z "$ac_sed_cmds"; then |
| 7464 | ac_sed_cmds=cat |
| 7465 | fi |
| 7466 | EOF |
| 7467 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7468 | cat >> $CONFIG_STATUS <<EOF |
| 7469 | |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7470 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"} |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7471 | EOF |
| 7472 | cat >> $CONFIG_STATUS <<\EOF |
| 7473 | 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] | 7474 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7475 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7476 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7477 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7478 | *) ac_file_in="${ac_file}.in" ;; |
| 7479 | esac |
| 7480 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7481 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7482 | |
| 7483 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7484 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7485 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7486 | # The file is in a subdirectory. |
| 7487 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7488 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7489 | # A "../" for each directory in $ac_dir_suffix. |
| 7490 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
| 7491 | else |
| 7492 | ac_dir_suffix= ac_dots= |
| 7493 | fi |
| 7494 | |
| 7495 | case "$ac_given_srcdir" in |
| 7496 | .) srcdir=. |
| 7497 | if test -z "$ac_dots"; then top_srcdir=. |
| 7498 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
| 7499 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; |
| 7500 | *) # Relative path. |
| 7501 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 7502 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
| 7503 | esac |
| 7504 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7505 | case "$ac_given_INSTALL" in |
| 7506 | [/$]*) INSTALL="$ac_given_INSTALL" ;; |
| 7507 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
| 7508 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7509 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7510 | echo creating "$ac_file" |
| 7511 | rm -f "$ac_file" |
| 7512 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
| 7513 | case "$ac_file" in |
| 7514 | *Makefile*) ac_comsub="1i\\ |
| 7515 | # $configure_input" ;; |
| 7516 | *) ac_comsub= ;; |
| 7517 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7518 | |
| 7519 | 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] | 7520 | sed -e "$ac_comsub |
| 7521 | s%@configure_input@%$configure_input%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7522 | s%@srcdir@%$srcdir%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7523 | s%@top_srcdir@%$top_srcdir%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7524 | s%@INSTALL@%$INSTALL%g |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7525 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7526 | fi; done |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7527 | rm -f conftest.s* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7528 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7529 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
| 7530 | # 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] | 7531 | # |
| 7532 | # ac_d sets the value in "#define NAME VALUE" lines. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7533 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 7534 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7535 | ac_dC='\3' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7536 | ac_dD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7537 | # 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] | 7538 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7539 | ac_uB='\([ ]\)%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7540 | ac_uC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7541 | ac_uD='\4%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7542 | # 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] | 7543 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7544 | ac_eB='$%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7545 | ac_eC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7546 | ac_eD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7547 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7548 | if test "${CONFIG_HEADERS+set}" != set; then |
| 7549 | EOF |
| 7550 | cat >> $CONFIG_STATUS <<EOF |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7551 | CONFIG_HEADERS="pyconfig.h" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7552 | EOF |
| 7553 | cat >> $CONFIG_STATUS <<\EOF |
| 7554 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7555 | 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] | 7556 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7557 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7558 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7559 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7560 | *) ac_file_in="${ac_file}.in" ;; |
| 7561 | esac |
| 7562 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7563 | echo creating $ac_file |
| 7564 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7565 | rm -f conftest.frag conftest.in conftest.out |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7566 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 7567 | cat $ac_file_inputs > conftest.in |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7568 | |
| 7569 | EOF |
| 7570 | |
| 7571 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
| 7572 | # 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] | 7573 | # 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] | 7574 | # Protect against being in an unquoted here document in config.status. |
| 7575 | rm -f conftest.vals |
| 7576 | cat > conftest.hdr <<\EOF |
| 7577 | s/[\\&%]/\\&/g |
| 7578 | s%[\\$`]%\\&%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7579 | 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] | 7580 | s%ac_d%ac_u%gp |
| 7581 | s%ac_u%ac_e%gp |
| 7582 | EOF |
| 7583 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
| 7584 | rm -f conftest.hdr |
| 7585 | |
| 7586 | # This sed command replaces #undef with comments. This is necessary, for |
| 7587 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 7588 | # on some systems where configure will not decide to define it. |
| 7589 | cat >> conftest.vals <<\EOF |
| 7590 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
| 7591 | EOF |
| 7592 | |
| 7593 | # Break up conftest.vals because some shells have a limit on |
| 7594 | # 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] | 7595 | |
| 7596 | rm -f conftest.tail |
| 7597 | while : |
| 7598 | do |
| 7599 | ac_lines=`grep -c . conftest.vals` |
| 7600 | # grep -c gives empty output for an empty file on some AIX systems. |
| 7601 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 7602 | # Write a limited-size here document to conftest.frag. |
| 7603 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
| 7604 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
| 7605 | echo 'CEOF |
| 7606 | sed -f conftest.frag conftest.in > conftest.out |
| 7607 | rm -f conftest.in |
| 7608 | mv conftest.out conftest.in |
| 7609 | ' >> $CONFIG_STATUS |
| 7610 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
| 7611 | rm -f conftest.vals |
| 7612 | mv conftest.tail conftest.vals |
| 7613 | done |
| 7614 | rm -f conftest.vals |
| 7615 | |
| 7616 | cat >> $CONFIG_STATUS <<\EOF |
| 7617 | rm -f conftest.frag conftest.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7618 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7619 | cat conftest.in >> conftest.h |
| 7620 | rm -f conftest.in |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7621 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7622 | echo "$ac_file is unchanged" |
| 7623 | rm -f conftest.h |
| 7624 | else |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7625 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7626 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7627 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7628 | # The file is in a subdirectory. |
| 7629 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 7630 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7631 | rm -f $ac_file |
| 7632 | mv conftest.h $ac_file |
| 7633 | fi |
| 7634 | fi; done |
| 7635 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7636 | EOF |
| 7637 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7638 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7639 | EOF |
| 7640 | cat >> $CONFIG_STATUS <<\EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7641 | |
| 7642 | exit 0 |
| 7643 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7644 | chmod +x $CONFIG_STATUS |
| 7645 | rm -fr confdefs* $ac_clean_files |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7646 | 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] | 7647 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7648 | |
| 7649 | echo "creating Setup" |
| 7650 | if test ! -f Modules/Setup |
| 7651 | then |
| 7652 | cp $srcdir/Modules/Setup.dist Modules/Setup |
| 7653 | fi |
| 7654 | |
| 7655 | echo "creating Setup.local" |
| 7656 | if test ! -f Modules/Setup.local |
| 7657 | then |
| 7658 | echo "# Edit this file for local setup changes" >Modules/Setup.local |
| 7659 | fi |
| 7660 | |
| 7661 | echo "creating Makefile" |
| 7662 | $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ |
| 7663 | -s Modules Modules/Setup.config \ |
Neil Schemenauer | f8b71c5 | 2001-04-21 17:41:16 +0000 | [diff] [blame] | 7664 | Modules/Setup.local Modules/Setup |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 7665 | mv config.c Modules |