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 | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3 | # From configure.in Revision: 1.251 |
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 | PYTHONFRAMEWORK=Python |
| 587 | PYTHONFRAMEWORKDIR=Python.framework |
| 588 | case $enableval in |
| 589 | yes) |
| 590 | enableval=/Library/Frameworks |
| 591 | PYTHONFRAMEWORKPREFIX=$enableval |
| 592 | ;; |
| 593 | *) |
| 594 | PYTHONFRAMEWORKPREFIX=$enableval |
| 595 | esac |
| 596 | PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR |
| 597 | prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 598 | |
| 599 | else |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 600 | |
| 601 | PYTHONFRAMEWORK= |
| 602 | PYTHONFRAMEWORKDIR= |
| 603 | PYTHONFRAMEWORKPREFIX= |
| 604 | PYTHONFRAMEWORKINSTALLDIR= |
| 605 | enable_framework= |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 606 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 607 | fi |
| 608 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 609 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 610 | |
| 611 | |
| 612 | |
| 613 | |
| 614 | ##AC_ARG_WITH(dyld, |
| 615 | ##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,) |
| 616 | ## |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 617 | # Set name for machine-dependent library files |
| 618 | |
| 619 | echo $ac_n "checking MACHDEP""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 620 | echo "configure:621: checking MACHDEP" >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 621 | if test -z "$MACHDEP" |
| 622 | then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 623 | ac_sys_system=`uname -s` |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 624 | 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] | 625 | ac_sys_release=`uname -v` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 626 | else |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 627 | ac_sys_release=`uname -r` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 628 | fi |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 629 | ac_md_system=`echo $ac_sys_system | |
| 630 | tr -d '/ ' | tr '[A-Z]' '[a-z]'` |
| 631 | ac_md_release=`echo $ac_sys_release | |
| 632 | tr -d '/ ' | sed 's/\..*//'` |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 633 | MACHDEP="$ac_md_system$ac_md_release" |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 634 | |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 635 | case $MACHDEP in |
Andrew M. Kuchling | 5a3e4cb | 2001-07-20 19:29:04 +0000 | [diff] [blame] | 636 | cygwin*) MACHDEP="cygwin";; |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 637 | '') MACHDEP="unknown";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 638 | esac |
| 639 | fi |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 640 | |
| 641 | # |
| 642 | # SGI compilers allow the specification of the both the ABI and the |
| 643 | # ISA on the command line. Depending on the values of these switches, |
| 644 | # different and often incompatable code will be generated. |
| 645 | # |
| 646 | # The SGI_ABI variable can be used to modify the CC and LDFLAGS and |
| 647 | # thus supply support for various ABI/ISA combinations. The MACHDEP |
| 648 | # variable is also adjusted. |
| 649 | # |
| 650 | |
| 651 | if test ! -z "$SGI_ABI" |
| 652 | then |
| 653 | CC="cc $SGI_ABI" |
| 654 | LDFLAGS="$SGI_ABI $LDFLAGS" |
| 655 | MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'` |
| 656 | fi |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 657 | echo "$ac_t""$MACHDEP" 1>&6 |
| 658 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 659 | # checks for alternative programs |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 660 | echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 661 | echo "configure:662: checking for --without-gcc" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 662 | # Check whether --with-gcc or --without-gcc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 663 | if test "${with_gcc+set}" = set; then |
| 664 | withval="$with_gcc" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 665 | |
| 666 | case $withval in |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 667 | no) CC=cc |
| 668 | without_gcc=yes;; |
| 669 | yes) CC=gcc |
| 670 | without_gcc=no;; |
| 671 | *) CC=$withval |
| 672 | without_gcc=$withval;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 673 | esac |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 674 | else |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 675 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 676 | case $ac_sys_system in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 677 | AIX*) CC=cc_r |
| 678 | without_gcc=;; |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 679 | BeOS*) |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 680 | case $BE_HOST_CPU in |
| 681 | ppc) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 682 | CC=mwcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 683 | without_gcc=yes |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 684 | 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] | 685 | CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 686 | LDFLAGS="$LDFLAGS -nodup" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 687 | ;; |
| 688 | x86) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 689 | CC=gcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 690 | without_gcc=no |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 691 | OPT=-O |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 692 | ;; |
| 693 | *) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 694 | { 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] | 695 | ;; |
| 696 | esac |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 697 | AR="\$(srcdir)/Modules/ar_beos" |
| 698 | RANLIB=: |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 699 | ;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 700 | Monterey*) |
| 701 | RANLIB=: |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 702 | without_gcc=;; |
| 703 | *) without_gcc=no;; |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 704 | esac |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 705 | fi |
| 706 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 707 | echo "$ac_t""$without_gcc" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 708 | |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 709 | |
| 710 | |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 711 | MAINOBJ=python.o |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 712 | echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 713 | echo "configure:714: checking for --with-cxx=<compiler>" >&5 |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 714 | # Check whether --with-cxx or --without-cxx was given. |
| 715 | if test "${with_cxx+set}" = set; then |
| 716 | withval="$with_cxx" |
| 717 | |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 718 | check_cxx=no |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 719 | case $withval in |
| 720 | no) CXX= |
| 721 | with_cxx=no;; |
| 722 | *) CXX=$withval |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 723 | MAINOBJ=ccpython.o |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 724 | with_cxx=$withval;; |
| 725 | esac |
| 726 | else |
| 727 | |
| 728 | with_cxx=no |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 729 | check_cxx=yes |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 730 | |
| 731 | fi |
| 732 | |
| 733 | echo "$ac_t""$with_cxx" 1>&6 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 734 | |
| 735 | |
| 736 | if test "$check_cxx" = "yes" |
| 737 | then |
| 738 | for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl |
| 739 | do |
| 740 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 741 | set dummy $ac_prog; ac_word=$2 |
| 742 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 743 | echo "configure:744: checking for $ac_word" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 744 | if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then |
| 745 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 746 | else |
| 747 | if test -n "$CXX"; then |
| 748 | ac_cv_prog_CXX="$CXX" # Let the user override the test. |
| 749 | else |
| 750 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 751 | ac_dummy="$PATH" |
| 752 | for ac_dir in $ac_dummy; do |
| 753 | test -z "$ac_dir" && ac_dir=. |
| 754 | if test -f $ac_dir/$ac_word; then |
| 755 | ac_cv_prog_CXX="$ac_prog" |
| 756 | break |
| 757 | fi |
| 758 | done |
| 759 | IFS="$ac_save_ifs" |
| 760 | fi |
| 761 | fi |
| 762 | CXX="$ac_cv_prog_CXX" |
| 763 | if test -n "$CXX"; then |
| 764 | echo "$ac_t""$CXX" 1>&6 |
| 765 | else |
| 766 | echo "$ac_t""no" 1>&6 |
| 767 | fi |
| 768 | |
| 769 | test -n "$CXX" && break |
| 770 | done |
| 771 | test -n "$CXX" || CXX="notfound" |
| 772 | |
| 773 | if test "$CXX" = "notfound" |
| 774 | then |
| 775 | CXX= |
| 776 | else |
| 777 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 778 | echo "configure:779: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 779 | |
| 780 | ac_ext=C |
| 781 | # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 782 | ac_cpp='$CXXCPP $CPPFLAGS' |
| 783 | ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 784 | ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 785 | cross_compiling=$ac_cv_prog_cxx_cross |
| 786 | |
| 787 | cat > conftest.$ac_ext << EOF |
| 788 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 789 | #line 790 "configure" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 790 | #include "confdefs.h" |
| 791 | |
| 792 | int main(){return(0);} |
| 793 | EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 794 | if { (eval echo configure:795: \"$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] | 795 | ac_cv_prog_cxx_works=yes |
| 796 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 797 | if (./conftest; exit) 2>/dev/null; then |
| 798 | ac_cv_prog_cxx_cross=no |
| 799 | else |
| 800 | ac_cv_prog_cxx_cross=yes |
| 801 | fi |
| 802 | else |
| 803 | echo "configure: failed program was:" >&5 |
| 804 | cat conftest.$ac_ext >&5 |
| 805 | ac_cv_prog_cxx_works=no |
| 806 | fi |
| 807 | rm -fr conftest* |
| 808 | ac_ext=c |
| 809 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 810 | ac_cpp='$CPP $CPPFLAGS' |
| 811 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 812 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 813 | cross_compiling=$ac_cv_prog_cc_cross |
| 814 | |
| 815 | echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 |
| 816 | if test $ac_cv_prog_cxx_works = no; then |
| 817 | { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } |
| 818 | fi |
| 819 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 820 | echo "configure:821: 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] | 821 | echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 |
| 822 | cross_compiling=$ac_cv_prog_cxx_cross |
| 823 | |
| 824 | fi |
| 825 | fi |
| 826 | |
Guido van Rossum | 8b131c5 | 1995-03-09 14:10:13 +0000 | [diff] [blame] | 827 | # If the user switches compilers, we can't believe the cache |
| 828 | if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" |
| 829 | then |
| 830 | { echo "configure: error: cached CC is different -- throw away $cache_file |
| 831 | (it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; } |
| 832 | fi |
| 833 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 834 | # Extract the first word of "gcc", so it can be a program name with args. |
| 835 | set dummy gcc; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 836 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 837 | echo "configure:838: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 838 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 839 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 840 | else |
| 841 | if test -n "$CC"; then |
| 842 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 843 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 844 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 845 | ac_dummy="$PATH" |
| 846 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 847 | test -z "$ac_dir" && ac_dir=. |
| 848 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 849 | ac_cv_prog_CC="gcc" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 850 | break |
| 851 | fi |
| 852 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 853 | IFS="$ac_save_ifs" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 854 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 855 | fi |
| 856 | CC="$ac_cv_prog_CC" |
| 857 | if test -n "$CC"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 858 | echo "$ac_t""$CC" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 859 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 860 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 861 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 862 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 863 | if test -z "$CC"; then |
| 864 | # Extract the first word of "cc", so it can be a program name with args. |
| 865 | set dummy cc; ac_word=$2 |
| 866 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 867 | echo "configure:868: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 868 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 869 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 870 | else |
| 871 | if test -n "$CC"; then |
| 872 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 873 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 874 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 875 | ac_prog_rejected=no |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 876 | ac_dummy="$PATH" |
| 877 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 878 | test -z "$ac_dir" && ac_dir=. |
| 879 | if test -f $ac_dir/$ac_word; then |
| 880 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then |
| 881 | ac_prog_rejected=yes |
| 882 | continue |
| 883 | fi |
| 884 | ac_cv_prog_CC="cc" |
| 885 | break |
| 886 | fi |
| 887 | done |
| 888 | IFS="$ac_save_ifs" |
| 889 | if test $ac_prog_rejected = yes; then |
| 890 | # We found a bogon in the path, so make sure we never use it. |
| 891 | set dummy $ac_cv_prog_CC |
| 892 | shift |
| 893 | if test $# -gt 0; then |
| 894 | # We chose a different compiler from the bogus one. |
| 895 | # However, it has the same basename, so the bogon will be chosen |
| 896 | # first if we set CC to just the basename; use the full file name. |
| 897 | shift |
| 898 | set dummy "$ac_dir/$ac_word" "$@" |
| 899 | shift |
| 900 | ac_cv_prog_CC="$@" |
| 901 | fi |
| 902 | fi |
| 903 | fi |
| 904 | fi |
| 905 | CC="$ac_cv_prog_CC" |
| 906 | if test -n "$CC"; then |
| 907 | echo "$ac_t""$CC" 1>&6 |
| 908 | else |
| 909 | echo "$ac_t""no" 1>&6 |
| 910 | fi |
| 911 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 912 | if test -z "$CC"; then |
| 913 | case "`uname -s`" in |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 914 | *win32* | *WIN32*) |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 915 | # Extract the first word of "cl", so it can be a program name with args. |
| 916 | set dummy cl; ac_word=$2 |
| 917 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 918 | echo "configure:919: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 919 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 920 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 921 | else |
| 922 | if test -n "$CC"; then |
| 923 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 924 | else |
| 925 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 926 | ac_dummy="$PATH" |
| 927 | for ac_dir in $ac_dummy; do |
| 928 | test -z "$ac_dir" && ac_dir=. |
| 929 | if test -f $ac_dir/$ac_word; then |
| 930 | ac_cv_prog_CC="cl" |
| 931 | break |
| 932 | fi |
| 933 | done |
| 934 | IFS="$ac_save_ifs" |
| 935 | fi |
| 936 | fi |
| 937 | CC="$ac_cv_prog_CC" |
| 938 | if test -n "$CC"; then |
| 939 | echo "$ac_t""$CC" 1>&6 |
| 940 | else |
| 941 | echo "$ac_t""no" 1>&6 |
| 942 | fi |
| 943 | ;; |
| 944 | esac |
| 945 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 946 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
| 947 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 948 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 949 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 950 | echo "configure:951: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 951 | |
| 952 | ac_ext=c |
| 953 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 954 | ac_cpp='$CPP $CPPFLAGS' |
| 955 | 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] | 956 | 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] | 957 | cross_compiling=$ac_cv_prog_cc_cross |
| 958 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 959 | cat > conftest.$ac_ext << EOF |
| 960 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 961 | #line 962 "configure" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 962 | #include "confdefs.h" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 963 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 964 | main(){return(0);} |
| 965 | EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 966 | if { (eval echo configure:967: \"$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] | 967 | ac_cv_prog_cc_works=yes |
| 968 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 969 | if (./conftest; exit) 2>/dev/null; then |
| 970 | ac_cv_prog_cc_cross=no |
| 971 | else |
| 972 | ac_cv_prog_cc_cross=yes |
| 973 | fi |
| 974 | else |
| 975 | echo "configure: failed program was:" >&5 |
| 976 | cat conftest.$ac_ext >&5 |
| 977 | ac_cv_prog_cc_works=no |
| 978 | fi |
| 979 | rm -fr conftest* |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 980 | ac_ext=c |
| 981 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 982 | ac_cpp='$CPP $CPPFLAGS' |
| 983 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 984 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 985 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 986 | |
| 987 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
| 988 | if test $ac_cv_prog_cc_works = no; then |
| 989 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } |
| 990 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 991 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 992 | echo "configure:993: 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] | 993 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
| 994 | cross_compiling=$ac_cv_prog_cc_cross |
| 995 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 996 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 997 | echo "configure:998: checking whether we are using GNU C" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 998 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 999 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1000 | else |
| 1001 | cat > conftest.c <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1002 | #ifdef __GNUC__ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1003 | yes; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1004 | #endif |
| 1005 | EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1006 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1007: \"$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] | 1007 | ac_cv_prog_gcc=yes |
| 1008 | else |
| 1009 | ac_cv_prog_gcc=no |
| 1010 | fi |
| 1011 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1012 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1013 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1014 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1015 | if test $ac_cv_prog_gcc = yes; then |
| 1016 | GCC=yes |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1017 | else |
| 1018 | GCC= |
| 1019 | fi |
| 1020 | |
| 1021 | ac_test_CFLAGS="${CFLAGS+set}" |
| 1022 | ac_save_CFLAGS="$CFLAGS" |
| 1023 | CFLAGS= |
| 1024 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1025 | echo "configure:1026: checking whether ${CC-cc} accepts -g" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1026 | 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] | 1027 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1028 | else |
| 1029 | echo 'void f(){}' > conftest.c |
| 1030 | 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] | 1031 | ac_cv_prog_cc_g=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1032 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1033 | ac_cv_prog_cc_g=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1034 | fi |
| 1035 | rm -f conftest* |
| 1036 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1037 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1038 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1039 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1040 | if test "$ac_test_CFLAGS" = set; then |
| 1041 | CFLAGS="$ac_save_CFLAGS" |
| 1042 | elif test $ac_cv_prog_cc_g = yes; then |
| 1043 | if test "$GCC" = yes; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1044 | CFLAGS="-g -O2" |
| 1045 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1046 | CFLAGS="-g" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1047 | fi |
| 1048 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1049 | if test "$GCC" = yes; then |
| 1050 | CFLAGS="-O2" |
| 1051 | else |
| 1052 | CFLAGS= |
| 1053 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1054 | fi |
| 1055 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1056 | |
| 1057 | # checks for UNIX variants that set C preprocessor variables |
| 1058 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1059 | echo "configure:1060: checking how to run the C preprocessor" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1060 | # On Suns, sometimes $CPP names a directory. |
| 1061 | if test -n "$CPP" && test -d "$CPP"; then |
| 1062 | CPP= |
| 1063 | fi |
| 1064 | if test -z "$CPP"; then |
| 1065 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
| 1066 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1067 | else |
| 1068 | # This must be in double quotes, not single quotes, because CPP may get |
| 1069 | # substituted into the Makefile and "${CC-cc}" will confuse make. |
| 1070 | CPP="${CC-cc} -E" |
| 1071 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 1072 | # not just through cpp. |
| 1073 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1074 | #line 1075 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1075 | #include "confdefs.h" |
| 1076 | #include <assert.h> |
| 1077 | Syntax Error |
| 1078 | EOF |
| 1079 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1080 | { (eval echo configure:1081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1081 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1082 | if test -z "$ac_err"; then |
| 1083 | : |
| 1084 | else |
| 1085 | echo "$ac_err" >&5 |
| 1086 | echo "configure: failed program was:" >&5 |
| 1087 | cat conftest.$ac_ext >&5 |
| 1088 | rm -rf conftest* |
| 1089 | CPP="${CC-cc} -E -traditional-cpp" |
| 1090 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1091 | #line 1092 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1092 | #include "confdefs.h" |
| 1093 | #include <assert.h> |
| 1094 | Syntax Error |
| 1095 | EOF |
| 1096 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1097 | { (eval echo configure:1098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1098 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1099 | if test -z "$ac_err"; then |
| 1100 | : |
| 1101 | else |
| 1102 | echo "$ac_err" >&5 |
| 1103 | echo "configure: failed program was:" >&5 |
| 1104 | cat conftest.$ac_ext >&5 |
| 1105 | rm -rf conftest* |
| 1106 | CPP="${CC-cc} -nologo -E" |
| 1107 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1108 | #line 1109 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1109 | #include "confdefs.h" |
| 1110 | #include <assert.h> |
| 1111 | Syntax Error |
| 1112 | EOF |
| 1113 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1114 | { (eval echo configure:1115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1115 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1116 | if test -z "$ac_err"; then |
| 1117 | : |
| 1118 | else |
| 1119 | echo "$ac_err" >&5 |
| 1120 | echo "configure: failed program was:" >&5 |
| 1121 | cat conftest.$ac_ext >&5 |
| 1122 | rm -rf conftest* |
| 1123 | CPP=/lib/cpp |
| 1124 | fi |
| 1125 | rm -f conftest* |
| 1126 | fi |
| 1127 | rm -f conftest* |
| 1128 | fi |
| 1129 | rm -f conftest* |
| 1130 | ac_cv_prog_CPP="$CPP" |
| 1131 | fi |
| 1132 | CPP="$ac_cv_prog_CPP" |
| 1133 | else |
| 1134 | ac_cv_prog_CPP="$CPP" |
| 1135 | fi |
| 1136 | echo "$ac_t""$CPP" 1>&6 |
| 1137 | |
| 1138 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1139 | echo "configure:1140: checking for AIX" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1140 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1141 | #line 1142 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1142 | #include "confdefs.h" |
| 1143 | #ifdef _AIX |
| 1144 | yes |
| 1145 | #endif |
| 1146 | |
| 1147 | EOF |
| 1148 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1149 | egrep "yes" >/dev/null 2>&1; then |
| 1150 | rm -rf conftest* |
| 1151 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF |
| 1152 | #define _ALL_SOURCE 1 |
| 1153 | EOF |
| 1154 | |
| 1155 | else |
| 1156 | rm -rf conftest* |
| 1157 | echo "$ac_t""no" 1>&6 |
| 1158 | fi |
| 1159 | rm -f conftest* |
| 1160 | |
| 1161 | |
| 1162 | ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` |
| 1163 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1164 | echo "configure:1165: checking for minix/config.h" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1165 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 1166 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1167 | else |
| 1168 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1169 | #line 1170 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1170 | #include "confdefs.h" |
| 1171 | #include <minix/config.h> |
| 1172 | EOF |
| 1173 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1174 | { (eval echo configure:1175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1175 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1176 | if test -z "$ac_err"; then |
| 1177 | rm -rf conftest* |
| 1178 | eval "ac_cv_header_$ac_safe=yes" |
| 1179 | else |
| 1180 | echo "$ac_err" >&5 |
| 1181 | echo "configure: failed program was:" >&5 |
| 1182 | cat conftest.$ac_ext >&5 |
| 1183 | rm -rf conftest* |
| 1184 | eval "ac_cv_header_$ac_safe=no" |
| 1185 | fi |
| 1186 | rm -f conftest* |
| 1187 | fi |
| 1188 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 1189 | echo "$ac_t""yes" 1>&6 |
| 1190 | MINIX=yes |
| 1191 | else |
| 1192 | echo "$ac_t""no" 1>&6 |
| 1193 | MINIX= |
| 1194 | fi |
| 1195 | |
| 1196 | if test "$MINIX" = yes; then |
| 1197 | cat >> confdefs.h <<\EOF |
| 1198 | #define _POSIX_SOURCE 1 |
| 1199 | EOF |
| 1200 | |
| 1201 | cat >> confdefs.h <<\EOF |
| 1202 | #define _POSIX_1_SOURCE 2 |
| 1203 | EOF |
| 1204 | |
| 1205 | cat >> confdefs.h <<\EOF |
| 1206 | #define _MINIX 1 |
| 1207 | EOF |
| 1208 | |
| 1209 | fi |
| 1210 | |
| 1211 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1212 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1213 | echo "configure:1214: checking for Cygwin environment" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1214 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
| 1215 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1216 | else |
| 1217 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1218 | #line 1219 "configure" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1219 | #include "confdefs.h" |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1220 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1221 | int main() { |
| 1222 | |
| 1223 | #ifndef __CYGWIN__ |
| 1224 | #define __CYGWIN__ __CYGWIN32__ |
| 1225 | #endif |
| 1226 | return __CYGWIN__; |
| 1227 | ; return 0; } |
| 1228 | EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1229 | if { (eval echo configure:1230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1230 | rm -rf conftest* |
| 1231 | ac_cv_cygwin=yes |
| 1232 | else |
| 1233 | echo "configure: failed program was:" >&5 |
| 1234 | cat conftest.$ac_ext >&5 |
| 1235 | rm -rf conftest* |
| 1236 | ac_cv_cygwin=no |
| 1237 | fi |
| 1238 | rm -f conftest* |
| 1239 | rm -f conftest* |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1240 | fi |
| 1241 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1242 | echo "$ac_t""$ac_cv_cygwin" 1>&6 |
| 1243 | CYGWIN= |
| 1244 | test "$ac_cv_cygwin" = yes && CYGWIN=yes |
| 1245 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1246 | echo "configure:1247: checking for mingw32 environment" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1247 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
| 1248 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1249 | else |
| 1250 | cat > conftest.$ac_ext <<EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1251 | #line 1252 "configure" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1252 | #include "confdefs.h" |
| 1253 | |
| 1254 | int main() { |
| 1255 | return __MINGW32__; |
| 1256 | ; return 0; } |
| 1257 | EOF |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1258 | if { (eval echo configure:1259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1259 | rm -rf conftest* |
| 1260 | ac_cv_mingw32=yes |
| 1261 | else |
| 1262 | echo "configure: failed program was:" >&5 |
| 1263 | cat conftest.$ac_ext >&5 |
| 1264 | rm -rf conftest* |
| 1265 | ac_cv_mingw32=no |
| 1266 | fi |
| 1267 | rm -f conftest* |
| 1268 | rm -f conftest* |
| 1269 | fi |
| 1270 | |
| 1271 | echo "$ac_t""$ac_cv_mingw32" 1>&6 |
| 1272 | MINGW32= |
| 1273 | test "$ac_cv_mingw32" = yes && MINGW32=yes |
| 1274 | |
| 1275 | |
| 1276 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1277 | echo "configure:1278: checking for executable suffix" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1278 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
| 1279 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1280 | else |
| 1281 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then |
| 1282 | ac_cv_exeext=.exe |
| 1283 | else |
| 1284 | rm -f conftest* |
| 1285 | echo 'int main () { return 0; }' > conftest.$ac_ext |
| 1286 | ac_cv_exeext= |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1287 | if { (eval echo configure:1288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1288 | for file in conftest.*; do |
| 1289 | case $file in |
| 1290 | *.c | *.o | *.obj) ;; |
| 1291 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
| 1292 | esac |
| 1293 | done |
| 1294 | else |
| 1295 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } |
| 1296 | fi |
| 1297 | rm -f conftest* |
| 1298 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no |
| 1299 | fi |
| 1300 | fi |
| 1301 | |
| 1302 | EXEEXT="" |
| 1303 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} |
| 1304 | echo "$ac_t""${ac_cv_exeext}" 1>&6 |
| 1305 | ac_exeext=$EXEEXT |
| 1306 | |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1307 | echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1308 | echo "configure:1309: checking for --with-suffix" >&5 |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1309 | # Check whether --with-suffix or --without-suffix was given. |
| 1310 | if test "${with_suffix+set}" = set; then |
| 1311 | withval="$with_suffix" |
| 1312 | |
| 1313 | case $withval in |
| 1314 | no) EXEEXT=;; |
| 1315 | yes) EXEEXT=.exe;; |
| 1316 | *) EXEEXT=$withval;; |
| 1317 | esac |
| 1318 | fi |
| 1319 | |
| 1320 | echo "$ac_t""$EXEEXT" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1321 | # Test whether we're running on a non-case-sensitive system, in which |
| 1322 | # case we give a warning if no ext is given |
| 1323 | if test -d "python" -a -z "$EXEEXT" |
| 1324 | then |
| 1325 | echo "configure: warning: This filesystem is not case-sensitive so you should probably use --with-suffix" 1>&2 |
| 1326 | fi |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1327 | |
Guido van Rossum | dd997f7 | 1998-10-07 19:58:26 +0000 | [diff] [blame] | 1328 | case $MACHDEP in |
| 1329 | bsdos*) |
| 1330 | case $CC in |
| 1331 | gcc) CC="$CC -D_HAVE_BSDI";; |
| 1332 | esac;; |
| 1333 | esac |
| 1334 | |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1335 | case $ac_sys_system in |
| 1336 | hp*|HP*) |
| 1337 | case $CC in |
Guido van Rossum | cd5ff9f | 2000-09-22 16:15:54 +0000 | [diff] [blame] | 1338 | cc|*/cc) CC="$CC -Ae";; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1339 | esac;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1340 | Monterey*) |
| 1341 | case $CC in |
| 1342 | cc) CC="$CC -Wl,-Bexport";; |
| 1343 | esac;; |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1344 | SunOS*) |
| 1345 | # Some functions have a prototype only with that define, e.g. confstr |
| 1346 | cat >> confdefs.h <<\EOF |
| 1347 | #define __EXTENSIONS__ 1 |
| 1348 | EOF |
| 1349 | |
| 1350 | ;; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1351 | esac |
| 1352 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1353 | |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1354 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1355 | echo $ac_n "checking LIBRARY""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1356 | echo "configure:1357: checking LIBRARY" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1357 | if test -z "$LIBRARY" |
| 1358 | then |
| 1359 | LIBRARY='libpython$(VERSION).a' |
| 1360 | fi |
| 1361 | echo "$ac_t""$LIBRARY" 1>&6 |
| 1362 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1363 | # 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] | 1364 | # name of the library into which to insert object files). BLDLIBRARY is also |
| 1365 | # the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY |
| 1366 | # is blank as the main program is not linked directly against LDLIBRARY. |
| 1367 | # LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On |
| 1368 | # systems without shared libraries, LDLIBRARY is the same as LIBRARY |
| 1369 | # (defined in the Makefiles). On Cygwin LDLIBRARY is the import library, |
| 1370 | # DLLLIBRARY is the shared (i.e., DLL) library. |
| 1371 | # |
| 1372 | |
| 1373 | |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1374 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1375 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1376 | LDLIBRARY="$LIBRARY" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1377 | BLDLIBRARY='$(LDLIBRARY)' |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 1378 | DLLLIBRARY='' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1379 | LDLIBRARYDIR='' |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1380 | |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1381 | # LINKCC is the command that links the python executable -- default is $(CC). |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1382 | # 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] | 1383 | # linking. |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1384 | |
| 1385 | echo $ac_n "checking LINKCC""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1386 | echo "configure:1387: checking LINKCC" >&5 |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1387 | if test -z "$LINKCC" |
| 1388 | then |
| 1389 | case $ac_sys_system in |
| 1390 | AIX*) |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 1391 | LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 1392 | dgux*) |
| 1393 | LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1394 | Monterey64*) |
| 1395 | LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";; |
Guido van Rossum | 25f9303 | 1997-08-18 16:00:04 +0000 | [diff] [blame] | 1396 | *) LINKCC="\$(PURIFY) \$(CC)";; |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1397 | esac |
| 1398 | fi |
| 1399 | echo "$ac_t""$LINKCC" 1>&6 |
| 1400 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1401 | echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1402 | echo "configure:1403: checking LDLIBRARY" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1403 | |
| 1404 | # 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] | 1405 | case $MACHDEP in |
| 1406 | dguxR4) |
| 1407 | LDLIBRARY='libpython$(VERSION).so' |
| 1408 | OPT="$OPT -pic" |
| 1409 | ;; |
| 1410 | beos*) |
| 1411 | LDLIBRARY='libpython$(VERSION).so' |
| 1412 | ;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1413 | cygwin*) |
| 1414 | LDLIBRARY='libpython$(VERSION).dll.a' |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1415 | DLLLIBRARY='libpython$(VERSION).dll' |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1416 | ;; |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1417 | esac |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1418 | |
| 1419 | # MacOSX framework builds need more magic. LDLIBRARY is the dynamic library that |
| 1420 | # we build, but we do not want to link against it (we will find it with a -framework |
| 1421 | # option). For this reason there is an extra variable BLDLIBRARY against which Python |
| 1422 | # and the extension modules are linked, BLDLIBRARY. This is normally the same |
| 1423 | # as LDLIBRARY, but empty for MacOSX framework builds. |
| 1424 | if test "$enable_framework" |
| 1425 | then |
| 1426 | LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
| 1427 | LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)' |
| 1428 | BLDLIBRARY='' |
| 1429 | else |
| 1430 | BLDLIBRARY='$(LDLIBRARY)' |
| 1431 | fi |
| 1432 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1433 | echo "$ac_t""$LDLIBRARY" 1>&6 |
| 1434 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1435 | # Extract the first word of "ranlib", so it can be a program name with args. |
| 1436 | set dummy ranlib; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1437 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1438 | echo "configure:1439: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1439 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1440 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1441 | else |
| 1442 | if test -n "$RANLIB"; then |
| 1443 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 1444 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1445 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1446 | ac_dummy="$PATH" |
| 1447 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1448 | test -z "$ac_dir" && ac_dir=. |
| 1449 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1450 | ac_cv_prog_RANLIB="ranlib" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1451 | break |
| 1452 | fi |
| 1453 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1454 | IFS="$ac_save_ifs" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1455 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1456 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1457 | fi |
| 1458 | RANLIB="$ac_cv_prog_RANLIB" |
| 1459 | if test -n "$RANLIB"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1460 | echo "$ac_t""$RANLIB" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1461 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1462 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1463 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1464 | |
| 1465 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1466 | for ac_prog in ar aal |
| 1467 | do |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1468 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 1469 | set dummy $ac_prog; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1470 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1471 | echo "configure:1472: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1472 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1473 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1474 | else |
| 1475 | if test -n "$AR"; then |
| 1476 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 1477 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1478 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1479 | ac_dummy="$PATH" |
| 1480 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1481 | test -z "$ac_dir" && ac_dir=. |
| 1482 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1483 | ac_cv_prog_AR="$ac_prog" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1484 | break |
| 1485 | fi |
| 1486 | done |
| 1487 | IFS="$ac_save_ifs" |
| 1488 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1489 | fi |
| 1490 | AR="$ac_cv_prog_AR" |
| 1491 | if test -n "$AR"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1492 | echo "$ac_t""$AR" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1493 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1494 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1495 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1496 | |
| 1497 | test -n "$AR" && break |
| 1498 | done |
| 1499 | test -n "$AR" || AR="ar" |
| 1500 | |
Neil Schemenauer | a42c827 | 2001-03-31 00:01:55 +0000 | [diff] [blame] | 1501 | |
| 1502 | case $MACHDEP in |
| 1503 | bsdos*) |
| 1504 | # install -d does not work on BSDI |
| 1505 | if test -z "$INSTALL" |
| 1506 | then |
| 1507 | INSTALL="${srcdir}/install-sh -c" |
| 1508 | fi |
| 1509 | esac |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1510 | ac_aux_dir= |
| 1511 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
| 1512 | if test -f $ac_dir/install-sh; then |
| 1513 | ac_aux_dir=$ac_dir |
| 1514 | ac_install_sh="$ac_aux_dir/install-sh -c" |
| 1515 | break |
| 1516 | elif test -f $ac_dir/install.sh; then |
| 1517 | ac_aux_dir=$ac_dir |
| 1518 | ac_install_sh="$ac_aux_dir/install.sh -c" |
| 1519 | break |
| 1520 | fi |
| 1521 | done |
| 1522 | if test -z "$ac_aux_dir"; then |
| 1523 | { 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] | 1524 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1525 | ac_config_guess=$ac_aux_dir/config.guess |
| 1526 | ac_config_sub=$ac_aux_dir/config.sub |
| 1527 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. |
| 1528 | |
| 1529 | # Find a good install program. We prefer a C program (faster), |
| 1530 | # so one script is as good as another. But avoid the broken or |
| 1531 | # incompatible versions: |
| 1532 | # SysV /etc/install, /usr/sbin/install |
| 1533 | # SunOS /usr/etc/install |
| 1534 | # IRIX /sbin/install |
| 1535 | # AIX /bin/install |
| 1536 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
| 1537 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
| 1538 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
| 1539 | # ./install, which can be erroneously created by make from ./install.sh. |
| 1540 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1541 | echo "configure:1542: checking for a BSD compatible install" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1542 | if test -z "$INSTALL"; then |
| 1543 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
| 1544 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1545 | else |
| 1546 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" |
| 1547 | for ac_dir in $PATH; do |
| 1548 | # Account for people who put trailing slashes in PATH elements. |
| 1549 | case "$ac_dir/" in |
| 1550 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; |
| 1551 | *) |
| 1552 | # OSF1 and SCO ODT 3.0 have their own names for install. |
| 1553 | # Don't use installbsd from OSF since it installs stuff as root |
| 1554 | # by default. |
| 1555 | for ac_prog in ginstall scoinst install; do |
| 1556 | if test -f $ac_dir/$ac_prog; then |
| 1557 | if test $ac_prog = install && |
| 1558 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then |
| 1559 | # AIX install. It has an incompatible calling convention. |
| 1560 | : |
| 1561 | else |
| 1562 | ac_cv_path_install="$ac_dir/$ac_prog -c" |
| 1563 | break 2 |
| 1564 | fi |
| 1565 | fi |
| 1566 | done |
| 1567 | ;; |
| 1568 | esac |
| 1569 | done |
| 1570 | IFS="$ac_save_IFS" |
| 1571 | |
| 1572 | fi |
| 1573 | if test "${ac_cv_path_install+set}" = set; then |
| 1574 | INSTALL="$ac_cv_path_install" |
| 1575 | else |
| 1576 | # As a last resort, use the slow shell script. We don't cache a |
| 1577 | # path for INSTALL within a source directory, because that will |
| 1578 | # break other packages using the cache if that directory is |
| 1579 | # removed, or if the path is relative. |
| 1580 | INSTALL="$ac_install_sh" |
| 1581 | fi |
| 1582 | fi |
| 1583 | echo "$ac_t""$INSTALL" 1>&6 |
| 1584 | |
| 1585 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
| 1586 | # It thinks the first close brace ends the variable substitution. |
| 1587 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' |
| 1588 | |
| 1589 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
| 1590 | |
| 1591 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
| 1592 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1593 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1594 | # Not every filesystem supports hard links |
| 1595 | |
| 1596 | if test -z "$LN" ; then |
| 1597 | case $ac_sys_system in |
| 1598 | BeOS*) LN="ln -s";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1599 | CYGWIN*) LN="ln -s";; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1600 | *) LN=ln;; |
| 1601 | esac |
| 1602 | fi |
| 1603 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1604 | # Check for --with-pydebug |
| 1605 | echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1606 | echo "configure:1607: checking for --with-pydebug" >&5 |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1607 | # Check whether --with-pydebug or --without-pydebug was given. |
| 1608 | if test "${with_pydebug+set}" = set; then |
| 1609 | withval="$with_pydebug" |
| 1610 | |
| 1611 | if test "$withval" != no |
| 1612 | then cat >> confdefs.h <<\EOF |
| 1613 | #define Py_DEBUG 1 |
| 1614 | EOF |
| 1615 | echo "$ac_t""yes" 1>&6; Py_DEBUG='true' |
| 1616 | else echo "$ac_t""no" 1>&6; Py_DEBUG='false' |
| 1617 | fi |
| 1618 | else |
| 1619 | echo "$ac_t""no" 1>&6 |
| 1620 | fi |
| 1621 | |
| 1622 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1623 | # Optimizer/debugger flags |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1624 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1625 | if test -z "$OPT" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1626 | then |
Guido van Rossum | edca74a | 1997-07-18 23:29:40 +0000 | [diff] [blame] | 1627 | case $GCC in |
| 1628 | yes) |
| 1629 | case $ac_cv_prog_cc_g in |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1630 | yes) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1631 | if test "$Py_DEBUG" = 'true' ; then |
| 1632 | # Optimization messes up debuggers, so turn it off for |
| 1633 | # debug builds. |
| 1634 | OPT="-g -Wall -Wstrict-prototypes" |
| 1635 | else |
| 1636 | OPT="-g -O3 -Wall -Wstrict-prototypes" |
| 1637 | fi;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1638 | *) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1639 | OPT="-O3 -Wall -Wstrict-prototypes";; |
| 1640 | esac |
| 1641 | ;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1642 | *) |
| 1643 | case $ac_sys_system in |
| 1644 | UnixWare*) |
| 1645 | OPT="-O -K pentium,host,inline,loop_unroll,alloca ";; |
| 1646 | *) |
| 1647 | OPT="-O";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1648 | esac |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1649 | esac |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 1650 | case $ac_sys_system in |
| 1651 | Darwin*) |
| 1652 | OPT="$OPT -no-cpp-precomp";; |
| 1653 | esac |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1654 | fi |
| 1655 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1656 | # The current (beta) Monterey compiler dies with optimizations |
| 1657 | case $ac_sys_system in |
| 1658 | Monterey*) OPT="";; |
| 1659 | esac |
| 1660 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 1661 | if test "$ac_arch_flags" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 1662 | then |
| 1663 | OPT="$OPT $ac_arch_flags" |
| 1664 | fi |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1665 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1666 | echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1667 | echo "configure:1668: checking whether $CC accepts -OPT:Olimit=0" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1668 | 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] | 1669 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1670 | else |
| 1671 | ac_save_cc="$CC" |
| 1672 | CC="$CC -OPT:Olimit=0" |
| 1673 | if test "$cross_compiling" = yes; then |
| 1674 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1675 | else |
| 1676 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1677 | #line 1678 "configure" |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1678 | #include "confdefs.h" |
| 1679 | int main() { return 0; } |
| 1680 | EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1681 | if { (eval echo configure:1682: \"$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] | 1682 | then |
| 1683 | ac_cv_opt_olimit_ok=yes |
| 1684 | else |
| 1685 | echo "configure: failed program was:" >&5 |
| 1686 | cat conftest.$ac_ext >&5 |
| 1687 | rm -fr conftest* |
| 1688 | ac_cv_opt_olimit_ok=no |
| 1689 | fi |
| 1690 | rm -fr conftest* |
| 1691 | fi |
| 1692 | |
| 1693 | CC="$ac_save_cc" |
| 1694 | fi |
| 1695 | |
| 1696 | echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6 |
Guido van Rossum | 2efa34b | 1997-10-23 17:43:11 +0000 | [diff] [blame] | 1697 | if test $ac_cv_opt_olimit_ok = yes; then |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 1698 | case $ac_sys_system in |
| 1699 | Darwin*) OPT="$OPT" ;; |
| 1700 | *) OPT="$OPT -OPT:Olimit=0";; |
| 1701 | esac |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1702 | else |
| 1703 | echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1704 | echo "configure:1705: checking whether $CC accepts -Olimit 1500" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1705 | if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1706 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1707 | else |
| 1708 | ac_save_cc="$CC" |
| 1709 | CC="$CC -Olimit 1500" |
| 1710 | if test "$cross_compiling" = yes; then |
| 1711 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 1712 | else |
| 1713 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1714 | #line 1715 "configure" |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1715 | #include "confdefs.h" |
| 1716 | int main() { return 0; } |
| 1717 | EOF |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1718 | if { (eval echo configure:1719: \"$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] | 1719 | then |
| 1720 | ac_cv_olimit_ok=yes |
| 1721 | else |
| 1722 | echo "configure: failed program was:" >&5 |
| 1723 | cat conftest.$ac_ext >&5 |
| 1724 | rm -fr conftest* |
| 1725 | ac_cv_olimit_ok=no |
Guido van Rossum | 201afe5 | 1997-05-14 21:14:44 +0000 | [diff] [blame] | 1726 | fi |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1727 | rm -fr conftest* |
| 1728 | fi |
| 1729 | |
| 1730 | CC="$ac_save_cc" |
| 1731 | fi |
| 1732 | |
| 1733 | echo "$ac_t""$ac_cv_olimit_ok" 1>&6 |
| 1734 | if test $ac_cv_olimit_ok = yes; then |
| 1735 | OPT="$OPT -Olimit 1500" |
| 1736 | fi |
| 1737 | fi |
| 1738 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1739 | # -Kpthread, if available, provides the right #defines |
| 1740 | # and linker options to make pthread_create available |
| 1741 | echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1742 | echo "configure:1743: checking whether $CC accepts -Kpthread" >&5 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1743 | if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then |
| 1744 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1745 | else |
| 1746 | ac_save_cc="$CC" |
| 1747 | CC="$CC -Kpthread" |
| 1748 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1749 | #line 1750 "configure" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1750 | #include "confdefs.h" |
| 1751 | #include <pthread.h> |
| 1752 | int main() { |
| 1753 | pthread_create(0,0,0,0) |
| 1754 | ; return 0; } |
| 1755 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1756 | if { (eval echo configure:1757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1757 | rm -rf conftest* |
| 1758 | ac_cv_kpthread=yes |
| 1759 | else |
| 1760 | echo "configure: failed program was:" >&5 |
| 1761 | cat conftest.$ac_ext >&5 |
| 1762 | rm -rf conftest* |
| 1763 | ac_cv_kpthread=no |
| 1764 | fi |
| 1765 | rm -f conftest* |
| 1766 | CC="$ac_save_cc" |
| 1767 | fi |
| 1768 | |
| 1769 | |
| 1770 | # GCC does not reject -Kpthread as an illegal option, it merely complains that |
| 1771 | # it is unrecognized |
| 1772 | if test "$GCC" = "yes" |
| 1773 | then ac_cv_kpthread="no, we have gcc" |
| 1774 | fi |
| 1775 | echo "$ac_t""$ac_cv_kpthread" 1>&6 |
| 1776 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1777 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1778 | # checks for header files |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1779 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1780 | echo "configure:1781: checking for ANSI C header files" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1781 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1782 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1783 | else |
| 1784 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1785 | #line 1786 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1786 | #include "confdefs.h" |
| 1787 | #include <stdlib.h> |
| 1788 | #include <stdarg.h> |
| 1789 | #include <string.h> |
| 1790 | #include <float.h> |
| 1791 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1792 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1793 | { (eval echo configure:1794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1794 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1795 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1796 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1797 | ac_cv_header_stdc=yes |
| 1798 | else |
| 1799 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1800 | echo "configure: failed program was:" >&5 |
| 1801 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1802 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1803 | ac_cv_header_stdc=no |
| 1804 | fi |
| 1805 | rm -f conftest* |
| 1806 | |
| 1807 | if test $ac_cv_header_stdc = yes; then |
| 1808 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 1809 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1810 | #line 1811 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1811 | #include "confdefs.h" |
| 1812 | #include <string.h> |
| 1813 | EOF |
| 1814 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1815 | egrep "memchr" >/dev/null 2>&1; then |
| 1816 | : |
| 1817 | else |
| 1818 | rm -rf conftest* |
| 1819 | ac_cv_header_stdc=no |
| 1820 | fi |
| 1821 | rm -f conftest* |
| 1822 | |
| 1823 | fi |
| 1824 | |
| 1825 | if test $ac_cv_header_stdc = yes; then |
| 1826 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 1827 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +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 <stdlib.h> |
| 1831 | EOF |
| 1832 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1833 | egrep "free" >/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 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| 1845 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1846 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1847 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1848 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1849 | #line 1850 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1850 | #include "confdefs.h" |
| 1851 | #include <ctype.h> |
| 1852 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 1853 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1854 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1855 | int main () { int i; for (i = 0; i < 256; i++) |
| 1856 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 1857 | exit (0); } |
| 1858 | |
| 1859 | EOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 1860 | if { (eval echo configure:1861: \"$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] | 1861 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1862 | : |
| 1863 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1864 | echo "configure: failed program was:" >&5 |
| 1865 | cat conftest.$ac_ext >&5 |
| 1866 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1867 | ac_cv_header_stdc=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1868 | fi |
| 1869 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1870 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1871 | |
| 1872 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1873 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1874 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1875 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1876 | if test $ac_cv_header_stdc = yes; then |
| 1877 | cat >> confdefs.h <<\EOF |
| 1878 | #define STDC_HEADERS 1 |
| 1879 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1880 | |
| 1881 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1882 | |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1883 | for ac_hdr in dlfcn.h fcntl.h limits.h langinfo.h locale.h \ |
| 1884 | ncurses.h poll.h pthread.h \ |
Eric S. Raymond | d2d75d3 | 2001-01-16 15:26:34 +0000 | [diff] [blame] | 1885 | 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] | 1886 | 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] | 1887 | 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] | 1888 | 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] | 1889 | 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] | 1890 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1891 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1892 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1893 | echo "configure:1894: checking for $ac_hdr" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1894 | 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] | 1895 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1896 | else |
| 1897 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1898 | #line 1899 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1899 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1900 | #include <$ac_hdr> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1901 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1902 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1903 | { (eval echo configure:1904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1904 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1905 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1906 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1907 | eval "ac_cv_header_$ac_safe=yes" |
| 1908 | else |
| 1909 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1910 | echo "configure: failed program was:" >&5 |
| 1911 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1912 | rm -rf conftest* |
| 1913 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1914 | fi |
| 1915 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1916 | fi |
| 1917 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1918 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1919 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1920 | cat >> confdefs.h <<EOF |
| 1921 | #define $ac_tr_hdr 1 |
| 1922 | EOF |
| 1923 | |
| 1924 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1925 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1926 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1927 | done |
| 1928 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1929 | ac_header_dirent=no |
| 1930 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h |
| 1931 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1932 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1933 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1934 | echo "configure:1935: checking for $ac_hdr that defines DIR" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1935 | 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] | 1936 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1937 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1938 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1939 | #line 1940 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1940 | #include "confdefs.h" |
| 1941 | #include <sys/types.h> |
| 1942 | #include <$ac_hdr> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1943 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1944 | DIR *dirp = 0; |
| 1945 | ; return 0; } |
| 1946 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1947 | if { (eval echo configure:1948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1948 | rm -rf conftest* |
| 1949 | eval "ac_cv_header_dirent_$ac_safe=yes" |
| 1950 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1951 | echo "configure: failed program was:" >&5 |
| 1952 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1953 | rm -rf conftest* |
| 1954 | eval "ac_cv_header_dirent_$ac_safe=no" |
| 1955 | fi |
| 1956 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1957 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1958 | 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] | 1959 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1960 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1961 | cat >> confdefs.h <<EOF |
| 1962 | #define $ac_tr_hdr 1 |
| 1963 | EOF |
| 1964 | ac_header_dirent=$ac_hdr; break |
| 1965 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1966 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1967 | fi |
| 1968 | done |
| 1969 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| 1970 | if test $ac_header_dirent = dirent.h; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1971 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1972 | echo "configure:1973: checking for opendir in -ldir" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1973 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1974 | 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] | 1975 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1976 | else |
| 1977 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1978 | LIBS="-ldir $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1979 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1980 | #line 1981 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1981 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1982 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 1983 | /* We use char because int might match the return type of a gcc2 |
| 1984 | builtin and then its argument prototype would still apply. */ |
| 1985 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1986 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1987 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1988 | opendir() |
| 1989 | ; return 0; } |
| 1990 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1991 | if { (eval echo configure:1992: \"$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] | 1992 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1993 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1994 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1995 | echo "configure: failed program was:" >&5 |
| 1996 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1997 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1998 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1999 | fi |
| 2000 | rm -f conftest* |
| 2001 | LIBS="$ac_save_LIBS" |
| 2002 | |
| 2003 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2004 | 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] | 2005 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2006 | LIBS="$LIBS -ldir" |
| 2007 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2008 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2009 | fi |
| 2010 | |
| 2011 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2012 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2013 | echo "configure:2014: checking for opendir in -lx" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2014 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2015 | 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] | 2016 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2017 | else |
| 2018 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2019 | LIBS="-lx $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2020 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2021 | #line 2022 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2022 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2023 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2024 | /* We use char because int might match the return type of a gcc2 |
| 2025 | builtin and then its argument prototype would still apply. */ |
| 2026 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2027 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2028 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2029 | opendir() |
| 2030 | ; return 0; } |
| 2031 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2032 | if { (eval echo configure:2033: \"$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] | 2033 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2034 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2035 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2036 | echo "configure: failed program was:" >&5 |
| 2037 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2038 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2039 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2040 | fi |
| 2041 | rm -f conftest* |
| 2042 | LIBS="$ac_save_LIBS" |
| 2043 | |
| 2044 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2045 | 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] | 2046 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2047 | LIBS="$LIBS -lx" |
| 2048 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2049 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2050 | fi |
| 2051 | |
| 2052 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2053 | |
| 2054 | |
| 2055 | # checks for typedefs |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2056 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2057 | echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2058 | echo "configure:2059: checking for clock_t in time.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2059 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2060 | #line 2061 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2061 | #include "confdefs.h" |
| 2062 | #include <time.h> |
| 2063 | EOF |
| 2064 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2065 | egrep "clock_t" >/dev/null 2>&1; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2066 | rm -rf conftest* |
| 2067 | was_it_defined=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2068 | else |
| 2069 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2070 | cat >> confdefs.h <<\EOF |
| 2071 | #define clock_t long |
| 2072 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2073 | |
| 2074 | fi |
| 2075 | rm -f conftest* |
| 2076 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2077 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2078 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2079 | # Add some code to confdefs.h so that the test for off_t works on SCO |
| 2080 | cat >> confdefs.h <<\EOF |
| 2081 | #if defined(SCO_DS) |
| 2082 | #undef _OFF_T |
| 2083 | #endif |
| 2084 | EOF |
| 2085 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2086 | # Type availability checks |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2087 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2088 | echo "configure:2089: checking for mode_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2089 | 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] | 2090 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2091 | else |
| 2092 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2093 | #line 2094 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2094 | #include "confdefs.h" |
| 2095 | #include <sys/types.h> |
| 2096 | #if STDC_HEADERS |
| 2097 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2098 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2099 | #endif |
| 2100 | EOF |
| 2101 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2102 | 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] | 2103 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2104 | ac_cv_type_mode_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2105 | else |
| 2106 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2107 | ac_cv_type_mode_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2108 | fi |
| 2109 | rm -f conftest* |
| 2110 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2111 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2112 | echo "$ac_t""$ac_cv_type_mode_t" 1>&6 |
| 2113 | if test $ac_cv_type_mode_t = no; then |
| 2114 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2115 | #define mode_t int |
| 2116 | EOF |
| 2117 | |
| 2118 | fi |
| 2119 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2120 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2121 | echo "configure:2122: checking for off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2122 | 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] | 2123 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2124 | else |
| 2125 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2126 | #line 2127 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2127 | #include "confdefs.h" |
| 2128 | #include <sys/types.h> |
| 2129 | #if STDC_HEADERS |
| 2130 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2131 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2132 | #endif |
| 2133 | EOF |
| 2134 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2135 | 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] | 2136 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2137 | ac_cv_type_off_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2138 | else |
| 2139 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2140 | ac_cv_type_off_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2141 | fi |
| 2142 | rm -f conftest* |
| 2143 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2144 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2145 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
| 2146 | if test $ac_cv_type_off_t = no; then |
| 2147 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2148 | #define off_t long |
| 2149 | EOF |
| 2150 | |
| 2151 | fi |
| 2152 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2153 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2154 | echo "configure:2155: checking for pid_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2155 | 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] | 2156 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2157 | else |
| 2158 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2159 | #line 2160 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2160 | #include "confdefs.h" |
| 2161 | #include <sys/types.h> |
| 2162 | #if STDC_HEADERS |
| 2163 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2164 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2165 | #endif |
| 2166 | EOF |
| 2167 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2168 | 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] | 2169 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2170 | ac_cv_type_pid_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2171 | else |
| 2172 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2173 | ac_cv_type_pid_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2174 | fi |
| 2175 | rm -f conftest* |
| 2176 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2177 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2178 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
| 2179 | if test $ac_cv_type_pid_t = no; then |
| 2180 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2181 | #define pid_t int |
| 2182 | EOF |
| 2183 | |
| 2184 | fi |
| 2185 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2186 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2187 | echo "configure:2188: checking return type of signal handlers" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2188 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2189 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2190 | else |
| 2191 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2192 | #line 2193 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2193 | #include "confdefs.h" |
| 2194 | #include <sys/types.h> |
| 2195 | #include <signal.h> |
| 2196 | #ifdef signal |
| 2197 | #undef signal |
| 2198 | #endif |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2199 | #ifdef __cplusplus |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2200 | extern "C" void (*signal (int, void (*)(int)))(int); |
| 2201 | #else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2202 | void (*signal ()) (); |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2203 | #endif |
| 2204 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2205 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2206 | int i; |
| 2207 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2208 | EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2209 | if { (eval echo configure:2210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2210 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2211 | ac_cv_type_signal=void |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2212 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2213 | echo "configure: failed program was:" >&5 |
| 2214 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2215 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2216 | ac_cv_type_signal=int |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2217 | fi |
| 2218 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2219 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2220 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2221 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2222 | cat >> confdefs.h <<EOF |
| 2223 | #define RETSIGTYPE $ac_cv_type_signal |
| 2224 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2225 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2226 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2227 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2228 | echo "configure:2229: checking for size_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2229 | 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] | 2230 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2231 | else |
| 2232 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2233 | #line 2234 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2234 | #include "confdefs.h" |
| 2235 | #include <sys/types.h> |
| 2236 | #if STDC_HEADERS |
| 2237 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2238 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2239 | #endif |
| 2240 | EOF |
| 2241 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2242 | 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] | 2243 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2244 | ac_cv_type_size_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2245 | else |
| 2246 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2247 | ac_cv_type_size_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2248 | fi |
| 2249 | rm -f conftest* |
| 2250 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2251 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2252 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
| 2253 | if test $ac_cv_type_size_t = no; then |
| 2254 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2255 | #define size_t unsigned |
| 2256 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2257 | |
| 2258 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2259 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2260 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2261 | echo "configure:2262: checking for uid_t in sys/types.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2262 | 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] | 2263 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2264 | else |
| 2265 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2266 | #line 2267 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2267 | #include "confdefs.h" |
| 2268 | #include <sys/types.h> |
| 2269 | EOF |
| 2270 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2271 | egrep "uid_t" >/dev/null 2>&1; then |
| 2272 | rm -rf conftest* |
| 2273 | ac_cv_type_uid_t=yes |
| 2274 | else |
| 2275 | rm -rf conftest* |
| 2276 | ac_cv_type_uid_t=no |
| 2277 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2278 | rm -f conftest* |
| 2279 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2280 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2281 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2282 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2283 | if test $ac_cv_type_uid_t = no; then |
| 2284 | cat >> confdefs.h <<\EOF |
| 2285 | #define uid_t int |
| 2286 | EOF |
| 2287 | |
| 2288 | cat >> confdefs.h <<\EOF |
| 2289 | #define gid_t int |
| 2290 | EOF |
| 2291 | |
| 2292 | fi |
| 2293 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2294 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2295 | # Sizes of various common basic types |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2296 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2297 | echo "configure:2298: checking size of int" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2298 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2299 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2300 | else |
| 2301 | if test "$cross_compiling" = yes; then |
| 2302 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2303 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2304 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 2305 | #line 2306 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2306 | #include "confdefs.h" |
| 2307 | #include <stdio.h> |
| 2308 | main() |
| 2309 | { |
| 2310 | FILE *f=fopen("conftestval", "w"); |
| 2311 | if (!f) exit(1); |
| 2312 | fprintf(f, "%d\n", sizeof(int)); |
| 2313 | exit(0); |
| 2314 | } |
| 2315 | EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2316 | if { (eval echo configure:2317: \"$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] | 2317 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2318 | ac_cv_sizeof_int=`cat conftestval` |
| 2319 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2320 | echo "configure: failed program was:" >&5 |
| 2321 | cat conftest.$ac_ext >&5 |
| 2322 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2323 | ac_cv_sizeof_int=0 |
| 2324 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2325 | rm -fr conftest* |
| 2326 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2327 | |
| 2328 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2329 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
| 2330 | cat >> confdefs.h <<EOF |
| 2331 | #define SIZEOF_INT $ac_cv_sizeof_int |
| 2332 | EOF |
| 2333 | |
| 2334 | |
| 2335 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2336 | echo "configure:2337: checking size of long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2337 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2338 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2339 | else |
| 2340 | if test "$cross_compiling" = yes; then |
| 2341 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2342 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2343 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2344 | #line 2345 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2345 | #include "confdefs.h" |
| 2346 | #include <stdio.h> |
| 2347 | main() |
| 2348 | { |
| 2349 | FILE *f=fopen("conftestval", "w"); |
| 2350 | if (!f) exit(1); |
| 2351 | fprintf(f, "%d\n", sizeof(long)); |
| 2352 | exit(0); |
| 2353 | } |
| 2354 | EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2355 | if { (eval echo configure:2356: \"$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] | 2356 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2357 | ac_cv_sizeof_long=`cat conftestval` |
| 2358 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2359 | echo "configure: failed program was:" >&5 |
| 2360 | cat conftest.$ac_ext >&5 |
| 2361 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2362 | ac_cv_sizeof_long=0 |
| 2363 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2364 | rm -fr conftest* |
| 2365 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2366 | |
| 2367 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2368 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
| 2369 | cat >> confdefs.h <<EOF |
| 2370 | #define SIZEOF_LONG $ac_cv_sizeof_long |
| 2371 | EOF |
| 2372 | |
| 2373 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2374 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2375 | echo "configure:2376: checking size of void *" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2376 | 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] | 2377 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2378 | else |
| 2379 | if test "$cross_compiling" = yes; then |
| 2380 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2381 | else |
| 2382 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2383 | #line 2384 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2384 | #include "confdefs.h" |
| 2385 | #include <stdio.h> |
| 2386 | main() |
| 2387 | { |
| 2388 | FILE *f=fopen("conftestval", "w"); |
| 2389 | if (!f) exit(1); |
| 2390 | fprintf(f, "%d\n", sizeof(void *)); |
| 2391 | exit(0); |
| 2392 | } |
| 2393 | EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2394 | if { (eval echo configure:2395: \"$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] | 2395 | then |
| 2396 | ac_cv_sizeof_void_p=`cat conftestval` |
| 2397 | else |
| 2398 | echo "configure: failed program was:" >&5 |
| 2399 | cat conftest.$ac_ext >&5 |
| 2400 | rm -fr conftest* |
| 2401 | ac_cv_sizeof_void_p=0 |
| 2402 | fi |
| 2403 | rm -fr conftest* |
| 2404 | fi |
| 2405 | |
| 2406 | fi |
| 2407 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 |
| 2408 | cat >> confdefs.h <<EOF |
| 2409 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
| 2410 | EOF |
| 2411 | |
| 2412 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2413 | echo $ac_n "checking size of char""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2414 | echo "configure:2415: checking size of char" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2415 | if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2416 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2417 | else |
| 2418 | if test "$cross_compiling" = yes; then |
| 2419 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2420 | else |
| 2421 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2422 | #line 2423 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2423 | #include "confdefs.h" |
| 2424 | #include <stdio.h> |
| 2425 | main() |
| 2426 | { |
| 2427 | FILE *f=fopen("conftestval", "w"); |
| 2428 | if (!f) exit(1); |
| 2429 | fprintf(f, "%d\n", sizeof(char)); |
| 2430 | exit(0); |
| 2431 | } |
| 2432 | EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2433 | if { (eval echo configure:2434: \"$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] | 2434 | then |
| 2435 | ac_cv_sizeof_char=`cat conftestval` |
| 2436 | else |
| 2437 | echo "configure: failed program was:" >&5 |
| 2438 | cat conftest.$ac_ext >&5 |
| 2439 | rm -fr conftest* |
| 2440 | ac_cv_sizeof_char=0 |
| 2441 | fi |
| 2442 | rm -fr conftest* |
| 2443 | fi |
| 2444 | |
| 2445 | fi |
| 2446 | echo "$ac_t""$ac_cv_sizeof_char" 1>&6 |
| 2447 | cat >> confdefs.h <<EOF |
| 2448 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
| 2449 | EOF |
| 2450 | |
| 2451 | |
| 2452 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2453 | echo "configure:2454: checking size of short" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2454 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2455 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2456 | else |
| 2457 | if test "$cross_compiling" = yes; then |
| 2458 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2459 | else |
| 2460 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2461 | #line 2462 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2462 | #include "confdefs.h" |
| 2463 | #include <stdio.h> |
| 2464 | main() |
| 2465 | { |
| 2466 | FILE *f=fopen("conftestval", "w"); |
| 2467 | if (!f) exit(1); |
| 2468 | fprintf(f, "%d\n", sizeof(short)); |
| 2469 | exit(0); |
| 2470 | } |
| 2471 | EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2472 | if { (eval echo configure:2473: \"$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] | 2473 | then |
| 2474 | ac_cv_sizeof_short=`cat conftestval` |
| 2475 | else |
| 2476 | echo "configure: failed program was:" >&5 |
| 2477 | cat conftest.$ac_ext >&5 |
| 2478 | rm -fr conftest* |
| 2479 | ac_cv_sizeof_short=0 |
| 2480 | fi |
| 2481 | rm -fr conftest* |
| 2482 | fi |
| 2483 | |
| 2484 | fi |
| 2485 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
| 2486 | cat >> confdefs.h <<EOF |
| 2487 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
| 2488 | EOF |
| 2489 | |
| 2490 | |
| 2491 | echo $ac_n "checking size of float""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2492 | echo "configure:2493: checking size of float" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2493 | if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2494 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2495 | else |
| 2496 | if test "$cross_compiling" = yes; then |
| 2497 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2498 | else |
| 2499 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2500 | #line 2501 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2501 | #include "confdefs.h" |
| 2502 | #include <stdio.h> |
| 2503 | main() |
| 2504 | { |
| 2505 | FILE *f=fopen("conftestval", "w"); |
| 2506 | if (!f) exit(1); |
| 2507 | fprintf(f, "%d\n", sizeof(float)); |
| 2508 | exit(0); |
| 2509 | } |
| 2510 | EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2511 | if { (eval echo configure:2512: \"$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] | 2512 | then |
| 2513 | ac_cv_sizeof_float=`cat conftestval` |
| 2514 | else |
| 2515 | echo "configure: failed program was:" >&5 |
| 2516 | cat conftest.$ac_ext >&5 |
| 2517 | rm -fr conftest* |
| 2518 | ac_cv_sizeof_float=0 |
| 2519 | fi |
| 2520 | rm -fr conftest* |
| 2521 | fi |
| 2522 | |
| 2523 | fi |
| 2524 | echo "$ac_t""$ac_cv_sizeof_float" 1>&6 |
| 2525 | cat >> confdefs.h <<EOF |
| 2526 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
| 2527 | EOF |
| 2528 | |
| 2529 | |
| 2530 | echo $ac_n "checking size of double""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2531 | echo "configure:2532: checking size of double" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2532 | if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2533 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2534 | else |
| 2535 | if test "$cross_compiling" = yes; then |
| 2536 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2537 | else |
| 2538 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2539 | #line 2540 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2540 | #include "confdefs.h" |
| 2541 | #include <stdio.h> |
| 2542 | main() |
| 2543 | { |
| 2544 | FILE *f=fopen("conftestval", "w"); |
| 2545 | if (!f) exit(1); |
| 2546 | fprintf(f, "%d\n", sizeof(double)); |
| 2547 | exit(0); |
| 2548 | } |
| 2549 | EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2550 | if { (eval echo configure:2551: \"$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] | 2551 | then |
| 2552 | ac_cv_sizeof_double=`cat conftestval` |
| 2553 | else |
| 2554 | echo "configure: failed program was:" >&5 |
| 2555 | cat conftest.$ac_ext >&5 |
| 2556 | rm -fr conftest* |
| 2557 | ac_cv_sizeof_double=0 |
| 2558 | fi |
| 2559 | rm -fr conftest* |
| 2560 | fi |
| 2561 | |
| 2562 | fi |
| 2563 | echo "$ac_t""$ac_cv_sizeof_double" 1>&6 |
| 2564 | cat >> confdefs.h <<EOF |
| 2565 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
| 2566 | EOF |
| 2567 | |
| 2568 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2569 | echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2570 | echo "configure:2571: checking size of fpos_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2571 | 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] | 2572 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2573 | else |
| 2574 | if test "$cross_compiling" = yes; then |
| 2575 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2576 | else |
| 2577 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2578 | #line 2579 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2579 | #include "confdefs.h" |
| 2580 | #include <stdio.h> |
| 2581 | main() |
| 2582 | { |
| 2583 | FILE *f=fopen("conftestval", "w"); |
| 2584 | if (!f) exit(1); |
| 2585 | fprintf(f, "%d\n", sizeof(fpos_t)); |
| 2586 | exit(0); |
| 2587 | } |
| 2588 | EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2589 | if { (eval echo configure:2590: \"$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] | 2590 | then |
| 2591 | ac_cv_sizeof_fpos_t=`cat conftestval` |
| 2592 | else |
| 2593 | echo "configure: failed program was:" >&5 |
| 2594 | cat conftest.$ac_ext >&5 |
| 2595 | rm -fr conftest* |
| 2596 | ac_cv_sizeof_fpos_t=0 |
| 2597 | fi |
| 2598 | rm -fr conftest* |
| 2599 | fi |
| 2600 | |
| 2601 | fi |
| 2602 | echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6 |
| 2603 | cat >> confdefs.h <<EOF |
| 2604 | #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t |
| 2605 | EOF |
| 2606 | |
| 2607 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2608 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2609 | echo $ac_n "checking for long long support""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2610 | echo "configure:2611: checking for long long support" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2611 | have_long_long=no |
| 2612 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2613 | #line 2614 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2614 | #include "confdefs.h" |
| 2615 | |
| 2616 | int main() { |
| 2617 | long long x; x = (long long)0; |
| 2618 | ; return 0; } |
| 2619 | EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2620 | if { (eval echo configure:2621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2621 | rm -rf conftest* |
| 2622 | cat >> confdefs.h <<\EOF |
| 2623 | #define HAVE_LONG_LONG 1 |
| 2624 | EOF |
| 2625 | have_long_long=yes |
| 2626 | else |
| 2627 | echo "configure: failed program was:" >&5 |
| 2628 | cat conftest.$ac_ext >&5 |
| 2629 | fi |
| 2630 | rm -f conftest* |
| 2631 | echo "$ac_t""$have_long_long" 1>&6 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2632 | if test "$have_long_long" = yes ; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2633 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2634 | echo "configure:2635: checking size of long long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2635 | 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] | 2636 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2637 | else |
| 2638 | if test "$cross_compiling" = yes; then |
| 2639 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2640 | else |
| 2641 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +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 | #include <stdio.h> |
| 2645 | main() |
| 2646 | { |
| 2647 | FILE *f=fopen("conftestval", "w"); |
| 2648 | if (!f) exit(1); |
| 2649 | fprintf(f, "%d\n", sizeof(long long)); |
| 2650 | exit(0); |
| 2651 | } |
| 2652 | EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2653 | if { (eval echo configure:2654: \"$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] | 2654 | then |
| 2655 | ac_cv_sizeof_long_long=`cat conftestval` |
| 2656 | else |
| 2657 | echo "configure: failed program was:" >&5 |
| 2658 | cat conftest.$ac_ext >&5 |
| 2659 | rm -fr conftest* |
| 2660 | ac_cv_sizeof_long_long=0 |
| 2661 | fi |
| 2662 | rm -fr conftest* |
| 2663 | fi |
| 2664 | |
| 2665 | fi |
| 2666 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
| 2667 | cat >> confdefs.h <<EOF |
| 2668 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 2669 | EOF |
| 2670 | |
| 2671 | |
| 2672 | fi |
| 2673 | |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2674 | echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2675 | echo "configure:2676: checking for uintptr_t support" >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2676 | have_uintptr_t=no |
| 2677 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2678 | #line 2679 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2679 | #include "confdefs.h" |
| 2680 | |
| 2681 | int main() { |
| 2682 | uintptr_t x; x = (uintptr_t)0; |
| 2683 | ; return 0; } |
| 2684 | EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2685 | if { (eval echo configure:2686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2686 | rm -rf conftest* |
| 2687 | cat >> confdefs.h <<\EOF |
| 2688 | #define HAVE_UINTPTR_T 1 |
| 2689 | EOF |
| 2690 | have_uintptr_t=yes |
| 2691 | else |
| 2692 | echo "configure: failed program was:" >&5 |
| 2693 | cat conftest.$ac_ext >&5 |
| 2694 | fi |
| 2695 | rm -f conftest* |
| 2696 | echo "$ac_t""$have_uintptr_t" 1>&6 |
| 2697 | if test "$have_uintptr_t" = yes ; then |
| 2698 | echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2699 | echo "configure:2700: checking size of uintptr_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2700 | if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2701 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2702 | else |
| 2703 | if test "$cross_compiling" = yes; then |
| 2704 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2705 | else |
| 2706 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2707 | #line 2708 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2708 | #include "confdefs.h" |
| 2709 | #include <stdio.h> |
| 2710 | main() |
| 2711 | { |
| 2712 | FILE *f=fopen("conftestval", "w"); |
| 2713 | if (!f) exit(1); |
| 2714 | fprintf(f, "%d\n", sizeof(uintptr_t)); |
| 2715 | exit(0); |
| 2716 | } |
| 2717 | EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2718 | if { (eval echo configure:2719: \"$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] | 2719 | then |
| 2720 | ac_cv_sizeof_uintptr_t=`cat conftestval` |
| 2721 | else |
| 2722 | echo "configure: failed program was:" >&5 |
| 2723 | cat conftest.$ac_ext >&5 |
| 2724 | rm -fr conftest* |
| 2725 | ac_cv_sizeof_uintptr_t=0 |
| 2726 | fi |
| 2727 | rm -fr conftest* |
| 2728 | fi |
| 2729 | |
| 2730 | fi |
| 2731 | echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6 |
| 2732 | cat >> confdefs.h <<EOF |
| 2733 | #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t |
| 2734 | EOF |
| 2735 | |
| 2736 | |
| 2737 | fi |
| 2738 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2739 | # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>. |
| 2740 | echo $ac_n "checking size of off_t""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2741 | echo "configure:2742: checking size of off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2742 | 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] | 2743 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2744 | else |
| 2745 | if test "$cross_compiling" = yes; then |
| 2746 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2747 | else |
| 2748 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2749 | #line 2750 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2750 | #include "confdefs.h" |
| 2751 | #include <stdio.h> |
| 2752 | #include <sys/types.h> |
| 2753 | main() |
| 2754 | { |
| 2755 | FILE *f=fopen("conftestval", "w"); |
| 2756 | if (!f) exit(1); |
| 2757 | fprintf(f, "%d\n", sizeof(off_t)); |
| 2758 | exit(0); |
| 2759 | } |
| 2760 | EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2761 | if { (eval echo configure:2762: \"$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] | 2762 | then |
| 2763 | ac_cv_sizeof_off_t=`cat conftestval` |
| 2764 | else |
| 2765 | echo "configure: failed program was:" >&5 |
| 2766 | cat conftest.$ac_ext >&5 |
| 2767 | rm -fr conftest* |
| 2768 | ac_cv_sizeof_off_t=0 |
| 2769 | fi |
| 2770 | rm -fr conftest* |
| 2771 | fi |
| 2772 | |
| 2773 | |
| 2774 | fi |
| 2775 | |
| 2776 | echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6 |
| 2777 | cat >> confdefs.h <<EOF |
| 2778 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
| 2779 | EOF |
| 2780 | |
| 2781 | |
| 2782 | echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2783 | echo "configure:2784: checking whether to enable large file support" >&5 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2784 | if test "$have_long_long" = yes -a \ |
| 2785 | "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ |
| 2786 | "$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] | 2787 | cat >> confdefs.h <<\EOF |
| 2788 | #define HAVE_LARGEFILE_SUPPORT 1 |
| 2789 | EOF |
| 2790 | |
| 2791 | echo "$ac_t""yes" 1>&6 |
| 2792 | else |
| 2793 | echo "$ac_t""no" 1>&6 |
| 2794 | fi |
| 2795 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2796 | # AC_CHECK_SIZEOF() doesn't include <time.h>. |
| 2797 | echo $ac_n "checking size of time_t""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2798 | echo "configure:2799: checking size of time_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2799 | 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] | 2800 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2801 | else |
| 2802 | if test "$cross_compiling" = yes; then |
| 2803 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2804 | else |
| 2805 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2806 | #line 2807 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2807 | #include "confdefs.h" |
| 2808 | #include <stdio.h> |
| 2809 | #include <time.h> |
| 2810 | main() |
| 2811 | { |
| 2812 | FILE *f=fopen("conftestval", "w"); |
| 2813 | if (!f) exit(1); |
| 2814 | fprintf(f, "%d\n", sizeof(time_t)); |
| 2815 | exit(0); |
| 2816 | } |
| 2817 | EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2818 | if { (eval echo configure:2819: \"$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] | 2819 | then |
| 2820 | ac_cv_sizeof_time_t=`cat conftestval` |
| 2821 | else |
| 2822 | echo "configure: failed program was:" >&5 |
| 2823 | cat conftest.$ac_ext >&5 |
| 2824 | rm -fr conftest* |
| 2825 | ac_cv_sizeof_time_t=0 |
| 2826 | fi |
| 2827 | rm -fr conftest* |
| 2828 | fi |
| 2829 | |
| 2830 | |
| 2831 | fi |
| 2832 | |
| 2833 | echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 |
| 2834 | cat >> confdefs.h <<EOF |
| 2835 | #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
| 2836 | EOF |
| 2837 | |
| 2838 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2839 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2840 | # if have pthread_t then define SIZEOF_PTHREAD_T |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 2841 | ac_save_cc="$CC" |
| 2842 | if test "$ac_cv_kpthread" = "yes" |
| 2843 | then CC="$CC -Kpthread" |
| 2844 | fi |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2845 | echo $ac_n "checking for pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2846 | echo "configure:2847: checking for pthread_t" >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2847 | have_pthread_t=no |
| 2848 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2849 | #line 2850 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2850 | #include "confdefs.h" |
| 2851 | #include <pthread.h> |
| 2852 | int main() { |
Guido van Rossum | 1258049 | 2000-09-24 16:47:19 +0000 | [diff] [blame] | 2853 | pthread_t x; x = *(pthread_t*)0; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2854 | ; return 0; } |
| 2855 | EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2856 | if { (eval echo configure:2857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2857 | rm -rf conftest* |
| 2858 | have_pthread_t=yes |
| 2859 | else |
| 2860 | echo "configure: failed program was:" >&5 |
| 2861 | cat conftest.$ac_ext >&5 |
| 2862 | fi |
| 2863 | rm -f conftest* |
| 2864 | echo "$ac_t""$have_pthread_t" 1>&6 |
| 2865 | if test "$have_pthread_t" = yes ; then |
| 2866 | # AC_CHECK_SIZEOF() doesn't include <pthread.h>. |
| 2867 | echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2868 | echo "configure:2869: checking size of pthread_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2869 | if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2870 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2871 | else |
| 2872 | if test "$cross_compiling" = yes; then |
| 2873 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 2874 | else |
| 2875 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2876 | #line 2877 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2877 | #include "confdefs.h" |
| 2878 | #include <stdio.h> |
| 2879 | #include <pthread.h> |
| 2880 | main() |
| 2881 | { |
| 2882 | FILE *f=fopen("conftestval", "w"); |
| 2883 | if (!f) exit(1); |
| 2884 | fprintf(f, "%d\n", sizeof(pthread_t)); |
| 2885 | exit(0); |
| 2886 | } |
| 2887 | EOF |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2888 | if { (eval echo configure:2889: \"$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] | 2889 | then |
| 2890 | ac_cv_sizeof_pthread_t=`cat conftestval` |
| 2891 | else |
| 2892 | echo "configure: failed program was:" >&5 |
| 2893 | cat conftest.$ac_ext >&5 |
| 2894 | rm -fr conftest* |
| 2895 | ac_cv_sizeof_pthread_t=0 |
| 2896 | fi |
| 2897 | rm -fr conftest* |
| 2898 | fi |
| 2899 | |
| 2900 | |
| 2901 | fi |
| 2902 | |
| 2903 | echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6 |
| 2904 | cat >> confdefs.h <<EOF |
| 2905 | #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t |
| 2906 | EOF |
| 2907 | |
| 2908 | fi |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 2909 | CC="$ac_save_cc" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2910 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2911 | echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2912 | echo "configure:2913: checking for --enable-toolbox-glue" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2913 | # Check whether --enable-toolbox-glue or --disable-toolbox-glue was given. |
| 2914 | if test "${enable_toolbox_glue+set}" = set; then |
| 2915 | enableval="$enable_toolbox_glue" |
| 2916 | : |
| 2917 | fi |
| 2918 | |
| 2919 | |
| 2920 | if test -z "$enable_toolbox_glue" |
| 2921 | then |
| 2922 | case $ac_sys_system/$ac_sys_release in |
| 2923 | Darwin/*) |
| 2924 | enable_toolbox_glue="yes";; |
| 2925 | *) |
| 2926 | enable_toolbox_glue="no";; |
| 2927 | esac |
| 2928 | fi |
| 2929 | case "$enable_toolbox_glue" in |
| 2930 | yes) |
| 2931 | extra_frameworks="-framework Carbon -framework Foundation" |
| 2932 | extra_machdep_objs="Python/mactoolboxglue.o" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 2933 | extra_undefs="-u __dummy -u _PyMac_Error" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2934 | cat >> confdefs.h <<\EOF |
| 2935 | #define USE_TOOLBOX_OBJECT_GLUE 1 |
| 2936 | EOF |
| 2937 | |
| 2938 | ;; |
| 2939 | *) |
| 2940 | extra_frameworks="" |
| 2941 | extra_machdep_objs="" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 2942 | extra_undefs="" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2943 | ;; |
| 2944 | esac |
| 2945 | echo "$ac_t""$enable_toolbox_glue" 1>&6 |
| 2946 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2947 | |
| 2948 | case $ac_sys_system/$ac_sys_release in |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 2949 | Darwin/*) |
| 2950 | ns_undef_sym='_environ' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2951 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" |
| 2952 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
| 2953 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 2954 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2955 | esac |
| 2956 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2957 | echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2958 | echo "configure:2959: checking for --enable-framework" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2959 | if test "$enable_framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2960 | then |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 2961 | OPT="$OPT -fno-common -dynamic" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2962 | # -U __environ is needed since bundles don't have access |
| 2963 | # to crt0 when built but will always be linked against it |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2964 | # -F. is needed to allow linking to the framework while |
| 2965 | # in the build location. |
| 2966 | |
| 2967 | LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2968 | cat >> confdefs.h <<\EOF |
| 2969 | #define WITH_NEXT_FRAMEWORK 1 |
| 2970 | EOF |
| 2971 | |
| 2972 | echo "$ac_t""yes" 1>&6 |
| 2973 | else |
| 2974 | echo "$ac_t""no" 1>&6 |
| 2975 | fi |
| 2976 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2977 | echo $ac_n "checking for dyld""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 2978 | echo "configure:2979: checking for dyld" >&5 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2979 | case $ac_sys_system/$ac_sys_release in |
| 2980 | Darwin/*) |
| 2981 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2982 | #define WITH_DYLD 1 |
| 2983 | EOF |
| 2984 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2985 | echo "$ac_t""always on for Darwin" 1>&6 |
| 2986 | ;; |
| 2987 | *) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 2988 | echo "$ac_t""no" 1>&6 |
| 2989 | ;; |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 2990 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 2991 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2992 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2993 | |
| 2994 | |
| 2995 | |
| 2996 | |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 2997 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2998 | # SO is the extension of shared libraries `(including the dot!) |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 2999 | # -- usually .so, .sl on HP-UX, .dll on Cygwin |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3000 | echo $ac_n "checking SO""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 3001 | echo "configure:3002: checking SO" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3002 | if test -z "$SO" |
| 3003 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3004 | case $ac_sys_system in |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3005 | hp*|HP*) SO=.sl;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3006 | CYGWIN*) SO=.dll;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3007 | *) SO=.so;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3008 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3009 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3010 | echo "$ac_t""$SO" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3011 | # LDSHARED is the ld *command* used to create shared library |
| 3012 | # -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3013 | # (Shared libraries in this instance are shared modules to be loaded into |
| 3014 | # Python, as opposed to building Python itself as a shared library.) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3015 | echo $ac_n "checking LDSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 3016 | echo "configure:3017: checking LDSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3017 | if test -z "$LDSHARED" |
| 3018 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3019 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3020 | AIX*) |
| 3021 | BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" |
| 3022 | LDSHARED="\$(BINLIBDEST)/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/python.exp" |
| 3023 | ;; |
| 3024 | BeOS*) |
| 3025 | BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY" |
| 3026 | LDSHARED="\$(BINLIBDEST)/ld_so_beos \$(LIBDIR)/$LDLIBRARY" |
| 3027 | ;; |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3028 | IRIX/5*) LDSHARED="ld -shared";; |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 3029 | IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3030 | SunOS/4*) LDSHARED="ld";; |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3031 | SunOS/5*) |
| 3032 | if test "$GCC" = "yes" |
Neil Schemenauer | 8ba9445 | 2001-02-19 18:18:48 +0000 | [diff] [blame] | 3033 | then LDSHARED='$(CC) -shared' |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3034 | else LDSHARED="ld -G"; |
| 3035 | fi ;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3036 | hp*|HP*) LDSHARED="ld -b";; |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3037 | OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; |
| 3038 | DYNIX/ptx*) LDSHARED="ld -G";; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3039 | Darwin/*) |
| 3040 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3041 | if test "$enable_framework" ; then |
| 3042 | # Link against the framework. All externals should be defined. |
| 3043 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3044 | else |
| 3045 | # No framework. Ignore undefined symbols, assuming they come from Python |
| 3046 | LDSHARED="$LDSHARED -undefined suppress" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3047 | fi ;; |
Guido van Rossum | 81652ab | 1996-07-21 02:53:27 +0000 | [diff] [blame] | 3048 | Linux*) LDSHARED="gcc -shared";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 3049 | dgux*) LDSHARED="ld -G";; |
Guido van Rossum | 458e7fa | 1999-09-17 15:40:40 +0000 | [diff] [blame] | 3050 | BSD/OS*/4*) LDSHARED="gcc -shared";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3051 | OpenBSD*|NetBSD*|FreeBSD*) |
Jeremy Hylton | 4bcc7c5 | 2000-08-31 17:45:35 +0000 | [diff] [blame] | 3052 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3053 | then |
| 3054 | LDSHARED="cc -shared ${LDFLAGS}" |
| 3055 | else |
| 3056 | LDSHARED="ld -Bshareable ${LDFLAGS}" |
| 3057 | fi;; |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3058 | UnixWare*) |
| 3059 | if test "$GCC" = "yes" |
| 3060 | then LDSHARED="$(CC) -shared" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3061 | else LDSHARED="$(CC) -G" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3062 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3063 | SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3064 | Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3065 | CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3066 | *) LDSHARED="ld";; |
| 3067 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3068 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3069 | echo "$ac_t""$LDSHARED" 1>&6 |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3070 | BLDSHARED=${BLDSHARED-$LDSHARED} |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3071 | # 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] | 3072 | # library (module) -- this is only needed for a few systems |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3073 | echo $ac_n "checking CCSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3074 | echo "configure:3075: checking CCSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3075 | if test -z "$CCSHARED" |
| 3076 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3077 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 3078 | SunOS*) if test "$GCC" = yes; |
| 3079 | then CCSHARED="-fPIC"; |
| 3080 | fi;; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3081 | hp*|HP*) if test "$GCC" = yes; |
Martin v. Löwis | 703ad70 | 2001-09-05 08:36:52 +0000 | [diff] [blame] | 3082 | then CCSHARED="-fPIC"; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3083 | else CCSHARED="+z"; |
| 3084 | fi;; |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3085 | Linux*) CCSHARED="-fPIC";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3086 | BSD/OS*/4*) CCSHARED="-fpic";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3087 | FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";; |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3088 | UnixWare*) |
| 3089 | if test "$GCC" = "yes" |
| 3090 | then CCSHARED="-fPIC" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3091 | else CCSHARED="-KPIC" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3092 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3093 | SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3094 | Monterey*) CCSHARED="-G";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3095 | IRIX*/6*) case $CC in |
| 3096 | *gcc*) CCSHARED="-shared";; |
Guido van Rossum | ee21f41 | 1998-04-20 18:51:54 +0000 | [diff] [blame] | 3097 | *) CCSHARED="";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3098 | esac;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3099 | CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3100 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3101 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3102 | echo "$ac_t""$CCSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3103 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3104 | # the python executable -- this is only needed for a few systems |
| 3105 | echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3106 | echo "configure:3107: checking LINKFORSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3107 | if test -z "$LINKFORSHARED" |
| 3108 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3109 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3110 | AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 3111 | hp*|HP*) |
Guido van Rossum | 304dd2d | 1997-10-20 23:10:56 +0000 | [diff] [blame] | 3112 | LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3113 | BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 2d9feed | 1997-11-24 17:36:21 +0000 | [diff] [blame] | 3114 | Linux*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3115 | # -u libsys_s pulls in all symbols in libsys |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3116 | Darwin/*) |
| 3117 | # -u __dummy makes the linker aware of the objc runtime |
| 3118 | # in System.framework; otherwise, __objcInit (referenced in |
| 3119 | # crt1.o) gets erroneously defined as common, which breaks dynamic |
| 3120 | # loading of any modules which reference it in System.framework. |
| 3121 | # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is |
| 3122 | # not used by the core itself but which needs to be in the core so |
| 3123 | # that dynamically loaded extension modules have access to it. |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3124 | LINKFORSHARED="$extra_undefs -framework System" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3125 | if test "$enable_framework" |
| 3126 | then |
| 3127 | LINKFORSHARED="$LINKFORSHARED -framework Python" |
| 3128 | fi |
| 3129 | LINKFORSHARED="$LINKFORSHARED $extra_frameworks";; |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3130 | UnixWare*) LINKFORSHARED="-Wl,-Bexport";; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3131 | SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3132 | ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3133 | FreeBSD*|NetBSD*|OpenBSD*) |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 3134 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 3135 | then |
| 3136 | LINKFORSHARED="-Wl,--export-dynamic" |
| 3137 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3138 | SunOS/5*) case $CC in |
| 3139 | *gcc*) |
Guido van Rossum | ff48418 | 2000-02-03 13:50:24 +0000 | [diff] [blame] | 3140 | if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 3141 | then |
| 3142 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3143 | fi;; |
| 3144 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3145 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3146 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3147 | echo "$ac_t""$LINKFORSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3148 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3149 | |
| 3150 | echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3151 | echo "configure:3152: checking CFLAGSFORSHARED" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3152 | if test ! "$LIBRARY" = "$LDLIBRARY" |
| 3153 | then |
Neil Schemenauer | 0c6141f | 2001-01-27 21:40:54 +0000 | [diff] [blame] | 3154 | case $ac_sys_system in |
| 3155 | CYGWIN*) |
| 3156 | # Cygwin needs CCSHARED when building extension DLLs |
| 3157 | # but not when building the interpreter DLL. |
| 3158 | CFLAGSFORSHARED='';; |
| 3159 | *) |
| 3160 | CFLAGSFORSHARED='$(CCSHARED)' |
| 3161 | esac |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3162 | fi |
| 3163 | echo "$ac_t""$CFLAGSFORSHARED" 1>&6 |
| 3164 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3165 | # checks for libraries |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3166 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3167 | echo "configure:3168: checking for dlopen in -ldl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3168 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3169 | 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] | 3170 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3171 | else |
| 3172 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3173 | LIBS="-ldl $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3174 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3175 | #line 3176 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3176 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3177 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3178 | /* We use char because int might match the return type of a gcc2 |
| 3179 | builtin and then its argument prototype would still apply. */ |
| 3180 | char dlopen(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3181 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3182 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3183 | dlopen() |
| 3184 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3185 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3186 | if { (eval echo configure:3187: \"$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] | 3187 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3188 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3189 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3190 | echo "configure: failed program was:" >&5 |
| 3191 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3192 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3193 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3194 | fi |
| 3195 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3196 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3197 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3198 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3199 | 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] | 3200 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3201 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3202 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3203 | cat >> confdefs.h <<EOF |
| 3204 | #define $ac_tr_lib 1 |
| 3205 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3206 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3207 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3208 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3209 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3210 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3211 | fi |
| 3212 | # Dynamic linking for SunOS/Solaris and SYSV |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3213 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3214 | echo "configure:3215: checking for shl_load in -ldld" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3215 | ac_lib_var=`echo dld'_'shl_load | 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="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3221 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +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 shl_load(); |
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 | shl_load() |
| 3231 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3232 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +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 dld | 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="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3255 | |
| 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 HP-UX |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3260 | |
| 3261 | # checks for system dependent C++ extensions support |
| 3262 | case "$ac_sys_system" in |
| 3263 | AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3264 | echo "configure:3265: checking for genuine AIX C++ extensions support" >&5 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3265 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3266 | #line 3267 "configure" |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3267 | #include "confdefs.h" |
| 3268 | #include "/usr/lpp/xlC/include/load.h" |
| 3269 | int main() { |
| 3270 | loadAndInit("", 0, "") |
| 3271 | ; return 0; } |
| 3272 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3273 | if { (eval echo configure:3274: \"$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] | 3274 | rm -rf conftest* |
| 3275 | cat >> confdefs.h <<\EOF |
| 3276 | #define AIX_GENUINE_CPLUSPLUS 1 |
| 3277 | EOF |
| 3278 | |
| 3279 | echo "$ac_t""yes" 1>&6 |
| 3280 | else |
| 3281 | echo "configure: failed program was:" >&5 |
| 3282 | cat conftest.$ac_ext >&5 |
| 3283 | rm -rf conftest* |
| 3284 | echo "$ac_t""no" 1>&6 |
| 3285 | fi |
| 3286 | rm -f conftest*;; |
| 3287 | *) ;; |
| 3288 | esac |
| 3289 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3290 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
| 3291 | # However on SGI IRIX, these exist but are broken. |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3292 | # BeOS' sockets are stashed in libnet. |
| 3293 | case "$ac_sys_system" in |
| 3294 | IRIX*) ;; |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3295 | *) |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3296 | echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3297 | echo "configure:3298: checking for t_open in -lnsl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3298 | ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3299 | 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] | 3300 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3301 | else |
| 3302 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3303 | LIBS="-lnsl $LIBS" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3304 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3305 | #line 3306 "configure" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3306 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3307 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3308 | /* We use char because int might match the return type of a gcc2 |
| 3309 | builtin and then its argument prototype would still apply. */ |
| 3310 | char t_open(); |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3311 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3312 | int main() { |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3313 | t_open() |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3314 | ; return 0; } |
| 3315 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3316 | if { (eval echo configure:3317: \"$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] | 3317 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3318 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3319 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3320 | echo "configure: failed program was:" >&5 |
| 3321 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3322 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3323 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3324 | fi |
| 3325 | rm -f conftest* |
| 3326 | LIBS="$ac_save_LIBS" |
| 3327 | |
| 3328 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3329 | 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] | 3330 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3331 | LIBS="-lnsl $LIBS" |
| 3332 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3333 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3334 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3335 | # SVR4 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3336 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3337 | echo "configure:3338: checking for socket in -lsocket" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3338 | ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3339 | 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] | 3340 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3341 | else |
| 3342 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3343 | LIBS="-lsocket $LIBS $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3344 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3345 | #line 3346 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3346 | #include "confdefs.h" |
| 3347 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3348 | /* We use char because int might match the return type of a gcc2 |
| 3349 | builtin and then its argument prototype would still apply. */ |
| 3350 | char socket(); |
| 3351 | |
| 3352 | int main() { |
| 3353 | socket() |
| 3354 | ; return 0; } |
| 3355 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3356 | if { (eval echo configure:3357: \"$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] | 3357 | rm -rf conftest* |
| 3358 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3359 | else |
| 3360 | echo "configure: failed program was:" >&5 |
| 3361 | cat conftest.$ac_ext >&5 |
| 3362 | rm -rf conftest* |
| 3363 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3364 | fi |
| 3365 | rm -f conftest* |
| 3366 | LIBS="$ac_save_LIBS" |
| 3367 | |
| 3368 | fi |
| 3369 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3370 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3371 | LIBS="-lsocket $LIBS" |
| 3372 | else |
| 3373 | echo "$ac_t""no" 1>&6 |
| 3374 | fi |
| 3375 | # SVR4 sockets |
Jeremy Hylton | cb25d5e | 2000-07-27 21:23:28 +0000 | [diff] [blame] | 3376 | ;; |
| 3377 | esac |
| 3378 | case "$ac_sys_system" in |
| 3379 | BeOS*) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3380 | echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3381 | echo "configure:3382: checking for socket in -lnet" >&5 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3382 | ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3383 | 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] | 3384 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3385 | else |
| 3386 | ac_save_LIBS="$LIBS" |
| 3387 | LIBS="-lnet $LIBS $LIBS" |
| 3388 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3389 | #line 3390 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3390 | #include "confdefs.h" |
| 3391 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3392 | /* We use char because int might match the return type of a gcc2 |
| 3393 | builtin and then its argument prototype would still apply. */ |
| 3394 | char socket(); |
| 3395 | |
| 3396 | int main() { |
| 3397 | socket() |
| 3398 | ; return 0; } |
| 3399 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3400 | if { (eval echo configure:3401: \"$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] | 3401 | rm -rf conftest* |
| 3402 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3403 | else |
| 3404 | echo "configure: failed program was:" >&5 |
| 3405 | cat conftest.$ac_ext >&5 |
| 3406 | rm -rf conftest* |
| 3407 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3408 | fi |
| 3409 | rm -f conftest* |
| 3410 | LIBS="$ac_save_LIBS" |
| 3411 | |
| 3412 | fi |
| 3413 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3414 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3415 | LIBS="-lnet $LIBS" |
| 3416 | else |
| 3417 | echo "$ac_t""no" 1>&6 |
| 3418 | fi |
| 3419 | # BeOS |
| 3420 | ;; |
| 3421 | esac |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3422 | |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3423 | echo $ac_n "checking for --with-libs""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3424 | echo "configure:3425: checking for --with-libs" >&5 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3425 | # Check whether --with-libs or --without-libs was given. |
| 3426 | if test "${with_libs+set}" = set; then |
| 3427 | withval="$with_libs" |
| 3428 | |
| 3429 | echo "$ac_t""$withval" 1>&6 |
| 3430 | LIBS="$withval $LIBS" |
| 3431 | |
| 3432 | else |
| 3433 | echo "$ac_t""no" 1>&6 |
| 3434 | fi |
| 3435 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3436 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3437 | # Determine if signalmodule should be used. |
| 3438 | |
| 3439 | |
| 3440 | echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3441 | echo "configure:3442: checking for --with-signal-module" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3442 | # Check whether --with-signal-module or --without-signal-module was given. |
| 3443 | if test "${with_signal_module+set}" = set; then |
| 3444 | withval="$with_signal_module" |
| 3445 | : |
| 3446 | fi |
| 3447 | |
| 3448 | |
| 3449 | if test -z "$with_signal_module" |
| 3450 | then with_signal_module="yes" |
| 3451 | fi |
| 3452 | echo "$ac_t""$with_signal_module" 1>&6 |
| 3453 | |
| 3454 | if test "${with_signal_module}" = "yes"; then |
| 3455 | USE_SIGNAL_MODULE="" |
| 3456 | SIGNAL_OBJS="" |
| 3457 | else |
| 3458 | USE_SIGNAL_MODULE="#" |
| 3459 | SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o" |
| 3460 | fi |
| 3461 | |
Guido van Rossum | 3d15bd8 | 2001-01-10 18:53:48 +0000 | [diff] [blame] | 3462 | # This is used to generate Setup.config |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3463 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3464 | USE_THREAD_MODULE="" |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3465 | |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3466 | echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3467 | echo "configure:3468: checking for --with-dec-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3468 | |
| 3469 | # Check whether --with-dec-threads or --without-dec-threads was given. |
| 3470 | if test "${with_dec_threads+set}" = set; then |
| 3471 | withval="$with_dec_threads" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3472 | |
| 3473 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3474 | LDLAST=-threads |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3475 | if test "${with_thread+set}" != set; then |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3476 | with_thread="$withval"; |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3477 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3478 | else |
| 3479 | echo "$ac_t""no" 1>&6 |
| 3480 | fi |
| 3481 | |
| 3482 | |
| 3483 | echo $ac_n "checking for --with-threads""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3484 | echo "configure:3485: checking for --with-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3485 | # Check whether --with-threads or --without-threads was given. |
| 3486 | if test "${with_threads+set}" = set; then |
| 3487 | withval="$with_threads" |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3488 | : |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3489 | fi |
| 3490 | |
| 3491 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3492 | # --with-thread is deprecated, but check for it anyway |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3493 | # Check whether --with-thread or --without-thread was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3494 | if test "${with_thread+set}" = set; then |
| 3495 | withval="$with_thread" |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 3496 | |
| 3497 | with_threads=$with_thread |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3498 | fi |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3499 | |
| 3500 | |
| 3501 | if test -z "$with_threads" |
| 3502 | then with_threads="yes" |
| 3503 | fi |
| 3504 | echo "$ac_t""$with_threads" 1>&6 |
| 3505 | |
| 3506 | if test "$with_threads" = "no" |
| 3507 | then |
| 3508 | USE_THREAD_MODULE="#" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3509 | elif test "$ac_cv_kpthread" = "yes" |
| 3510 | then |
| 3511 | CC="$CC -Kpthread" |
| 3512 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3513 | #define WITH_THREAD 1 |
| 3514 | EOF |
| 3515 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3516 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3517 | #define _POSIX_THREADS 1 |
| 3518 | EOF |
| 3519 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3520 | LIBOBJS="$LIBOBJS thread.o" |
| 3521 | else |
| 3522 | if test ! -z "$with_threads" -a -d "$with_threads" |
| 3523 | then LDFLAGS="$LDFLAGS -L$with_threads" |
| 3524 | fi |
| 3525 | if test ! -z "$withval" -a -d "$withval" |
| 3526 | then LDFLAGS="$LDFLAGS -L$withval" |
| 3527 | fi |
| 3528 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 3529 | #define _REENTRANT 1 |
| 3530 | EOF |
| 3531 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3532 | ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3533 | echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3534 | echo "configure:3535: checking for mach/cthreads.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3535 | 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] | 3536 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3537 | else |
| 3538 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3539 | #line 3540 "configure" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3540 | #include "confdefs.h" |
| 3541 | #include <mach/cthreads.h> |
| 3542 | EOF |
| 3543 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3544 | { (eval echo configure:3545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3545 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3546 | if test -z "$ac_err"; then |
| 3547 | rm -rf conftest* |
| 3548 | eval "ac_cv_header_$ac_safe=yes" |
| 3549 | else |
| 3550 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3551 | echo "configure: failed program was:" >&5 |
| 3552 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3553 | rm -rf conftest* |
| 3554 | eval "ac_cv_header_$ac_safe=no" |
| 3555 | fi |
| 3556 | rm -f conftest* |
| 3557 | fi |
| 3558 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3559 | echo "$ac_t""yes" 1>&6 |
| 3560 | cat >> confdefs.h <<\EOF |
| 3561 | #define WITH_THREAD 1 |
| 3562 | EOF |
| 3563 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3564 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3565 | #define C_THREADS 1 |
| 3566 | EOF |
| 3567 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3568 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3569 | else |
| 3570 | echo "$ac_t""no" 1>&6 |
| 3571 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3572 | echo $ac_n "checking for --with-pth""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3573 | echo "configure:3574: checking for --with-pth" >&5 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3574 | # Check whether --with-pth or --without-pth was given. |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3575 | if test "${with_pth+set}" = set; then |
| 3576 | withval="$with_pth" |
| 3577 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3578 | echo "$ac_t""$withval" 1>&6 |
| 3579 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3580 | #define WITH_THREAD 1 |
| 3581 | EOF |
| 3582 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3583 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3584 | #define HAVE_PTH 1 |
| 3585 | EOF |
| 3586 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3587 | LIBS="-lpth $LIBS" |
| 3588 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3589 | else |
| 3590 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3591 | echo "$ac_t""no" 1>&6 |
| 3592 | echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3593 | echo "configure:3594: checking for pthread_create in -lpthread" >&5 |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3594 | ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3595 | 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] | 3596 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3597 | else |
| 3598 | ac_save_LIBS="$LIBS" |
| 3599 | LIBS="-lpthread $LIBS" |
| 3600 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3601 | #line 3602 "configure" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3602 | #include "confdefs.h" |
| 3603 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3604 | /* We use char because int might match the return type of a gcc2 |
| 3605 | builtin and then its argument prototype would still apply. */ |
| 3606 | char pthread_create(); |
| 3607 | |
| 3608 | int main() { |
| 3609 | pthread_create() |
| 3610 | ; return 0; } |
| 3611 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3612 | if { (eval echo configure:3613: \"$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] | 3613 | rm -rf conftest* |
| 3614 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3615 | else |
| 3616 | echo "configure: failed program was:" >&5 |
| 3617 | cat conftest.$ac_ext >&5 |
| 3618 | rm -rf conftest* |
| 3619 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3620 | fi |
| 3621 | rm -f conftest* |
| 3622 | LIBS="$ac_save_LIBS" |
| 3623 | |
| 3624 | fi |
| 3625 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3626 | echo "$ac_t""yes" 1>&6 |
| 3627 | cat >> confdefs.h <<\EOF |
| 3628 | #define WITH_THREAD 1 |
| 3629 | EOF |
| 3630 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3631 | case $ac_sys_system in |
| 3632 | Darwin*) ;; |
| 3633 | *) cat >> confdefs.h <<\EOF |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3634 | #define _POSIX_THREADS 1 |
| 3635 | EOF |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3636 | ;; |
| 3637 | esac |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3638 | LIBS="-lpthread $LIBS" |
| 3639 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3640 | else |
| 3641 | echo "$ac_t""no" 1>&6 |
| 3642 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3643 | echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3644 | echo "configure:3645: checking for pthread_detach" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3645 | 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] | 3646 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3647 | else |
| 3648 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3649 | #line 3650 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3650 | #include "confdefs.h" |
| 3651 | /* System header to define __stub macros and hopefully few prototypes, |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3652 | which can conflict with char pthread_detach(); below. */ |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3653 | #include <assert.h> |
| 3654 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3655 | /* We use char because int might match the return type of a gcc2 |
| 3656 | builtin and then its argument prototype would still apply. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3657 | char pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3658 | |
| 3659 | int main() { |
| 3660 | |
| 3661 | /* The GNU C library defines this for functions which it implements |
| 3662 | to always fail with ENOSYS. Some functions are actually named |
| 3663 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3664 | #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3665 | choke me |
| 3666 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3667 | pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3668 | #endif |
| 3669 | |
| 3670 | ; return 0; } |
| 3671 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3672 | if { (eval echo configure:3673: \"$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] | 3673 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3674 | eval "ac_cv_func_pthread_detach=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3675 | else |
| 3676 | echo "configure: failed program was:" >&5 |
| 3677 | cat conftest.$ac_ext >&5 |
| 3678 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3679 | eval "ac_cv_func_pthread_detach=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3680 | fi |
| 3681 | rm -f conftest* |
| 3682 | fi |
| 3683 | |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3684 | if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3685 | echo "$ac_t""yes" 1>&6 |
| 3686 | cat >> confdefs.h <<\EOF |
| 3687 | #define WITH_THREAD 1 |
| 3688 | EOF |
| 3689 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3690 | case $ac_sys_system in |
| 3691 | Darwin*) ;; |
| 3692 | *) cat >> confdefs.h <<\EOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3693 | #define _POSIX_THREADS 1 |
| 3694 | EOF |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 3695 | ;; |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3696 | esac |
| 3697 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3698 | else |
| 3699 | echo "$ac_t""no" 1>&6 |
| 3700 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3701 | ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3702 | echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3703 | echo "configure:3704: checking for kernel/OS.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3704 | 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] | 3705 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3706 | else |
| 3707 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3708 | #line 3709 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3709 | #include "confdefs.h" |
| 3710 | #include <kernel/OS.h> |
| 3711 | EOF |
| 3712 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3713 | { (eval echo configure:3714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3714 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3715 | if test -z "$ac_err"; then |
| 3716 | rm -rf conftest* |
| 3717 | eval "ac_cv_header_$ac_safe=yes" |
| 3718 | else |
| 3719 | echo "$ac_err" >&5 |
| 3720 | echo "configure: failed program was:" >&5 |
| 3721 | cat conftest.$ac_ext >&5 |
| 3722 | rm -rf conftest* |
| 3723 | eval "ac_cv_header_$ac_safe=no" |
| 3724 | fi |
| 3725 | rm -f conftest* |
| 3726 | fi |
| 3727 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3728 | echo "$ac_t""yes" 1>&6 |
| 3729 | cat >> confdefs.h <<\EOF |
| 3730 | #define WITH_THREAD 1 |
| 3731 | EOF |
| 3732 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3733 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3734 | #define BEOS_THREADS 1 |
| 3735 | EOF |
| 3736 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3737 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3738 | else |
| 3739 | echo "$ac_t""no" 1>&6 |
| 3740 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3741 | echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3742 | echo "configure:3743: checking for pthread_create in -lpthreads" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3743 | ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3744 | 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] | 3745 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3746 | else |
| 3747 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3748 | LIBS="-lpthreads $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3749 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3750 | #line 3751 "configure" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3751 | #include "confdefs.h" |
| 3752 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3753 | /* We use char because int might match the return type of a gcc2 |
| 3754 | builtin and then its argument prototype would still apply. */ |
| 3755 | char pthread_create(); |
| 3756 | |
| 3757 | int main() { |
| 3758 | pthread_create() |
| 3759 | ; return 0; } |
| 3760 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3761 | if { (eval echo configure:3762: \"$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] | 3762 | rm -rf conftest* |
| 3763 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3764 | else |
| 3765 | echo "configure: failed program was:" >&5 |
| 3766 | cat conftest.$ac_ext >&5 |
| 3767 | rm -rf conftest* |
| 3768 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3769 | fi |
| 3770 | rm -f conftest* |
| 3771 | LIBS="$ac_save_LIBS" |
| 3772 | |
| 3773 | fi |
| 3774 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3775 | echo "$ac_t""yes" 1>&6 |
| 3776 | cat >> confdefs.h <<\EOF |
| 3777 | #define WITH_THREAD 1 |
| 3778 | EOF |
| 3779 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3780 | cat >> confdefs.h <<\EOF |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3781 | #define _POSIX_THREADS 1 |
| 3782 | EOF |
| 3783 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3784 | LIBS="$LIBS -lpthreads" |
| 3785 | LIBOBJS="$LIBOBJS thread.o" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3786 | else |
| 3787 | echo "$ac_t""no" 1>&6 |
| 3788 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3789 | echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3790 | echo "configure:3791: checking for pthread_create in -lc_r" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3791 | ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3792 | 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] | 3793 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3794 | else |
| 3795 | ac_save_LIBS="$LIBS" |
| 3796 | LIBS="-lc_r $LIBS" |
| 3797 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3798 | #line 3799 "configure" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3799 | #include "confdefs.h" |
| 3800 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3801 | /* We use char because int might match the return type of a gcc2 |
| 3802 | builtin and then its argument prototype would still apply. */ |
| 3803 | char pthread_create(); |
| 3804 | |
| 3805 | int main() { |
| 3806 | pthread_create() |
| 3807 | ; return 0; } |
| 3808 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3809 | if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3810 | rm -rf conftest* |
| 3811 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3812 | else |
| 3813 | echo "configure: failed program was:" >&5 |
| 3814 | cat conftest.$ac_ext >&5 |
| 3815 | rm -rf conftest* |
| 3816 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3817 | fi |
| 3818 | rm -f conftest* |
| 3819 | LIBS="$ac_save_LIBS" |
| 3820 | |
| 3821 | fi |
| 3822 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3823 | echo "$ac_t""yes" 1>&6 |
| 3824 | cat >> confdefs.h <<\EOF |
| 3825 | #define WITH_THREAD 1 |
| 3826 | EOF |
| 3827 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3828 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3829 | #define _POSIX_THREADS 1 |
| 3830 | EOF |
| 3831 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3832 | LIBS="$LIBS -lc_r" |
| 3833 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3834 | else |
| 3835 | echo "$ac_t""no" 1>&6 |
| 3836 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3837 | echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3838 | echo "configure:3839: checking for __d6_pthread_create in -lthread" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3839 | ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3840 | 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] | 3841 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3842 | else |
| 3843 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3844 | LIBS="-lthread $LIBS" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3845 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3846 | #line 3847 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3847 | #include "confdefs.h" |
| 3848 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3849 | /* We use char because int might match the return type of a gcc2 |
| 3850 | builtin and then its argument prototype would still apply. */ |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3851 | char __d6_pthread_create(); |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3852 | |
| 3853 | int main() { |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3854 | __d6_pthread_create() |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3855 | ; return 0; } |
| 3856 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3857 | if { (eval echo configure:3858: \"$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] | 3858 | rm -rf conftest* |
| 3859 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3860 | else |
| 3861 | echo "configure: failed program was:" >&5 |
| 3862 | cat conftest.$ac_ext >&5 |
| 3863 | rm -rf conftest* |
| 3864 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3865 | fi |
| 3866 | rm -f conftest* |
| 3867 | LIBS="$ac_save_LIBS" |
| 3868 | |
| 3869 | fi |
| 3870 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3871 | echo "$ac_t""yes" 1>&6 |
| 3872 | cat >> confdefs.h <<\EOF |
| 3873 | #define WITH_THREAD 1 |
| 3874 | EOF |
| 3875 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3876 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3877 | #define _POSIX_THREADS 1 |
| 3878 | EOF |
| 3879 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3880 | LIBS="$LIBS -lthread" |
| 3881 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3882 | else |
| 3883 | echo "$ac_t""no" 1>&6 |
| 3884 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3885 | echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3886 | echo "configure:3887: checking for __pthread_create_system in -lpthread" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3887 | ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` |
| 3888 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 3889 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3890 | else |
| 3891 | ac_save_LIBS="$LIBS" |
| 3892 | LIBS="-lpthread $LIBS" |
| 3893 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3894 | #line 3895 "configure" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3895 | #include "confdefs.h" |
| 3896 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3897 | /* We use char because int might match the return type of a gcc2 |
| 3898 | builtin and then its argument prototype would still apply. */ |
| 3899 | char __pthread_create_system(); |
| 3900 | |
| 3901 | int main() { |
| 3902 | __pthread_create_system() |
| 3903 | ; return 0; } |
| 3904 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3905 | if { (eval echo configure:3906: \"$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] | 3906 | rm -rf conftest* |
| 3907 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3908 | else |
| 3909 | echo "configure: failed program was:" >&5 |
| 3910 | cat conftest.$ac_ext >&5 |
| 3911 | rm -rf conftest* |
| 3912 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3913 | fi |
| 3914 | rm -f conftest* |
| 3915 | LIBS="$ac_save_LIBS" |
| 3916 | |
| 3917 | fi |
| 3918 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3919 | echo "$ac_t""yes" 1>&6 |
| 3920 | cat >> confdefs.h <<\EOF |
| 3921 | #define WITH_THREAD 1 |
| 3922 | EOF |
| 3923 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3924 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3925 | #define _POSIX_THREADS 1 |
| 3926 | EOF |
| 3927 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3928 | LIBS="$LIBS -lpthread" |
| 3929 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3930 | else |
| 3931 | echo "$ac_t""no" 1>&6 |
| 3932 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3933 | echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3934 | echo "configure:3935: checking for pthread_create in -lcma" >&5 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3935 | ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3936 | 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] | 3937 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3938 | else |
| 3939 | ac_save_LIBS="$LIBS" |
| 3940 | LIBS="-lcma $LIBS" |
| 3941 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3942 | #line 3943 "configure" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3943 | #include "confdefs.h" |
| 3944 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3945 | /* We use char because int might match the return type of a gcc2 |
| 3946 | builtin and then its argument prototype would still apply. */ |
| 3947 | char pthread_create(); |
| 3948 | |
| 3949 | int main() { |
| 3950 | pthread_create() |
| 3951 | ; return 0; } |
| 3952 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 3953 | if { (eval echo configure:3954: \"$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] | 3954 | rm -rf conftest* |
| 3955 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3956 | else |
| 3957 | echo "configure: failed program was:" >&5 |
| 3958 | cat conftest.$ac_ext >&5 |
| 3959 | rm -rf conftest* |
| 3960 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3961 | fi |
| 3962 | rm -f conftest* |
| 3963 | LIBS="$ac_save_LIBS" |
| 3964 | |
| 3965 | fi |
| 3966 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3967 | echo "$ac_t""yes" 1>&6 |
| 3968 | cat >> confdefs.h <<\EOF |
| 3969 | #define WITH_THREAD 1 |
| 3970 | EOF |
| 3971 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3972 | cat >> confdefs.h <<\EOF |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3973 | #define _POSIX_THREADS 1 |
| 3974 | EOF |
| 3975 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3976 | LIBS="$LIBS -lcma" |
| 3977 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3978 | else |
| 3979 | echo "$ac_t""no" 1>&6 |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 3980 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3981 | USE_THREAD_MODULE="#" |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 3982 | fi |
| 3983 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3984 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3985 | fi |
| 3986 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3987 | fi |
| 3988 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 3989 | fi |
| 3990 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3991 | fi |
| 3992 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3993 | fi |
| 3994 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3995 | fi |
| 3996 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3997 | fi |
| 3998 | |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3999 | fi |
| 4000 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4001 | fi |
| 4002 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4003 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4004 | echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4005 | echo "configure:4006: checking for usconfig in -lmpc" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4006 | ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4007 | 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] | 4008 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4009 | else |
| 4010 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4011 | LIBS="-lmpc $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4012 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4013 | #line 4014 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4014 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4015 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4016 | /* We use char because int might match the return type of a gcc2 |
| 4017 | builtin and then its argument prototype would still apply. */ |
| 4018 | char usconfig(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4019 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4020 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4021 | usconfig() |
| 4022 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4023 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4024 | if { (eval echo configure:4025: \"$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] | 4025 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4026 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4027 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4028 | echo "configure: failed program was:" >&5 |
| 4029 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4030 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4031 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4032 | fi |
| 4033 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4034 | LIBS="$ac_save_LIBS" |
| 4035 | |
| 4036 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4037 | 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] | 4038 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4039 | cat >> confdefs.h <<\EOF |
| 4040 | #define WITH_THREAD 1 |
| 4041 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4042 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4043 | LIBS="$LIBS -lmpc" |
| 4044 | LIBOBJS="$LIBOBJS thread.o" |
| 4045 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4046 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4047 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4048 | fi |
| 4049 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4050 | echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4051 | echo "configure:4052: checking for thr_create in -lthread" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4052 | ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4053 | 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] | 4054 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4055 | else |
| 4056 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4057 | LIBS="-lthread $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4058 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4059 | #line 4060 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4060 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4061 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4062 | /* We use char because int might match the return type of a gcc2 |
| 4063 | builtin and then its argument prototype would still apply. */ |
| 4064 | char thr_create(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4065 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4066 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4067 | thr_create() |
| 4068 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4069 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4070 | if { (eval echo configure:4071: \"$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] | 4071 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4072 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4073 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4074 | echo "configure: failed program was:" >&5 |
| 4075 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4076 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4077 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4078 | fi |
| 4079 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4080 | LIBS="$ac_save_LIBS" |
| 4081 | |
| 4082 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4083 | 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] | 4084 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4085 | cat >> confdefs.h <<\EOF |
| 4086 | #define WITH_THREAD 1 |
| 4087 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4088 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4089 | LIBS="$LIBS -lthread" |
| 4090 | LIBOBJS="$LIBOBJS thread.o" |
| 4091 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4092 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4093 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4094 | fi |
| 4095 | |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4096 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4097 | if test "$USE_THREAD_MODULE" != "#" |
| 4098 | then |
| 4099 | # If the above checks didn't disable threads, (at least) OSF1 |
| 4100 | # needs this '-threads' argument during linking. |
| 4101 | case $ac_sys_system in |
| 4102 | OSF1) LDLAST=-threads;; |
| 4103 | esac |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4104 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4105 | fi |
| 4106 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4107 | # Check for enable-ipv6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4108 | echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4109 | echo "configure:4110: checking if --enable-ipv6 is specified" >&5 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4110 | # Check whether --enable-ipv6 or --disable-ipv6 was given. |
| 4111 | if test "${enable_ipv6+set}" = set; then |
| 4112 | enableval="$enable_ipv6" |
| 4113 | case "$enableval" in |
| 4114 | no) |
| 4115 | echo "$ac_t""no" 1>&6 |
| 4116 | ipv6=no |
| 4117 | ;; |
| 4118 | *) echo "$ac_t""yes" 1>&6 |
| 4119 | cat >> confdefs.h <<\EOF |
| 4120 | #define ENABLE_IPV6 1 |
| 4121 | EOF |
| 4122 | |
| 4123 | ipv6=yes |
| 4124 | ;; |
| 4125 | esac |
| 4126 | else |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4127 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4128 | if test "$cross_compiling" = yes; then |
| 4129 | echo "$ac_t""no" 1>&6 |
| 4130 | ipv6=no |
| 4131 | |
| 4132 | else |
| 4133 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4134 | #line 4135 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4135 | #include "confdefs.h" |
| 4136 | /* AF_INET6 available check */ |
| 4137 | #include <sys/types.h> |
| 4138 | #include <sys/socket.h> |
| 4139 | main() |
| 4140 | { |
| 4141 | if (socket(AF_INET6, SOCK_STREAM, 0) < 0) |
| 4142 | exit(1); |
| 4143 | else |
| 4144 | exit(0); |
| 4145 | } |
| 4146 | |
| 4147 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4148 | if { (eval echo configure:4149: \"$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] | 4149 | then |
| 4150 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4151 | ipv6=yes |
| 4152 | else |
| 4153 | echo "configure: failed program was:" >&5 |
| 4154 | cat conftest.$ac_ext >&5 |
| 4155 | rm -fr conftest* |
| 4156 | echo "$ac_t""no" 1>&6 |
| 4157 | ipv6=no |
| 4158 | fi |
| 4159 | rm -fr conftest* |
| 4160 | fi |
| 4161 | |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4162 | |
| 4163 | if test "$ipv6" = "yes"; then |
| 4164 | echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4165 | echo "configure:4166: checking if RFC2553 API is available" >&5 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4166 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4167 | #line 4168 "configure" |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4168 | #include "confdefs.h" |
| 4169 | #include <sys/types.h> |
| 4170 | #include <netinet/in.h> |
| 4171 | int main() { |
| 4172 | struct sockaddr_in6 x; |
| 4173 | x.sin6_scope_id; |
| 4174 | ; return 0; } |
| 4175 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4176 | if { (eval echo configure:4177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4177 | rm -rf conftest* |
| 4178 | echo "$ac_t""yes" 1>&6 |
| 4179 | ipv6=yes |
| 4180 | else |
| 4181 | echo "configure: failed program was:" >&5 |
| 4182 | cat conftest.$ac_ext >&5 |
| 4183 | rm -rf conftest* |
| 4184 | echo "$ac_t""no" 1>&6 |
| 4185 | ipv6=no |
| 4186 | fi |
| 4187 | rm -f conftest* |
| 4188 | fi |
| 4189 | |
| 4190 | if test "$ipv6" = "yes"; then |
| 4191 | cat >> confdefs.h <<\EOF |
| 4192 | #define ENABLE_IPV6 1 |
| 4193 | EOF |
| 4194 | |
| 4195 | fi |
| 4196 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4197 | fi |
| 4198 | |
| 4199 | |
| 4200 | ipv6type=unknown |
| 4201 | ipv6lib=none |
| 4202 | ipv6trylibc=no |
| 4203 | |
| 4204 | if test "$ipv6" = "yes"; then |
| 4205 | echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4206 | echo "configure:4207: checking ipv6 stack type" >&5 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4207 | for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; do |
| 4208 | case $i in |
| 4209 | inria) |
| 4210 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4211 | #line 4212 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4212 | #include "confdefs.h" |
| 4213 | dnl |
| 4214 | #include <netinet/in.h> |
| 4215 | #ifdef IPV6_INRIA_VERSION |
| 4216 | yes |
| 4217 | #endif |
| 4218 | EOF |
| 4219 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4220 | egrep "yes" >/dev/null 2>&1; then |
| 4221 | rm -rf conftest* |
| 4222 | ipv6type=$i; |
| 4223 | OPT="-DINET6 $OPT" |
| 4224 | fi |
| 4225 | rm -f conftest* |
| 4226 | |
| 4227 | ;; |
| 4228 | kame) |
| 4229 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4230 | #line 4231 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4231 | #include "confdefs.h" |
| 4232 | dnl |
| 4233 | #include <netinet/in.h> |
| 4234 | #ifdef __KAME__ |
| 4235 | yes |
| 4236 | #endif |
| 4237 | EOF |
| 4238 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4239 | egrep "yes" >/dev/null 2>&1; then |
| 4240 | rm -rf conftest* |
| 4241 | ipv6type=$i; |
| 4242 | ipv6lib=inet6 |
| 4243 | ipv6libdir=/usr/local/v6/lib |
| 4244 | ipv6trylibc=yes |
| 4245 | OPT="-DINET6 $OPT" |
| 4246 | fi |
| 4247 | rm -f conftest* |
| 4248 | |
| 4249 | ;; |
| 4250 | linux-glibc) |
| 4251 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4252 | #line 4253 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4253 | #include "confdefs.h" |
| 4254 | dnl |
| 4255 | #include <features.h> |
| 4256 | #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) |
| 4257 | yes |
| 4258 | #endif |
| 4259 | EOF |
| 4260 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4261 | egrep "yes" >/dev/null 2>&1; then |
| 4262 | rm -rf conftest* |
| 4263 | ipv6type=$i; |
| 4264 | ipv6trylibc=yes |
| 4265 | OPT="-DINET6 $OPT" |
| 4266 | fi |
| 4267 | rm -f conftest* |
| 4268 | |
| 4269 | ;; |
| 4270 | linux-inet6) |
| 4271 | if test -d /usr/inet6; then |
| 4272 | ipv6type=$i |
| 4273 | ipv6lib=inet6 |
| 4274 | ipv6libdir=/usr/inet6/lib |
| 4275 | OPT="-DINET6 -I/usr/inet6/include $OPT" |
| 4276 | fi |
| 4277 | ;; |
| 4278 | solaris) |
| 4279 | if test -f /etc/netconfig; then |
| 4280 | if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then |
| 4281 | ipv6type=$i |
| 4282 | ipv6trylibc=yes |
| 4283 | OPT="-DINET6 $OPT" |
| 4284 | fi |
| 4285 | fi |
| 4286 | ;; |
| 4287 | toshiba) |
| 4288 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4289 | #line 4290 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4290 | #include "confdefs.h" |
| 4291 | dnl |
| 4292 | #include <sys/param.h> |
| 4293 | #ifdef _TOSHIBA_INET6 |
| 4294 | yes |
| 4295 | #endif |
| 4296 | EOF |
| 4297 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4298 | egrep "yes" >/dev/null 2>&1; then |
| 4299 | rm -rf conftest* |
| 4300 | ipv6type=$i; |
| 4301 | ipv6lib=inet6; |
| 4302 | ipv6libdir=/usr/local/v6/lib; |
| 4303 | OPT="-DINET6 $OPT" |
| 4304 | fi |
| 4305 | rm -f conftest* |
| 4306 | |
| 4307 | ;; |
| 4308 | v6d) |
| 4309 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4310 | #line 4311 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4311 | #include "confdefs.h" |
| 4312 | dnl |
| 4313 | #include </usr/local/v6/include/sys/v6config.h> |
| 4314 | #ifdef __V6D__ |
| 4315 | yes |
| 4316 | #endif |
| 4317 | EOF |
| 4318 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4319 | egrep "yes" >/dev/null 2>&1; then |
| 4320 | rm -rf conftest* |
| 4321 | ipv6type=$i; |
| 4322 | ipv6lib=v6; |
| 4323 | ipv6libdir=/usr/local/v6/lib; |
| 4324 | OPT="-I/usr/local/v6/include $OPT" |
| 4325 | fi |
| 4326 | rm -f conftest* |
| 4327 | |
| 4328 | ;; |
| 4329 | zeta) |
| 4330 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4331 | #line 4332 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4332 | #include "confdefs.h" |
| 4333 | dnl |
| 4334 | #include <sys/param.h> |
| 4335 | #ifdef _ZETA_MINAMI_INET6 |
| 4336 | yes |
| 4337 | #endif |
| 4338 | EOF |
| 4339 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4340 | egrep "yes" >/dev/null 2>&1; then |
| 4341 | rm -rf conftest* |
| 4342 | ipv6type=$i; |
| 4343 | ipv6lib=inet6; |
| 4344 | ipv6libdir=/usr/local/v6/lib; |
| 4345 | OPT="-DINET6 $OPT" |
| 4346 | fi |
| 4347 | rm -f conftest* |
| 4348 | |
| 4349 | ;; |
| 4350 | esac |
| 4351 | if test "$ipv6type" != "unknown"; then |
| 4352 | break |
| 4353 | fi |
| 4354 | done |
| 4355 | echo "$ac_t""$ipv6type" 1>&6 |
| 4356 | fi |
| 4357 | |
| 4358 | if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then |
| 4359 | if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then |
| 4360 | LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" |
| 4361 | echo "using lib$ipv6lib" |
| 4362 | else |
| 4363 | if test $ipv6trylibc = "yes"; then |
| 4364 | echo "using libc" |
| 4365 | else |
| 4366 | echo 'Fatal: no $ipv6lib library found. cannot continue.' |
| 4367 | echo "You need to fetch lib$ipv6lib.a from appropriate" |
| 4368 | echo 'ipv6 kit and compile beforehand.' |
| 4369 | exit 1 |
| 4370 | fi |
| 4371 | fi |
| 4372 | fi |
| 4373 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4374 | # Check for GC support |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4375 | echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4376 | echo "configure:4377: checking for --with-cycle-gc" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4377 | # Check whether --with-cycle-gc or --without-cycle-gc was given. |
| 4378 | if test "${with_cycle_gc+set}" = set; then |
| 4379 | withval="$with_cycle_gc" |
| 4380 | : |
| 4381 | fi |
| 4382 | |
| 4383 | |
| 4384 | if test -z "$with_cycle_gc" |
| 4385 | then with_cycle_gc="yes" |
| 4386 | fi |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame] | 4387 | if test "$with_cycle_gc" != "no" |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4388 | then |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4389 | cat >> confdefs.h <<\EOF |
| 4390 | #define WITH_CYCLE_GC 1 |
| 4391 | EOF |
| 4392 | |
| 4393 | fi |
| 4394 | echo "$ac_t""$with_cycle_gc" 1>&6 |
| 4395 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4396 | # Check for Python-specific malloc support |
| 4397 | echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4398 | echo "configure:4399: checking for --with-pymalloc" >&5 |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4399 | # Check whether --with-pymalloc or --without-pymalloc was given. |
| 4400 | if test "${with_pymalloc+set}" = set; then |
| 4401 | withval="$with_pymalloc" |
| 4402 | |
| 4403 | if test "$withval" != no |
| 4404 | then cat >> confdefs.h <<\EOF |
| 4405 | #define WITH_PYMALLOC 1 |
| 4406 | EOF |
| 4407 | echo "$ac_t""yes" 1>&6 |
| 4408 | else echo "$ac_t""no" 1>&6 |
| 4409 | fi |
| 4410 | else |
| 4411 | echo "$ac_t""no" 1>&6 |
| 4412 | fi |
| 4413 | |
| 4414 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4415 | # Check for --with-wctype-functions |
| 4416 | echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4417 | echo "configure:4418: checking for --with-wctype-functions" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4418 | # Check whether --with-wctype-functions or --without-wctype-functions was given. |
| 4419 | if test "${with_wctype_functions+set}" = set; then |
| 4420 | withval="$with_wctype_functions" |
| 4421 | |
| 4422 | if test "$withval" != no |
| 4423 | then cat >> confdefs.h <<\EOF |
| 4424 | #define WANT_WCTYPE_FUNCTIONS 1 |
| 4425 | EOF |
| 4426 | echo "$ac_t""yes" 1>&6 |
| 4427 | else echo "$ac_t""no" 1>&6 |
| 4428 | fi |
| 4429 | else |
| 4430 | echo "$ac_t""no" 1>&6 |
| 4431 | fi |
| 4432 | |
| 4433 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4434 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4435 | |
| 4436 | DLINCLDIR=/ |
| 4437 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4438 | echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4439 | echo "configure:4440: checking for --with-sgi-dl" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4440 | # Check whether --with-sgi-dl or --without-sgi-dl was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4441 | if test "${with_sgi_dl+set}" = set; then |
| 4442 | withval="$with_sgi_dl" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4443 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4444 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4445 | cat >> confdefs.h <<\EOF |
| 4446 | #define WITH_SGI_DL 1 |
| 4447 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4448 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4449 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4450 | dldir=$withval |
Guido van Rossum | 4095101 | 2000-10-07 16:21:27 +0000 | [diff] [blame] | 4451 | if test ! -z "$dldir" -a -d "$dldir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 4452 | then LDFLAGS="$LDFLAGS -L$dldir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4453 | 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] | 4454 | fi |
| 4455 | DLINCLDIR=${dldir} |
| 4456 | LIBS="$LIBS -ldl -lmld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4457 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4458 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4459 | fi |
| 4460 | |
| 4461 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4462 | echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4463 | echo "configure:4464: checking for --with-dl-dld" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4464 | # Check whether --with-dl-dld or --without-dl-dld was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4465 | if test "${with_dl_dld+set}" = set; then |
| 4466 | withval="$with_dl_dld" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4467 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4468 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4469 | cat >> confdefs.h <<\EOF |
| 4470 | #define WITH_DL_DLD 1 |
| 4471 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4472 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4473 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4474 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 4475 | dlddir=`echo "$withval" | sed 's/.*,//'` |
Barry Warsaw | 7d1219d | 2000-10-05 18:45:53 +0000 | [diff] [blame] | 4476 | 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] | 4477 | then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4478 | 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] | 4479 | fi |
| 4480 | DLINCLDIR=${dldir} |
| 4481 | LIBS="$LIBS -ldl -ldld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4482 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4483 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4484 | fi |
| 4485 | |
| 4486 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4487 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 4488 | # 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] | 4489 | for ac_func in dlopen |
| 4490 | do |
| 4491 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4492 | echo "configure:4493: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4493 | 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] | 4494 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4495 | else |
| 4496 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4497 | #line 4498 "configure" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4498 | #include "confdefs.h" |
| 4499 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4500 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4501 | #include <assert.h> |
| 4502 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4503 | /* We use char because int might match the return type of a gcc2 |
| 4504 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4505 | char $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4506 | |
| 4507 | int main() { |
| 4508 | |
| 4509 | /* The GNU C library defines this for functions which it implements |
| 4510 | to always fail with ENOSYS. Some functions are actually named |
| 4511 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4512 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4513 | choke me |
| 4514 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4515 | $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4516 | #endif |
| 4517 | |
| 4518 | ; return 0; } |
| 4519 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4520 | if { (eval echo configure:4521: \"$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] | 4521 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4522 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4523 | else |
| 4524 | echo "configure: failed program was:" >&5 |
| 4525 | cat conftest.$ac_ext >&5 |
| 4526 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4527 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4528 | fi |
| 4529 | rm -f conftest* |
| 4530 | fi |
| 4531 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4532 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4533 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4534 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4535 | cat >> confdefs.h <<EOF |
| 4536 | #define $ac_tr_func 1 |
| 4537 | EOF |
| 4538 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4539 | else |
| 4540 | echo "$ac_t""no" 1>&6 |
| 4541 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4542 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4543 | |
| 4544 | |
| 4545 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 4546 | # loading of modules. |
| 4547 | |
| 4548 | echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4549 | echo "configure:4550: checking DYNLOADFILE" >&5 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4550 | if test -z "$DYNLOADFILE" |
| 4551 | then |
| 4552 | case $ac_sys_system/$ac_sys_release in |
| 4553 | AIX*) DYNLOADFILE="dynload_aix.o";; |
| 4554 | BeOS*) DYNLOADFILE="dynload_beos.o";; |
| 4555 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4556 | Darwin/*) DYNLOADFILE="dynload_next.o";; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4557 | *) |
| 4558 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 4559 | # out any dynamic loading |
| 4560 | if test "$ac_cv_func_dlopen" = yes |
| 4561 | then DYNLOADFILE="dynload_shlib.o" |
| 4562 | else DYNLOADFILE="dynload_stub.o" |
| 4563 | fi |
| 4564 | ;; |
| 4565 | esac |
| 4566 | fi |
| 4567 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
| 4568 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 4569 | then |
| 4570 | cat >> confdefs.h <<\EOF |
| 4571 | #define HAVE_DYNAMIC_LOADING 1 |
| 4572 | EOF |
| 4573 | |
| 4574 | fi |
| 4575 | |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4576 | # MACHDEP_OBJS can be set to platform-specific object files needed by Python |
| 4577 | |
| 4578 | |
| 4579 | echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4580 | echo "configure:4581: checking MACHDEP_OBJS" >&5 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4581 | if test -z "$MACHDEP_OBJS" |
| 4582 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4583 | MACHDEP_OBJS=$extra_machdep_objs |
| 4584 | else |
| 4585 | MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4586 | fi |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4587 | echo "$ac_t""MACHDEP_OBJS" 1>&6 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4588 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4589 | # checks for library functions |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4590 | for ac_func in alarm chown clock confstr ctermid ctermid_r execv \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4591 | flock fork fsync fdatasync fpathconf ftime ftruncate \ |
Martin v. Löwis | f95dd0a | 2001-08-15 17:14:33 +0000 | [diff] [blame] | 4592 | gai_strerror getgroups getlogin getpeername getpid getpwent getwd \ |
Martin v. Löwis | 864e9ff | 2001-08-04 22:32:03 +0000 | [diff] [blame] | 4593 | hstrerror inet_pton kill link lstat mkfifo mktime mremap \ |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 4594 | nice pathconf pause plock poll pthread_init \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4595 | putenv readlink \ |
Andrew M. Kuchling | 8d2f2b2 | 2000-07-13 01:26:58 +0000 | [diff] [blame] | 4596 | select setegid seteuid setgid \ |
Martin v. Löwis | 791bfda | 2001-07-24 06:33:08 +0000 | [diff] [blame] | 4597 | setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4598 | sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ |
Fred Drake | 89143df | 1999-12-09 22:03:25 +0000 | [diff] [blame] | 4599 | tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Thomas Wouters | c2c12dc | 2001-07-11 14:45:34 +0000 | [diff] [blame] | 4600 | truncate uname waitpid _getpty getpriority |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4601 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4602 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4603 | echo "configure:4604: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4604 | 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] | 4605 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4606 | else |
| 4607 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4608 | #line 4609 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4609 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4610 | /* System header to define __stub macros and hopefully few prototypes, |
| 4611 | which can conflict with char $ac_func(); below. */ |
| 4612 | #include <assert.h> |
| 4613 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4614 | /* We use char because int might match the return type of a gcc2 |
| 4615 | builtin and then its argument prototype would still apply. */ |
| 4616 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4617 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4618 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4619 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4620 | /* The GNU C library defines this for functions which it implements |
| 4621 | to always fail with ENOSYS. Some functions are actually named |
| 4622 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4623 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4624 | choke me |
| 4625 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4626 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4627 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4628 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4629 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4630 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4631 | if { (eval echo configure:4632: \"$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] | 4632 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4633 | eval "ac_cv_func_$ac_func=yes" |
| 4634 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4635 | echo "configure: failed program was:" >&5 |
| 4636 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4637 | rm -rf conftest* |
| 4638 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4639 | fi |
| 4640 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4641 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4642 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4643 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4644 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4645 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4646 | cat >> confdefs.h <<EOF |
| 4647 | #define $ac_tr_func 1 |
| 4648 | EOF |
| 4649 | |
| 4650 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4651 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4652 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4653 | done |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 4654 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4655 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4656 | # check for openpty and forkpty |
| 4657 | |
| 4658 | for ac_func in openpty |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4659 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4660 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4661 | echo "configure:4662: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4662 | 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] | 4663 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4664 | else |
| 4665 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4666 | #line 4667 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4667 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4668 | /* System header to define __stub macros and hopefully few prototypes, |
| 4669 | which can conflict with char $ac_func(); below. */ |
| 4670 | #include <assert.h> |
| 4671 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4672 | /* We use char because int might match the return type of a gcc2 |
| 4673 | builtin and then its argument prototype would still apply. */ |
| 4674 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4675 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4676 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4677 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4678 | /* The GNU C library defines this for functions which it implements |
| 4679 | to always fail with ENOSYS. Some functions are actually named |
| 4680 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4681 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4682 | choke me |
| 4683 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4684 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4685 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4686 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4687 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4688 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4689 | if { (eval echo configure:4690: \"$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] | 4690 | rm -rf conftest* |
| 4691 | eval "ac_cv_func_$ac_func=yes" |
| 4692 | else |
| 4693 | echo "configure: failed program was:" >&5 |
| 4694 | cat conftest.$ac_ext >&5 |
| 4695 | rm -rf conftest* |
| 4696 | eval "ac_cv_func_$ac_func=no" |
| 4697 | fi |
| 4698 | rm -f conftest* |
| 4699 | fi |
| 4700 | |
| 4701 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4702 | echo "$ac_t""yes" 1>&6 |
| 4703 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4704 | cat >> confdefs.h <<EOF |
| 4705 | #define $ac_tr_func 1 |
| 4706 | EOF |
| 4707 | |
| 4708 | else |
| 4709 | echo "$ac_t""no" 1>&6 |
| 4710 | echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4711 | echo "configure:4712: checking for openpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4712 | ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4713 | 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] | 4714 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4715 | else |
| 4716 | ac_save_LIBS="$LIBS" |
| 4717 | LIBS="-lutil $LIBS" |
| 4718 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4719 | #line 4720 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4720 | #include "confdefs.h" |
| 4721 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4722 | /* We use char because int might match the return type of a gcc2 |
| 4723 | builtin and then its argument prototype would still apply. */ |
| 4724 | char openpty(); |
| 4725 | |
| 4726 | int main() { |
| 4727 | openpty() |
| 4728 | ; return 0; } |
| 4729 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4730 | if { (eval echo configure:4731: \"$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] | 4731 | rm -rf conftest* |
| 4732 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4733 | else |
| 4734 | echo "configure: failed program was:" >&5 |
| 4735 | cat conftest.$ac_ext >&5 |
| 4736 | rm -rf conftest* |
| 4737 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4738 | fi |
| 4739 | rm -f conftest* |
| 4740 | LIBS="$ac_save_LIBS" |
| 4741 | |
| 4742 | fi |
| 4743 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4744 | echo "$ac_t""yes" 1>&6 |
| 4745 | cat >> confdefs.h <<\EOF |
| 4746 | #define HAVE_OPENPTY 1 |
| 4747 | EOF |
| 4748 | LIBS="$LIBS -lutil" |
| 4749 | else |
| 4750 | echo "$ac_t""no" 1>&6 |
| 4751 | fi |
| 4752 | |
| 4753 | fi |
| 4754 | done |
| 4755 | |
| 4756 | for ac_func in forkpty |
| 4757 | do |
| 4758 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4759 | echo "configure:4760: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4760 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4761 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4762 | else |
| 4763 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4764 | #line 4765 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4765 | #include "confdefs.h" |
| 4766 | /* System header to define __stub macros and hopefully few prototypes, |
| 4767 | which can conflict with char $ac_func(); below. */ |
| 4768 | #include <assert.h> |
| 4769 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4770 | /* We use char because int might match the return type of a gcc2 |
| 4771 | builtin and then its argument prototype would still apply. */ |
| 4772 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4773 | |
| 4774 | int main() { |
| 4775 | |
| 4776 | /* The GNU C library defines this for functions which it implements |
| 4777 | to always fail with ENOSYS. Some functions are actually named |
| 4778 | something starting with __ and the normal name is an alias. */ |
| 4779 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4780 | choke me |
| 4781 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4782 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4783 | #endif |
| 4784 | |
| 4785 | ; return 0; } |
| 4786 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4787 | if { (eval echo configure:4788: \"$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] | 4788 | rm -rf conftest* |
| 4789 | eval "ac_cv_func_$ac_func=yes" |
| 4790 | else |
| 4791 | echo "configure: failed program was:" >&5 |
| 4792 | cat conftest.$ac_ext >&5 |
| 4793 | rm -rf conftest* |
| 4794 | eval "ac_cv_func_$ac_func=no" |
| 4795 | fi |
| 4796 | rm -f conftest* |
| 4797 | fi |
| 4798 | |
| 4799 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4800 | echo "$ac_t""yes" 1>&6 |
| 4801 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4802 | cat >> confdefs.h <<EOF |
| 4803 | #define $ac_tr_func 1 |
| 4804 | EOF |
| 4805 | |
| 4806 | else |
| 4807 | echo "$ac_t""no" 1>&6 |
| 4808 | echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4809 | echo "configure:4810: checking for forkpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4810 | ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4811 | 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] | 4812 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4813 | else |
| 4814 | ac_save_LIBS="$LIBS" |
| 4815 | LIBS="-lutil $LIBS" |
| 4816 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4817 | #line 4818 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4818 | #include "confdefs.h" |
| 4819 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4820 | /* We use char because int might match the return type of a gcc2 |
| 4821 | builtin and then its argument prototype would still apply. */ |
| 4822 | char forkpty(); |
| 4823 | |
| 4824 | int main() { |
| 4825 | forkpty() |
| 4826 | ; return 0; } |
| 4827 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4828 | if { (eval echo configure:4829: \"$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] | 4829 | rm -rf conftest* |
| 4830 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4831 | else |
| 4832 | echo "configure: failed program was:" >&5 |
| 4833 | cat conftest.$ac_ext >&5 |
| 4834 | rm -rf conftest* |
| 4835 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4836 | fi |
| 4837 | rm -f conftest* |
| 4838 | LIBS="$ac_save_LIBS" |
| 4839 | |
| 4840 | fi |
| 4841 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4842 | echo "$ac_t""yes" 1>&6 |
| 4843 | cat >> confdefs.h <<\EOF |
| 4844 | #define HAVE_FORKPTY 1 |
| 4845 | EOF |
| 4846 | LIBS="$LIBS -lutil" |
| 4847 | else |
| 4848 | echo "$ac_t""no" 1>&6 |
| 4849 | fi |
| 4850 | |
| 4851 | fi |
| 4852 | done |
| 4853 | |
| 4854 | |
| 4855 | # check for long file support functions |
| 4856 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
| 4857 | do |
| 4858 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4859 | echo "configure:4860: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4860 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4861 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4862 | else |
| 4863 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4864 | #line 4865 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4865 | #include "confdefs.h" |
| 4866 | /* System header to define __stub macros and hopefully few prototypes, |
| 4867 | which can conflict with char $ac_func(); below. */ |
| 4868 | #include <assert.h> |
| 4869 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4870 | /* We use char because int might match the return type of a gcc2 |
| 4871 | builtin and then its argument prototype would still apply. */ |
| 4872 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4873 | |
| 4874 | int main() { |
| 4875 | |
| 4876 | /* The GNU C library defines this for functions which it implements |
| 4877 | to always fail with ENOSYS. Some functions are actually named |
| 4878 | something starting with __ and the normal name is an alias. */ |
| 4879 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4880 | choke me |
| 4881 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4882 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4883 | #endif |
| 4884 | |
| 4885 | ; return 0; } |
| 4886 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4887 | if { (eval echo configure:4888: \"$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] | 4888 | rm -rf conftest* |
| 4889 | eval "ac_cv_func_$ac_func=yes" |
| 4890 | else |
| 4891 | echo "configure: failed program was:" >&5 |
| 4892 | cat conftest.$ac_ext >&5 |
| 4893 | rm -rf conftest* |
| 4894 | eval "ac_cv_func_$ac_func=no" |
| 4895 | fi |
| 4896 | rm -f conftest* |
| 4897 | fi |
| 4898 | |
| 4899 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4900 | echo "$ac_t""yes" 1>&6 |
| 4901 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4902 | cat >> confdefs.h <<EOF |
| 4903 | #define $ac_tr_func 1 |
| 4904 | EOF |
| 4905 | |
| 4906 | else |
| 4907 | echo "$ac_t""no" 1>&6 |
| 4908 | fi |
| 4909 | done |
| 4910 | |
| 4911 | |
| 4912 | for ac_func in dup2 getcwd strdup strerror memmove |
| 4913 | do |
| 4914 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4915 | echo "configure:4916: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4916 | 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] | 4917 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4918 | else |
| 4919 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4920 | #line 4921 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4921 | #include "confdefs.h" |
| 4922 | /* System header to define __stub macros and hopefully few prototypes, |
| 4923 | which can conflict with char $ac_func(); below. */ |
| 4924 | #include <assert.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 $ac_func(); |
| 4929 | |
| 4930 | int main() { |
| 4931 | |
| 4932 | /* The GNU C library defines this for functions which it implements |
| 4933 | to always fail with ENOSYS. Some functions are actually named |
| 4934 | something starting with __ and the normal name is an alias. */ |
| 4935 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4936 | choke me |
| 4937 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4938 | $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 4939 | #endif |
| 4940 | |
| 4941 | ; return 0; } |
| 4942 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4943 | if { (eval echo configure:4944: \"$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] | 4944 | rm -rf conftest* |
| 4945 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4946 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4947 | echo "configure: failed program was:" >&5 |
| 4948 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4949 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4950 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4951 | fi |
| 4952 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4953 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4954 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4955 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4956 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4957 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4958 | cat >> confdefs.h <<EOF |
| 4959 | #define $ac_tr_func 1 |
| 4960 | EOF |
| 4961 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4962 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4963 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 4964 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4965 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4966 | done |
| 4967 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4968 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4969 | for ac_func in getpgrp |
| 4970 | do |
| 4971 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4972 | echo "configure:4973: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4973 | 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] | 4974 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4975 | else |
| 4976 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 4977 | #line 4978 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4978 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4979 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4980 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4981 | #include <assert.h> |
| 4982 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4983 | /* We use char because int might match the return type of a gcc2 |
| 4984 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4985 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4986 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4987 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4988 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4989 | /* The GNU C library defines this for functions which it implements |
| 4990 | to always fail with ENOSYS. Some functions are actually named |
| 4991 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4992 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4993 | choke me |
| 4994 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4995 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4996 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4997 | |
| 4998 | ; return 0; } |
| 4999 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5000 | if { (eval echo configure:5001: \"$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] | 5001 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5002 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5003 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5004 | echo "configure: failed program was:" >&5 |
| 5005 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5006 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5007 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5008 | fi |
| 5009 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5010 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5011 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5012 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5013 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5014 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5015 | cat >> confdefs.h <<EOF |
| 5016 | #define $ac_tr_func 1 |
| 5017 | EOF |
| 5018 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5019 | #line 5020 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5020 | #include "confdefs.h" |
| 5021 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5022 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5023 | getpgrp(0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5024 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5025 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5026 | if { (eval echo configure:5027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5027 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5028 | cat >> confdefs.h <<\EOF |
| 5029 | #define GETPGRP_HAVE_ARG 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5030 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5031 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5032 | else |
| 5033 | echo "configure: failed program was:" >&5 |
| 5034 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5035 | fi |
| 5036 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5037 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5038 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5039 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5040 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5041 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5042 | for ac_func in setpgrp |
| 5043 | do |
| 5044 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5045 | echo "configure:5046: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5046 | 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] | 5047 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5048 | else |
| 5049 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5050 | #line 5051 "configure" |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5051 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5052 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5053 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5054 | #include <assert.h> |
| 5055 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5056 | /* We use char because int might match the return type of a gcc2 |
| 5057 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5058 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5059 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5060 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5061 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5062 | /* The GNU C library defines this for functions which it implements |
| 5063 | to always fail with ENOSYS. Some functions are actually named |
| 5064 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5065 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5066 | choke me |
| 5067 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5068 | $ac_func(); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5069 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5070 | |
| 5071 | ; return 0; } |
| 5072 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5073 | if { (eval echo configure:5074: \"$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] | 5074 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5075 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5076 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5077 | echo "configure: failed program was:" >&5 |
| 5078 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5079 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5080 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5081 | fi |
| 5082 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5083 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5084 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5085 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5086 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5087 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5088 | cat >> confdefs.h <<EOF |
| 5089 | #define $ac_tr_func 1 |
| 5090 | EOF |
| 5091 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5092 | #line 5093 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5093 | #include "confdefs.h" |
| 5094 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5095 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5096 | setpgrp(0,0); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5097 | ; return 0; } |
| 5098 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5099 | if { (eval echo configure:5100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5100 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5101 | cat >> confdefs.h <<\EOF |
| 5102 | #define SETPGRP_HAVE_ARG 1 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5103 | EOF |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5104 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5105 | else |
| 5106 | echo "configure: failed program was:" >&5 |
| 5107 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5108 | fi |
| 5109 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5110 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5111 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5112 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5113 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5114 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5115 | for ac_func in gettimeofday |
| 5116 | do |
| 5117 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5118 | echo "configure:5119: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5119 | 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] | 5120 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5121 | else |
| 5122 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5123 | #line 5124 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5124 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5125 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5126 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5127 | #include <assert.h> |
| 5128 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5129 | /* We use char because int might match the return type of a gcc2 |
| 5130 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5131 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5132 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5133 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5134 | |
| 5135 | /* The GNU C library defines this for functions which it implements |
| 5136 | to always fail with ENOSYS. Some functions are actually named |
| 5137 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5138 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5139 | choke me |
| 5140 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5141 | $ac_func(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5142 | #endif |
| 5143 | |
| 5144 | ; return 0; } |
| 5145 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5146 | if { (eval echo configure:5147: \"$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] | 5147 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5148 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5149 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5150 | echo "configure: failed program was:" >&5 |
| 5151 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5152 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5153 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5154 | fi |
| 5155 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5156 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5157 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5158 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5159 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5160 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5161 | cat >> confdefs.h <<EOF |
| 5162 | #define $ac_tr_func 1 |
| 5163 | EOF |
| 5164 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5165 | #line 5166 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5166 | #include "confdefs.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5167 | #include <sys/time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5168 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5169 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
| 5170 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5171 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5172 | if { (eval echo configure:5173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5173 | : |
| 5174 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5175 | echo "configure: failed program was:" >&5 |
| 5176 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5177 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5178 | cat >> confdefs.h <<\EOF |
| 5179 | #define GETTIMEOFDAY_NO_TZ 1 |
| 5180 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5181 | |
| 5182 | fi |
| 5183 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5184 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5185 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5186 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5187 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5188 | |
| 5189 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5190 | for ac_func in getaddrinfo |
| 5191 | do |
| 5192 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5193 | echo "configure:5194: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5194 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5195 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5196 | else |
| 5197 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5198 | #line 5199 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5199 | #include "confdefs.h" |
| 5200 | /* System header to define __stub macros and hopefully few prototypes, |
| 5201 | which can conflict with char $ac_func(); below. */ |
| 5202 | #include <assert.h> |
| 5203 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5204 | /* We use char because int might match the return type of a gcc2 |
| 5205 | builtin and then its argument prototype would still apply. */ |
| 5206 | char $ac_func(); |
| 5207 | |
| 5208 | int main() { |
| 5209 | |
| 5210 | /* The GNU C library defines this for functions which it implements |
| 5211 | to always fail with ENOSYS. Some functions are actually named |
| 5212 | something starting with __ and the normal name is an alias. */ |
| 5213 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5214 | choke me |
| 5215 | #else |
| 5216 | $ac_func(); |
| 5217 | #endif |
| 5218 | |
| 5219 | ; return 0; } |
| 5220 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5221 | if { (eval echo configure:5222: \"$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] | 5222 | rm -rf conftest* |
| 5223 | eval "ac_cv_func_$ac_func=yes" |
| 5224 | else |
| 5225 | echo "configure: failed program was:" >&5 |
| 5226 | cat conftest.$ac_ext >&5 |
| 5227 | rm -rf conftest* |
| 5228 | eval "ac_cv_func_$ac_func=no" |
| 5229 | fi |
| 5230 | rm -f conftest* |
| 5231 | fi |
| 5232 | |
| 5233 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5234 | echo "$ac_t""yes" 1>&6 |
| 5235 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5236 | cat >> confdefs.h <<EOF |
| 5237 | #define $ac_tr_func 1 |
| 5238 | EOF |
| 5239 | echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5240 | echo "configure:5241: checking getaddrinfo bug" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5241 | if test "$cross_compiling" = yes; then |
| 5242 | echo "$ac_t""buggy" 1>&6 |
| 5243 | buggygetaddrinfo=yes |
| 5244 | else |
| 5245 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5246 | #line 5247 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5247 | #include "confdefs.h" |
| 5248 | |
| 5249 | #include <sys/types.h> |
| 5250 | #include <netdb.h> |
| 5251 | #include <string.h> |
| 5252 | #include <sys/socket.h> |
| 5253 | #include <netinet/in.h> |
| 5254 | |
| 5255 | main() |
| 5256 | { |
| 5257 | int passive, gaierr, inet4 = 0, inet6 = 0; |
| 5258 | struct addrinfo hints, *ai, *aitop; |
| 5259 | char straddr[INET6_ADDRSTRLEN], strport[16]; |
| 5260 | |
| 5261 | for (passive = 0; passive <= 1; passive++) { |
| 5262 | memset(&hints, 0, sizeof(hints)); |
| 5263 | hints.ai_family = AF_UNSPEC; |
| 5264 | hints.ai_flags = passive ? AI_PASSIVE : 0; |
| 5265 | hints.ai_socktype = SOCK_STREAM; |
| 5266 | if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { |
| 5267 | (void)gai_strerror(gaierr); |
| 5268 | goto bad; |
| 5269 | } |
| 5270 | for (ai = aitop; ai; ai = ai->ai_next) { |
| 5271 | if (ai->ai_addr == NULL || |
| 5272 | ai->ai_addrlen == 0 || |
| 5273 | getnameinfo(ai->ai_addr, ai->ai_addrlen, |
| 5274 | straddr, sizeof(straddr), strport, sizeof(strport), |
| 5275 | NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
| 5276 | goto bad; |
| 5277 | } |
| 5278 | switch (ai->ai_family) { |
| 5279 | case AF_INET: |
| 5280 | if (strcmp(strport, "54321") != 0) { |
| 5281 | goto bad; |
| 5282 | } |
| 5283 | if (passive) { |
| 5284 | if (strcmp(straddr, "0.0.0.0") != 0) { |
| 5285 | goto bad; |
| 5286 | } |
| 5287 | } else { |
| 5288 | if (strcmp(straddr, "127.0.0.1") != 0) { |
| 5289 | goto bad; |
| 5290 | } |
| 5291 | } |
| 5292 | inet4++; |
| 5293 | break; |
| 5294 | case AF_INET6: |
| 5295 | if (strcmp(strport, "54321") != 0) { |
| 5296 | goto bad; |
| 5297 | } |
| 5298 | if (passive) { |
| 5299 | if (strcmp(straddr, "::") != 0) { |
| 5300 | goto bad; |
| 5301 | } |
| 5302 | } else { |
| 5303 | if (strcmp(straddr, "::1") != 0) { |
| 5304 | goto bad; |
| 5305 | } |
| 5306 | } |
| 5307 | inet6++; |
| 5308 | break; |
| 5309 | case AF_UNSPEC: |
| 5310 | goto bad; |
| 5311 | break; |
| 5312 | default: |
| 5313 | /* another family support? */ |
| 5314 | break; |
| 5315 | } |
| 5316 | } |
| 5317 | } |
| 5318 | |
| 5319 | if (!(inet4 == 0 || inet4 == 2)) |
| 5320 | goto bad; |
| 5321 | if (!(inet6 == 0 || inet6 == 2)) |
| 5322 | goto bad; |
| 5323 | |
| 5324 | if (aitop) |
| 5325 | freeaddrinfo(aitop); |
| 5326 | exit(0); |
| 5327 | |
| 5328 | bad: |
| 5329 | if (aitop) |
| 5330 | freeaddrinfo(aitop); |
| 5331 | exit(1); |
| 5332 | } |
| 5333 | |
| 5334 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5335 | if { (eval echo configure:5336: \"$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] | 5336 | then |
| 5337 | echo "$ac_t""good" 1>&6 |
| 5338 | buggygetaddrinfo=no |
| 5339 | else |
| 5340 | echo "configure: failed program was:" >&5 |
| 5341 | cat conftest.$ac_ext >&5 |
| 5342 | rm -fr conftest* |
| 5343 | echo "$ac_t""buggy" 1>&6 |
| 5344 | buggygetaddrinfo=yes |
| 5345 | fi |
| 5346 | rm -fr conftest* |
| 5347 | fi |
| 5348 | |
| 5349 | else |
| 5350 | echo "$ac_t""no" 1>&6 |
| 5351 | buggygetaddrinfo=yes |
| 5352 | fi |
| 5353 | done |
| 5354 | |
| 5355 | |
| 5356 | if test "$buggygetaddrinfo" = "yes"; then |
| 5357 | if test "$ipv6" = "yes"; then |
| 5358 | echo 'Fatal: You must get working getaddrinfo() function.' |
| 5359 | echo ' or you can specify "--disable-ipv6"'. |
| 5360 | exit 1 |
| 5361 | fi |
| 5362 | fi |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5363 | for ac_func in getnameinfo |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5364 | do |
| 5365 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5366 | echo "configure:5367: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5367 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5368 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5369 | else |
| 5370 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5371 | #line 5372 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5372 | #include "confdefs.h" |
| 5373 | /* System header to define __stub macros and hopefully few prototypes, |
| 5374 | which can conflict with char $ac_func(); below. */ |
| 5375 | #include <assert.h> |
| 5376 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5377 | /* We use char because int might match the return type of a gcc2 |
| 5378 | builtin and then its argument prototype would still apply. */ |
| 5379 | char $ac_func(); |
| 5380 | |
| 5381 | int main() { |
| 5382 | |
| 5383 | /* The GNU C library defines this for functions which it implements |
| 5384 | to always fail with ENOSYS. Some functions are actually named |
| 5385 | something starting with __ and the normal name is an alias. */ |
| 5386 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5387 | choke me |
| 5388 | #else |
| 5389 | $ac_func(); |
| 5390 | #endif |
| 5391 | |
| 5392 | ; return 0; } |
| 5393 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5394 | if { (eval echo configure:5395: \"$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] | 5395 | rm -rf conftest* |
| 5396 | eval "ac_cv_func_$ac_func=yes" |
| 5397 | else |
| 5398 | echo "configure: failed program was:" >&5 |
| 5399 | cat conftest.$ac_ext >&5 |
| 5400 | rm -rf conftest* |
| 5401 | eval "ac_cv_func_$ac_func=no" |
| 5402 | fi |
| 5403 | rm -f conftest* |
| 5404 | fi |
| 5405 | |
| 5406 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5407 | echo "$ac_t""yes" 1>&6 |
| 5408 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5409 | cat >> confdefs.h <<EOF |
| 5410 | #define $ac_tr_func 1 |
| 5411 | EOF |
| 5412 | |
| 5413 | else |
| 5414 | echo "$ac_t""no" 1>&6 |
| 5415 | fi |
| 5416 | done |
| 5417 | |
| 5418 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5419 | # checks for structures |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5420 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5421 | echo "configure:5422: 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] | 5422 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5423 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5424 | else |
| 5425 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5426 | #line 5427 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5427 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5428 | #include <sys/types.h> |
| 5429 | #include <sys/time.h> |
| 5430 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5431 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5432 | struct tm *tp; |
| 5433 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5434 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5435 | if { (eval echo configure:5436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5436 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5437 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5438 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5439 | echo "configure: failed program was:" >&5 |
| 5440 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5441 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5442 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5443 | fi |
| 5444 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5445 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5446 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5447 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5448 | if test $ac_cv_header_time = yes; then |
| 5449 | cat >> confdefs.h <<\EOF |
| 5450 | #define TIME_WITH_SYS_TIME 1 |
| 5451 | EOF |
| 5452 | |
| 5453 | fi |
| 5454 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5455 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5456 | echo "configure:5457: 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] | 5457 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5458 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5459 | else |
| 5460 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5461 | #line 5462 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5462 | #include "confdefs.h" |
| 5463 | #include <sys/types.h> |
| 5464 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5465 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5466 | struct tm *tp; tp->tm_sec; |
| 5467 | ; return 0; } |
| 5468 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5469 | if { (eval echo configure:5470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5470 | rm -rf conftest* |
| 5471 | ac_cv_struct_tm=time.h |
| 5472 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5473 | echo "configure: failed program was:" >&5 |
| 5474 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5475 | rm -rf conftest* |
| 5476 | ac_cv_struct_tm=sys/time.h |
| 5477 | fi |
| 5478 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5479 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5480 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5481 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5482 | if test $ac_cv_struct_tm = sys/time.h; then |
| 5483 | cat >> confdefs.h <<\EOF |
| 5484 | #define TM_IN_SYS_TIME 1 |
| 5485 | EOF |
| 5486 | |
| 5487 | fi |
| 5488 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5489 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5490 | echo "configure:5491: checking for tm_zone in struct tm" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5491 | 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] | 5492 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5493 | else |
| 5494 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5495 | #line 5496 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5496 | #include "confdefs.h" |
| 5497 | #include <sys/types.h> |
| 5498 | #include <$ac_cv_struct_tm> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5499 | int main() { |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5500 | struct tm tm; tm.tm_zone; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5501 | ; return 0; } |
| 5502 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5503 | if { (eval echo configure:5504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5504 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5505 | ac_cv_struct_tm_zone=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5506 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5507 | echo "configure: failed program was:" >&5 |
| 5508 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5509 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5510 | ac_cv_struct_tm_zone=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5511 | fi |
| 5512 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5513 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5514 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5515 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 |
| 5516 | if test "$ac_cv_struct_tm_zone" = yes; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5517 | cat >> confdefs.h <<\EOF |
| 5518 | #define HAVE_TM_ZONE 1 |
| 5519 | EOF |
| 5520 | |
| 5521 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5522 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5523 | echo "configure:5524: checking for tzname" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5524 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5525 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5526 | else |
| 5527 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5528 | #line 5529 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5529 | #include "confdefs.h" |
| 5530 | #include <time.h> |
| 5531 | #ifndef tzname /* For SGI. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5532 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5533 | #endif |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5534 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5535 | atoi(*tzname); |
| 5536 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5537 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5538 | if { (eval echo configure:5539: \"$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] | 5539 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5540 | ac_cv_var_tzname=yes |
| 5541 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5542 | echo "configure: failed program was:" >&5 |
| 5543 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5544 | rm -rf conftest* |
| 5545 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5546 | fi |
| 5547 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5548 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5549 | |
| 5550 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5551 | if test $ac_cv_var_tzname = yes; then |
| 5552 | cat >> confdefs.h <<\EOF |
| 5553 | #define HAVE_TZNAME 1 |
| 5554 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5555 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5556 | fi |
| 5557 | fi |
| 5558 | |
| 5559 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5560 | echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5561 | echo "configure:5562: checking for time.h that defines altzone" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5562 | 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] | 5563 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5564 | else |
| 5565 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5566 | #line 5567 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5567 | #include "confdefs.h" |
| 5568 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5569 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5570 | return altzone; |
| 5571 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5572 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5573 | if { (eval echo configure:5574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5574 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5575 | ac_cv_header_time_altzone=yes |
| 5576 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5577 | echo "configure: failed program was:" >&5 |
| 5578 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5579 | rm -rf conftest* |
| 5580 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5581 | fi |
| 5582 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5583 | fi |
| 5584 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5585 | echo "$ac_t""$ac_cv_header_time_altzone" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5586 | if test $ac_cv_header_time_altzone = yes; then |
| 5587 | cat >> confdefs.h <<\EOF |
| 5588 | #define HAVE_ALTZONE 1 |
| 5589 | EOF |
| 5590 | |
| 5591 | fi |
| 5592 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5593 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5594 | echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5595 | echo "configure:5596: 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] | 5596 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5597 | #line 5598 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5598 | #include "confdefs.h" |
| 5599 | |
| 5600 | #include <sys/types.h> |
| 5601 | #include <sys/select.h> |
| 5602 | #include <sys/time.h> |
| 5603 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5604 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5605 | ; |
| 5606 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5607 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5608 | if { (eval echo configure:5609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5609 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5610 | cat >> confdefs.h <<\EOF |
| 5611 | #define SYS_SELECT_WITH_SYS_TIME 1 |
| 5612 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5613 | was_it_defined=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5614 | else |
| 5615 | echo "configure: failed program was:" >&5 |
| 5616 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5617 | fi |
| 5618 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5619 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5620 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5621 | echo $ac_n "checking for addrinfo""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5622 | echo "configure:5623: checking for addrinfo" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5623 | if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then |
| 5624 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5625 | else |
| 5626 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5627 | #line 5628 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5628 | #include "confdefs.h" |
| 5629 | |
| 5630 | # include <netdb.h> |
| 5631 | int main() { |
| 5632 | struct addrinfo a |
| 5633 | ; return 0; } |
| 5634 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5635 | if { (eval echo configure:5636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5636 | rm -rf conftest* |
| 5637 | ac_cv_struct_addrinfo=yes |
| 5638 | else |
| 5639 | echo "configure: failed program was:" >&5 |
| 5640 | cat conftest.$ac_ext >&5 |
| 5641 | rm -rf conftest* |
| 5642 | ac_cv_struct_addrinfo=no |
| 5643 | fi |
| 5644 | rm -f conftest* |
| 5645 | fi |
| 5646 | |
| 5647 | echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6 |
| 5648 | if test $ac_cv_struct_addrinfo = yes; then |
| 5649 | cat >> confdefs.h <<\EOF |
| 5650 | #define HAVE_ADDRINFO 1 |
| 5651 | EOF |
| 5652 | |
| 5653 | fi |
| 5654 | |
| 5655 | echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5656 | echo "configure:5657: checking for sockaddr_storage" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5657 | if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then |
| 5658 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5659 | else |
| 5660 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5661 | #line 5662 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5662 | #include "confdefs.h" |
| 5663 | |
| 5664 | # include <sys/types.h> |
| 5665 | # include <sys/socket.h> |
| 5666 | int main() { |
| 5667 | struct sockaddr_storage s |
| 5668 | ; return 0; } |
| 5669 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5670 | if { (eval echo configure:5671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5671 | rm -rf conftest* |
| 5672 | ac_cv_struct_sockaddr_storage=yes |
| 5673 | else |
| 5674 | echo "configure: failed program was:" >&5 |
| 5675 | cat conftest.$ac_ext >&5 |
| 5676 | rm -rf conftest* |
| 5677 | ac_cv_struct_sockaddr_storage=no |
| 5678 | fi |
| 5679 | rm -f conftest* |
| 5680 | fi |
| 5681 | |
| 5682 | echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6 |
| 5683 | if test $ac_cv_struct_sockaddr_storage = yes; then |
| 5684 | cat >> confdefs.h <<\EOF |
| 5685 | #define HAVE_SOCKADDR_STORAGE 1 |
| 5686 | EOF |
| 5687 | |
| 5688 | fi |
| 5689 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5690 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5691 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5692 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5693 | echo "configure:5694: checking whether char is unsigned" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5694 | 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] | 5695 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5696 | else |
| 5697 | if test "$GCC" = yes; then |
| 5698 | # GCC predefines this symbol on systems where it applies. |
| 5699 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5700 | #line 5701 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5701 | #include "confdefs.h" |
| 5702 | #ifdef __CHAR_UNSIGNED__ |
| 5703 | yes |
| 5704 | #endif |
| 5705 | |
| 5706 | EOF |
| 5707 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 5708 | egrep "yes" >/dev/null 2>&1; then |
| 5709 | rm -rf conftest* |
| 5710 | ac_cv_c_char_unsigned=yes |
| 5711 | else |
| 5712 | rm -rf conftest* |
| 5713 | ac_cv_c_char_unsigned=no |
| 5714 | fi |
| 5715 | rm -f conftest* |
| 5716 | |
| 5717 | else |
| 5718 | if test "$cross_compiling" = yes; then |
| 5719 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5720 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5721 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5722 | #line 5723 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5723 | #include "confdefs.h" |
| 5724 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5725 | #if !defined(__STDC__) || __STDC__ != 1 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5726 | #define volatile |
| 5727 | #endif |
| 5728 | main() { |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5729 | volatile char c = 255; exit(c < 0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5730 | } |
| 5731 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5732 | if { (eval echo configure:5733: \"$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] | 5733 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5734 | ac_cv_c_char_unsigned=yes |
| 5735 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5736 | echo "configure: failed program was:" >&5 |
| 5737 | cat conftest.$ac_ext >&5 |
| 5738 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5739 | ac_cv_c_char_unsigned=no |
| 5740 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5741 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5742 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5743 | |
| 5744 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5745 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5746 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5747 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5748 | if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then |
| 5749 | cat >> confdefs.h <<\EOF |
| 5750 | #define __CHAR_UNSIGNED__ 1 |
| 5751 | EOF |
| 5752 | |
| 5753 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5754 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5755 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5756 | echo "configure:5757: checking for working const" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5757 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5758 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5759 | else |
| 5760 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5761 | #line 5762 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5762 | #include "confdefs.h" |
| 5763 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5764 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5765 | |
| 5766 | /* Ultrix mips cc rejects this. */ |
Martin v. Löwis | 9db2f57 | 2001-07-23 01:30:10 +0000 | [diff] [blame] | 5767 | typedef int charset[2]; const charset x; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5768 | /* SunOS 4.1.1 cc rejects this. */ |
| 5769 | char const *const *ccp; |
| 5770 | char **p; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5771 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 5772 | struct point {int x, y;}; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5773 | static struct point const zero = {0,0}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5774 | /* AIX XL C 1.02.0.0 rejects this. |
| 5775 | It does not let you subtract one const X* pointer from another in an arm |
| 5776 | of an if-expression whose if-part is not a constant expression */ |
| 5777 | const char *g = "string"; |
| 5778 | ccp = &g + (g ? g-g : 0); |
| 5779 | /* HPUX 7.0 cc rejects these. */ |
| 5780 | ++ccp; |
| 5781 | p = (char**) ccp; |
| 5782 | ccp = (char const *const *) p; |
| 5783 | { /* SCO 3.2v4 cc rejects this. */ |
| 5784 | char *t; |
| 5785 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
| 5786 | |
| 5787 | *t++ = 0; |
| 5788 | } |
| 5789 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5790 | int x[] = {25, 17}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5791 | const int *foo = &x[0]; |
| 5792 | ++foo; |
| 5793 | } |
| 5794 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 5795 | typedef const int *iptr; |
| 5796 | iptr p = 0; |
| 5797 | ++p; |
| 5798 | } |
| 5799 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 5800 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 5801 | struct s { int j; const int *ap[3]; }; |
| 5802 | struct s *b; b->j = 5; |
| 5803 | } |
| 5804 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 5805 | const int foo = 10; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5806 | } |
| 5807 | |
| 5808 | ; return 0; } |
| 5809 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5810 | if { (eval echo configure:5811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5811 | rm -rf conftest* |
| 5812 | ac_cv_c_const=yes |
| 5813 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5814 | echo "configure: failed program was:" >&5 |
| 5815 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5816 | rm -rf conftest* |
| 5817 | ac_cv_c_const=no |
| 5818 | fi |
| 5819 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5820 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5821 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5822 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5823 | if test $ac_cv_c_const = no; then |
| 5824 | cat >> confdefs.h <<\EOF |
| 5825 | #define const |
| 5826 | EOF |
| 5827 | |
| 5828 | fi |
| 5829 | |
| 5830 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5831 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5832 | echo $ac_n "checking for working volatile""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5833 | echo "configure:5834: checking for working volatile" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5834 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5835 | #line 5836 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5836 | #include "confdefs.h" |
| 5837 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5838 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5839 | volatile int x; x = 0; |
| 5840 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5841 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5842 | if { (eval echo configure:5843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5843 | rm -rf conftest* |
| 5844 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5845 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5846 | echo "configure: failed program was:" >&5 |
| 5847 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5848 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5849 | cat >> confdefs.h <<\EOF |
| 5850 | #define volatile |
| 5851 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5852 | |
| 5853 | fi |
| 5854 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5855 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5856 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5857 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5858 | echo $ac_n "checking for working signed char""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5859 | echo "configure:5860: checking for working signed char" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5860 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5861 | #line 5862 "configure" |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5862 | #include "confdefs.h" |
| 5863 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5864 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5865 | signed char c; |
| 5866 | ; return 0; } |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5867 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5868 | if { (eval echo configure:5869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5869 | rm -rf conftest* |
| 5870 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5871 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5872 | echo "configure: failed program was:" >&5 |
| 5873 | cat conftest.$ac_ext >&5 |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 5874 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5875 | cat >> confdefs.h <<\EOF |
| 5876 | #define signed |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5877 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5878 | |
| 5879 | fi |
| 5880 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5881 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5882 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5883 | have_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5884 | echo $ac_n "checking for prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5885 | echo "configure:5886: checking for prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5886 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5887 | #line 5888 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5888 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5889 | int foo(int x) { return 0; } |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5890 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5891 | return foo(10); |
| 5892 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5893 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5894 | if { (eval echo configure:5895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5895 | rm -rf conftest* |
| 5896 | cat >> confdefs.h <<\EOF |
| 5897 | #define HAVE_PROTOTYPES 1 |
| 5898 | EOF |
| 5899 | have_prototypes=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5900 | else |
| 5901 | echo "configure: failed program was:" >&5 |
| 5902 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5903 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5904 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5905 | echo "$ac_t""$have_prototypes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5906 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5907 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5908 | echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5909 | echo "configure:5910: checking for variable length prototypes and stdarg.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5910 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5911 | #line 5912 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5912 | #include "confdefs.h" |
| 5913 | |
| 5914 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 5915 | int foo(int x, ...) { |
| 5916 | va_list va; |
| 5917 | va_start(va, x); |
| 5918 | va_arg(va, int); |
| 5919 | va_arg(va, char *); |
| 5920 | va_arg(va, double); |
| 5921 | return 0; |
| 5922 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5923 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5924 | int main() { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 5925 | return foo(10, "", 3.14); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5926 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5927 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5928 | if { (eval echo configure:5929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5929 | rm -rf conftest* |
| 5930 | cat >> confdefs.h <<\EOF |
| 5931 | #define HAVE_STDARG_PROTOTYPES 1 |
| 5932 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5933 | works=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5934 | else |
| 5935 | echo "configure: failed program was:" >&5 |
| 5936 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5937 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5938 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5939 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5940 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5941 | if test "$have_prototypes" = yes; then |
| 5942 | bad_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5943 | echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5944 | echo "configure:5945: checking for bad exec* prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5945 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5946 | #line 5947 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5947 | #include "confdefs.h" |
| 5948 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5949 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5950 | char **t;execve("@",t,t); |
| 5951 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5952 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5953 | if { (eval echo configure:5954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5954 | : |
| 5955 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5956 | echo "configure: failed program was:" >&5 |
| 5957 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5958 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5959 | cat >> confdefs.h <<\EOF |
| 5960 | #define BAD_EXEC_PROTOTYPES 1 |
| 5961 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5962 | bad_prototypes=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5963 | fi |
| 5964 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5965 | echo "$ac_t""$bad_prototypes" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5966 | fi |
| 5967 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5968 | # check if sockaddr has sa_len member |
| 5969 | echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5970 | echo "configure:5971: checking if sockaddr has sa_len member" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5971 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5972 | #line 5973 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5973 | #include "confdefs.h" |
| 5974 | #include <sys/types.h> |
| 5975 | #include <sys/socket.h> |
| 5976 | int main() { |
| 5977 | struct sockaddr x; |
| 5978 | x.sa_len = 0; |
| 5979 | ; return 0; } |
| 5980 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5981 | if { (eval echo configure:5982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5982 | rm -rf conftest* |
| 5983 | echo "$ac_t""yes" 1>&6 |
| 5984 | cat >> confdefs.h <<\EOF |
| 5985 | #define HAVE_SOCKADDR_SA_LEN 1 |
| 5986 | EOF |
| 5987 | |
| 5988 | else |
| 5989 | echo "configure: failed program was:" >&5 |
| 5990 | cat conftest.$ac_ext >&5 |
| 5991 | rm -rf conftest* |
| 5992 | echo "$ac_t""no" 1>&6 |
| 5993 | fi |
| 5994 | rm -f conftest* |
| 5995 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5996 | echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 5997 | echo "configure:5998: checking for bad static forward" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 5998 | if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then |
| 5999 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6000 | else |
| 6001 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6002 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6003 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6004 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6005 | #line 6006 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6006 | #include "confdefs.h" |
| 6007 | |
| 6008 | struct s { int a; int b; }; |
| 6009 | static struct s foo; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6010 | int foobar() { |
| 6011 | static int random; |
| 6012 | random = (int) &foo; |
| 6013 | return random; |
| 6014 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6015 | static struct s foo = { 1, 2 }; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6016 | main() { |
| 6017 | exit(!((int)&foo == foobar())); |
| 6018 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6019 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6020 | if { (eval echo configure:6021: \"$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] | 6021 | then |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6022 | ac_cv_bad_static_forward=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6023 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6024 | echo "configure: failed program was:" >&5 |
| 6025 | cat conftest.$ac_ext >&5 |
| 6026 | rm -fr conftest* |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6027 | ac_cv_bad_static_forward=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6028 | fi |
| 6029 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6030 | fi |
| 6031 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6032 | fi |
| 6033 | |
| 6034 | echo "$ac_t""$ac_cv_bad_static_forward" 1>&6 |
| 6035 | if test "$ac_cv_bad_static_forward" = yes |
| 6036 | then |
| 6037 | cat >> confdefs.h <<\EOF |
| 6038 | #define BAD_STATIC_FORWARD 1 |
| 6039 | EOF |
| 6040 | |
| 6041 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6042 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6043 | va_list_is_array=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6044 | echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6045 | echo "configure:6046: checking whether va_list is an array" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6046 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6047 | #line 6048 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6048 | #include "confdefs.h" |
| 6049 | |
| 6050 | #ifdef HAVE_STDARG_PROTOTYPES |
| 6051 | #include <stdarg.h> |
| 6052 | #else |
| 6053 | #include <varargs.h> |
| 6054 | #endif |
| 6055 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6056 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6057 | va_list list1, list2; list1 = list2; |
| 6058 | ; return 0; } |
| 6059 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6060 | if { (eval echo configure:6061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6061 | : |
| 6062 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6063 | echo "configure: failed program was:" >&5 |
| 6064 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6065 | rm -rf conftest* |
| 6066 | cat >> confdefs.h <<\EOF |
| 6067 | #define VA_LIST_IS_ARRAY 1 |
| 6068 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6069 | va_list_is_array=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6070 | fi |
| 6071 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6072 | echo "$ac_t""$va_list_is_array" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6073 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6074 | # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( |
| 6075 | echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6076 | echo "configure:6077: checking for gethostbyname_r" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6077 | 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] | 6078 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6079 | else |
| 6080 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6081 | #line 6082 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6082 | #include "confdefs.h" |
| 6083 | /* System header to define __stub macros and hopefully few prototypes, |
| 6084 | which can conflict with char gethostbyname_r(); below. */ |
| 6085 | #include <assert.h> |
| 6086 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6087 | /* We use char because int might match the return type of a gcc2 |
| 6088 | builtin and then its argument prototype would still apply. */ |
| 6089 | char gethostbyname_r(); |
| 6090 | |
| 6091 | int main() { |
| 6092 | |
| 6093 | /* The GNU C library defines this for functions which it implements |
| 6094 | to always fail with ENOSYS. Some functions are actually named |
| 6095 | something starting with __ and the normal name is an alias. */ |
| 6096 | #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) |
| 6097 | choke me |
| 6098 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6099 | gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6100 | #endif |
| 6101 | |
| 6102 | ; return 0; } |
| 6103 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6104 | if { (eval echo configure:6105: \"$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] | 6105 | rm -rf conftest* |
| 6106 | eval "ac_cv_func_gethostbyname_r=yes" |
| 6107 | else |
| 6108 | echo "configure: failed program was:" >&5 |
| 6109 | cat conftest.$ac_ext >&5 |
| 6110 | rm -rf conftest* |
| 6111 | eval "ac_cv_func_gethostbyname_r=no" |
| 6112 | fi |
| 6113 | rm -f conftest* |
| 6114 | fi |
| 6115 | |
| 6116 | if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then |
| 6117 | echo "$ac_t""yes" 1>&6 |
| 6118 | |
| 6119 | cat >> confdefs.h <<\EOF |
| 6120 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6121 | EOF |
| 6122 | |
| 6123 | echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6124 | echo "configure:6125: checking gethostbyname_r with 6 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6125 | OLD_CFLAGS=$CFLAGS |
| 6126 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
| 6127 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6128 | #line 6129 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6129 | #include "confdefs.h" |
| 6130 | |
| 6131 | # include <netdb.h> |
| 6132 | |
| 6133 | int main() { |
| 6134 | |
| 6135 | char *name; |
| 6136 | struct hostent *he, *res; |
| 6137 | char buffer[2048]; |
| 6138 | int buflen = 2048; |
| 6139 | int h_errnop; |
| 6140 | |
| 6141 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
| 6142 | |
| 6143 | ; return 0; } |
| 6144 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6145 | if { (eval echo configure:6146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6146 | rm -rf conftest* |
| 6147 | |
| 6148 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6149 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6150 | EOF |
| 6151 | |
| 6152 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6153 | #define HAVE_GETHOSTBYNAME_R_6_ARG 1 |
| 6154 | EOF |
| 6155 | |
| 6156 | echo "$ac_t""yes" 1>&6 |
| 6157 | |
| 6158 | else |
| 6159 | echo "configure: failed program was:" >&5 |
| 6160 | cat conftest.$ac_ext >&5 |
| 6161 | rm -rf conftest* |
| 6162 | |
| 6163 | echo "$ac_t""no" 1>&6 |
| 6164 | echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6165 | echo "configure:6166: checking gethostbyname_r with 5 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6166 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6167 | #line 6168 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6168 | #include "confdefs.h" |
| 6169 | |
| 6170 | # include <netdb.h> |
| 6171 | |
| 6172 | int main() { |
| 6173 | |
| 6174 | char *name; |
| 6175 | struct hostent *he; |
| 6176 | char buffer[2048]; |
| 6177 | int buflen = 2048; |
| 6178 | int h_errnop; |
| 6179 | |
| 6180 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
| 6181 | |
| 6182 | ; return 0; } |
| 6183 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6184 | if { (eval echo configure:6185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6185 | rm -rf conftest* |
| 6186 | |
| 6187 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6188 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6189 | EOF |
| 6190 | |
| 6191 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6192 | #define HAVE_GETHOSTBYNAME_R_5_ARG 1 |
| 6193 | EOF |
| 6194 | |
| 6195 | echo "$ac_t""yes" 1>&6 |
| 6196 | |
| 6197 | else |
| 6198 | echo "configure: failed program was:" >&5 |
| 6199 | cat conftest.$ac_ext >&5 |
| 6200 | rm -rf conftest* |
| 6201 | |
| 6202 | echo "$ac_t""no" 1>&6 |
| 6203 | echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6204 | echo "configure:6205: checking gethostbyname_r with 3 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6205 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6206 | #line 6207 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6207 | #include "confdefs.h" |
| 6208 | |
| 6209 | # include <netdb.h> |
| 6210 | |
| 6211 | int main() { |
| 6212 | |
| 6213 | char *name; |
| 6214 | struct hostent *he; |
| 6215 | struct hostent_data data; |
| 6216 | |
| 6217 | (void) gethostbyname_r(name, he, &data); |
| 6218 | |
| 6219 | ; return 0; } |
| 6220 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6221 | if { (eval echo configure:6222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6222 | rm -rf conftest* |
| 6223 | |
| 6224 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6225 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6226 | EOF |
| 6227 | |
| 6228 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6229 | #define HAVE_GETHOSTBYNAME_R_3_ARG 1 |
| 6230 | EOF |
| 6231 | |
| 6232 | echo "$ac_t""yes" 1>&6 |
| 6233 | |
| 6234 | else |
| 6235 | echo "configure: failed program was:" >&5 |
| 6236 | cat conftest.$ac_ext >&5 |
| 6237 | rm -rf conftest* |
| 6238 | |
| 6239 | echo "$ac_t""no" 1>&6 |
| 6240 | |
| 6241 | fi |
| 6242 | rm -f conftest* |
| 6243 | |
| 6244 | fi |
| 6245 | rm -f conftest* |
| 6246 | |
| 6247 | fi |
| 6248 | rm -f conftest* |
| 6249 | CFLAGS=$OLD_CFLAGS |
| 6250 | |
| 6251 | else |
| 6252 | echo "$ac_t""no" 1>&6 |
| 6253 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6254 | for ac_func in gethostbyname |
| 6255 | do |
| 6256 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6257 | echo "configure:6258: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6258 | 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] | 6259 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6260 | else |
| 6261 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6262 | #line 6263 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6263 | #include "confdefs.h" |
| 6264 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6265 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6266 | #include <assert.h> |
| 6267 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6268 | /* We use char because int might match the return type of a gcc2 |
| 6269 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6270 | char $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6271 | |
| 6272 | int main() { |
| 6273 | |
| 6274 | /* The GNU C library defines this for functions which it implements |
| 6275 | to always fail with ENOSYS. Some functions are actually named |
| 6276 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6277 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6278 | choke me |
| 6279 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6280 | $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6281 | #endif |
| 6282 | |
| 6283 | ; return 0; } |
| 6284 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6285 | if { (eval echo configure:6286: \"$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] | 6286 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6287 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6288 | else |
| 6289 | echo "configure: failed program was:" >&5 |
| 6290 | cat conftest.$ac_ext >&5 |
| 6291 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6292 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6293 | fi |
| 6294 | rm -f conftest* |
| 6295 | fi |
| 6296 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6297 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6298 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6299 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6300 | cat >> confdefs.h <<EOF |
| 6301 | #define $ac_tr_func 1 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6302 | EOF |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6303 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6304 | else |
| 6305 | echo "$ac_t""no" 1>&6 |
| 6306 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6307 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6308 | |
| 6309 | |
| 6310 | fi |
| 6311 | |
| 6312 | |
| 6313 | |
| 6314 | |
| 6315 | |
| 6316 | |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6317 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6318 | # checks for system services |
| 6319 | # (none yet) |
| 6320 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6321 | # Linux requires this for correct f.p. operations |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6322 | echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6323 | echo "configure:6324: checking for __fpu_control" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6324 | if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6325 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6326 | else |
| 6327 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6328 | #line 6329 "configure" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6329 | #include "confdefs.h" |
| 6330 | /* System header to define __stub macros and hopefully few prototypes, |
| 6331 | which can conflict with char __fpu_control(); below. */ |
| 6332 | #include <assert.h> |
| 6333 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6334 | /* We use char because int might match the return type of a gcc2 |
| 6335 | builtin and then its argument prototype would still apply. */ |
| 6336 | char __fpu_control(); |
| 6337 | |
| 6338 | int main() { |
| 6339 | |
| 6340 | /* The GNU C library defines this for functions which it implements |
| 6341 | to always fail with ENOSYS. Some functions are actually named |
| 6342 | something starting with __ and the normal name is an alias. */ |
| 6343 | #if defined (__stub___fpu_control) || defined (__stub_____fpu_control) |
| 6344 | choke me |
| 6345 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6346 | __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6347 | #endif |
| 6348 | |
| 6349 | ; return 0; } |
| 6350 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6351 | if { (eval echo configure:6352: \"$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] | 6352 | rm -rf conftest* |
| 6353 | eval "ac_cv_func___fpu_control=yes" |
| 6354 | else |
| 6355 | echo "configure: failed program was:" >&5 |
| 6356 | cat conftest.$ac_ext >&5 |
| 6357 | rm -rf conftest* |
| 6358 | eval "ac_cv_func___fpu_control=no" |
| 6359 | fi |
| 6360 | rm -f conftest* |
| 6361 | fi |
| 6362 | |
| 6363 | if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then |
| 6364 | echo "$ac_t""yes" 1>&6 |
| 6365 | : |
| 6366 | else |
| 6367 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6368 | echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6369 | echo "configure:6370: checking for __fpu_control in -lieee" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6370 | ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6371 | 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] | 6372 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6373 | else |
| 6374 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6375 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6376 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6377 | #line 6378 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6378 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6379 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6380 | /* We use char because int might match the return type of a gcc2 |
| 6381 | builtin and then its argument prototype would still apply. */ |
| 6382 | char __fpu_control(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6383 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6384 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6385 | __fpu_control() |
| 6386 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6387 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6388 | if { (eval echo configure:6389: \"$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] | 6389 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6390 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6391 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6392 | echo "configure: failed program was:" >&5 |
| 6393 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6394 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6395 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6396 | fi |
| 6397 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6398 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6399 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6400 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6401 | 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] | 6402 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6403 | ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 6404 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6405 | cat >> confdefs.h <<EOF |
| 6406 | #define $ac_tr_lib 1 |
| 6407 | EOF |
| 6408 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6409 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6410 | |
| 6411 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6412 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6413 | fi |
| 6414 | |
| 6415 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6416 | fi |
| 6417 | |
| 6418 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6419 | # Check for --with-fpectl |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6420 | echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6421 | echo "configure:6422: checking for --with-fpectl" >&5 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6422 | # Check whether --with-fpectl or --without-fpectl was given. |
| 6423 | if test "${with_fpectl+set}" = set; then |
| 6424 | withval="$with_fpectl" |
| 6425 | |
| 6426 | if test "$withval" != no |
| 6427 | then cat >> confdefs.h <<\EOF |
| 6428 | #define WANT_SIGFPE_HANDLER 1 |
| 6429 | EOF |
| 6430 | echo "$ac_t""yes" 1>&6 |
| 6431 | else echo "$ac_t""no" 1>&6 |
| 6432 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6433 | else |
| 6434 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6435 | fi |
| 6436 | |
| 6437 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6438 | # check for --with-libm=... |
| 6439 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6440 | case $ac_sys_system in |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 6441 | Darwin) ;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 6442 | BeOS) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6443 | *) LIBM=-lm |
| 6444 | esac |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6445 | echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6446 | echo "configure:6447: checking for --with-libm=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6447 | # Check whether --with-libm or --without-libm was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6448 | if test "${with_libm+set}" = set; then |
| 6449 | withval="$with_libm" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6450 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6451 | if test "$withval" = no |
| 6452 | then LIBM= |
| 6453 | echo "$ac_t""force LIBM empty" 1>&6 |
| 6454 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6455 | then LIBM=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6456 | echo "$ac_t""set LIBM=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6457 | 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] | 6458 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6459 | else |
| 6460 | echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6461 | fi |
| 6462 | |
| 6463 | |
| 6464 | # check for --with-libc=... |
| 6465 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6466 | echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6467 | echo "configure:6468: checking for --with-libc=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6468 | # Check whether --with-libc or --without-libc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6469 | if test "${with_libc+set}" = set; then |
| 6470 | withval="$with_libc" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6471 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6472 | if test "$withval" = no |
| 6473 | then LIBC= |
| 6474 | echo "$ac_t""force LIBC empty" 1>&6 |
| 6475 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6476 | then LIBC=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6477 | echo "$ac_t""set LIBC=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6478 | 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] | 6479 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6480 | else |
| 6481 | echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6482 | fi |
| 6483 | |
| 6484 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6485 | # check for hypot() in math library |
| 6486 | LIBS_SAVE=$LIBS |
| 6487 | LIBS="$LIBS $LIBM" |
| 6488 | for ac_func in hypot |
| 6489 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6490 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6491 | echo "configure:6492: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6492 | 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] | 6493 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6494 | else |
| 6495 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6496 | #line 6497 "configure" |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6497 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6498 | /* System header to define __stub macros and hopefully few prototypes, |
| 6499 | which can conflict with char $ac_func(); below. */ |
| 6500 | #include <assert.h> |
| 6501 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6502 | /* We use char because int might match the return type of a gcc2 |
| 6503 | builtin and then its argument prototype would still apply. */ |
| 6504 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6505 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6506 | int main() { |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6507 | |
| 6508 | /* The GNU C library defines this for functions which it implements |
| 6509 | to always fail with ENOSYS. Some functions are actually named |
| 6510 | something starting with __ and the normal name is an alias. */ |
| 6511 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 6512 | choke me |
| 6513 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6514 | $ac_func(); |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6515 | #endif |
| 6516 | |
| 6517 | ; return 0; } |
| 6518 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6519 | if { (eval echo configure:6520: \"$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] | 6520 | rm -rf conftest* |
| 6521 | eval "ac_cv_func_$ac_func=yes" |
| 6522 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6523 | echo "configure: failed program was:" >&5 |
| 6524 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6525 | rm -rf conftest* |
| 6526 | eval "ac_cv_func_$ac_func=no" |
| 6527 | fi |
| 6528 | rm -f conftest* |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6529 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6530 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6531 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 6532 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6533 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6534 | cat >> confdefs.h <<EOF |
| 6535 | #define $ac_tr_func 1 |
| 6536 | EOF |
| 6537 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6538 | else |
| 6539 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 6540 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6541 | fi |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6542 | done |
| 6543 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6544 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6545 | LIBS=$LIBS_SAVE |
| 6546 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6547 | # check whether malloc(0) returns NULL or not |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6548 | echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6549 | echo "configure:6550: checking what malloc(0) returns" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6550 | if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6551 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6552 | else |
| 6553 | if test "$cross_compiling" = yes; then |
| 6554 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6555 | else |
| 6556 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6557 | #line 6558 "configure" |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6558 | #include "confdefs.h" |
| 6559 | #include <stdio.h> |
| 6560 | #ifdef HAVE_STDLIB |
| 6561 | #include <stdlib.h> |
| 6562 | #else |
| 6563 | char *malloc(), *realloc(); |
| 6564 | int *free(); |
| 6565 | #endif |
| 6566 | main() { |
| 6567 | char *p; |
| 6568 | p = malloc(0); |
| 6569 | if (p == NULL) exit(1); |
| 6570 | p = realloc(p, 0); |
| 6571 | if (p == NULL) exit(1); |
| 6572 | free(p); |
| 6573 | exit(0); |
| 6574 | } |
| 6575 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6576 | if { (eval echo configure:6577: \"$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] | 6577 | then |
| 6578 | ac_cv_malloc_zero=nonnull |
| 6579 | else |
| 6580 | echo "configure: failed program was:" >&5 |
| 6581 | cat conftest.$ac_ext >&5 |
| 6582 | rm -fr conftest* |
| 6583 | ac_cv_malloc_zero=null |
| 6584 | fi |
| 6585 | rm -fr conftest* |
| 6586 | fi |
| 6587 | |
| 6588 | fi |
| 6589 | |
| 6590 | echo "$ac_t""$ac_cv_malloc_zero" 1>&6 |
| 6591 | if test "$ac_cv_malloc_zero" = null |
| 6592 | then |
| 6593 | cat >> confdefs.h <<\EOF |
| 6594 | #define MALLOC_ZERO_RETURNS_NULL 1 |
| 6595 | EOF |
| 6596 | |
| 6597 | fi |
| 6598 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6599 | # check for wchar.h |
| 6600 | ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` |
| 6601 | echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6602 | echo "configure:6603: checking for wchar.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6603 | 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] | 6604 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6605 | else |
| 6606 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6607 | #line 6608 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6608 | #include "confdefs.h" |
| 6609 | #include <wchar.h> |
| 6610 | EOF |
| 6611 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6612 | { (eval echo configure:6613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6613 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 6614 | if test -z "$ac_err"; then |
| 6615 | rm -rf conftest* |
| 6616 | eval "ac_cv_header_$ac_safe=yes" |
| 6617 | else |
| 6618 | echo "$ac_err" >&5 |
| 6619 | echo "configure: failed program was:" >&5 |
| 6620 | cat conftest.$ac_ext >&5 |
| 6621 | rm -rf conftest* |
| 6622 | eval "ac_cv_header_$ac_safe=no" |
| 6623 | fi |
| 6624 | rm -f conftest* |
| 6625 | fi |
| 6626 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 6627 | echo "$ac_t""yes" 1>&6 |
| 6628 | cat >> confdefs.h <<\EOF |
| 6629 | #define HAVE_WCHAR_H 1 |
| 6630 | EOF |
| 6631 | wchar_h="yes" |
| 6632 | else |
| 6633 | echo "$ac_t""no" 1>&6 |
| 6634 | wchar_h="no" |
| 6635 | |
| 6636 | fi |
| 6637 | |
| 6638 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6639 | # determine wchar_t size |
| 6640 | if test "$wchar_h" = yes |
| 6641 | then |
| 6642 | echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6643 | echo "configure:6644: checking size of wchar_t" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6644 | if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then |
| 6645 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6646 | else |
| 6647 | if test "$cross_compiling" = yes; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6648 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6649 | else |
| 6650 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6651 | #line 6652 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6652 | #include "confdefs.h" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6653 | #include <stdio.h> |
| 6654 | main() |
| 6655 | { |
| 6656 | FILE *f=fopen("conftestval", "w"); |
| 6657 | if (!f) exit(1); |
| 6658 | fprintf(f, "%d\n", sizeof(wchar_t)); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6659 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6660 | } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6661 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6662 | if { (eval echo configure:6663: \"$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] | 6663 | then |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6664 | ac_cv_sizeof_wchar_t=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6665 | else |
| 6666 | echo "configure: failed program was:" >&5 |
| 6667 | cat conftest.$ac_ext >&5 |
| 6668 | rm -fr conftest* |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6669 | ac_cv_sizeof_wchar_t=0 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6670 | fi |
| 6671 | rm -fr conftest* |
| 6672 | fi |
| 6673 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6674 | fi |
| 6675 | echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 |
| 6676 | cat >> confdefs.h <<EOF |
| 6677 | #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t |
| 6678 | EOF |
| 6679 | |
| 6680 | |
| 6681 | fi |
| 6682 | |
| 6683 | echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6684 | echo "configure:6685: checking what type to use for unicode" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6685 | # Check whether --enable-unicode or --disable-unicode was given. |
| 6686 | if test "${enable_unicode+set}" = set; then |
| 6687 | enableval="$enable_unicode" |
| 6688 | : |
| 6689 | else |
| 6690 | enable_unicode=yes |
| 6691 | fi |
| 6692 | |
| 6693 | |
| 6694 | if test $enable_unicode = yes |
| 6695 | then |
Martin v. Löwis | fd91779 | 2001-06-27 20:22:04 +0000 | [diff] [blame] | 6696 | # Without any arguments, Py_UNICODE defaults to two-byte mode |
| 6697 | enable_unicode="ucs2" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6698 | fi |
| 6699 | |
| 6700 | case "$enable_unicode" in |
| 6701 | ucs2) unicode_size="2" |
| 6702 | cat >> confdefs.h <<\EOF |
| 6703 | #define Py_UNICODE_SIZE 2 |
| 6704 | EOF |
| 6705 | |
| 6706 | ;; |
| 6707 | ucs4) unicode_size="4" |
| 6708 | cat >> confdefs.h <<\EOF |
| 6709 | #define Py_UNICODE_SIZE 4 |
| 6710 | EOF |
| 6711 | |
| 6712 | ;; |
| 6713 | esac |
| 6714 | |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6715 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6716 | if test "$enable_unicode" = "no" |
| 6717 | then |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6718 | UNICODE_OBJS="" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6719 | echo "$ac_t""not used" 1>&6 |
| 6720 | else |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6721 | UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6722 | cat >> confdefs.h <<\EOF |
| 6723 | #define Py_USING_UNICODE 1 |
| 6724 | EOF |
| 6725 | |
| 6726 | if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" |
| 6727 | then |
| 6728 | PY_UNICODE_TYPE="wchar_t" |
| 6729 | cat >> confdefs.h <<\EOF |
| 6730 | #define HAVE_USABLE_WCHAR_T 1 |
| 6731 | EOF |
| 6732 | |
| 6733 | cat >> confdefs.h <<\EOF |
| 6734 | #define PY_UNICODE_TYPE wchar_t |
| 6735 | EOF |
| 6736 | |
| 6737 | elif test "$ac_cv_sizeof_short" = "$unicode_size" |
| 6738 | then |
| 6739 | PY_UNICODE_TYPE="unsigned short" |
| 6740 | cat >> confdefs.h <<\EOF |
| 6741 | #define PY_UNICODE_TYPE unsigned short |
| 6742 | EOF |
| 6743 | |
| 6744 | elif test "$ac_cv_sizeof_long" = "$unicode_size" |
| 6745 | then |
| 6746 | PY_UNICODE_TYPE="unsigned long" |
| 6747 | cat >> confdefs.h <<\EOF |
| 6748 | #define PY_UNICODE_TYPE unsigned long |
| 6749 | EOF |
| 6750 | |
| 6751 | else |
| 6752 | PY_UNICODE_TYPE="no type found" |
| 6753 | fi |
| 6754 | echo "$ac_t""$PY_UNICODE_TYPE" 1>&6 |
| 6755 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6756 | |
| 6757 | # check for endianness |
| 6758 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6759 | echo "configure:6760: checking whether byte ordering is bigendian" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6760 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6761 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6762 | else |
| 6763 | ac_cv_c_bigendian=unknown |
| 6764 | # See if sys/param.h defines the BYTE_ORDER macro. |
| 6765 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6766 | #line 6767 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6767 | #include "confdefs.h" |
| 6768 | #include <sys/types.h> |
| 6769 | #include <sys/param.h> |
| 6770 | int main() { |
| 6771 | |
| 6772 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 6773 | bogus endian macros |
| 6774 | #endif |
| 6775 | ; return 0; } |
| 6776 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6777 | if { (eval echo configure:6778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6778 | rm -rf conftest* |
| 6779 | # It does; now see whether it defined to BIG_ENDIAN or not. |
| 6780 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6781 | #line 6782 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6782 | #include "confdefs.h" |
| 6783 | #include <sys/types.h> |
| 6784 | #include <sys/param.h> |
| 6785 | int main() { |
| 6786 | |
| 6787 | #if BYTE_ORDER != BIG_ENDIAN |
| 6788 | not big endian |
| 6789 | #endif |
| 6790 | ; return 0; } |
| 6791 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6792 | if { (eval echo configure:6793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6793 | rm -rf conftest* |
| 6794 | ac_cv_c_bigendian=yes |
| 6795 | else |
| 6796 | echo "configure: failed program was:" >&5 |
| 6797 | cat conftest.$ac_ext >&5 |
| 6798 | rm -rf conftest* |
| 6799 | ac_cv_c_bigendian=no |
| 6800 | fi |
| 6801 | rm -f conftest* |
| 6802 | else |
| 6803 | echo "configure: failed program was:" >&5 |
| 6804 | cat conftest.$ac_ext >&5 |
| 6805 | fi |
| 6806 | rm -f conftest* |
| 6807 | if test $ac_cv_c_bigendian = unknown; then |
| 6808 | if test "$cross_compiling" = yes; then |
| 6809 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6810 | else |
| 6811 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6812 | #line 6813 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6813 | #include "confdefs.h" |
| 6814 | main () { |
| 6815 | /* Are we little or big endian? From Harbison&Steele. */ |
| 6816 | union |
| 6817 | { |
| 6818 | long l; |
| 6819 | char c[sizeof (long)]; |
| 6820 | } u; |
| 6821 | u.l = 1; |
| 6822 | exit (u.c[sizeof (long) - 1] == 1); |
| 6823 | } |
| 6824 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6825 | if { (eval echo configure:6826: \"$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] | 6826 | then |
| 6827 | ac_cv_c_bigendian=no |
| 6828 | else |
| 6829 | echo "configure: failed program was:" >&5 |
| 6830 | cat conftest.$ac_ext >&5 |
| 6831 | rm -fr conftest* |
| 6832 | ac_cv_c_bigendian=yes |
| 6833 | fi |
| 6834 | rm -fr conftest* |
| 6835 | fi |
| 6836 | |
| 6837 | fi |
| 6838 | fi |
| 6839 | |
| 6840 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 6841 | if test $ac_cv_c_bigendian = yes; then |
| 6842 | cat >> confdefs.h <<\EOF |
| 6843 | #define WORDS_BIGENDIAN 1 |
| 6844 | EOF |
| 6845 | |
| 6846 | fi |
| 6847 | |
| 6848 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6849 | # Check whether right shifting a negative integer extends the sign bit |
| 6850 | # or fills with zeros (like the Cray J90, according to Tim Peters). |
| 6851 | echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6852 | echo "configure:6853: checking whether right shift extends the sign bit" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6853 | if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 6854 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6855 | else |
| 6856 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6857 | if test "$cross_compiling" = yes; then |
| 6858 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6859 | else |
| 6860 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6861 | #line 6862 "configure" |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6862 | #include "confdefs.h" |
| 6863 | |
| 6864 | int main() |
| 6865 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 6866 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6867 | } |
| 6868 | |
| 6869 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6870 | if { (eval echo configure:6871: \"$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] | 6871 | then |
| 6872 | ac_cv_rshift_extends_sign=yes |
| 6873 | else |
| 6874 | echo "configure: failed program was:" >&5 |
| 6875 | cat conftest.$ac_ext >&5 |
| 6876 | rm -fr conftest* |
| 6877 | ac_cv_rshift_extends_sign=no |
| 6878 | fi |
| 6879 | rm -fr conftest* |
| 6880 | fi |
| 6881 | |
| 6882 | fi |
| 6883 | |
| 6884 | echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 |
| 6885 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6886 | then |
| 6887 | cat >> confdefs.h <<\EOF |
| 6888 | #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 |
| 6889 | EOF |
| 6890 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6891 | fi |
| 6892 | |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6893 | # check for getc_unlocked and related locking functions |
| 6894 | echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6895 | echo "configure:6896: checking for getc_unlocked() and friends" >&5 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6896 | if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then |
| 6897 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6898 | else |
| 6899 | |
| 6900 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6901 | #line 6902 "configure" |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 6902 | #include "confdefs.h" |
| 6903 | #include <stdio.h> |
| 6904 | int main() { |
| 6905 | |
| 6906 | FILE *f = fopen("/dev/null", "r"); |
| 6907 | flockfile(f); |
| 6908 | getc_unlocked(f); |
| 6909 | funlockfile(f); |
| 6910 | |
| 6911 | ; return 0; } |
| 6912 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6913 | if { (eval echo configure:6914: \"$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] | 6914 | rm -rf conftest* |
| 6915 | ac_cv_have_getc_unlocked=yes |
| 6916 | else |
| 6917 | echo "configure: failed program was:" >&5 |
| 6918 | cat conftest.$ac_ext >&5 |
| 6919 | rm -rf conftest* |
| 6920 | ac_cv_have_getc_unlocked=no |
| 6921 | fi |
| 6922 | rm -f conftest* |
| 6923 | fi |
| 6924 | |
| 6925 | echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6 |
| 6926 | if test "$ac_cv_have_getc_unlocked" = yes |
| 6927 | then |
| 6928 | cat >> confdefs.h <<\EOF |
| 6929 | #define HAVE_GETC_UNLOCKED 1 |
| 6930 | EOF |
| 6931 | |
| 6932 | fi |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 6933 | |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 6934 | # check for readline 4.2 |
| 6935 | echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6936 | echo "configure:6937: checking for rl_completion_matches in -lreadline" >&5 |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 6937 | ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` |
| 6938 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 6939 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6940 | else |
| 6941 | ac_save_LIBS="$LIBS" |
| 6942 | LIBS="-lreadline -ltermcap $LIBS" |
| 6943 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6944 | #line 6945 "configure" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 6945 | #include "confdefs.h" |
| 6946 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6947 | /* We use char because int might match the return type of a gcc2 |
| 6948 | builtin and then its argument prototype would still apply. */ |
| 6949 | char rl_completion_matches(); |
| 6950 | |
| 6951 | int main() { |
| 6952 | rl_completion_matches() |
| 6953 | ; return 0; } |
| 6954 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6955 | if { (eval echo configure:6956: \"$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] | 6956 | rm -rf conftest* |
| 6957 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 6958 | else |
| 6959 | echo "configure: failed program was:" >&5 |
| 6960 | cat conftest.$ac_ext >&5 |
| 6961 | rm -rf conftest* |
| 6962 | eval "ac_cv_lib_$ac_lib_var=no" |
| 6963 | fi |
| 6964 | rm -f conftest* |
| 6965 | LIBS="$ac_save_LIBS" |
| 6966 | |
| 6967 | fi |
| 6968 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 6969 | echo "$ac_t""yes" 1>&6 |
| 6970 | cat >> confdefs.h <<\EOF |
| 6971 | #define HAVE_RL_COMPLETION_MATCHES 1 |
| 6972 | EOF |
| 6973 | |
| 6974 | else |
| 6975 | echo "$ac_t""no" 1>&6 |
| 6976 | fi |
| 6977 | |
| 6978 | |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 6979 | echo $ac_n "checking for broken nice()""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6980 | echo "configure:6981: checking for broken nice()" >&5 |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 6981 | if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then |
| 6982 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6983 | else |
| 6984 | |
| 6985 | if test "$cross_compiling" = yes; then |
| 6986 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6987 | else |
| 6988 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 6989 | #line 6990 "configure" |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 6990 | #include "confdefs.h" |
| 6991 | |
| 6992 | int main() |
| 6993 | { |
| 6994 | int val1 = nice(1); |
| 6995 | if (val1 != -1 && val1 == nice(2)) |
| 6996 | exit(0); |
| 6997 | exit(1); |
| 6998 | } |
| 6999 | |
| 7000 | EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 7001 | if { (eval echo configure:7002: \"$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] | 7002 | then |
| 7003 | ac_cv_broken_nice=yes |
| 7004 | else |
| 7005 | echo "configure: failed program was:" >&5 |
| 7006 | cat conftest.$ac_ext >&5 |
| 7007 | rm -fr conftest* |
| 7008 | ac_cv_broken_nice=no |
| 7009 | fi |
| 7010 | rm -fr conftest* |
| 7011 | fi |
| 7012 | |
| 7013 | fi |
| 7014 | |
| 7015 | echo "$ac_t""$ac_cv_broken_nice" 1>&6 |
| 7016 | if test "$ac_cv_broken_nice" = yes |
| 7017 | then |
| 7018 | cat >> confdefs.h <<\EOF |
| 7019 | #define HAVE_BROKEN_NICE 1 |
| 7020 | EOF |
| 7021 | |
| 7022 | fi |
| 7023 | |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7024 | # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! |
| 7025 | # Add sys/socket.h to confdefs.h |
| 7026 | cat >> confdefs.h <<\EOF |
| 7027 | #ifdef HAVE_SYS_SOCKET_H |
| 7028 | #include <sys/socket.h> |
| 7029 | #endif |
| 7030 | EOF |
| 7031 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 7032 | echo "configure:7033: checking for socklen_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7033 | 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] | 7034 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7035 | else |
| 7036 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 7037 | #line 7038 "configure" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7038 | #include "confdefs.h" |
| 7039 | #include <sys/types.h> |
| 7040 | #if STDC_HEADERS |
| 7041 | #include <stdlib.h> |
| 7042 | #include <stddef.h> |
| 7043 | #endif |
| 7044 | EOF |
| 7045 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 7046 | egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 7047 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7048 | ac_cv_type_socklen_t=yes |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7049 | else |
| 7050 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7051 | ac_cv_type_socklen_t=no |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7052 | fi |
| 7053 | rm -f conftest* |
| 7054 | |
| 7055 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7056 | echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 |
| 7057 | if test $ac_cv_type_socklen_t = no; then |
| 7058 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7059 | #define socklen_t int |
| 7060 | EOF |
| 7061 | |
| 7062 | fi |
| 7063 | |
| 7064 | |
Neil Schemenauer | f25cf6c | 2001-03-04 06:39:33 +0000 | [diff] [blame] | 7065 | # Add Python/ prefix to LIBOBJS |
| 7066 | libobjs=$LIBOBJS |
| 7067 | LIBOBJS= |
| 7068 | for obj in $libobjs; do |
| 7069 | LIBOBJS="$LIBOBJS Python/$obj" |
| 7070 | done |
| 7071 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7072 | #AC_MSG_CHECKING(for Modules/Setup) |
| 7073 | #if test ! -f Modules/Setup ; then |
| 7074 | # if test ! -d Modules ; then |
| 7075 | # mkdir Modules |
| 7076 | # fi |
| 7077 | # cp "$srcdir/Modules/Setup.dist" Modules/Setup |
| 7078 | # AC_MSG_RESULT(creating) |
| 7079 | #else |
| 7080 | # AC_MSG_RESULT(already exists) |
| 7081 | #fi |
| 7082 | |
| 7083 | |
Neil Schemenauer | acbf9ef | 2001-02-27 02:15:14 +0000 | [diff] [blame] | 7084 | SRCDIRS="Parser Grammar Objects Python Modules" |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7085 | echo $ac_n "checking for build directories""... $ac_c" 1>&6 |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame^] | 7086 | echo "configure:7087: checking for build directories" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7087 | for dir in $SRCDIRS; do |
| 7088 | if test ! -d $dir; then |
| 7089 | mkdir $dir |
Guido van Rossum | 262cf20 | 2000-11-02 19:33:53 +0000 | [diff] [blame] | 7090 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7091 | done |
| 7092 | echo "$ac_t""done" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 7093 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7094 | # generate output files |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7095 | trap '' 1 2 15 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7096 | cat > confcache <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7097 | # This file is a shell script that caches the results of configure |
| 7098 | # tests run on this system so they can be shared between configure |
| 7099 | # scripts and configure runs. It is not useful on other systems. |
| 7100 | # If it contains results you don't want to keep, you may remove or edit it. |
| 7101 | # |
| 7102 | # By default, configure uses ./config.cache as the cache file, |
| 7103 | # creating it if it does not exist already. You can give configure |
| 7104 | # the --cache-file=FILE option to use a different cache file; that is |
| 7105 | # what configure does when it calls configure scripts in |
| 7106 | # subdirectories, so they share the cache. |
| 7107 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| 7108 | # config.status only pays attention to the cache file if you give it the |
| 7109 | # --recheck option to rerun configure. |
| 7110 | # |
| 7111 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7112 | # The following way of writing the cache mishandles newlines in values, |
| 7113 | # but we know of no workaround that is simple, portable, and efficient. |
| 7114 | # So, don't put newlines in cache variables' values. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7115 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 7116 | # 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] | 7117 | (set) 2>&1 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7118 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7119 | *ac_space=\ *) |
| 7120 | # `set' does not quote correctly, so add quotes (double-quote substitution |
| 7121 | # turns \\\\ into \\, and sed turns \\ into \). |
| 7122 | sed -n \ |
| 7123 | -e "s/'/'\\\\''/g" \ |
| 7124 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| 7125 | ;; |
| 7126 | *) |
| 7127 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 7128 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| 7129 | ;; |
| 7130 | esac >> confcache |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7131 | if cmp -s $cache_file confcache; then |
| 7132 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7133 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7134 | if test -w $cache_file; then |
| 7135 | echo "updating cache $cache_file" |
| 7136 | cat confcache > $cache_file |
| 7137 | else |
| 7138 | echo "not updating unwritable cache $cache_file" |
| 7139 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7140 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7141 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7142 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7143 | 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] | 7144 | |
| 7145 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 7146 | # Let make expand exec_prefix. |
| 7147 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7148 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7149 | # Any assignment to VPATH causes Sun make to only execute |
| 7150 | # the first set of double-colon rules, so remove it if not needed. |
| 7151 | # If there is a colon in the path, we need to keep it. |
| 7152 | if test "x$srcdir" = x.; then |
| 7153 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
| 7154 | fi |
| 7155 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7156 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7157 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7158 | DEFS=-DHAVE_CONFIG_H |
| 7159 | |
| 7160 | # Without the "./", some shells look in PATH for config.status. |
| 7161 | : ${CONFIG_STATUS=./config.status} |
| 7162 | |
| 7163 | echo creating $CONFIG_STATUS |
| 7164 | rm -f $CONFIG_STATUS |
| 7165 | cat > $CONFIG_STATUS <<EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7166 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7167 | # Generated automatically by configure. |
| 7168 | # Run this file to recreate the current configuration. |
| 7169 | # This directory was configured as follows, |
| 7170 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 7171 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7172 | # $0 $ac_configure_args |
| 7173 | # |
| 7174 | # Compiler output produced by configure, useful for debugging |
| 7175 | # configure, is in ./config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7176 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7177 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7178 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7179 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7180 | case "\$ac_option" in |
| 7181 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7182 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
| 7183 | 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] | 7184 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7185 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7186 | exit 0 ;; |
| 7187 | -help | --help | --hel | --he | --h) |
| 7188 | echo "\$ac_cs_usage"; exit 0 ;; |
| 7189 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7190 | esac |
| 7191 | done |
| 7192 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7193 | ac_given_srcdir=$srcdir |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7194 | ac_given_INSTALL="$INSTALL" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7195 | |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7196 | 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] | 7197 | EOF |
| 7198 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7199 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7200 | # Protect against being on the right side of a sed subst in config.status. |
| 7201 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 7202 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7203 | $ac_vpsub |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7204 | $extrasub |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7205 | s%@SHELL@%$SHELL%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7206 | s%@CFLAGS@%$CFLAGS%g |
| 7207 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 7208 | s%@CXXFLAGS@%$CXXFLAGS%g |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7209 | s%@FFLAGS@%$FFLAGS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7210 | s%@DEFS@%$DEFS%g |
| 7211 | s%@LDFLAGS@%$LDFLAGS%g |
| 7212 | s%@LIBS@%$LIBS%g |
| 7213 | s%@exec_prefix@%$exec_prefix%g |
| 7214 | s%@prefix@%$prefix%g |
| 7215 | s%@program_transform_name@%$program_transform_name%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7216 | s%@bindir@%$bindir%g |
| 7217 | s%@sbindir@%$sbindir%g |
| 7218 | s%@libexecdir@%$libexecdir%g |
| 7219 | s%@datadir@%$datadir%g |
| 7220 | s%@sysconfdir@%$sysconfdir%g |
| 7221 | s%@sharedstatedir@%$sharedstatedir%g |
| 7222 | s%@localstatedir@%$localstatedir%g |
| 7223 | s%@libdir@%$libdir%g |
| 7224 | s%@includedir@%$includedir%g |
| 7225 | s%@oldincludedir@%$oldincludedir%g |
| 7226 | s%@infodir@%$infodir%g |
| 7227 | s%@mandir@%$mandir%g |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 7228 | s%@VERSION@%$VERSION%g |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 7229 | s%@CONFIG_ARGS@%$CONFIG_ARGS%g |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 7230 | s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g |
| 7231 | s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g |
| 7232 | s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g |
| 7233 | s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 7234 | s%@MACHDEP@%$MACHDEP%g |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 7235 | s%@SGI_ABI@%$SGI_ABI%g |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 7236 | s%@CXX@%$CXX%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7237 | s%@MAINOBJ@%$MAINOBJ%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7238 | s%@CC@%$CC%g |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 7239 | s%@CPP@%$CPP%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7240 | s%@EXEEXT@%$EXEEXT%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7241 | s%@LIBRARY@%$LIBRARY%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7242 | s%@LDLIBRARY@%$LDLIBRARY%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7243 | s%@DLLLIBRARY@%$DLLLIBRARY%g |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 7244 | s%@BLDLIBRARY@%$BLDLIBRARY%g |
| 7245 | s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 7246 | s%@LINKCC@%$LINKCC%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7247 | s%@RANLIB@%$RANLIB%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7248 | s%@AR@%$AR%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7249 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7250 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7251 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 7252 | s%@LN@%$LN%g |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 7253 | s%@OPT@%$OPT%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7254 | s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7255 | s%@SO@%$SO%g |
| 7256 | s%@LDSHARED@%$LDSHARED%g |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 7257 | s%@BLDSHARED@%$BLDSHARED%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7258 | s%@CCSHARED@%$CCSHARED%g |
| 7259 | s%@LINKFORSHARED@%$LINKFORSHARED%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7260 | s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7261 | s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g |
| 7262 | s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 7263 | s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 7264 | s%@LDLAST@%$LDLAST%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7265 | s%@DLINCLDIR@%$DLINCLDIR%g |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 7266 | s%@DYNLOADFILE@%$DYNLOADFILE%g |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 7267 | s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7268 | s%@LIBOBJS@%$LIBOBJS%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7269 | s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g |
| 7270 | s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g |
| 7271 | 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] | 7272 | s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7273 | s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7274 | s%@LIBM@%$LIBM%g |
| 7275 | s%@LIBC@%$LIBC%g |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7276 | s%@UNICODE_OBJS@%$UNICODE_OBJS%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7277 | s%@SRCDIRS@%$SRCDIRS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7278 | |
| 7279 | CEOF |
| 7280 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7281 | |
| 7282 | cat >> $CONFIG_STATUS <<\EOF |
| 7283 | |
| 7284 | # Split the substitutions into bite-sized pieces for seds with |
| 7285 | # small command number limits, like on Digital OSF/1 and HP-UX. |
| 7286 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 7287 | ac_file=1 # Number of current file. |
| 7288 | ac_beg=1 # First line for current file. |
| 7289 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 7290 | ac_more_lines=: |
| 7291 | ac_sed_cmds="" |
| 7292 | while $ac_more_lines; do |
| 7293 | if test $ac_beg -gt 1; then |
| 7294 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7295 | else |
| 7296 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7297 | fi |
| 7298 | if test ! -s conftest.s$ac_file; then |
| 7299 | ac_more_lines=false |
| 7300 | rm -f conftest.s$ac_file |
| 7301 | else |
| 7302 | if test -z "$ac_sed_cmds"; then |
| 7303 | ac_sed_cmds="sed -f conftest.s$ac_file" |
| 7304 | else |
| 7305 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
| 7306 | fi |
| 7307 | ac_file=`expr $ac_file + 1` |
| 7308 | ac_beg=$ac_end |
| 7309 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
| 7310 | fi |
| 7311 | done |
| 7312 | if test -z "$ac_sed_cmds"; then |
| 7313 | ac_sed_cmds=cat |
| 7314 | fi |
| 7315 | EOF |
| 7316 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7317 | cat >> $CONFIG_STATUS <<EOF |
| 7318 | |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7319 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"} |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7320 | EOF |
| 7321 | cat >> $CONFIG_STATUS <<\EOF |
| 7322 | 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] | 7323 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7324 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7325 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7326 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7327 | *) ac_file_in="${ac_file}.in" ;; |
| 7328 | esac |
| 7329 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7330 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7331 | |
| 7332 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7333 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7334 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7335 | # The file is in a subdirectory. |
| 7336 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7337 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7338 | # A "../" for each directory in $ac_dir_suffix. |
| 7339 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
| 7340 | else |
| 7341 | ac_dir_suffix= ac_dots= |
| 7342 | fi |
| 7343 | |
| 7344 | case "$ac_given_srcdir" in |
| 7345 | .) srcdir=. |
| 7346 | if test -z "$ac_dots"; then top_srcdir=. |
| 7347 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
| 7348 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; |
| 7349 | *) # Relative path. |
| 7350 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 7351 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
| 7352 | esac |
| 7353 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7354 | case "$ac_given_INSTALL" in |
| 7355 | [/$]*) INSTALL="$ac_given_INSTALL" ;; |
| 7356 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
| 7357 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7358 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7359 | echo creating "$ac_file" |
| 7360 | rm -f "$ac_file" |
| 7361 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
| 7362 | case "$ac_file" in |
| 7363 | *Makefile*) ac_comsub="1i\\ |
| 7364 | # $configure_input" ;; |
| 7365 | *) ac_comsub= ;; |
| 7366 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7367 | |
| 7368 | 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] | 7369 | sed -e "$ac_comsub |
| 7370 | s%@configure_input@%$configure_input%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7371 | s%@srcdir@%$srcdir%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7372 | s%@top_srcdir@%$top_srcdir%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7373 | s%@INSTALL@%$INSTALL%g |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7374 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7375 | fi; done |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7376 | rm -f conftest.s* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7377 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7378 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
| 7379 | # 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] | 7380 | # |
| 7381 | # ac_d sets the value in "#define NAME VALUE" lines. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7382 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 7383 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7384 | ac_dC='\3' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7385 | ac_dD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7386 | # 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] | 7387 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7388 | ac_uB='\([ ]\)%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7389 | ac_uC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7390 | ac_uD='\4%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7391 | # 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] | 7392 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7393 | ac_eB='$%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7394 | ac_eC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7395 | ac_eD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7396 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7397 | if test "${CONFIG_HEADERS+set}" != set; then |
| 7398 | EOF |
| 7399 | cat >> $CONFIG_STATUS <<EOF |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7400 | CONFIG_HEADERS="pyconfig.h" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7401 | EOF |
| 7402 | cat >> $CONFIG_STATUS <<\EOF |
| 7403 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7404 | 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] | 7405 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7406 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7407 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7408 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7409 | *) ac_file_in="${ac_file}.in" ;; |
| 7410 | esac |
| 7411 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7412 | echo creating $ac_file |
| 7413 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7414 | rm -f conftest.frag conftest.in conftest.out |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7415 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 7416 | cat $ac_file_inputs > conftest.in |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7417 | |
| 7418 | EOF |
| 7419 | |
| 7420 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
| 7421 | # 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] | 7422 | # 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] | 7423 | # Protect against being in an unquoted here document in config.status. |
| 7424 | rm -f conftest.vals |
| 7425 | cat > conftest.hdr <<\EOF |
| 7426 | s/[\\&%]/\\&/g |
| 7427 | s%[\\$`]%\\&%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7428 | 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] | 7429 | s%ac_d%ac_u%gp |
| 7430 | s%ac_u%ac_e%gp |
| 7431 | EOF |
| 7432 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
| 7433 | rm -f conftest.hdr |
| 7434 | |
| 7435 | # This sed command replaces #undef with comments. This is necessary, for |
| 7436 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 7437 | # on some systems where configure will not decide to define it. |
| 7438 | cat >> conftest.vals <<\EOF |
| 7439 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
| 7440 | EOF |
| 7441 | |
| 7442 | # Break up conftest.vals because some shells have a limit on |
| 7443 | # 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] | 7444 | |
| 7445 | rm -f conftest.tail |
| 7446 | while : |
| 7447 | do |
| 7448 | ac_lines=`grep -c . conftest.vals` |
| 7449 | # grep -c gives empty output for an empty file on some AIX systems. |
| 7450 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 7451 | # Write a limited-size here document to conftest.frag. |
| 7452 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
| 7453 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
| 7454 | echo 'CEOF |
| 7455 | sed -f conftest.frag conftest.in > conftest.out |
| 7456 | rm -f conftest.in |
| 7457 | mv conftest.out conftest.in |
| 7458 | ' >> $CONFIG_STATUS |
| 7459 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
| 7460 | rm -f conftest.vals |
| 7461 | mv conftest.tail conftest.vals |
| 7462 | done |
| 7463 | rm -f conftest.vals |
| 7464 | |
| 7465 | cat >> $CONFIG_STATUS <<\EOF |
| 7466 | rm -f conftest.frag conftest.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7467 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7468 | cat conftest.in >> conftest.h |
| 7469 | rm -f conftest.in |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7470 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7471 | echo "$ac_file is unchanged" |
| 7472 | rm -f conftest.h |
| 7473 | else |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7474 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7475 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7476 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7477 | # The file is in a subdirectory. |
| 7478 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 7479 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7480 | rm -f $ac_file |
| 7481 | mv conftest.h $ac_file |
| 7482 | fi |
| 7483 | fi; done |
| 7484 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7485 | EOF |
| 7486 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7487 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7488 | EOF |
| 7489 | cat >> $CONFIG_STATUS <<\EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7490 | |
| 7491 | exit 0 |
| 7492 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7493 | chmod +x $CONFIG_STATUS |
| 7494 | rm -fr confdefs* $ac_clean_files |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7495 | 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] | 7496 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7497 | |
| 7498 | echo "creating Setup" |
| 7499 | if test ! -f Modules/Setup |
| 7500 | then |
| 7501 | cp $srcdir/Modules/Setup.dist Modules/Setup |
| 7502 | fi |
| 7503 | |
| 7504 | echo "creating Setup.local" |
| 7505 | if test ! -f Modules/Setup.local |
| 7506 | then |
| 7507 | echo "# Edit this file for local setup changes" >Modules/Setup.local |
| 7508 | fi |
| 7509 | |
| 7510 | echo "creating Makefile" |
| 7511 | $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ |
| 7512 | -s Modules Modules/Setup.config \ |
Neil Schemenauer | f8b71c5 | 2001-04-21 17:41:16 +0000 | [diff] [blame] | 7513 | Modules/Setup.local Modules/Setup |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 7514 | mv config.c Modules |