Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1 | #! /bin/sh |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2 | |
Guido van Rossum | a6535fd | 2001-10-18 19:44:10 +0000 | [diff] [blame^] | 3 | # From configure.in Revision: 1.272 |
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 | c0d24d8 | 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 | c0d24d8 | 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 | c0d24d8 | 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 | c0d24d8 | 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 | c0d24d8 | 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 | c0d24d8 | 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 | c0d24d8 | 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 | c0d24d8 | 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 | c0d24d8 | 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 | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 58 | --with-libc=STRING C library" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 59 | ac_help="$ac_help |
| 60 | --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 61 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 62 | # Initialize some variables set by options. |
| 63 | # The variables have the same names as the options, with |
| 64 | # dashes changed to underlines. |
| 65 | build=NONE |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 66 | cache_file=./config.cache |
| 67 | exec_prefix=NONE |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 68 | host=NONE |
| 69 | no_create= |
| 70 | nonopt=NONE |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 71 | no_recursion= |
| 72 | prefix=NONE |
| 73 | program_prefix=NONE |
| 74 | program_suffix=NONE |
| 75 | program_transform_name=s,x,x, |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 76 | silent= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 77 | site= |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 78 | srcdir= |
| 79 | target=NONE |
| 80 | verbose= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 81 | x_includes=NONE |
| 82 | x_libraries=NONE |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 83 | bindir='${exec_prefix}/bin' |
| 84 | sbindir='${exec_prefix}/sbin' |
| 85 | libexecdir='${exec_prefix}/libexec' |
| 86 | datadir='${prefix}/share' |
| 87 | sysconfdir='${prefix}/etc' |
| 88 | sharedstatedir='${prefix}/com' |
| 89 | localstatedir='${prefix}/var' |
| 90 | libdir='${exec_prefix}/lib' |
| 91 | includedir='${prefix}/include' |
| 92 | oldincludedir='/usr/include' |
| 93 | infodir='${prefix}/info' |
| 94 | mandir='${prefix}/man' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 95 | |
| 96 | # Initialize some other variables. |
| 97 | subdirs= |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 98 | MFLAGS= MAKEFLAGS= |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 99 | SHELL=${CONFIG_SHELL-/bin/sh} |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 100 | # Maximum number of lines to put in a shell here document. |
| 101 | ac_max_here_lines=12 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 102 | |
| 103 | ac_prev= |
| 104 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 105 | do |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 106 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 107 | # If the previous option needs an argument, assign it. |
| 108 | if test -n "$ac_prev"; then |
| 109 | eval "$ac_prev=\$ac_option" |
| 110 | ac_prev= |
| 111 | continue |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 112 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 113 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 114 | case "$ac_option" in |
| 115 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
| 116 | *) ac_optarg= ;; |
| 117 | esac |
| 118 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 119 | # Accept the important Cygnus configure options, so we can diagnose typos. |
| 120 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 121 | case "$ac_option" in |
| 122 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 123 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
| 124 | ac_prev=bindir ;; |
| 125 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) |
| 126 | bindir="$ac_optarg" ;; |
| 127 | |
| 128 | -build | --build | --buil | --bui | --bu) |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 129 | ac_prev=build ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 130 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 131 | build="$ac_optarg" ;; |
| 132 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 133 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
| 134 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) |
| 135 | ac_prev=cache_file ;; |
| 136 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ |
| 137 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) |
| 138 | cache_file="$ac_optarg" ;; |
| 139 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 140 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) |
| 141 | ac_prev=datadir ;; |
| 142 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ |
| 143 | | --da=*) |
| 144 | datadir="$ac_optarg" ;; |
| 145 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 146 | -disable-* | --disable-*) |
| 147 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 148 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 149 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 150 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 151 | fi |
| 152 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 153 | eval "enable_${ac_feature}=no" ;; |
| 154 | |
| 155 | -enable-* | --enable-*) |
| 156 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 157 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 158 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 159 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 160 | fi |
| 161 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 162 | case "$ac_option" in |
| 163 | *=*) ;; |
| 164 | *) ac_optarg=yes ;; |
| 165 | esac |
| 166 | eval "enable_${ac_feature}='$ac_optarg'" ;; |
| 167 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 168 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ |
| 169 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ |
| 170 | | --exec | --exe | --ex) |
| 171 | ac_prev=exec_prefix ;; |
| 172 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ |
| 173 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ |
| 174 | | --exec=* | --exe=* | --ex=*) |
| 175 | exec_prefix="$ac_optarg" ;; |
| 176 | |
| 177 | -gas | --gas | --ga | --g) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 178 | # Obsolete; use --with-gas. |
| 179 | with_gas=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 180 | |
| 181 | -help | --help | --hel | --he) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 182 | # Omit some internal or obsolete options to make the list less imposing. |
| 183 | # This message is too long to be a string in the A/UX 3.1 sh. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 184 | cat << EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 185 | Usage: configure [options] [host] |
| 186 | Options: [defaults in brackets after descriptions] |
| 187 | Configuration: |
| 188 | --cache-file=FILE cache test results in FILE |
| 189 | --help print this message |
| 190 | --no-create do not create output files |
| 191 | --quiet, --silent do not print \`checking...' messages |
| 192 | --version print the version of autoconf that created configure |
| 193 | Directory and file names: |
| 194 | --prefix=PREFIX install architecture-independent files in PREFIX |
| 195 | [$ac_default_prefix] |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 196 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 197 | [same as prefix] |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 198 | --bindir=DIR user executables in DIR [EPREFIX/bin] |
| 199 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] |
| 200 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] |
| 201 | --datadir=DIR read-only architecture-independent data in DIR |
| 202 | [PREFIX/share] |
| 203 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] |
| 204 | --sharedstatedir=DIR modifiable architecture-independent data in DIR |
| 205 | [PREFIX/com] |
| 206 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] |
| 207 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] |
| 208 | --includedir=DIR C header files in DIR [PREFIX/include] |
| 209 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] |
| 210 | --infodir=DIR info documentation in DIR [PREFIX/info] |
| 211 | --mandir=DIR man documentation in DIR [PREFIX/man] |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 212 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
| 213 | --program-prefix=PREFIX prepend PREFIX to installed program names |
| 214 | --program-suffix=SUFFIX append SUFFIX to installed program names |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 215 | --program-transform-name=PROGRAM |
| 216 | run sed PROGRAM on installed program names |
| 217 | EOF |
| 218 | cat << EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 219 | Host type: |
| 220 | --build=BUILD configure for building on BUILD [BUILD=HOST] |
| 221 | --host=HOST configure for HOST [guessed] |
| 222 | --target=TARGET configure for TARGET [TARGET=HOST] |
| 223 | Features and packages: |
| 224 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
| 225 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
| 226 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
| 227 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
| 228 | --x-includes=DIR X include files are in DIR |
| 229 | --x-libraries=DIR X library files are in DIR |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 230 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 231 | if test -n "$ac_help"; then |
| 232 | echo "--enable and --with options recognized:$ac_help" |
| 233 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 234 | exit 0 ;; |
| 235 | |
| 236 | -host | --host | --hos | --ho) |
| 237 | ac_prev=host ;; |
| 238 | -host=* | --host=* | --hos=* | --ho=*) |
| 239 | host="$ac_optarg" ;; |
| 240 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 241 | -includedir | --includedir | --includedi | --included | --include \ |
| 242 | | --includ | --inclu | --incl | --inc) |
| 243 | ac_prev=includedir ;; |
| 244 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ |
| 245 | | --includ=* | --inclu=* | --incl=* | --inc=*) |
| 246 | includedir="$ac_optarg" ;; |
| 247 | |
| 248 | -infodir | --infodir | --infodi | --infod | --info | --inf) |
| 249 | ac_prev=infodir ;; |
| 250 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) |
| 251 | infodir="$ac_optarg" ;; |
| 252 | |
| 253 | -libdir | --libdir | --libdi | --libd) |
| 254 | ac_prev=libdir ;; |
| 255 | -libdir=* | --libdir=* | --libdi=* | --libd=*) |
| 256 | libdir="$ac_optarg" ;; |
| 257 | |
| 258 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ |
| 259 | | --libexe | --libex | --libe) |
| 260 | ac_prev=libexecdir ;; |
| 261 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ |
| 262 | | --libexe=* | --libex=* | --libe=*) |
| 263 | libexecdir="$ac_optarg" ;; |
| 264 | |
| 265 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
| 266 | | --localstate | --localstat | --localsta | --localst \ |
| 267 | | --locals | --local | --loca | --loc | --lo) |
| 268 | ac_prev=localstatedir ;; |
| 269 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ |
| 270 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ |
| 271 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) |
| 272 | localstatedir="$ac_optarg" ;; |
| 273 | |
| 274 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) |
| 275 | ac_prev=mandir ;; |
| 276 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) |
| 277 | mandir="$ac_optarg" ;; |
| 278 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 279 | -nfp | --nfp | --nf) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 280 | # Obsolete; use --without-fp. |
| 281 | with_fp=no ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 282 | |
| 283 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 284 | | --no-cr | --no-c) |
| 285 | no_create=yes ;; |
| 286 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 287 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 288 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) |
| 289 | no_recursion=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 290 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 291 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
| 292 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ |
| 293 | | --oldin | --oldi | --old | --ol | --o) |
| 294 | ac_prev=oldincludedir ;; |
| 295 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ |
| 296 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ |
| 297 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) |
| 298 | oldincludedir="$ac_optarg" ;; |
| 299 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 300 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
| 301 | ac_prev=prefix ;; |
| 302 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) |
| 303 | prefix="$ac_optarg" ;; |
| 304 | |
| 305 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ |
| 306 | | --program-pre | --program-pr | --program-p) |
| 307 | ac_prev=program_prefix ;; |
| 308 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ |
| 309 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) |
| 310 | program_prefix="$ac_optarg" ;; |
| 311 | |
| 312 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ |
| 313 | | --program-suf | --program-su | --program-s) |
| 314 | ac_prev=program_suffix ;; |
| 315 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ |
| 316 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) |
| 317 | program_suffix="$ac_optarg" ;; |
| 318 | |
| 319 | -program-transform-name | --program-transform-name \ |
| 320 | | --program-transform-nam | --program-transform-na \ |
| 321 | | --program-transform-n | --program-transform- \ |
| 322 | | --program-transform | --program-transfor \ |
| 323 | | --program-transfo | --program-transf \ |
| 324 | | --program-trans | --program-tran \ |
| 325 | | --progr-tra | --program-tr | --program-t) |
| 326 | ac_prev=program_transform_name ;; |
| 327 | -program-transform-name=* | --program-transform-name=* \ |
| 328 | | --program-transform-nam=* | --program-transform-na=* \ |
| 329 | | --program-transform-n=* | --program-transform-=* \ |
| 330 | | --program-transform=* | --program-transfor=* \ |
| 331 | | --program-transfo=* | --program-transf=* \ |
| 332 | | --program-trans=* | --program-tran=* \ |
| 333 | | --progr-tra=* | --program-tr=* | --program-t=*) |
| 334 | program_transform_name="$ac_optarg" ;; |
| 335 | |
| 336 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 337 | | -silent | --silent | --silen | --sile | --sil) |
| 338 | silent=yes ;; |
| 339 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 340 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
| 341 | ac_prev=sbindir ;; |
| 342 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ |
| 343 | | --sbi=* | --sb=*) |
| 344 | sbindir="$ac_optarg" ;; |
| 345 | |
| 346 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ |
| 347 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ |
| 348 | | --sharedst | --shareds | --shared | --share | --shar \ |
| 349 | | --sha | --sh) |
| 350 | ac_prev=sharedstatedir ;; |
| 351 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ |
| 352 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ |
| 353 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ |
| 354 | | --sha=* | --sh=*) |
| 355 | sharedstatedir="$ac_optarg" ;; |
| 356 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 357 | -site | --site | --sit) |
| 358 | ac_prev=site ;; |
| 359 | -site=* | --site=* | --sit=*) |
| 360 | site="$ac_optarg" ;; |
| 361 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 362 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
| 363 | ac_prev=srcdir ;; |
| 364 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
| 365 | srcdir="$ac_optarg" ;; |
| 366 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 367 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
| 368 | | --syscon | --sysco | --sysc | --sys | --sy) |
| 369 | ac_prev=sysconfdir ;; |
| 370 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ |
| 371 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) |
| 372 | sysconfdir="$ac_optarg" ;; |
| 373 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 374 | -target | --target | --targe | --targ | --tar | --ta | --t) |
| 375 | ac_prev=target ;; |
| 376 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
| 377 | target="$ac_optarg" ;; |
| 378 | |
| 379 | -v | -verbose | --verbose | --verbos | --verbo | --verb) |
| 380 | verbose=yes ;; |
| 381 | |
| 382 | -version | --version | --versio | --versi | --vers) |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 383 | echo "configure generated by autoconf version 2.13" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 384 | exit 0 ;; |
| 385 | |
| 386 | -with-* | --with-*) |
| 387 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 388 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 389 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 390 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 391 | fi |
| 392 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 393 | case "$ac_option" in |
| 394 | *=*) ;; |
| 395 | *) ac_optarg=yes ;; |
| 396 | esac |
| 397 | eval "with_${ac_package}='$ac_optarg'" ;; |
| 398 | |
| 399 | -without-* | --without-*) |
| 400 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 401 | # Reject names that are not valid shell variable names. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 402 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 403 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 404 | fi |
| 405 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 406 | eval "with_${ac_package}=no" ;; |
| 407 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 408 | --x) |
| 409 | # Obsolete; use --with-x. |
| 410 | with_x=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 411 | |
| 412 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ |
| 413 | | --x-incl | --x-inc | --x-in | --x-i) |
| 414 | ac_prev=x_includes ;; |
| 415 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ |
| 416 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) |
| 417 | x_includes="$ac_optarg" ;; |
| 418 | |
| 419 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ |
| 420 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) |
| 421 | ac_prev=x_libraries ;; |
| 422 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ |
| 423 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) |
| 424 | x_libraries="$ac_optarg" ;; |
| 425 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 426 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 427 | ;; |
| 428 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 429 | *) |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 430 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 431 | echo "configure: warning: $ac_option: invalid host type" 1>&2 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 432 | fi |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 433 | if test "x$nonopt" != xNONE; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 434 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 435 | fi |
| 436 | nonopt="$ac_option" |
| 437 | ;; |
| 438 | |
| 439 | esac |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 440 | done |
| 441 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 442 | if test -n "$ac_prev"; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 443 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 444 | fi |
| 445 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 446 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 447 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 448 | # File descriptor usage: |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 449 | # 0 standard input |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 450 | # 1 file creation |
| 451 | # 2 errors and warnings |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 452 | # 3 some systems may open it to /dev/tty |
| 453 | # 4 used on the Kubota Titan |
| 454 | # 6 checking for... messages and results |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 455 | # 5 compiler messages saved in config.log |
| 456 | if test "$silent" = yes; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 457 | exec 6>/dev/null |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 458 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 459 | exec 6>&1 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 460 | fi |
| 461 | exec 5>./config.log |
| 462 | |
| 463 | echo "\ |
| 464 | This file contains any messages produced by compilers while |
| 465 | running configure, to aid debugging if configure makes a mistake. |
| 466 | " 1>&5 |
| 467 | |
| 468 | # Strip out --no-create and --no-recursion so they do not pile up. |
| 469 | # Also quote any args containing shell metacharacters. |
| 470 | ac_configure_args= |
| 471 | for ac_arg |
| 472 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 473 | case "$ac_arg" in |
| 474 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 475 | | --no-cr | --no-c) ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 476 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 477 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; |
| 478 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) |
| 479 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; |
| 480 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 481 | esac |
| 482 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 483 | |
| 484 | # NLS nuisances. |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 485 | # Only set these to C if already set. These must not be set unconditionally |
| 486 | # because not all systems understand e.g. LANG=C (notably SCO). |
| 487 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! |
| 488 | # Non-C LC_CTYPE values break the ctype check. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 489 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 490 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi |
| 491 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi |
| 492 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 493 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 494 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
| 495 | rm -rf conftest* confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 496 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. |
| 497 | echo > confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 498 | |
| 499 | # A filename unique to this package, relative to the directory that |
| 500 | # configure is in, which we can look for to find out if srcdir is correct. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 501 | ac_unique_file=Include/object.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 502 | |
| 503 | # Find the source files, if location was not specified. |
| 504 | if test -z "$srcdir"; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 505 | ac_srcdir_defaulted=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 506 | # Try the directory containing this script, then its parent. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 507 | ac_prog=$0 |
| 508 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` |
| 509 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. |
| 510 | srcdir=$ac_confdir |
| 511 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 512 | srcdir=.. |
| 513 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 514 | else |
| 515 | ac_srcdir_defaulted=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 516 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 517 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 518 | if test "$ac_srcdir_defaulted" = yes; then |
| 519 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 520 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 521 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 522 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 523 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 524 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` |
| 525 | |
| 526 | # Prefer explicitly selected file to automatically selected ones. |
| 527 | if test -z "$CONFIG_SITE"; then |
| 528 | if test "x$prefix" != xNONE; then |
| 529 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" |
| 530 | else |
| 531 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" |
| 532 | fi |
| 533 | fi |
| 534 | for ac_site_file in $CONFIG_SITE; do |
| 535 | if test -r "$ac_site_file"; then |
| 536 | echo "loading site script $ac_site_file" |
| 537 | . "$ac_site_file" |
| 538 | fi |
| 539 | done |
| 540 | |
| 541 | if test -r "$cache_file"; then |
| 542 | echo "loading cache $cache_file" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 543 | . $cache_file |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 544 | else |
| 545 | echo "creating cache $cache_file" |
| 546 | > $cache_file |
| 547 | fi |
| 548 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 549 | ac_ext=c |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 550 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 551 | ac_cpp='$CPP $CPPFLAGS' |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 552 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 553 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 554 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 555 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 556 | ac_exeext= |
| 557 | ac_objext=o |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 558 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then |
| 559 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. |
| 560 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then |
| 561 | ac_n= ac_c=' |
| 562 | ' ac_t=' ' |
| 563 | else |
| 564 | ac_n=-n ac_c= ac_t= |
| 565 | fi |
| 566 | else |
| 567 | ac_n= ac_c='\c' ac_t= |
| 568 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 569 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 570 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 571 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 572 | |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 573 | # Set VERSION so we only need to edit in one place (i.e., here) |
| 574 | |
Guido van Rossum | 6db412b | 2001-04-18 04:37:57 +0000 | [diff] [blame] | 575 | VERSION=2.2 |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 576 | |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 577 | # Arguments passed to configure. |
| 578 | |
| 579 | CONFIG_ARGS="$ac_configure_args" |
| 580 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 581 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 582 | # Check whether --enable-framework or --disable-framework was given. |
| 583 | if test "${enable_framework+set}" = set; then |
| 584 | enableval="$enable_framework" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 585 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 586 | case $enableval in |
| 587 | yes) |
| 588 | enableval=/Library/Frameworks |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 589 | esac |
| 590 | case $enableval in |
| 591 | no) |
| 592 | PYTHONFRAMEWORK= |
| 593 | PYTHONFRAMEWORKDIR=no-framework |
| 594 | PYTHONFRAMEWORKPREFIX= |
| 595 | PYTHONFRAMEWORKINSTALLDIR= |
| 596 | enable_framework= |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 597 | ;; |
| 598 | *) |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 599 | PYTHONFRAMEWORK=Python |
| 600 | PYTHONFRAMEWORKDIR=Python.framework |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 601 | PYTHONFRAMEWORKPREFIX=$enableval |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 602 | PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR |
| 603 | prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 604 | esac |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 605 | |
| 606 | else |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 607 | |
| 608 | PYTHONFRAMEWORK= |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 609 | PYTHONFRAMEWORKDIR=no-framework |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 610 | PYTHONFRAMEWORKPREFIX= |
| 611 | PYTHONFRAMEWORKINSTALLDIR= |
| 612 | enable_framework= |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 613 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 614 | fi |
| 615 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 616 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 617 | |
| 618 | |
| 619 | |
| 620 | |
| 621 | ##AC_ARG_WITH(dyld, |
| 622 | ##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,) |
| 623 | ## |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 624 | # Set name for machine-dependent library files |
| 625 | |
| 626 | echo $ac_n "checking MACHDEP""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 627 | echo "configure:628: checking MACHDEP" >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 628 | if test -z "$MACHDEP" |
| 629 | then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 630 | ac_sys_system=`uname -s` |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 631 | if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 632 | ac_sys_release=`uname -v` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 633 | else |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 634 | ac_sys_release=`uname -r` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 635 | fi |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 636 | ac_md_system=`echo $ac_sys_system | |
| 637 | tr -d '/ ' | tr '[A-Z]' '[a-z]'` |
| 638 | ac_md_release=`echo $ac_sys_release | |
| 639 | tr -d '/ ' | sed 's/\..*//'` |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 640 | MACHDEP="$ac_md_system$ac_md_release" |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 641 | |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 642 | case $MACHDEP in |
Andrew M. Kuchling | 5a3e4cb | 2001-07-20 19:29:04 +0000 | [diff] [blame] | 643 | cygwin*) MACHDEP="cygwin";; |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 644 | '') MACHDEP="unknown";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 645 | esac |
| 646 | fi |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 647 | |
| 648 | # |
| 649 | # SGI compilers allow the specification of the both the ABI and the |
| 650 | # ISA on the command line. Depending on the values of these switches, |
| 651 | # different and often incompatable code will be generated. |
| 652 | # |
| 653 | # The SGI_ABI variable can be used to modify the CC and LDFLAGS and |
| 654 | # thus supply support for various ABI/ISA combinations. The MACHDEP |
| 655 | # variable is also adjusted. |
| 656 | # |
| 657 | |
| 658 | if test ! -z "$SGI_ABI" |
| 659 | then |
| 660 | CC="cc $SGI_ABI" |
| 661 | LDFLAGS="$SGI_ABI $LDFLAGS" |
| 662 | MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'` |
| 663 | fi |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 664 | echo "$ac_t""$MACHDEP" 1>&6 |
| 665 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 666 | # checks for alternative programs |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 667 | echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 668 | echo "configure:669: checking for --without-gcc" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 669 | # Check whether --with-gcc or --without-gcc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 670 | if test "${with_gcc+set}" = set; then |
| 671 | withval="$with_gcc" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 672 | |
| 673 | case $withval in |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 674 | no) CC=cc |
| 675 | without_gcc=yes;; |
| 676 | yes) CC=gcc |
| 677 | without_gcc=no;; |
| 678 | *) CC=$withval |
| 679 | without_gcc=$withval;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 680 | esac |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 681 | else |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 682 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 683 | case $ac_sys_system in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 684 | AIX*) CC=cc_r |
| 685 | without_gcc=;; |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 686 | BeOS*) |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 687 | case $BE_HOST_CPU in |
| 688 | ppc) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 689 | CC=mwcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 690 | without_gcc=yes |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 691 | OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 692 | CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 693 | LDFLAGS="$LDFLAGS -nodup" |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 694 | ;; |
| 695 | x86) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 696 | CC=gcc |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 697 | without_gcc=no |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 698 | OPT=-O |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 699 | ;; |
| 700 | *) |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 701 | { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; } |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 702 | ;; |
| 703 | esac |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 704 | AR="\$(srcdir)/Modules/ar_beos" |
| 705 | RANLIB=: |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 706 | ;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 707 | Monterey*) |
| 708 | RANLIB=: |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 709 | without_gcc=;; |
| 710 | *) without_gcc=no;; |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 711 | esac |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 712 | fi |
| 713 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 714 | echo "$ac_t""$without_gcc" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 715 | |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 716 | |
| 717 | |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 718 | MAINOBJ=python.o |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 719 | echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6 |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 720 | echo "configure:721: checking for --with-cxx=<compiler>" >&5 |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 721 | # Check whether --with-cxx or --without-cxx was given. |
| 722 | if test "${with_cxx+set}" = set; then |
| 723 | withval="$with_cxx" |
| 724 | |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 725 | check_cxx=no |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 726 | case $withval in |
| 727 | no) CXX= |
| 728 | with_cxx=no;; |
| 729 | *) CXX=$withval |
Fred Drake | a1a84e7 | 2001-03-06 05:52:16 +0000 | [diff] [blame] | 730 | MAINOBJ=ccpython.o |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 731 | with_cxx=$withval;; |
| 732 | esac |
| 733 | else |
| 734 | |
| 735 | with_cxx=no |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 736 | check_cxx=yes |
Guido van Rossum | 9501219 | 1999-12-16 17:50:52 +0000 | [diff] [blame] | 737 | |
| 738 | fi |
| 739 | |
| 740 | echo "$ac_t""$with_cxx" 1>&6 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 741 | |
| 742 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 743 | |
| 744 | |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 745 | if test "$check_cxx" = "yes" |
| 746 | then |
| 747 | for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl |
| 748 | do |
| 749 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 750 | set dummy $ac_prog; ac_word=$2 |
| 751 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 752 | echo "configure:753: checking for $ac_word" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 753 | if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then |
| 754 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 755 | else |
| 756 | if test -n "$CXX"; then |
| 757 | ac_cv_prog_CXX="$CXX" # Let the user override the test. |
| 758 | else |
| 759 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 760 | ac_dummy="$PATH" |
| 761 | for ac_dir in $ac_dummy; do |
| 762 | test -z "$ac_dir" && ac_dir=. |
| 763 | if test -f $ac_dir/$ac_word; then |
| 764 | ac_cv_prog_CXX="$ac_prog" |
| 765 | break |
| 766 | fi |
| 767 | done |
| 768 | IFS="$ac_save_ifs" |
| 769 | fi |
| 770 | fi |
| 771 | CXX="$ac_cv_prog_CXX" |
| 772 | if test -n "$CXX"; then |
| 773 | echo "$ac_t""$CXX" 1>&6 |
| 774 | else |
| 775 | echo "$ac_t""no" 1>&6 |
| 776 | fi |
| 777 | |
| 778 | test -n "$CXX" && break |
| 779 | done |
| 780 | test -n "$CXX" || CXX="notfound" |
| 781 | |
| 782 | if test "$CXX" = "notfound" |
| 783 | then |
| 784 | CXX= |
| 785 | else |
| 786 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 787 | echo "configure:788: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 788 | |
| 789 | ac_ext=C |
| 790 | # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 791 | ac_cpp='$CXXCPP $CPPFLAGS' |
| 792 | ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 793 | ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 794 | cross_compiling=$ac_cv_prog_cxx_cross |
| 795 | |
| 796 | cat > conftest.$ac_ext << EOF |
| 797 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 798 | #line 799 "configure" |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 799 | #include "confdefs.h" |
| 800 | |
| 801 | int main(){return(0);} |
| 802 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 803 | if { (eval echo configure:804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 804 | ac_cv_prog_cxx_works=yes |
| 805 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 806 | if (./conftest; exit) 2>/dev/null; then |
| 807 | ac_cv_prog_cxx_cross=no |
| 808 | else |
| 809 | ac_cv_prog_cxx_cross=yes |
| 810 | fi |
| 811 | else |
| 812 | echo "configure: failed program was:" >&5 |
| 813 | cat conftest.$ac_ext >&5 |
| 814 | ac_cv_prog_cxx_works=no |
| 815 | fi |
| 816 | rm -fr conftest* |
| 817 | ac_ext=c |
| 818 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 819 | ac_cpp='$CPP $CPPFLAGS' |
| 820 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 821 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 822 | cross_compiling=$ac_cv_prog_cc_cross |
| 823 | |
| 824 | echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 |
| 825 | if test $ac_cv_prog_cxx_works = no; then |
| 826 | { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } |
| 827 | fi |
| 828 | echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 829 | echo "configure:830: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 830 | echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 |
| 831 | cross_compiling=$ac_cv_prog_cxx_cross |
| 832 | |
| 833 | fi |
| 834 | fi |
| 835 | |
Guido van Rossum | 8b131c5 | 1995-03-09 14:10:13 +0000 | [diff] [blame] | 836 | # If the user switches compilers, we can't believe the cache |
| 837 | if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" |
| 838 | then |
| 839 | { echo "configure: error: cached CC is different -- throw away $cache_file |
| 840 | (it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; } |
| 841 | fi |
| 842 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 843 | # Extract the first word of "gcc", so it can be a program name with args. |
| 844 | set dummy gcc; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 845 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 846 | echo "configure:847: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 847 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 848 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 849 | else |
| 850 | if test -n "$CC"; then |
| 851 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 852 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 853 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 854 | ac_dummy="$PATH" |
| 855 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 856 | test -z "$ac_dir" && ac_dir=. |
| 857 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 858 | ac_cv_prog_CC="gcc" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 859 | break |
| 860 | fi |
| 861 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 862 | IFS="$ac_save_ifs" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 863 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 864 | fi |
| 865 | CC="$ac_cv_prog_CC" |
| 866 | if test -n "$CC"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 867 | echo "$ac_t""$CC" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 868 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 869 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 870 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 871 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 872 | if test -z "$CC"; then |
| 873 | # Extract the first word of "cc", so it can be a program name with args. |
| 874 | set dummy cc; ac_word=$2 |
| 875 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 876 | echo "configure:877: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 877 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 878 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 879 | else |
| 880 | if test -n "$CC"; then |
| 881 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 882 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 883 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 884 | ac_prog_rejected=no |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 885 | ac_dummy="$PATH" |
| 886 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 887 | test -z "$ac_dir" && ac_dir=. |
| 888 | if test -f $ac_dir/$ac_word; then |
| 889 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then |
| 890 | ac_prog_rejected=yes |
| 891 | continue |
| 892 | fi |
| 893 | ac_cv_prog_CC="cc" |
| 894 | break |
| 895 | fi |
| 896 | done |
| 897 | IFS="$ac_save_ifs" |
| 898 | if test $ac_prog_rejected = yes; then |
| 899 | # We found a bogon in the path, so make sure we never use it. |
| 900 | set dummy $ac_cv_prog_CC |
| 901 | shift |
| 902 | if test $# -gt 0; then |
| 903 | # We chose a different compiler from the bogus one. |
| 904 | # However, it has the same basename, so the bogon will be chosen |
| 905 | # first if we set CC to just the basename; use the full file name. |
| 906 | shift |
| 907 | set dummy "$ac_dir/$ac_word" "$@" |
| 908 | shift |
| 909 | ac_cv_prog_CC="$@" |
| 910 | fi |
| 911 | fi |
| 912 | fi |
| 913 | fi |
| 914 | CC="$ac_cv_prog_CC" |
| 915 | if test -n "$CC"; then |
| 916 | echo "$ac_t""$CC" 1>&6 |
| 917 | else |
| 918 | echo "$ac_t""no" 1>&6 |
| 919 | fi |
| 920 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 921 | if test -z "$CC"; then |
| 922 | case "`uname -s`" in |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 923 | *win32* | *WIN32*) |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 924 | # Extract the first word of "cl", so it can be a program name with args. |
| 925 | set dummy cl; ac_word=$2 |
| 926 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 927 | echo "configure:928: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 928 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 929 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 930 | else |
| 931 | if test -n "$CC"; then |
| 932 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 933 | else |
| 934 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 935 | ac_dummy="$PATH" |
| 936 | for ac_dir in $ac_dummy; do |
| 937 | test -z "$ac_dir" && ac_dir=. |
| 938 | if test -f $ac_dir/$ac_word; then |
| 939 | ac_cv_prog_CC="cl" |
| 940 | break |
| 941 | fi |
| 942 | done |
| 943 | IFS="$ac_save_ifs" |
| 944 | fi |
| 945 | fi |
| 946 | CC="$ac_cv_prog_CC" |
| 947 | if test -n "$CC"; then |
| 948 | echo "$ac_t""$CC" 1>&6 |
| 949 | else |
| 950 | echo "$ac_t""no" 1>&6 |
| 951 | fi |
| 952 | ;; |
| 953 | esac |
| 954 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 955 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } |
| 956 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 957 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 958 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 959 | echo "configure:960: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 960 | |
| 961 | ac_ext=c |
| 962 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 963 | ac_cpp='$CPP $CPPFLAGS' |
| 964 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 965 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 966 | cross_compiling=$ac_cv_prog_cc_cross |
| 967 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 968 | cat > conftest.$ac_ext << EOF |
| 969 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 970 | #line 971 "configure" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 971 | #include "confdefs.h" |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 972 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 973 | main(){return(0);} |
| 974 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 975 | if { (eval echo configure:976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 976 | ac_cv_prog_cc_works=yes |
| 977 | # If we can't run a trivial program, we are probably using a cross compiler. |
| 978 | if (./conftest; exit) 2>/dev/null; then |
| 979 | ac_cv_prog_cc_cross=no |
| 980 | else |
| 981 | ac_cv_prog_cc_cross=yes |
| 982 | fi |
| 983 | else |
| 984 | echo "configure: failed program was:" >&5 |
| 985 | cat conftest.$ac_ext >&5 |
| 986 | ac_cv_prog_cc_works=no |
| 987 | fi |
| 988 | rm -fr conftest* |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 989 | ac_ext=c |
| 990 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
| 991 | ac_cpp='$CPP $CPPFLAGS' |
| 992 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' |
| 993 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' |
| 994 | cross_compiling=$ac_cv_prog_cc_cross |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 995 | |
| 996 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 |
| 997 | if test $ac_cv_prog_cc_works = no; then |
| 998 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } |
| 999 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1000 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1001 | echo "configure:1002: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1002 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
| 1003 | cross_compiling=$ac_cv_prog_cc_cross |
| 1004 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1005 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1006 | echo "configure:1007: checking whether we are using GNU C" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1007 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1008 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1009 | else |
| 1010 | cat > conftest.c <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1011 | #ifdef __GNUC__ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1012 | yes; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1013 | #endif |
| 1014 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1015 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1016 | ac_cv_prog_gcc=yes |
| 1017 | else |
| 1018 | ac_cv_prog_gcc=no |
| 1019 | fi |
| 1020 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1021 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1022 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1023 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1024 | if test $ac_cv_prog_gcc = yes; then |
| 1025 | GCC=yes |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1026 | else |
| 1027 | GCC= |
| 1028 | fi |
| 1029 | |
| 1030 | ac_test_CFLAGS="${CFLAGS+set}" |
| 1031 | ac_save_CFLAGS="$CFLAGS" |
| 1032 | CFLAGS= |
| 1033 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1034 | echo "configure:1035: checking whether ${CC-cc} accepts -g" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1035 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1036 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1037 | else |
| 1038 | echo 'void f(){}' > conftest.c |
| 1039 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1040 | ac_cv_prog_cc_g=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1041 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1042 | ac_cv_prog_cc_g=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1043 | fi |
| 1044 | rm -f conftest* |
| 1045 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1046 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1047 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1048 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1049 | if test "$ac_test_CFLAGS" = set; then |
| 1050 | CFLAGS="$ac_save_CFLAGS" |
| 1051 | elif test $ac_cv_prog_cc_g = yes; then |
| 1052 | if test "$GCC" = yes; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1053 | CFLAGS="-g -O2" |
| 1054 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1055 | CFLAGS="-g" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1056 | fi |
| 1057 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1058 | if test "$GCC" = yes; then |
| 1059 | CFLAGS="-O2" |
| 1060 | else |
| 1061 | CFLAGS= |
| 1062 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1063 | fi |
| 1064 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1065 | |
| 1066 | # checks for UNIX variants that set C preprocessor variables |
| 1067 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1068 | echo "configure:1069: checking how to run the C preprocessor" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1069 | # On Suns, sometimes $CPP names a directory. |
| 1070 | if test -n "$CPP" && test -d "$CPP"; then |
| 1071 | CPP= |
| 1072 | fi |
| 1073 | if test -z "$CPP"; then |
| 1074 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
| 1075 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1076 | else |
| 1077 | # This must be in double quotes, not single quotes, because CPP may get |
| 1078 | # substituted into the Makefile and "${CC-cc}" will confuse make. |
| 1079 | CPP="${CC-cc} -E" |
| 1080 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 1081 | # not just through cpp. |
| 1082 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1083 | #line 1084 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1084 | #include "confdefs.h" |
| 1085 | #include <assert.h> |
| 1086 | Syntax Error |
| 1087 | EOF |
| 1088 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1089 | { (eval echo configure:1090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1090 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1091 | if test -z "$ac_err"; then |
| 1092 | : |
| 1093 | else |
| 1094 | echo "$ac_err" >&5 |
| 1095 | echo "configure: failed program was:" >&5 |
| 1096 | cat conftest.$ac_ext >&5 |
| 1097 | rm -rf conftest* |
| 1098 | CPP="${CC-cc} -E -traditional-cpp" |
| 1099 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1100 | #line 1101 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1101 | #include "confdefs.h" |
| 1102 | #include <assert.h> |
| 1103 | Syntax Error |
| 1104 | EOF |
| 1105 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1106 | { (eval echo configure:1107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1107 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1108 | if test -z "$ac_err"; then |
| 1109 | : |
| 1110 | else |
| 1111 | echo "$ac_err" >&5 |
| 1112 | echo "configure: failed program was:" >&5 |
| 1113 | cat conftest.$ac_ext >&5 |
| 1114 | rm -rf conftest* |
| 1115 | CPP="${CC-cc} -nologo -E" |
| 1116 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1117 | #line 1118 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1118 | #include "confdefs.h" |
| 1119 | #include <assert.h> |
| 1120 | Syntax Error |
| 1121 | EOF |
| 1122 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1123 | { (eval echo configure:1124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1124 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1125 | if test -z "$ac_err"; then |
| 1126 | : |
| 1127 | else |
| 1128 | echo "$ac_err" >&5 |
| 1129 | echo "configure: failed program was:" >&5 |
| 1130 | cat conftest.$ac_ext >&5 |
| 1131 | rm -rf conftest* |
| 1132 | CPP=/lib/cpp |
| 1133 | fi |
| 1134 | rm -f conftest* |
| 1135 | fi |
| 1136 | rm -f conftest* |
| 1137 | fi |
| 1138 | rm -f conftest* |
| 1139 | ac_cv_prog_CPP="$CPP" |
| 1140 | fi |
| 1141 | CPP="$ac_cv_prog_CPP" |
| 1142 | else |
| 1143 | ac_cv_prog_CPP="$CPP" |
| 1144 | fi |
| 1145 | echo "$ac_t""$CPP" 1>&6 |
| 1146 | |
| 1147 | echo $ac_n "checking for AIX""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1148 | echo "configure:1149: checking for AIX" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1149 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1150 | #line 1151 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1151 | #include "confdefs.h" |
| 1152 | #ifdef _AIX |
| 1153 | yes |
| 1154 | #endif |
| 1155 | |
| 1156 | EOF |
| 1157 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1158 | egrep "yes" >/dev/null 2>&1; then |
| 1159 | rm -rf conftest* |
| 1160 | echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF |
| 1161 | #define _ALL_SOURCE 1 |
| 1162 | EOF |
| 1163 | |
| 1164 | else |
| 1165 | rm -rf conftest* |
| 1166 | echo "$ac_t""no" 1>&6 |
| 1167 | fi |
| 1168 | rm -f conftest* |
| 1169 | |
| 1170 | |
| 1171 | ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` |
| 1172 | echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1173 | echo "configure:1174: checking for minix/config.h" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1174 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
| 1175 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1176 | else |
| 1177 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1178 | #line 1179 "configure" |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1179 | #include "confdefs.h" |
| 1180 | #include <minix/config.h> |
| 1181 | EOF |
| 1182 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1183 | { (eval echo configure:1184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 1184 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 1185 | if test -z "$ac_err"; then |
| 1186 | rm -rf conftest* |
| 1187 | eval "ac_cv_header_$ac_safe=yes" |
| 1188 | else |
| 1189 | echo "$ac_err" >&5 |
| 1190 | echo "configure: failed program was:" >&5 |
| 1191 | cat conftest.$ac_ext >&5 |
| 1192 | rm -rf conftest* |
| 1193 | eval "ac_cv_header_$ac_safe=no" |
| 1194 | fi |
| 1195 | rm -f conftest* |
| 1196 | fi |
| 1197 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 1198 | echo "$ac_t""yes" 1>&6 |
| 1199 | MINIX=yes |
| 1200 | else |
| 1201 | echo "$ac_t""no" 1>&6 |
| 1202 | MINIX= |
| 1203 | fi |
| 1204 | |
| 1205 | if test "$MINIX" = yes; then |
| 1206 | cat >> confdefs.h <<\EOF |
| 1207 | #define _POSIX_SOURCE 1 |
| 1208 | EOF |
| 1209 | |
| 1210 | cat >> confdefs.h <<\EOF |
| 1211 | #define _POSIX_1_SOURCE 2 |
| 1212 | EOF |
| 1213 | |
| 1214 | cat >> confdefs.h <<\EOF |
| 1215 | #define _MINIX 1 |
| 1216 | EOF |
| 1217 | |
| 1218 | fi |
| 1219 | |
| 1220 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1221 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1222 | echo "configure:1223: checking for Cygwin environment" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1223 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
| 1224 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1225 | else |
| 1226 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1227 | #line 1228 "configure" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1228 | #include "confdefs.h" |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1229 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1230 | int main() { |
| 1231 | |
| 1232 | #ifndef __CYGWIN__ |
| 1233 | #define __CYGWIN__ __CYGWIN32__ |
| 1234 | #endif |
| 1235 | return __CYGWIN__; |
| 1236 | ; return 0; } |
| 1237 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1238 | if { (eval echo configure:1239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1239 | rm -rf conftest* |
| 1240 | ac_cv_cygwin=yes |
| 1241 | else |
| 1242 | echo "configure: failed program was:" >&5 |
| 1243 | cat conftest.$ac_ext >&5 |
| 1244 | rm -rf conftest* |
| 1245 | ac_cv_cygwin=no |
| 1246 | fi |
| 1247 | rm -f conftest* |
| 1248 | rm -f conftest* |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1249 | fi |
| 1250 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1251 | echo "$ac_t""$ac_cv_cygwin" 1>&6 |
| 1252 | CYGWIN= |
| 1253 | test "$ac_cv_cygwin" = yes && CYGWIN=yes |
| 1254 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1255 | echo "configure:1256: checking for mingw32 environment" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1256 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
| 1257 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1258 | else |
| 1259 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1260 | #line 1261 "configure" |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1261 | #include "confdefs.h" |
| 1262 | |
| 1263 | int main() { |
| 1264 | return __MINGW32__; |
| 1265 | ; return 0; } |
| 1266 | EOF |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1267 | if { (eval echo configure:1268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1268 | rm -rf conftest* |
| 1269 | ac_cv_mingw32=yes |
| 1270 | else |
| 1271 | echo "configure: failed program was:" >&5 |
| 1272 | cat conftest.$ac_ext >&5 |
| 1273 | rm -rf conftest* |
| 1274 | ac_cv_mingw32=no |
| 1275 | fi |
| 1276 | rm -f conftest* |
| 1277 | rm -f conftest* |
| 1278 | fi |
| 1279 | |
| 1280 | echo "$ac_t""$ac_cv_mingw32" 1>&6 |
| 1281 | MINGW32= |
| 1282 | test "$ac_cv_mingw32" = yes && MINGW32=yes |
| 1283 | |
| 1284 | |
| 1285 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1286 | echo "configure:1287: checking for executable suffix" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1287 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
| 1288 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1289 | else |
| 1290 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then |
| 1291 | ac_cv_exeext=.exe |
| 1292 | else |
| 1293 | rm -f conftest* |
| 1294 | echo 'int main () { return 0; }' > conftest.$ac_ext |
| 1295 | ac_cv_exeext= |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1296 | if { (eval echo configure:1297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1297 | for file in conftest.*; do |
| 1298 | case $file in |
| 1299 | *.c | *.o | *.obj) ;; |
| 1300 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
| 1301 | esac |
| 1302 | done |
| 1303 | else |
| 1304 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } |
| 1305 | fi |
| 1306 | rm -f conftest* |
| 1307 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no |
| 1308 | fi |
| 1309 | fi |
| 1310 | |
| 1311 | EXEEXT="" |
| 1312 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} |
| 1313 | echo "$ac_t""${ac_cv_exeext}" 1>&6 |
| 1314 | ac_exeext=$EXEEXT |
| 1315 | |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1316 | echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1317 | echo "configure:1318: checking for --with-suffix" >&5 |
Neil Schemenauer | dfb38e4 | 2001-01-27 06:57:08 +0000 | [diff] [blame] | 1318 | # Check whether --with-suffix or --without-suffix was given. |
| 1319 | if test "${with_suffix+set}" = set; then |
| 1320 | withval="$with_suffix" |
| 1321 | |
| 1322 | case $withval in |
| 1323 | no) EXEEXT=;; |
| 1324 | yes) EXEEXT=.exe;; |
| 1325 | *) EXEEXT=$withval;; |
| 1326 | esac |
| 1327 | fi |
| 1328 | |
| 1329 | echo "$ac_t""$EXEEXT" 1>&6 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 1330 | # Test whether we're running on a non-case-sensitive system, in which |
| 1331 | # case we give a warning if no ext is given |
| 1332 | if test -d "python" -a -z "$EXEEXT" |
| 1333 | then |
| 1334 | echo "configure: warning: This filesystem is not case-sensitive so you should probably use --with-suffix" 1>&2 |
| 1335 | fi |
Guido van Rossum | ff555e3 | 2000-09-22 15:38:21 +0000 | [diff] [blame] | 1336 | |
Guido van Rossum | dd997f7 | 1998-10-07 19:58:26 +0000 | [diff] [blame] | 1337 | case $MACHDEP in |
| 1338 | bsdos*) |
| 1339 | case $CC in |
| 1340 | gcc) CC="$CC -D_HAVE_BSDI";; |
| 1341 | esac;; |
| 1342 | esac |
| 1343 | |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1344 | case $ac_sys_system in |
| 1345 | hp*|HP*) |
| 1346 | case $CC in |
Guido van Rossum | cd5ff9f | 2000-09-22 16:15:54 +0000 | [diff] [blame] | 1347 | cc|*/cc) CC="$CC -Ae";; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1348 | esac;; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1349 | Monterey*) |
| 1350 | case $CC in |
| 1351 | cc) CC="$CC -Wl,-Bexport";; |
| 1352 | esac;; |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1353 | SunOS*) |
| 1354 | # Some functions have a prototype only with that define, e.g. confstr |
| 1355 | cat >> confdefs.h <<\EOF |
| 1356 | #define __EXTENSIONS__ 1 |
| 1357 | EOF |
| 1358 | |
| 1359 | ;; |
Guido van Rossum | 24b1e75 | 1997-08-21 02:29:16 +0000 | [diff] [blame] | 1360 | esac |
| 1361 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1362 | |
Martin v. Löwis | a30c100 | 2001-03-06 12:10:20 +0000 | [diff] [blame] | 1363 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1364 | echo $ac_n "checking LIBRARY""... $ac_c" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1365 | echo "configure:1366: checking LIBRARY" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1366 | if test -z "$LIBRARY" |
| 1367 | then |
| 1368 | LIBRARY='libpython$(VERSION).a' |
| 1369 | fi |
| 1370 | echo "$ac_t""$LIBRARY" 1>&6 |
| 1371 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1372 | # LDLIBRARY is the name of the library to link against (as opposed to the |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1373 | # name of the library into which to insert object files). BLDLIBRARY is also |
| 1374 | # the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY |
| 1375 | # is blank as the main program is not linked directly against LDLIBRARY. |
| 1376 | # LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On |
| 1377 | # systems without shared libraries, LDLIBRARY is the same as LIBRARY |
| 1378 | # (defined in the Makefiles). On Cygwin LDLIBRARY is the import library, |
| 1379 | # DLLLIBRARY is the shared (i.e., DLL) library. |
| 1380 | # |
| 1381 | |
| 1382 | |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1383 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1384 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 1385 | LDLIBRARY="$LIBRARY" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1386 | BLDLIBRARY='$(LDLIBRARY)' |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 1387 | DLLLIBRARY='' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1388 | LDLIBRARYDIR='' |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1389 | |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1390 | # LINKCC is the command that links the python executable -- default is $(CC). |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1391 | # If CXX is set, and if it is needed to link a main function that was |
| 1392 | # compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable: |
| 1393 | # python might then depend on the C++ runtime |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1394 | # This is altered for AIX in order to build the export list before |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1395 | # linking. |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1396 | |
| 1397 | echo $ac_n "checking LINKCC""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1398 | echo "configure:1399: checking LINKCC" >&5 |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1399 | if test -z "$LINKCC" |
| 1400 | then |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1401 | if test -z "$CXX"; then |
| 1402 | LINKCC="\$(PURIFY) \$(CC)" |
| 1403 | else |
| 1404 | echo 'int main(){return 0;}' > conftest.$ac_ext |
| 1405 | $CXX -c conftest.$ac_ext 2>&5 |
| 1406 | if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \ |
| 1407 | && test -s conftest$ac_exeext && ./conftest$ac_exeext |
| 1408 | then |
| 1409 | LINKCC="\$(PURIFY) \$(CC)" |
| 1410 | else |
| 1411 | LINKCC="\$(PURIFY) \$(CXX)" |
| 1412 | fi |
| 1413 | rm -fr conftest* |
| 1414 | fi |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1415 | case $ac_sys_system in |
| 1416 | AIX*) |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1417 | LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $(LINKCC)";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 1418 | dgux*) |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1419 | LINKCC="LD_RUN_PATH=$libdir $(LINKCC)";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1420 | Monterey64*) |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1421 | LINKCC="$(LINKCC) -L/usr/lib/ia64l64";; |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 1422 | esac |
| 1423 | fi |
| 1424 | echo "$ac_t""$LINKCC" 1>&6 |
| 1425 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1426 | echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1427 | echo "configure:1428: checking LDLIBRARY" >&5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1428 | |
| 1429 | # DG/UX requires some fancy ld contortions to produce a .so from an .a |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1430 | case $MACHDEP in |
| 1431 | dguxR4) |
| 1432 | LDLIBRARY='libpython$(VERSION).so' |
| 1433 | OPT="$OPT -pic" |
| 1434 | ;; |
| 1435 | beos*) |
| 1436 | LDLIBRARY='libpython$(VERSION).so' |
| 1437 | ;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1438 | cygwin*) |
| 1439 | LDLIBRARY='libpython$(VERSION).dll.a' |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1440 | DLLLIBRARY='libpython$(VERSION).dll' |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1441 | ;; |
Fred Drake | 5790be1 | 2000-10-09 17:06:13 +0000 | [diff] [blame] | 1442 | esac |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1443 | |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 1444 | # MacOSX framework builds need more magic. LDLIBRARY is the dynamic |
| 1445 | # library that we build, but we do not want to link against it (we |
| 1446 | # will find it with a -framework option). For this reason there is an |
| 1447 | # extra variable BLDLIBRARY against which Python and the extension |
| 1448 | # modules are linked, BLDLIBRARY. This is normally the same as |
| 1449 | # LDLIBRARY, but empty for MacOSX framework builds. |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 1450 | if test "$enable_framework" |
| 1451 | then |
| 1452 | LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
| 1453 | LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)' |
| 1454 | BLDLIBRARY='' |
| 1455 | else |
| 1456 | BLDLIBRARY='$(LDLIBRARY)' |
| 1457 | fi |
| 1458 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 1459 | echo "$ac_t""$LDLIBRARY" 1>&6 |
| 1460 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1461 | # Extract the first word of "ranlib", so it can be a program name with args. |
| 1462 | set dummy ranlib; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1463 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1464 | echo "configure:1465: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1465 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1466 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1467 | else |
| 1468 | if test -n "$RANLIB"; then |
| 1469 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 1470 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1471 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1472 | ac_dummy="$PATH" |
| 1473 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1474 | test -z "$ac_dir" && ac_dir=. |
| 1475 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1476 | ac_cv_prog_RANLIB="ranlib" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1477 | break |
| 1478 | fi |
| 1479 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1480 | IFS="$ac_save_ifs" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1481 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1482 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1483 | fi |
| 1484 | RANLIB="$ac_cv_prog_RANLIB" |
| 1485 | if test -n "$RANLIB"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1486 | echo "$ac_t""$RANLIB" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1487 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1488 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1489 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1490 | |
| 1491 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1492 | for ac_prog in ar aal |
| 1493 | do |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1494 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 1495 | set dummy $ac_prog; ac_word=$2 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1496 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1497 | echo "configure:1498: checking for $ac_word" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1498 | if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1499 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1500 | else |
| 1501 | if test -n "$AR"; then |
| 1502 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 1503 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1504 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
| 1505 | ac_dummy="$PATH" |
| 1506 | for ac_dir in $ac_dummy; do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1507 | test -z "$ac_dir" && ac_dir=. |
| 1508 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1509 | ac_cv_prog_AR="$ac_prog" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1510 | break |
| 1511 | fi |
| 1512 | done |
| 1513 | IFS="$ac_save_ifs" |
| 1514 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1515 | fi |
| 1516 | AR="$ac_cv_prog_AR" |
| 1517 | if test -n "$AR"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1518 | echo "$ac_t""$AR" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1519 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1520 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1521 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1522 | |
| 1523 | test -n "$AR" && break |
| 1524 | done |
| 1525 | test -n "$AR" || AR="ar" |
| 1526 | |
Neil Schemenauer | a42c827 | 2001-03-31 00:01:55 +0000 | [diff] [blame] | 1527 | |
| 1528 | case $MACHDEP in |
| 1529 | bsdos*) |
| 1530 | # install -d does not work on BSDI |
| 1531 | if test -z "$INSTALL" |
| 1532 | then |
| 1533 | INSTALL="${srcdir}/install-sh -c" |
| 1534 | fi |
| 1535 | esac |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1536 | ac_aux_dir= |
| 1537 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do |
| 1538 | if test -f $ac_dir/install-sh; then |
| 1539 | ac_aux_dir=$ac_dir |
| 1540 | ac_install_sh="$ac_aux_dir/install-sh -c" |
| 1541 | break |
| 1542 | elif test -f $ac_dir/install.sh; then |
| 1543 | ac_aux_dir=$ac_dir |
| 1544 | ac_install_sh="$ac_aux_dir/install.sh -c" |
| 1545 | break |
| 1546 | fi |
| 1547 | done |
| 1548 | if test -z "$ac_aux_dir"; then |
| 1549 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1550 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1551 | ac_config_guess=$ac_aux_dir/config.guess |
| 1552 | ac_config_sub=$ac_aux_dir/config.sub |
| 1553 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. |
| 1554 | |
| 1555 | # Find a good install program. We prefer a C program (faster), |
| 1556 | # so one script is as good as another. But avoid the broken or |
| 1557 | # incompatible versions: |
| 1558 | # SysV /etc/install, /usr/sbin/install |
| 1559 | # SunOS /usr/etc/install |
| 1560 | # IRIX /sbin/install |
| 1561 | # AIX /bin/install |
| 1562 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
| 1563 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
| 1564 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
| 1565 | # ./install, which can be erroneously created by make from ./install.sh. |
| 1566 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1567 | echo "configure:1568: checking for a BSD compatible install" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1568 | if test -z "$INSTALL"; then |
| 1569 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
| 1570 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1571 | else |
| 1572 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" |
| 1573 | for ac_dir in $PATH; do |
| 1574 | # Account for people who put trailing slashes in PATH elements. |
| 1575 | case "$ac_dir/" in |
| 1576 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; |
| 1577 | *) |
| 1578 | # OSF1 and SCO ODT 3.0 have their own names for install. |
| 1579 | # Don't use installbsd from OSF since it installs stuff as root |
| 1580 | # by default. |
| 1581 | for ac_prog in ginstall scoinst install; do |
| 1582 | if test -f $ac_dir/$ac_prog; then |
| 1583 | if test $ac_prog = install && |
| 1584 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then |
| 1585 | # AIX install. It has an incompatible calling convention. |
| 1586 | : |
| 1587 | else |
| 1588 | ac_cv_path_install="$ac_dir/$ac_prog -c" |
| 1589 | break 2 |
| 1590 | fi |
| 1591 | fi |
| 1592 | done |
| 1593 | ;; |
| 1594 | esac |
| 1595 | done |
| 1596 | IFS="$ac_save_IFS" |
| 1597 | |
| 1598 | fi |
| 1599 | if test "${ac_cv_path_install+set}" = set; then |
| 1600 | INSTALL="$ac_cv_path_install" |
| 1601 | else |
| 1602 | # As a last resort, use the slow shell script. We don't cache a |
| 1603 | # path for INSTALL within a source directory, because that will |
| 1604 | # break other packages using the cache if that directory is |
| 1605 | # removed, or if the path is relative. |
| 1606 | INSTALL="$ac_install_sh" |
| 1607 | fi |
| 1608 | fi |
| 1609 | echo "$ac_t""$INSTALL" 1>&6 |
| 1610 | |
| 1611 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
| 1612 | # It thinks the first close brace ends the variable substitution. |
| 1613 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' |
| 1614 | |
| 1615 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
| 1616 | |
| 1617 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
| 1618 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1619 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1620 | # Not every filesystem supports hard links |
| 1621 | |
| 1622 | if test -z "$LN" ; then |
| 1623 | case $ac_sys_system in |
| 1624 | BeOS*) LN="ln -s";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 1625 | CYGWIN*) LN="ln -s";; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 1626 | *) LN=ln;; |
| 1627 | esac |
| 1628 | fi |
| 1629 | |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1630 | # Check for --with-pydebug |
| 1631 | echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1632 | echo "configure:1633: checking for --with-pydebug" >&5 |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1633 | # Check whether --with-pydebug or --without-pydebug was given. |
| 1634 | if test "${with_pydebug+set}" = set; then |
| 1635 | withval="$with_pydebug" |
| 1636 | |
| 1637 | if test "$withval" != no |
| 1638 | then cat >> confdefs.h <<\EOF |
| 1639 | #define Py_DEBUG 1 |
| 1640 | EOF |
| 1641 | echo "$ac_t""yes" 1>&6; Py_DEBUG='true' |
| 1642 | else echo "$ac_t""no" 1>&6; Py_DEBUG='false' |
| 1643 | fi |
| 1644 | else |
| 1645 | echo "$ac_t""no" 1>&6 |
| 1646 | fi |
| 1647 | |
| 1648 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 1649 | # Optimizer/debugger flags |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1650 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1651 | if test -z "$OPT" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1652 | then |
Guido van Rossum | edca74a | 1997-07-18 23:29:40 +0000 | [diff] [blame] | 1653 | case $GCC in |
| 1654 | yes) |
| 1655 | case $ac_cv_prog_cc_g in |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1656 | yes) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1657 | if test "$Py_DEBUG" = 'true' ; then |
| 1658 | # Optimization messes up debuggers, so turn it off for |
| 1659 | # debug builds. |
| 1660 | OPT="-g -Wall -Wstrict-prototypes" |
| 1661 | else |
| 1662 | OPT="-g -O3 -Wall -Wstrict-prototypes" |
| 1663 | fi;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1664 | *) |
Fred Drake | 109d986 | 2001-07-11 06:27:56 +0000 | [diff] [blame] | 1665 | OPT="-O3 -Wall -Wstrict-prototypes";; |
| 1666 | esac |
| 1667 | ;; |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1668 | *) |
| 1669 | case $ac_sys_system in |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 1670 | OpenUNIX*|UnixWare*) |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1671 | OPT="-O -K pentium,host,inline,loop_unroll,alloca ";; |
| 1672 | *) |
| 1673 | OPT="-O";; |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 1674 | esac |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 1675 | esac |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 1676 | case $ac_sys_system in |
| 1677 | Darwin*) |
| 1678 | OPT="$OPT -no-cpp-precomp";; |
| 1679 | esac |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1680 | fi |
| 1681 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 1682 | # The current (beta) Monterey compiler dies with optimizations |
| 1683 | case $ac_sys_system in |
| 1684 | Monterey*) OPT="";; |
| 1685 | esac |
| 1686 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 1687 | if test "$ac_arch_flags" |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 1688 | then |
| 1689 | OPT="$OPT $ac_arch_flags" |
| 1690 | fi |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 1691 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1692 | echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1693 | echo "configure:1694: checking whether $CC accepts -OPT:Olimit=0" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1694 | if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1695 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1696 | else |
| 1697 | ac_save_cc="$CC" |
| 1698 | CC="$CC -OPT:Olimit=0" |
| 1699 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 1700 | ac_cv_opt_olimit_ok=no |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1701 | else |
| 1702 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1703 | #line 1704 "configure" |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1704 | #include "confdefs.h" |
| 1705 | int main() { return 0; } |
| 1706 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1707 | if { (eval echo configure:1708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 1708 | then |
| 1709 | ac_cv_opt_olimit_ok=yes |
| 1710 | else |
| 1711 | echo "configure: failed program was:" >&5 |
| 1712 | cat conftest.$ac_ext >&5 |
| 1713 | rm -fr conftest* |
| 1714 | ac_cv_opt_olimit_ok=no |
| 1715 | fi |
| 1716 | rm -fr conftest* |
| 1717 | fi |
| 1718 | |
| 1719 | CC="$ac_save_cc" |
| 1720 | fi |
| 1721 | |
| 1722 | echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6 |
Guido van Rossum | 2efa34b | 1997-10-23 17:43:11 +0000 | [diff] [blame] | 1723 | if test $ac_cv_opt_olimit_ok = yes; then |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 1724 | case $ac_sys_system in |
| 1725 | Darwin*) OPT="$OPT" ;; |
| 1726 | *) OPT="$OPT -OPT:Olimit=0";; |
| 1727 | esac |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1728 | else |
| 1729 | echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1730 | echo "configure:1731: checking whether $CC accepts -Olimit 1500" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1731 | if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1732 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1733 | else |
| 1734 | ac_save_cc="$CC" |
| 1735 | CC="$CC -Olimit 1500" |
| 1736 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 1737 | ac_cv_olimit_ok=no |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1738 | else |
| 1739 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1740 | #line 1741 "configure" |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1741 | #include "confdefs.h" |
| 1742 | int main() { return 0; } |
| 1743 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1744 | if { (eval echo configure:1745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1745 | then |
| 1746 | ac_cv_olimit_ok=yes |
| 1747 | else |
| 1748 | echo "configure: failed program was:" >&5 |
| 1749 | cat conftest.$ac_ext >&5 |
| 1750 | rm -fr conftest* |
| 1751 | ac_cv_olimit_ok=no |
Guido van Rossum | 201afe5 | 1997-05-14 21:14:44 +0000 | [diff] [blame] | 1752 | fi |
Guido van Rossum | 6b3d77e | 1998-07-07 21:11:02 +0000 | [diff] [blame] | 1753 | rm -fr conftest* |
| 1754 | fi |
| 1755 | |
| 1756 | CC="$ac_save_cc" |
| 1757 | fi |
| 1758 | |
| 1759 | echo "$ac_t""$ac_cv_olimit_ok" 1>&6 |
| 1760 | if test $ac_cv_olimit_ok = yes; then |
| 1761 | OPT="$OPT -Olimit 1500" |
| 1762 | fi |
| 1763 | fi |
| 1764 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1765 | # On some compilers, pthreads are available without further options |
| 1766 | # (e.g. MacOS X). On some of these systems, the compiler will not |
| 1767 | # complain if unaccepted options are passed (e.g. gcc on Mac OS X). |
| 1768 | # So we have to see first whether pthreads are available without |
| 1769 | # options before we can check whether -Kpthread improves anything. |
| 1770 | echo $ac_n "checking whether pthreads are available without options""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1771 | echo "configure:1772: checking whether pthreads are available without options" >&5 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1772 | if eval "test \"`echo '$''{'ac_cv_pthread_is_default'+set}'`\" = set"; then |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1773 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1774 | else |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1775 | if test "$cross_compiling" = yes; then |
| 1776 | ac_cv_pthread_is_default=no |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1777 | else |
| 1778 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1779 | #line 1780 "configure" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1780 | #include "confdefs.h" |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1781 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1782 | #include <pthread.h> |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1783 | |
| 1784 | void* routine(void* p){return NULL;} |
| 1785 | |
| 1786 | int main(){ |
| 1787 | pthread_t p; |
| 1788 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 1789 | return 1; |
| 1790 | return 0; |
| 1791 | } |
| 1792 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1793 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1794 | if { (eval echo configure:1795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1795 | then |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1796 | ac_cv_pthread_is_default=yes |
| 1797 | else |
| 1798 | echo "configure: failed program was:" >&5 |
| 1799 | cat conftest.$ac_ext >&5 |
| 1800 | rm -fr conftest* |
| 1801 | ac_cv_pthread_is_default=no |
| 1802 | fi |
| 1803 | rm -fr conftest* |
| 1804 | fi |
| 1805 | |
| 1806 | |
| 1807 | fi |
| 1808 | |
| 1809 | echo "$ac_t""$ac_cv_pthread_is_default" 1>&6 |
| 1810 | |
| 1811 | |
| 1812 | if test $ac_cv_pthread_is_default = yes |
| 1813 | then |
| 1814 | ac_cv_kpthread=no |
| 1815 | else |
| 1816 | # -Kpthread, if available, provides the right #defines |
| 1817 | # and linker options to make pthread_create available |
| 1818 | # Some compilers won't report that they do not support -Kpthread, |
| 1819 | # so we need to run a program to see whether it really made the |
| 1820 | # function available. |
| 1821 | echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1822 | echo "configure:1823: checking whether $CC accepts -Kpthread" >&5 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1823 | if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then |
| 1824 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 1825 | else |
| 1826 | ac_save_cc="$CC" |
| 1827 | CC="$CC -Kpthread" |
| 1828 | if test "$cross_compiling" = yes; then |
| 1829 | ac_cv_kpthread=no |
| 1830 | else |
| 1831 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1832 | #line 1833 "configure" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1833 | #include "confdefs.h" |
| 1834 | |
| 1835 | #include <pthread.h> |
| 1836 | |
| 1837 | void* routine(void* p){return NULL;} |
| 1838 | |
| 1839 | int main(){ |
| 1840 | pthread_t p; |
| 1841 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 1842 | return 1; |
| 1843 | return 0; |
| 1844 | } |
| 1845 | |
| 1846 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1847 | if { (eval echo configure:1848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1848 | then |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1849 | ac_cv_kpthread=yes |
| 1850 | else |
| 1851 | echo "configure: failed program was:" >&5 |
| 1852 | cat conftest.$ac_ext >&5 |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1853 | rm -fr conftest* |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1854 | ac_cv_kpthread=no |
| 1855 | fi |
Martin v. Löwis | 260aecc | 2001-10-07 08:14:41 +0000 | [diff] [blame] | 1856 | rm -fr conftest* |
| 1857 | fi |
| 1858 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1859 | CC="$ac_save_cc" |
| 1860 | fi |
| 1861 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1862 | echo "$ac_t""$ac_cv_kpthread" 1>&6 |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 1863 | fi |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 1864 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 1865 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1866 | # checks for header files |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1867 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1868 | echo "configure:1869: checking for ANSI C header files" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1869 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1870 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1871 | else |
| 1872 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1873 | #line 1874 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1874 | #include "confdefs.h" |
| 1875 | #include <stdlib.h> |
| 1876 | #include <stdarg.h> |
| 1877 | #include <string.h> |
| 1878 | #include <float.h> |
| 1879 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1880 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1881 | { (eval echo configure:1882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1882 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1883 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1884 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1885 | ac_cv_header_stdc=yes |
| 1886 | else |
| 1887 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1888 | echo "configure: failed program was:" >&5 |
| 1889 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1890 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1891 | ac_cv_header_stdc=no |
| 1892 | fi |
| 1893 | rm -f conftest* |
| 1894 | |
| 1895 | if test $ac_cv_header_stdc = yes; then |
| 1896 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 1897 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1898 | #line 1899 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1899 | #include "confdefs.h" |
| 1900 | #include <string.h> |
| 1901 | EOF |
| 1902 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1903 | egrep "memchr" >/dev/null 2>&1; then |
| 1904 | : |
| 1905 | else |
| 1906 | rm -rf conftest* |
| 1907 | ac_cv_header_stdc=no |
| 1908 | fi |
| 1909 | rm -f conftest* |
| 1910 | |
| 1911 | fi |
| 1912 | |
| 1913 | if test $ac_cv_header_stdc = yes; then |
| 1914 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 1915 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1916 | #line 1917 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1917 | #include "confdefs.h" |
| 1918 | #include <stdlib.h> |
| 1919 | EOF |
| 1920 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 1921 | egrep "free" >/dev/null 2>&1; then |
| 1922 | : |
| 1923 | else |
| 1924 | rm -rf conftest* |
| 1925 | ac_cv_header_stdc=no |
| 1926 | fi |
| 1927 | rm -f conftest* |
| 1928 | |
| 1929 | fi |
| 1930 | |
| 1931 | if test $ac_cv_header_stdc = yes; then |
| 1932 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| 1933 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1934 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1935 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1936 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1937 | #line 1938 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1938 | #include "confdefs.h" |
| 1939 | #include <ctype.h> |
| 1940 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 1941 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1942 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1943 | int main () { int i; for (i = 0; i < 256; i++) |
| 1944 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 1945 | exit (0); } |
| 1946 | |
| 1947 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1948 | if { (eval echo configure:1949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1949 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1950 | : |
| 1951 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1952 | echo "configure: failed program was:" >&5 |
| 1953 | cat conftest.$ac_ext >&5 |
| 1954 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1955 | ac_cv_header_stdc=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1956 | fi |
| 1957 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1958 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1959 | |
| 1960 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1961 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1962 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1963 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1964 | if test $ac_cv_header_stdc = yes; then |
| 1965 | cat >> confdefs.h <<\EOF |
| 1966 | #define STDC_HEADERS 1 |
| 1967 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1968 | |
| 1969 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1970 | |
Guido van Rossum | a6535fd | 2001-10-18 19:44:10 +0000 | [diff] [blame^] | 1971 | for ac_hdr in dlfcn.h fcntl.h grp.h limits.h langinfo.h locale.h \ |
Martin v. Löwis | 9b75dca | 2001-08-10 13:58:50 +0000 | [diff] [blame] | 1972 | ncurses.h poll.h pthread.h \ |
Eric S. Raymond | d2d75d3 | 2001-01-16 15:26:34 +0000 | [diff] [blame] | 1973 | signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \ |
Fred Drake | bbc3c5a | 2001-05-11 16:11:25 +0000 | [diff] [blame] | 1974 | sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \ |
Andrew M. Kuchling | 881fd90 | 2001-07-14 20:55:52 +0000 | [diff] [blame] | 1975 | sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \ |
Martin v. Löwis | 6953233 | 2001-10-13 09:12:41 +0000 | [diff] [blame] | 1976 | sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \ |
Martin v. Löwis | f24b2f3 | 2001-08-10 20:29:40 +0000 | [diff] [blame] | 1977 | ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1978 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1979 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1980 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1981 | echo "configure:1982: checking for $ac_hdr" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 1982 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1983 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1984 | else |
| 1985 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1986 | #line 1987 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1987 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1988 | #include <$ac_hdr> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1989 | EOF |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1990 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 1991 | { (eval echo configure:1992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 1992 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1993 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1994 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1995 | eval "ac_cv_header_$ac_safe=yes" |
| 1996 | else |
| 1997 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 1998 | echo "configure: failed program was:" >&5 |
| 1999 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2000 | rm -rf conftest* |
| 2001 | eval "ac_cv_header_$ac_safe=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2002 | fi |
| 2003 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2004 | fi |
| 2005 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2006 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2007 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2008 | cat >> confdefs.h <<EOF |
| 2009 | #define $ac_tr_hdr 1 |
| 2010 | EOF |
| 2011 | |
| 2012 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2013 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2014 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2015 | done |
| 2016 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2017 | ac_header_dirent=no |
| 2018 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h |
| 2019 | do |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2020 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2021 | echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2022 | echo "configure:2023: checking for $ac_hdr that defines DIR" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2023 | if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2024 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2025 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2026 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2027 | #line 2028 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2028 | #include "confdefs.h" |
| 2029 | #include <sys/types.h> |
| 2030 | #include <$ac_hdr> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2031 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2032 | DIR *dirp = 0; |
| 2033 | ; return 0; } |
| 2034 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2035 | if { (eval echo configure:2036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2036 | rm -rf conftest* |
| 2037 | eval "ac_cv_header_dirent_$ac_safe=yes" |
| 2038 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2039 | echo "configure: failed program was:" >&5 |
| 2040 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2041 | rm -rf conftest* |
| 2042 | eval "ac_cv_header_dirent_$ac_safe=no" |
| 2043 | fi |
| 2044 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2045 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2046 | if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2047 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2048 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2049 | cat >> confdefs.h <<EOF |
| 2050 | #define $ac_tr_hdr 1 |
| 2051 | EOF |
| 2052 | ac_header_dirent=$ac_hdr; break |
| 2053 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2054 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2055 | fi |
| 2056 | done |
| 2057 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| 2058 | if test $ac_header_dirent = dirent.h; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2059 | echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2060 | echo "configure:2061: checking for opendir in -ldir" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2061 | ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2062 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2063 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2064 | else |
| 2065 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2066 | LIBS="-ldir $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2067 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2068 | #line 2069 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2069 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2070 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2071 | /* We use char because int might match the return type of a gcc2 |
| 2072 | builtin and then its argument prototype would still apply. */ |
| 2073 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2074 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2075 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2076 | opendir() |
| 2077 | ; return 0; } |
| 2078 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2079 | if { (eval echo configure:2080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2080 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2081 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2082 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2083 | echo "configure: failed program was:" >&5 |
| 2084 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2085 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2086 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2087 | fi |
| 2088 | rm -f conftest* |
| 2089 | LIBS="$ac_save_LIBS" |
| 2090 | |
| 2091 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2092 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2093 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2094 | LIBS="$LIBS -ldir" |
| 2095 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2096 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2097 | fi |
| 2098 | |
| 2099 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2100 | echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2101 | echo "configure:2102: checking for opendir in -lx" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2102 | ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2103 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2104 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2105 | else |
| 2106 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2107 | LIBS="-lx $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2108 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2109 | #line 2110 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2110 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2111 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 2112 | /* We use char because int might match the return type of a gcc2 |
| 2113 | builtin and then its argument prototype would still apply. */ |
| 2114 | char opendir(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2115 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2116 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2117 | opendir() |
| 2118 | ; return 0; } |
| 2119 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2120 | if { (eval echo configure:2121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2121 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2122 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2123 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2124 | echo "configure: failed program was:" >&5 |
| 2125 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2126 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2127 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2128 | fi |
| 2129 | rm -f conftest* |
| 2130 | LIBS="$ac_save_LIBS" |
| 2131 | |
| 2132 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2133 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2134 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2135 | LIBS="$LIBS -lx" |
| 2136 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2137 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2138 | fi |
| 2139 | |
| 2140 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2141 | |
| 2142 | |
| 2143 | # checks for typedefs |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2144 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2145 | echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2146 | echo "configure:2147: checking for clock_t in time.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2147 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2148 | #line 2149 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2149 | #include "confdefs.h" |
| 2150 | #include <time.h> |
| 2151 | EOF |
| 2152 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2153 | egrep "clock_t" >/dev/null 2>&1; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2154 | rm -rf conftest* |
| 2155 | was_it_defined=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2156 | else |
| 2157 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2158 | cat >> confdefs.h <<\EOF |
| 2159 | #define clock_t long |
| 2160 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2161 | |
| 2162 | fi |
| 2163 | rm -f conftest* |
| 2164 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2165 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 2166 | |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 2167 | # Two defines needed to enable largefile support on various platforms |
| 2168 | # These may affect some typedefs |
| 2169 | cat >> confdefs.h <<\EOF |
| 2170 | #define _LARGEFILE_SOURCE 1 |
| 2171 | EOF |
| 2172 | |
| 2173 | cat >> confdefs.h <<\EOF |
| 2174 | #define _FILE_OFFSET_BITS 64 |
| 2175 | EOF |
| 2176 | |
| 2177 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 2178 | # Add some code to confdefs.h so that the test for off_t works on SCO |
| 2179 | cat >> confdefs.h <<\EOF |
| 2180 | #if defined(SCO_DS) |
| 2181 | #undef _OFF_T |
| 2182 | #endif |
| 2183 | EOF |
| 2184 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2185 | # Type availability checks |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2186 | echo $ac_n "checking for mode_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2187 | echo "configure:2188: checking for mode_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2188 | if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2189 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2190 | else |
| 2191 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2192 | #line 2193 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2193 | #include "confdefs.h" |
| 2194 | #include <sys/types.h> |
| 2195 | #if STDC_HEADERS |
| 2196 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2197 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2198 | #endif |
| 2199 | EOF |
| 2200 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2201 | egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2202 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2203 | ac_cv_type_mode_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2204 | else |
| 2205 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2206 | ac_cv_type_mode_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2207 | fi |
| 2208 | rm -f conftest* |
| 2209 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2210 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2211 | echo "$ac_t""$ac_cv_type_mode_t" 1>&6 |
| 2212 | if test $ac_cv_type_mode_t = no; then |
| 2213 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2214 | #define mode_t int |
| 2215 | EOF |
| 2216 | |
| 2217 | fi |
| 2218 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2219 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2220 | echo "configure:2221: checking for off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2221 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2222 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2223 | else |
| 2224 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2225 | #line 2226 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2226 | #include "confdefs.h" |
| 2227 | #include <sys/types.h> |
| 2228 | #if STDC_HEADERS |
| 2229 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2230 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2231 | #endif |
| 2232 | EOF |
| 2233 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2234 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2235 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2236 | ac_cv_type_off_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2237 | else |
| 2238 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2239 | ac_cv_type_off_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2240 | fi |
| 2241 | rm -f conftest* |
| 2242 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2243 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2244 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
| 2245 | if test $ac_cv_type_off_t = no; then |
| 2246 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2247 | #define off_t long |
| 2248 | EOF |
| 2249 | |
| 2250 | fi |
| 2251 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2252 | echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2253 | echo "configure:2254: checking for pid_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2254 | if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2255 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2256 | else |
| 2257 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2258 | #line 2259 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2259 | #include "confdefs.h" |
| 2260 | #include <sys/types.h> |
| 2261 | #if STDC_HEADERS |
| 2262 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2263 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2264 | #endif |
| 2265 | EOF |
| 2266 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2267 | egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2268 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2269 | ac_cv_type_pid_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2270 | else |
| 2271 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2272 | ac_cv_type_pid_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2273 | fi |
| 2274 | rm -f conftest* |
| 2275 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2276 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2277 | echo "$ac_t""$ac_cv_type_pid_t" 1>&6 |
| 2278 | if test $ac_cv_type_pid_t = no; then |
| 2279 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2280 | #define pid_t int |
| 2281 | EOF |
| 2282 | |
| 2283 | fi |
| 2284 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2285 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2286 | echo "configure:2287: checking return type of signal handlers" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2287 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2288 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2289 | else |
| 2290 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2291 | #line 2292 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2292 | #include "confdefs.h" |
| 2293 | #include <sys/types.h> |
| 2294 | #include <signal.h> |
| 2295 | #ifdef signal |
| 2296 | #undef signal |
| 2297 | #endif |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2298 | #ifdef __cplusplus |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2299 | extern "C" void (*signal (int, void (*)(int)))(int); |
| 2300 | #else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2301 | void (*signal ()) (); |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2302 | #endif |
| 2303 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2304 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2305 | int i; |
| 2306 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2307 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2308 | if { (eval echo configure:2309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2309 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2310 | ac_cv_type_signal=void |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2311 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2312 | echo "configure: failed program was:" >&5 |
| 2313 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2314 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2315 | ac_cv_type_signal=int |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2316 | fi |
| 2317 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2318 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2319 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2320 | echo "$ac_t""$ac_cv_type_signal" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2321 | cat >> confdefs.h <<EOF |
| 2322 | #define RETSIGTYPE $ac_cv_type_signal |
| 2323 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2324 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2325 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2326 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2327 | echo "configure:2328: checking for size_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2328 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2329 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2330 | else |
| 2331 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2332 | #line 2333 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2333 | #include "confdefs.h" |
| 2334 | #include <sys/types.h> |
| 2335 | #if STDC_HEADERS |
| 2336 | #include <stdlib.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2337 | #include <stddef.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2338 | #endif |
| 2339 | EOF |
| 2340 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 2341 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2342 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2343 | ac_cv_type_size_t=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2344 | else |
| 2345 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2346 | ac_cv_type_size_t=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2347 | fi |
| 2348 | rm -f conftest* |
| 2349 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2350 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2351 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
| 2352 | if test $ac_cv_type_size_t = no; then |
| 2353 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2354 | #define size_t unsigned |
| 2355 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2356 | |
| 2357 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2358 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2359 | echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2360 | echo "configure:2361: checking for uid_t in sys/types.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2361 | if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2362 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2363 | else |
| 2364 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2365 | #line 2366 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2366 | #include "confdefs.h" |
| 2367 | #include <sys/types.h> |
| 2368 | EOF |
| 2369 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 2370 | egrep "uid_t" >/dev/null 2>&1; then |
| 2371 | rm -rf conftest* |
| 2372 | ac_cv_type_uid_t=yes |
| 2373 | else |
| 2374 | rm -rf conftest* |
| 2375 | ac_cv_type_uid_t=no |
| 2376 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2377 | rm -f conftest* |
| 2378 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2379 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 2380 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 2381 | echo "$ac_t""$ac_cv_type_uid_t" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2382 | if test $ac_cv_type_uid_t = no; then |
| 2383 | cat >> confdefs.h <<\EOF |
| 2384 | #define uid_t int |
| 2385 | EOF |
| 2386 | |
| 2387 | cat >> confdefs.h <<\EOF |
| 2388 | #define gid_t int |
| 2389 | EOF |
| 2390 | |
| 2391 | fi |
| 2392 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2393 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2394 | # Sizes of various common basic types |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2395 | echo $ac_n "checking size of int""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2396 | echo "configure:2397: checking size of int" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2397 | if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2398 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2399 | else |
| 2400 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2401 | ac_cv_sizeof_int=4 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2402 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2403 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2404 | #line 2405 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2405 | #include "confdefs.h" |
| 2406 | #include <stdio.h> |
| 2407 | main() |
| 2408 | { |
| 2409 | FILE *f=fopen("conftestval", "w"); |
| 2410 | if (!f) exit(1); |
| 2411 | fprintf(f, "%d\n", sizeof(int)); |
| 2412 | exit(0); |
| 2413 | } |
| 2414 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2415 | if { (eval echo configure:2416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2416 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2417 | ac_cv_sizeof_int=`cat conftestval` |
| 2418 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2419 | echo "configure: failed program was:" >&5 |
| 2420 | cat conftest.$ac_ext >&5 |
| 2421 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2422 | ac_cv_sizeof_int=0 |
| 2423 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2424 | rm -fr conftest* |
| 2425 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2426 | |
| 2427 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2428 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
| 2429 | cat >> confdefs.h <<EOF |
| 2430 | #define SIZEOF_INT $ac_cv_sizeof_int |
| 2431 | EOF |
| 2432 | |
| 2433 | |
| 2434 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2435 | echo "configure:2436: checking size of long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2436 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2437 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2438 | else |
| 2439 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2440 | ac_cv_sizeof_long=4 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2441 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2442 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2443 | #line 2444 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2444 | #include "confdefs.h" |
| 2445 | #include <stdio.h> |
| 2446 | main() |
| 2447 | { |
| 2448 | FILE *f=fopen("conftestval", "w"); |
| 2449 | if (!f) exit(1); |
| 2450 | fprintf(f, "%d\n", sizeof(long)); |
| 2451 | exit(0); |
| 2452 | } |
| 2453 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2454 | if { (eval echo configure:2455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2455 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2456 | ac_cv_sizeof_long=`cat conftestval` |
| 2457 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2458 | echo "configure: failed program was:" >&5 |
| 2459 | cat conftest.$ac_ext >&5 |
| 2460 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2461 | ac_cv_sizeof_long=0 |
| 2462 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2463 | rm -fr conftest* |
| 2464 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2465 | |
| 2466 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2467 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
| 2468 | cat >> confdefs.h <<EOF |
| 2469 | #define SIZEOF_LONG $ac_cv_sizeof_long |
| 2470 | EOF |
| 2471 | |
| 2472 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2473 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2474 | echo "configure:2475: checking size of void *" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2475 | if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2476 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2477 | else |
| 2478 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2479 | ac_cv_sizeof_void_p=4 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2480 | else |
| 2481 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2482 | #line 2483 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2483 | #include "confdefs.h" |
| 2484 | #include <stdio.h> |
| 2485 | main() |
| 2486 | { |
| 2487 | FILE *f=fopen("conftestval", "w"); |
| 2488 | if (!f) exit(1); |
| 2489 | fprintf(f, "%d\n", sizeof(void *)); |
| 2490 | exit(0); |
| 2491 | } |
| 2492 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2493 | if { (eval echo configure:2494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2494 | then |
| 2495 | ac_cv_sizeof_void_p=`cat conftestval` |
| 2496 | else |
| 2497 | echo "configure: failed program was:" >&5 |
| 2498 | cat conftest.$ac_ext >&5 |
| 2499 | rm -fr conftest* |
| 2500 | ac_cv_sizeof_void_p=0 |
| 2501 | fi |
| 2502 | rm -fr conftest* |
| 2503 | fi |
| 2504 | |
| 2505 | fi |
| 2506 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 |
| 2507 | cat >> confdefs.h <<EOF |
| 2508 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
| 2509 | EOF |
| 2510 | |
| 2511 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2512 | echo $ac_n "checking size of char""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2513 | echo "configure:2514: checking size of char" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2514 | if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2515 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2516 | else |
| 2517 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2518 | ac_cv_sizeof_char=1 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2519 | else |
| 2520 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2521 | #line 2522 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2522 | #include "confdefs.h" |
| 2523 | #include <stdio.h> |
| 2524 | main() |
| 2525 | { |
| 2526 | FILE *f=fopen("conftestval", "w"); |
| 2527 | if (!f) exit(1); |
| 2528 | fprintf(f, "%d\n", sizeof(char)); |
| 2529 | exit(0); |
| 2530 | } |
| 2531 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2532 | if { (eval echo configure:2533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2533 | then |
| 2534 | ac_cv_sizeof_char=`cat conftestval` |
| 2535 | else |
| 2536 | echo "configure: failed program was:" >&5 |
| 2537 | cat conftest.$ac_ext >&5 |
| 2538 | rm -fr conftest* |
| 2539 | ac_cv_sizeof_char=0 |
| 2540 | fi |
| 2541 | rm -fr conftest* |
| 2542 | fi |
| 2543 | |
| 2544 | fi |
| 2545 | echo "$ac_t""$ac_cv_sizeof_char" 1>&6 |
| 2546 | cat >> confdefs.h <<EOF |
| 2547 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
| 2548 | EOF |
| 2549 | |
| 2550 | |
| 2551 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2552 | echo "configure:2553: checking size of short" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2553 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2554 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2555 | else |
| 2556 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2557 | ac_cv_sizeof_short=2 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2558 | else |
| 2559 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2560 | #line 2561 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2561 | #include "confdefs.h" |
| 2562 | #include <stdio.h> |
| 2563 | main() |
| 2564 | { |
| 2565 | FILE *f=fopen("conftestval", "w"); |
| 2566 | if (!f) exit(1); |
| 2567 | fprintf(f, "%d\n", sizeof(short)); |
| 2568 | exit(0); |
| 2569 | } |
| 2570 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2571 | if { (eval echo configure:2572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2572 | then |
| 2573 | ac_cv_sizeof_short=`cat conftestval` |
| 2574 | else |
| 2575 | echo "configure: failed program was:" >&5 |
| 2576 | cat conftest.$ac_ext >&5 |
| 2577 | rm -fr conftest* |
| 2578 | ac_cv_sizeof_short=0 |
| 2579 | fi |
| 2580 | rm -fr conftest* |
| 2581 | fi |
| 2582 | |
| 2583 | fi |
| 2584 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
| 2585 | cat >> confdefs.h <<EOF |
| 2586 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
| 2587 | EOF |
| 2588 | |
| 2589 | |
| 2590 | echo $ac_n "checking size of float""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2591 | echo "configure:2592: checking size of float" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2592 | if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2593 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2594 | else |
| 2595 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2596 | ac_cv_sizeof_float=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2597 | else |
| 2598 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2599 | #line 2600 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2600 | #include "confdefs.h" |
| 2601 | #include <stdio.h> |
| 2602 | main() |
| 2603 | { |
| 2604 | FILE *f=fopen("conftestval", "w"); |
| 2605 | if (!f) exit(1); |
| 2606 | fprintf(f, "%d\n", sizeof(float)); |
| 2607 | exit(0); |
| 2608 | } |
| 2609 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2610 | if { (eval echo configure:2611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2611 | then |
| 2612 | ac_cv_sizeof_float=`cat conftestval` |
| 2613 | else |
| 2614 | echo "configure: failed program was:" >&5 |
| 2615 | cat conftest.$ac_ext >&5 |
| 2616 | rm -fr conftest* |
| 2617 | ac_cv_sizeof_float=0 |
| 2618 | fi |
| 2619 | rm -fr conftest* |
| 2620 | fi |
| 2621 | |
| 2622 | fi |
| 2623 | echo "$ac_t""$ac_cv_sizeof_float" 1>&6 |
| 2624 | cat >> confdefs.h <<EOF |
| 2625 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
| 2626 | EOF |
| 2627 | |
| 2628 | |
| 2629 | echo $ac_n "checking size of double""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2630 | echo "configure:2631: checking size of double" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2631 | if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2632 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2633 | else |
| 2634 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2635 | ac_cv_sizeof_double=8 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2636 | else |
| 2637 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2638 | #line 2639 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2639 | #include "confdefs.h" |
| 2640 | #include <stdio.h> |
| 2641 | main() |
| 2642 | { |
| 2643 | FILE *f=fopen("conftestval", "w"); |
| 2644 | if (!f) exit(1); |
| 2645 | fprintf(f, "%d\n", sizeof(double)); |
| 2646 | exit(0); |
| 2647 | } |
| 2648 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2649 | if { (eval echo configure:2650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2650 | then |
| 2651 | ac_cv_sizeof_double=`cat conftestval` |
| 2652 | else |
| 2653 | echo "configure: failed program was:" >&5 |
| 2654 | cat conftest.$ac_ext >&5 |
| 2655 | rm -fr conftest* |
| 2656 | ac_cv_sizeof_double=0 |
| 2657 | fi |
| 2658 | rm -fr conftest* |
| 2659 | fi |
| 2660 | |
| 2661 | fi |
| 2662 | echo "$ac_t""$ac_cv_sizeof_double" 1>&6 |
| 2663 | cat >> confdefs.h <<EOF |
| 2664 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
| 2665 | EOF |
| 2666 | |
| 2667 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2668 | echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2669 | echo "configure:2670: checking size of fpos_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2670 | if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2671 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2672 | else |
| 2673 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2674 | ac_cv_sizeof_fpos_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2675 | else |
| 2676 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2677 | #line 2678 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2678 | #include "confdefs.h" |
| 2679 | #include <stdio.h> |
| 2680 | main() |
| 2681 | { |
| 2682 | FILE *f=fopen("conftestval", "w"); |
| 2683 | if (!f) exit(1); |
| 2684 | fprintf(f, "%d\n", sizeof(fpos_t)); |
| 2685 | exit(0); |
| 2686 | } |
| 2687 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2688 | if { (eval echo configure:2689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2689 | then |
| 2690 | ac_cv_sizeof_fpos_t=`cat conftestval` |
| 2691 | else |
| 2692 | echo "configure: failed program was:" >&5 |
| 2693 | cat conftest.$ac_ext >&5 |
| 2694 | rm -fr conftest* |
| 2695 | ac_cv_sizeof_fpos_t=0 |
| 2696 | fi |
| 2697 | rm -fr conftest* |
| 2698 | fi |
| 2699 | |
| 2700 | fi |
| 2701 | echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6 |
| 2702 | cat >> confdefs.h <<EOF |
| 2703 | #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t |
| 2704 | EOF |
| 2705 | |
| 2706 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2707 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2708 | echo $ac_n "checking for long long support""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2709 | echo "configure:2710: checking for long long support" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2710 | have_long_long=no |
| 2711 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2712 | #line 2713 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2713 | #include "confdefs.h" |
| 2714 | |
| 2715 | int main() { |
| 2716 | long long x; x = (long long)0; |
| 2717 | ; return 0; } |
| 2718 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2719 | if { (eval echo configure:2720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2720 | rm -rf conftest* |
| 2721 | cat >> confdefs.h <<\EOF |
| 2722 | #define HAVE_LONG_LONG 1 |
| 2723 | EOF |
| 2724 | have_long_long=yes |
| 2725 | else |
| 2726 | echo "configure: failed program was:" >&5 |
| 2727 | cat conftest.$ac_ext >&5 |
| 2728 | fi |
| 2729 | rm -f conftest* |
| 2730 | echo "$ac_t""$have_long_long" 1>&6 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2731 | if test "$have_long_long" = yes ; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2732 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2733 | echo "configure:2734: checking size of long long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2734 | if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2735 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2736 | else |
| 2737 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2738 | ac_cv_sizeof_long_long=8 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2739 | else |
| 2740 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2741 | #line 2742 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2742 | #include "confdefs.h" |
| 2743 | #include <stdio.h> |
| 2744 | main() |
| 2745 | { |
| 2746 | FILE *f=fopen("conftestval", "w"); |
| 2747 | if (!f) exit(1); |
| 2748 | fprintf(f, "%d\n", sizeof(long long)); |
| 2749 | exit(0); |
| 2750 | } |
| 2751 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2752 | if { (eval echo configure:2753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2753 | then |
| 2754 | ac_cv_sizeof_long_long=`cat conftestval` |
| 2755 | else |
| 2756 | echo "configure: failed program was:" >&5 |
| 2757 | cat conftest.$ac_ext >&5 |
| 2758 | rm -fr conftest* |
| 2759 | ac_cv_sizeof_long_long=0 |
| 2760 | fi |
| 2761 | rm -fr conftest* |
| 2762 | fi |
| 2763 | |
| 2764 | fi |
| 2765 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
| 2766 | cat >> confdefs.h <<EOF |
| 2767 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 2768 | EOF |
| 2769 | |
| 2770 | |
| 2771 | fi |
| 2772 | |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2773 | echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2774 | echo "configure:2775: checking for uintptr_t support" >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2775 | have_uintptr_t=no |
| 2776 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2777 | #line 2778 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2778 | #include "confdefs.h" |
| 2779 | |
| 2780 | int main() { |
| 2781 | uintptr_t x; x = (uintptr_t)0; |
| 2782 | ; return 0; } |
| 2783 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2784 | if { (eval echo configure:2785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2785 | rm -rf conftest* |
| 2786 | cat >> confdefs.h <<\EOF |
| 2787 | #define HAVE_UINTPTR_T 1 |
| 2788 | EOF |
| 2789 | have_uintptr_t=yes |
| 2790 | else |
| 2791 | echo "configure: failed program was:" >&5 |
| 2792 | cat conftest.$ac_ext >&5 |
| 2793 | fi |
| 2794 | rm -f conftest* |
| 2795 | echo "$ac_t""$have_uintptr_t" 1>&6 |
| 2796 | if test "$have_uintptr_t" = yes ; then |
| 2797 | echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2798 | echo "configure:2799: checking size of uintptr_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2799 | if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2800 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2801 | else |
| 2802 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2803 | ac_cv_sizeof_uintptr_t=4 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2804 | else |
| 2805 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2806 | #line 2807 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2807 | #include "confdefs.h" |
| 2808 | #include <stdio.h> |
| 2809 | main() |
| 2810 | { |
| 2811 | FILE *f=fopen("conftestval", "w"); |
| 2812 | if (!f) exit(1); |
| 2813 | fprintf(f, "%d\n", sizeof(uintptr_t)); |
| 2814 | exit(0); |
| 2815 | } |
| 2816 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2817 | if { (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2818 | then |
| 2819 | ac_cv_sizeof_uintptr_t=`cat conftestval` |
| 2820 | else |
| 2821 | echo "configure: failed program was:" >&5 |
| 2822 | cat conftest.$ac_ext >&5 |
| 2823 | rm -fr conftest* |
| 2824 | ac_cv_sizeof_uintptr_t=0 |
| 2825 | fi |
| 2826 | rm -fr conftest* |
| 2827 | fi |
| 2828 | |
| 2829 | fi |
| 2830 | echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6 |
| 2831 | cat >> confdefs.h <<EOF |
| 2832 | #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t |
| 2833 | EOF |
| 2834 | |
| 2835 | |
| 2836 | fi |
| 2837 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2838 | # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>. |
| 2839 | echo $ac_n "checking size of off_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2840 | echo "configure:2841: checking size of off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2841 | if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2842 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2843 | else |
| 2844 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2845 | ac_cv_sizeof_off_t=4 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2846 | else |
| 2847 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2848 | #line 2849 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2849 | #include "confdefs.h" |
| 2850 | #include <stdio.h> |
| 2851 | #include <sys/types.h> |
| 2852 | main() |
| 2853 | { |
| 2854 | FILE *f=fopen("conftestval", "w"); |
| 2855 | if (!f) exit(1); |
| 2856 | fprintf(f, "%d\n", sizeof(off_t)); |
| 2857 | exit(0); |
| 2858 | } |
| 2859 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2860 | if { (eval echo configure:2861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2861 | then |
| 2862 | ac_cv_sizeof_off_t=`cat conftestval` |
| 2863 | else |
| 2864 | echo "configure: failed program was:" >&5 |
| 2865 | cat conftest.$ac_ext >&5 |
| 2866 | rm -fr conftest* |
| 2867 | ac_cv_sizeof_off_t=0 |
| 2868 | fi |
| 2869 | rm -fr conftest* |
| 2870 | fi |
| 2871 | |
| 2872 | |
| 2873 | fi |
| 2874 | |
| 2875 | echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6 |
| 2876 | cat >> confdefs.h <<EOF |
| 2877 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
| 2878 | EOF |
| 2879 | |
| 2880 | |
| 2881 | echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2882 | echo "configure:2883: checking whether to enable large file support" >&5 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2883 | if test "$have_long_long" = yes -a \ |
| 2884 | "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ |
| 2885 | "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2886 | cat >> confdefs.h <<\EOF |
| 2887 | #define HAVE_LARGEFILE_SUPPORT 1 |
| 2888 | EOF |
| 2889 | |
| 2890 | echo "$ac_t""yes" 1>&6 |
| 2891 | else |
| 2892 | echo "$ac_t""no" 1>&6 |
| 2893 | fi |
| 2894 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2895 | # AC_CHECK_SIZEOF() doesn't include <time.h>. |
| 2896 | echo $ac_n "checking size of time_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2897 | echo "configure:2898: checking size of time_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2898 | if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2899 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2900 | else |
| 2901 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2902 | ac_cv_sizeof_time_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2903 | else |
| 2904 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2905 | #line 2906 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2906 | #include "confdefs.h" |
| 2907 | #include <stdio.h> |
| 2908 | #include <time.h> |
| 2909 | main() |
| 2910 | { |
| 2911 | FILE *f=fopen("conftestval", "w"); |
| 2912 | if (!f) exit(1); |
| 2913 | fprintf(f, "%d\n", sizeof(time_t)); |
| 2914 | exit(0); |
| 2915 | } |
| 2916 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2917 | if { (eval echo configure:2918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2918 | then |
| 2919 | ac_cv_sizeof_time_t=`cat conftestval` |
| 2920 | else |
| 2921 | echo "configure: failed program was:" >&5 |
| 2922 | cat conftest.$ac_ext >&5 |
| 2923 | rm -fr conftest* |
| 2924 | ac_cv_sizeof_time_t=0 |
| 2925 | fi |
| 2926 | rm -fr conftest* |
| 2927 | fi |
| 2928 | |
| 2929 | |
| 2930 | fi |
| 2931 | |
| 2932 | echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 |
| 2933 | cat >> confdefs.h <<EOF |
| 2934 | #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
| 2935 | EOF |
| 2936 | |
| 2937 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2938 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2939 | # if have pthread_t then define SIZEOF_PTHREAD_T |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 2940 | ac_save_cc="$CC" |
| 2941 | if test "$ac_cv_kpthread" = "yes" |
| 2942 | then CC="$CC -Kpthread" |
| 2943 | fi |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2944 | echo $ac_n "checking for pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2945 | echo "configure:2946: checking for pthread_t" >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2946 | have_pthread_t=no |
| 2947 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2948 | #line 2949 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2949 | #include "confdefs.h" |
| 2950 | #include <pthread.h> |
| 2951 | int main() { |
Guido van Rossum | 1258049 | 2000-09-24 16:47:19 +0000 | [diff] [blame] | 2952 | pthread_t x; x = *(pthread_t*)0; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2953 | ; return 0; } |
| 2954 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2955 | if { (eval echo configure:2956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2956 | rm -rf conftest* |
| 2957 | have_pthread_t=yes |
| 2958 | else |
| 2959 | echo "configure: failed program was:" >&5 |
| 2960 | cat conftest.$ac_ext >&5 |
| 2961 | fi |
| 2962 | rm -f conftest* |
| 2963 | echo "$ac_t""$have_pthread_t" 1>&6 |
| 2964 | if test "$have_pthread_t" = yes ; then |
| 2965 | # AC_CHECK_SIZEOF() doesn't include <pthread.h>. |
| 2966 | echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2967 | echo "configure:2968: checking size of pthread_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2968 | if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2969 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2970 | else |
| 2971 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2972 | ac_cv_sizeof_pthread_t=4 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2973 | else |
| 2974 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2975 | #line 2976 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2976 | #include "confdefs.h" |
| 2977 | #include <stdio.h> |
| 2978 | #include <pthread.h> |
| 2979 | main() |
| 2980 | { |
| 2981 | FILE *f=fopen("conftestval", "w"); |
| 2982 | if (!f) exit(1); |
| 2983 | fprintf(f, "%d\n", sizeof(pthread_t)); |
| 2984 | exit(0); |
| 2985 | } |
| 2986 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 2987 | if { (eval echo configure:2988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2988 | then |
| 2989 | ac_cv_sizeof_pthread_t=`cat conftestval` |
| 2990 | else |
| 2991 | echo "configure: failed program was:" >&5 |
| 2992 | cat conftest.$ac_ext >&5 |
| 2993 | rm -fr conftest* |
| 2994 | ac_cv_sizeof_pthread_t=0 |
| 2995 | fi |
| 2996 | rm -fr conftest* |
| 2997 | fi |
| 2998 | |
| 2999 | |
| 3000 | fi |
| 3001 | |
| 3002 | echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6 |
| 3003 | cat >> confdefs.h <<EOF |
| 3004 | #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t |
| 3005 | EOF |
| 3006 | |
| 3007 | fi |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 3008 | CC="$ac_save_cc" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3009 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3010 | echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3011 | echo "configure:3012: checking for --enable-toolbox-glue" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3012 | # Check whether --enable-toolbox-glue or --disable-toolbox-glue was given. |
| 3013 | if test "${enable_toolbox_glue+set}" = set; then |
| 3014 | enableval="$enable_toolbox_glue" |
| 3015 | : |
| 3016 | fi |
| 3017 | |
| 3018 | |
| 3019 | if test -z "$enable_toolbox_glue" |
| 3020 | then |
| 3021 | case $ac_sys_system/$ac_sys_release in |
| 3022 | Darwin/*) |
| 3023 | enable_toolbox_glue="yes";; |
| 3024 | *) |
| 3025 | enable_toolbox_glue="no";; |
| 3026 | esac |
| 3027 | fi |
| 3028 | case "$enable_toolbox_glue" in |
| 3029 | yes) |
| 3030 | extra_frameworks="-framework Carbon -framework Foundation" |
| 3031 | extra_machdep_objs="Python/mactoolboxglue.o" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3032 | extra_undefs="-u __dummy -u _PyMac_Error" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3033 | cat >> confdefs.h <<\EOF |
| 3034 | #define USE_TOOLBOX_OBJECT_GLUE 1 |
| 3035 | EOF |
| 3036 | |
| 3037 | ;; |
| 3038 | *) |
| 3039 | extra_frameworks="" |
| 3040 | extra_machdep_objs="" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3041 | extra_undefs="" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3042 | ;; |
| 3043 | esac |
| 3044 | echo "$ac_t""$enable_toolbox_glue" 1>&6 |
| 3045 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3046 | |
| 3047 | case $ac_sys_system/$ac_sys_release in |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3048 | Darwin/1.4*) |
| 3049 | ns_undef_sym='_environ' |
| 3050 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym" |
| 3051 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
| 3052 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 3053 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 3054 | Darwin/*) |
| 3055 | ns_undef_sym='_environ' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3056 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" |
| 3057 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
| 3058 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 3059 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3060 | esac |
| 3061 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3062 | echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3063 | echo "configure:3064: checking for --enable-framework" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3064 | if test "$enable_framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3065 | then |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 3066 | OPT="$OPT -fno-common -dynamic" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3067 | # -U __environ is needed since bundles don't have access |
| 3068 | # to crt0 when built but will always be linked against it |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3069 | # -F. is needed to allow linking to the framework while |
| 3070 | # in the build location. |
| 3071 | |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3072 | case $ac_sys_system/$ac_sys_release in |
| 3073 | Darwin/1.4*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";; |
| 3074 | Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";; |
| 3075 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3076 | cat >> confdefs.h <<\EOF |
| 3077 | #define WITH_NEXT_FRAMEWORK 1 |
| 3078 | EOF |
| 3079 | |
| 3080 | echo "$ac_t""yes" 1>&6 |
| 3081 | else |
| 3082 | echo "$ac_t""no" 1>&6 |
| 3083 | fi |
| 3084 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3085 | echo $ac_n "checking for dyld""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3086 | echo "configure:3087: checking for dyld" >&5 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3087 | case $ac_sys_system/$ac_sys_release in |
| 3088 | Darwin/*) |
| 3089 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3090 | #define WITH_DYLD 1 |
| 3091 | EOF |
| 3092 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3093 | echo "$ac_t""always on for Darwin" 1>&6 |
| 3094 | ;; |
| 3095 | *) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3096 | echo "$ac_t""no" 1>&6 |
| 3097 | ;; |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3098 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3099 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3100 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3101 | |
| 3102 | |
| 3103 | |
| 3104 | |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3105 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3106 | # SO is the extension of shared libraries `(including the dot!) |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3107 | # -- usually .so, .sl on HP-UX, .dll on Cygwin |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3108 | echo $ac_n "checking SO""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3109 | echo "configure:3110: checking SO" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3110 | if test -z "$SO" |
| 3111 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3112 | case $ac_sys_system in |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3113 | hp*|HP*) SO=.sl;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3114 | CYGWIN*) SO=.dll;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3115 | *) SO=.so;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3116 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3117 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3118 | echo "$ac_t""$SO" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3119 | # LDSHARED is the ld *command* used to create shared library |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3120 | # -- "ld" on SunOS 4.x.x, "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3121 | # (Shared libraries in this instance are shared modules to be loaded into |
| 3122 | # Python, as opposed to building Python itself as a shared library.) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3123 | echo $ac_n "checking LDSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3124 | echo "configure:3125: checking LDSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3125 | if test -z "$LDSHARED" |
| 3126 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3127 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3128 | AIX*) |
| 3129 | BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" |
Guido van Rossum | ce608b0 | 2001-09-28 15:59:38 +0000 | [diff] [blame] | 3130 | LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3131 | ;; |
| 3132 | BeOS*) |
| 3133 | BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY" |
Guido van Rossum | ce608b0 | 2001-09-28 15:59:38 +0000 | [diff] [blame] | 3134 | LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3135 | ;; |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3136 | IRIX/5*) LDSHARED="ld -shared";; |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 3137 | IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3138 | SunOS/4*) LDSHARED="ld";; |
Greg Ward | 57c9a66 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3139 | SunOS/5*) |
| 3140 | if test "$GCC" = "yes" |
Neil Schemenauer | 8ba9445 | 2001-02-19 18:18:48 +0000 | [diff] [blame] | 3141 | then LDSHARED='$(CC) -shared' |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3142 | else LDSHARED="$(CC) -G"; |
Greg Ward | 57c9a66 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3143 | fi ;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3144 | hp*|HP*) LDSHARED="ld -b";; |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3145 | OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; |
| 3146 | DYNIX/ptx*) LDSHARED="ld -G";; |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3147 | Darwin/1.4*) |
| 3148 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3149 | if test "$enable_framework" ; then |
| 3150 | # Link against the framework. All externals should be defined. |
| 3151 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3152 | else |
| 3153 | # No framework. Ignore undefined symbols, assuming they come from Python |
| 3154 | LDSHARED="$LDSHARED -flat_namespace -undefined suppress" |
| 3155 | fi ;; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3156 | Darwin/*) |
| 3157 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3158 | if test "$enable_framework" ; then |
| 3159 | # Link against the framework. All externals should be defined. |
| 3160 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3161 | else |
| 3162 | # No framework. Ignore undefined symbols, assuming they come from Python |
| 3163 | LDSHARED="$LDSHARED -undefined suppress" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3164 | fi ;; |
Guido van Rossum | 81652ab | 1996-07-21 02:53:27 +0000 | [diff] [blame] | 3165 | Linux*) LDSHARED="gcc -shared";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 3166 | dgux*) LDSHARED="ld -G";; |
Guido van Rossum | 458e7fa | 1999-09-17 15:40:40 +0000 | [diff] [blame] | 3167 | BSD/OS*/4*) LDSHARED="gcc -shared";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3168 | OpenBSD*|NetBSD*|FreeBSD*) |
Jeremy Hylton | 4bcc7c5 | 2000-08-31 17:45:35 +0000 | [diff] [blame] | 3169 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3170 | then |
| 3171 | LDSHARED="cc -shared ${LDFLAGS}" |
| 3172 | else |
| 3173 | LDSHARED="ld -Bshareable ${LDFLAGS}" |
| 3174 | fi;; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3175 | OpenUNIX*|UnixWare*) |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3176 | if test "$GCC" = "yes" |
| 3177 | then LDSHARED="$(CC) -shared" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3178 | else LDSHARED="$(CC) -G" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3179 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3180 | SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3181 | Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3182 | CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3183 | *) LDSHARED="ld";; |
| 3184 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3185 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3186 | echo "$ac_t""$LDSHARED" 1>&6 |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3187 | BLDSHARED=${BLDSHARED-$LDSHARED} |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3188 | # CCSHARED are the C *flags* used to create objects to go into a shared |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3189 | # library (module) -- this is only needed for a few systems |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3190 | echo $ac_n "checking CCSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3191 | echo "configure:3192: checking CCSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3192 | if test -z "$CCSHARED" |
| 3193 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3194 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 3195 | SunOS*) if test "$GCC" = yes; |
| 3196 | then CCSHARED="-fPIC"; |
| 3197 | fi;; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3198 | hp*|HP*) if test "$GCC" = yes; |
Martin v. Löwis | 703ad70 | 2001-09-05 08:36:52 +0000 | [diff] [blame] | 3199 | then CCSHARED="-fPIC"; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3200 | else CCSHARED="+z"; |
| 3201 | fi;; |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3202 | Linux*) CCSHARED="-fPIC";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3203 | BSD/OS*/4*) CCSHARED="-fpic";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3204 | FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3205 | OpenUNIX*|UnixWare*) |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3206 | if test "$GCC" = "yes" |
| 3207 | then CCSHARED="-fPIC" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3208 | else CCSHARED="-KPIC" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3209 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3210 | SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3211 | Monterey*) CCSHARED="-G";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3212 | IRIX*/6*) case $CC in |
| 3213 | *gcc*) CCSHARED="-shared";; |
Guido van Rossum | ee21f41 | 1998-04-20 18:51:54 +0000 | [diff] [blame] | 3214 | *) CCSHARED="";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3215 | esac;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3216 | CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3217 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3218 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3219 | echo "$ac_t""$CCSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3220 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3221 | # the python executable -- this is only needed for a few systems |
| 3222 | echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3223 | echo "configure:3224: checking LINKFORSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3224 | if test -z "$LINKFORSHARED" |
| 3225 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3226 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3227 | AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 3228 | hp*|HP*) |
Guido van Rossum | 304dd2d | 1997-10-20 23:10:56 +0000 | [diff] [blame] | 3229 | LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3230 | BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 2d9feed | 1997-11-24 17:36:21 +0000 | [diff] [blame] | 3231 | Linux*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3232 | # -u libsys_s pulls in all symbols in libsys |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3233 | Darwin/*) |
| 3234 | # -u __dummy makes the linker aware of the objc runtime |
| 3235 | # in System.framework; otherwise, __objcInit (referenced in |
| 3236 | # crt1.o) gets erroneously defined as common, which breaks dynamic |
| 3237 | # loading of any modules which reference it in System.framework. |
| 3238 | # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is |
| 3239 | # not used by the core itself but which needs to be in the core so |
| 3240 | # that dynamically loaded extension modules have access to it. |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3241 | LINKFORSHARED="$extra_undefs -framework System" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3242 | if test "$enable_framework" |
| 3243 | then |
| 3244 | LINKFORSHARED="$LINKFORSHARED -framework Python" |
| 3245 | fi |
| 3246 | LINKFORSHARED="$LINKFORSHARED $extra_frameworks";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3247 | OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3248 | SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3249 | ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3250 | FreeBSD*|NetBSD*|OpenBSD*) |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 3251 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 3252 | then |
| 3253 | LINKFORSHARED="-Wl,--export-dynamic" |
| 3254 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3255 | SunOS/5*) case $CC in |
| 3256 | *gcc*) |
Guido van Rossum | ff48418 | 2000-02-03 13:50:24 +0000 | [diff] [blame] | 3257 | if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 3258 | then |
| 3259 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3260 | fi;; |
| 3261 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3262 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3263 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3264 | echo "$ac_t""$LINKFORSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3265 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3266 | |
| 3267 | echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3268 | echo "configure:3269: checking CFLAGSFORSHARED" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3269 | if test ! "$LIBRARY" = "$LDLIBRARY" |
| 3270 | then |
Neil Schemenauer | 0c6141f | 2001-01-27 21:40:54 +0000 | [diff] [blame] | 3271 | case $ac_sys_system in |
| 3272 | CYGWIN*) |
| 3273 | # Cygwin needs CCSHARED when building extension DLLs |
| 3274 | # but not when building the interpreter DLL. |
| 3275 | CFLAGSFORSHARED='';; |
| 3276 | *) |
| 3277 | CFLAGSFORSHARED='$(CCSHARED)' |
| 3278 | esac |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3279 | fi |
| 3280 | echo "$ac_t""$CFLAGSFORSHARED" 1>&6 |
| 3281 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3282 | # checks for libraries |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3283 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3284 | echo "configure:3285: checking for dlopen in -ldl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3285 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3286 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3287 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3288 | else |
| 3289 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3290 | LIBS="-ldl $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3291 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3292 | #line 3293 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3293 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3294 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3295 | /* We use char because int might match the return type of a gcc2 |
| 3296 | builtin and then its argument prototype would still apply. */ |
| 3297 | char dlopen(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3298 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3299 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3300 | dlopen() |
| 3301 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3302 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3303 | if { (eval echo configure:3304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3304 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3305 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3306 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3307 | echo "configure: failed program was:" >&5 |
| 3308 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3309 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3310 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3311 | fi |
| 3312 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3313 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3314 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3315 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3316 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3317 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3318 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3319 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3320 | cat >> confdefs.h <<EOF |
| 3321 | #define $ac_tr_lib 1 |
| 3322 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3323 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3324 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3325 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3326 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3327 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3328 | fi |
| 3329 | # Dynamic linking for SunOS/Solaris and SYSV |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3330 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3331 | echo "configure:3332: checking for shl_load in -ldld" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3332 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3333 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3334 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3335 | else |
| 3336 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3337 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3338 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3339 | #line 3340 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3340 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3341 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3342 | /* We use char because int might match the return type of a gcc2 |
| 3343 | builtin and then its argument prototype would still apply. */ |
| 3344 | char shl_load(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3345 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3346 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3347 | shl_load() |
| 3348 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3349 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3350 | if { (eval echo configure:3351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3351 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3352 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3353 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3354 | echo "configure: failed program was:" >&5 |
| 3355 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3356 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3357 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3358 | fi |
| 3359 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3360 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3361 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3362 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3363 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3364 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3365 | ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3366 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3367 | cat >> confdefs.h <<EOF |
| 3368 | #define $ac_tr_lib 1 |
| 3369 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3370 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3371 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3372 | |
| 3373 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3374 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3375 | fi |
| 3376 | # Dynamic linking for HP-UX |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3377 | |
| 3378 | # checks for system dependent C++ extensions support |
| 3379 | case "$ac_sys_system" in |
| 3380 | AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3381 | echo "configure:3382: checking for genuine AIX C++ extensions support" >&5 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3382 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3383 | #line 3384 "configure" |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3384 | #include "confdefs.h" |
| 3385 | #include "/usr/lpp/xlC/include/load.h" |
| 3386 | int main() { |
| 3387 | loadAndInit("", 0, "") |
| 3388 | ; return 0; } |
| 3389 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3390 | if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3391 | rm -rf conftest* |
| 3392 | cat >> confdefs.h <<\EOF |
| 3393 | #define AIX_GENUINE_CPLUSPLUS 1 |
| 3394 | EOF |
| 3395 | |
| 3396 | echo "$ac_t""yes" 1>&6 |
| 3397 | else |
| 3398 | echo "configure: failed program was:" >&5 |
| 3399 | cat conftest.$ac_ext >&5 |
| 3400 | rm -rf conftest* |
| 3401 | echo "$ac_t""no" 1>&6 |
| 3402 | fi |
| 3403 | rm -f conftest*;; |
| 3404 | *) ;; |
| 3405 | esac |
| 3406 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3407 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
| 3408 | # However on SGI IRIX, these exist but are broken. |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3409 | # BeOS' sockets are stashed in libnet. |
| 3410 | case "$ac_sys_system" in |
| 3411 | IRIX*) ;; |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3412 | *) |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3413 | echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3414 | echo "configure:3415: checking for t_open in -lnsl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3415 | ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3416 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3417 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3418 | else |
| 3419 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3420 | LIBS="-lnsl $LIBS" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3421 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3422 | #line 3423 "configure" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3423 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3424 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3425 | /* We use char because int might match the return type of a gcc2 |
| 3426 | builtin and then its argument prototype would still apply. */ |
| 3427 | char t_open(); |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3428 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3429 | int main() { |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3430 | t_open() |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3431 | ; return 0; } |
| 3432 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3433 | if { (eval echo configure:3434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3434 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3435 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3436 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3437 | echo "configure: failed program was:" >&5 |
| 3438 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3439 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3440 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3441 | fi |
| 3442 | rm -f conftest* |
| 3443 | LIBS="$ac_save_LIBS" |
| 3444 | |
| 3445 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3446 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3447 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3448 | LIBS="-lnsl $LIBS" |
| 3449 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3450 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3451 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3452 | # SVR4 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3453 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3454 | echo "configure:3455: checking for socket in -lsocket" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3455 | ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3456 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3457 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3458 | else |
| 3459 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3460 | LIBS="-lsocket $LIBS $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3461 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3462 | #line 3463 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3463 | #include "confdefs.h" |
| 3464 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3465 | /* We use char because int might match the return type of a gcc2 |
| 3466 | builtin and then its argument prototype would still apply. */ |
| 3467 | char socket(); |
| 3468 | |
| 3469 | int main() { |
| 3470 | socket() |
| 3471 | ; return 0; } |
| 3472 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3473 | if { (eval echo configure:3474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3474 | rm -rf conftest* |
| 3475 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3476 | else |
| 3477 | echo "configure: failed program was:" >&5 |
| 3478 | cat conftest.$ac_ext >&5 |
| 3479 | rm -rf conftest* |
| 3480 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3481 | fi |
| 3482 | rm -f conftest* |
| 3483 | LIBS="$ac_save_LIBS" |
| 3484 | |
| 3485 | fi |
| 3486 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3487 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3488 | LIBS="-lsocket $LIBS" |
| 3489 | else |
| 3490 | echo "$ac_t""no" 1>&6 |
| 3491 | fi |
| 3492 | # SVR4 sockets |
Jeremy Hylton | cb25d5e | 2000-07-27 21:23:28 +0000 | [diff] [blame] | 3493 | ;; |
| 3494 | esac |
| 3495 | case "$ac_sys_system" in |
| 3496 | BeOS*) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3497 | echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3498 | echo "configure:3499: checking for socket in -lnet" >&5 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3499 | ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3500 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3501 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3502 | else |
| 3503 | ac_save_LIBS="$LIBS" |
| 3504 | LIBS="-lnet $LIBS $LIBS" |
| 3505 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3506 | #line 3507 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3507 | #include "confdefs.h" |
| 3508 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3509 | /* We use char because int might match the return type of a gcc2 |
| 3510 | builtin and then its argument prototype would still apply. */ |
| 3511 | char socket(); |
| 3512 | |
| 3513 | int main() { |
| 3514 | socket() |
| 3515 | ; return 0; } |
| 3516 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3517 | if { (eval echo configure:3518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3518 | rm -rf conftest* |
| 3519 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3520 | else |
| 3521 | echo "configure: failed program was:" >&5 |
| 3522 | cat conftest.$ac_ext >&5 |
| 3523 | rm -rf conftest* |
| 3524 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3525 | fi |
| 3526 | rm -f conftest* |
| 3527 | LIBS="$ac_save_LIBS" |
| 3528 | |
| 3529 | fi |
| 3530 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3531 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3532 | LIBS="-lnet $LIBS" |
| 3533 | else |
| 3534 | echo "$ac_t""no" 1>&6 |
| 3535 | fi |
| 3536 | # BeOS |
| 3537 | ;; |
| 3538 | esac |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3539 | |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3540 | echo $ac_n "checking for --with-libs""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3541 | echo "configure:3542: checking for --with-libs" >&5 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3542 | # Check whether --with-libs or --without-libs was given. |
| 3543 | if test "${with_libs+set}" = set; then |
| 3544 | withval="$with_libs" |
| 3545 | |
| 3546 | echo "$ac_t""$withval" 1>&6 |
| 3547 | LIBS="$withval $LIBS" |
| 3548 | |
| 3549 | else |
| 3550 | echo "$ac_t""no" 1>&6 |
| 3551 | fi |
| 3552 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3553 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3554 | # Determine if signalmodule should be used. |
| 3555 | |
| 3556 | |
| 3557 | echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3558 | echo "configure:3559: checking for --with-signal-module" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3559 | # Check whether --with-signal-module or --without-signal-module was given. |
| 3560 | if test "${with_signal_module+set}" = set; then |
| 3561 | withval="$with_signal_module" |
| 3562 | : |
| 3563 | fi |
| 3564 | |
| 3565 | |
| 3566 | if test -z "$with_signal_module" |
| 3567 | then with_signal_module="yes" |
| 3568 | fi |
| 3569 | echo "$ac_t""$with_signal_module" 1>&6 |
| 3570 | |
| 3571 | if test "${with_signal_module}" = "yes"; then |
| 3572 | USE_SIGNAL_MODULE="" |
| 3573 | SIGNAL_OBJS="" |
| 3574 | else |
| 3575 | USE_SIGNAL_MODULE="#" |
| 3576 | SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o" |
| 3577 | fi |
| 3578 | |
Guido van Rossum | 3d15bd8 | 2001-01-10 18:53:48 +0000 | [diff] [blame] | 3579 | # This is used to generate Setup.config |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3580 | |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3581 | USE_THREAD_MODULE="" |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3582 | |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3583 | echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3584 | echo "configure:3585: checking for --with-dec-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3585 | |
| 3586 | # Check whether --with-dec-threads or --without-dec-threads was given. |
| 3587 | if test "${with_dec_threads+set}" = set; then |
| 3588 | withval="$with_dec_threads" |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3589 | |
| 3590 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3591 | LDLAST=-threads |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3592 | if test "${with_thread+set}" != set; then |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3593 | with_thread="$withval"; |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3594 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3595 | else |
| 3596 | echo "$ac_t""no" 1>&6 |
| 3597 | fi |
| 3598 | |
| 3599 | |
| 3600 | echo $ac_n "checking for --with-threads""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3601 | echo "configure:3602: checking for --with-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3602 | # Check whether --with-threads or --without-threads was given. |
| 3603 | if test "${with_threads+set}" = set; then |
| 3604 | withval="$with_threads" |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3605 | : |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3606 | fi |
| 3607 | |
| 3608 | |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3609 | # --with-thread is deprecated, but check for it anyway |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3610 | # Check whether --with-thread or --without-thread was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3611 | if test "${with_thread+set}" = set; then |
| 3612 | withval="$with_thread" |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 3613 | |
| 3614 | with_threads=$with_thread |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3615 | fi |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3616 | |
| 3617 | |
| 3618 | if test -z "$with_threads" |
| 3619 | then with_threads="yes" |
| 3620 | fi |
| 3621 | echo "$ac_t""$with_threads" 1>&6 |
| 3622 | |
| 3623 | if test "$with_threads" = "no" |
| 3624 | then |
| 3625 | USE_THREAD_MODULE="#" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3626 | elif test "$ac_cv_pthread_is_default" = yes |
| 3627 | then |
| 3628 | cat >> confdefs.h <<\EOF |
| 3629 | #define WITH_THREAD 1 |
| 3630 | EOF |
| 3631 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3632 | # Defining _REENTRANT on system with POSIX threads should not hurt. |
| 3633 | cat >> confdefs.h <<\EOF |
| 3634 | #define _REENTRANT 1 |
| 3635 | EOF |
| 3636 | |
| 3637 | posix_threads=yes |
| 3638 | LIBOBJS="$LIBOBJS thread.o" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3639 | elif test "$ac_cv_kpthread" = "yes" |
| 3640 | then |
| 3641 | CC="$CC -Kpthread" |
| 3642 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3643 | #define WITH_THREAD 1 |
| 3644 | EOF |
| 3645 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3646 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3647 | LIBOBJS="$LIBOBJS thread.o" |
| 3648 | else |
| 3649 | if test ! -z "$with_threads" -a -d "$with_threads" |
| 3650 | then LDFLAGS="$LDFLAGS -L$with_threads" |
| 3651 | fi |
| 3652 | if test ! -z "$withval" -a -d "$withval" |
| 3653 | then LDFLAGS="$LDFLAGS -L$withval" |
| 3654 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3655 | |
| 3656 | # According to the POSIX spec, a pthreads implementation must |
| 3657 | # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?) |
| 3658 | echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3659 | echo "configure:3660: checking for _POSIX_THREADS in unistd.h" >&5 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3660 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3661 | #line 3662 "configure" |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3662 | #include "confdefs.h" |
| 3663 | #include <unistd.h> |
| 3664 | #ifdef _POSIX_THREADS |
| 3665 | yes |
| 3666 | #endif |
| 3667 | |
| 3668 | EOF |
| 3669 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 3670 | egrep "yes" >/dev/null 2>&1; then |
| 3671 | rm -rf conftest* |
| 3672 | unistd_defines_pthreads=yes |
| 3673 | else |
| 3674 | rm -rf conftest* |
| 3675 | unistd_defines_pthreads=no |
| 3676 | fi |
| 3677 | rm -f conftest* |
| 3678 | |
| 3679 | echo "$ac_t""$unistd_defines_pthreads" 1>&6 |
| 3680 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3681 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 3682 | #define _REENTRANT 1 |
| 3683 | EOF |
| 3684 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3685 | ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3686 | echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3687 | echo "configure:3688: checking for mach/cthreads.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3688 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3689 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3690 | else |
| 3691 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3692 | #line 3693 "configure" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3693 | #include "confdefs.h" |
| 3694 | #include <mach/cthreads.h> |
| 3695 | EOF |
| 3696 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3697 | { (eval echo configure:3698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3698 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3699 | if test -z "$ac_err"; then |
| 3700 | rm -rf conftest* |
| 3701 | eval "ac_cv_header_$ac_safe=yes" |
| 3702 | else |
| 3703 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3704 | echo "configure: failed program was:" >&5 |
| 3705 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3706 | rm -rf conftest* |
| 3707 | eval "ac_cv_header_$ac_safe=no" |
| 3708 | fi |
| 3709 | rm -f conftest* |
| 3710 | fi |
| 3711 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3712 | echo "$ac_t""yes" 1>&6 |
| 3713 | cat >> confdefs.h <<\EOF |
| 3714 | #define WITH_THREAD 1 |
| 3715 | EOF |
| 3716 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3717 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3718 | #define C_THREADS 1 |
| 3719 | EOF |
| 3720 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3721 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3722 | else |
| 3723 | echo "$ac_t""no" 1>&6 |
| 3724 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3725 | echo $ac_n "checking for --with-pth""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3726 | echo "configure:3727: checking for --with-pth" >&5 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3727 | # Check whether --with-pth or --without-pth was given. |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3728 | if test "${with_pth+set}" = set; then |
| 3729 | withval="$with_pth" |
| 3730 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3731 | echo "$ac_t""$withval" 1>&6 |
| 3732 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3733 | #define WITH_THREAD 1 |
| 3734 | EOF |
| 3735 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3736 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3737 | #define HAVE_PTH 1 |
| 3738 | EOF |
| 3739 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3740 | LIBS="-lpth $LIBS" |
| 3741 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3742 | else |
| 3743 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3744 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3745 | |
| 3746 | # Just looking for pthread_create in libpthread is not enough: |
| 3747 | # on HP/UX, pthread.h renames pthread_create to a different symbol name. |
| 3748 | # So we really have to include pthread.h, and then link. |
| 3749 | _libs=$LIBS |
| 3750 | LIBS="$LIBS -lpthread" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3751 | echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3752 | echo "configure:3753: checking for pthread_create in -lpthread" >&5 |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3753 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3754 | #line 3755 "configure" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3755 | #include "confdefs.h" |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3756 | #include <pthread.h> |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3757 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3758 | void * start_routine (void *arg) { exit (0); } |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3759 | int main() { |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3760 | |
| 3761 | pthread_create (NULL, NULL, start_routine, NULL) |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3762 | ; return 0; } |
| 3763 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3764 | if { (eval echo configure:3765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3765 | rm -rf conftest* |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3766 | |
| 3767 | echo "$ac_t""yes" 1>&6 |
| 3768 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3769 | #define WITH_THREAD 1 |
| 3770 | EOF |
| 3771 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3772 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3773 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3774 | else |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3775 | echo "configure: failed program was:" >&5 |
| 3776 | cat conftest.$ac_ext >&5 |
| 3777 | rm -rf conftest* |
| 3778 | |
| 3779 | LIBS=$_libs |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3780 | echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3781 | echo "configure:3782: checking for pthread_detach" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3782 | if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3783 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3784 | else |
| 3785 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3786 | #line 3787 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3787 | #include "confdefs.h" |
| 3788 | /* System header to define __stub macros and hopefully few prototypes, |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3789 | which can conflict with char pthread_detach(); below. */ |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3790 | #include <assert.h> |
| 3791 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3792 | /* We use char because int might match the return type of a gcc2 |
| 3793 | builtin and then its argument prototype would still apply. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3794 | char pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3795 | |
| 3796 | int main() { |
| 3797 | |
| 3798 | /* The GNU C library defines this for functions which it implements |
| 3799 | to always fail with ENOSYS. Some functions are actually named |
| 3800 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3801 | #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3802 | choke me |
| 3803 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3804 | pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3805 | #endif |
| 3806 | |
| 3807 | ; return 0; } |
| 3808 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3809 | if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3810 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3811 | eval "ac_cv_func_pthread_detach=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3812 | else |
| 3813 | echo "configure: failed program was:" >&5 |
| 3814 | cat conftest.$ac_ext >&5 |
| 3815 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3816 | eval "ac_cv_func_pthread_detach=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3817 | fi |
| 3818 | rm -f conftest* |
| 3819 | fi |
| 3820 | |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3821 | if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3822 | echo "$ac_t""yes" 1>&6 |
| 3823 | cat >> confdefs.h <<\EOF |
| 3824 | #define WITH_THREAD 1 |
| 3825 | EOF |
| 3826 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3827 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3828 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3829 | else |
| 3830 | echo "$ac_t""no" 1>&6 |
| 3831 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3832 | ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3833 | echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3834 | echo "configure:3835: checking for kernel/OS.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3835 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3836 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3837 | else |
| 3838 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3839 | #line 3840 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3840 | #include "confdefs.h" |
| 3841 | #include <kernel/OS.h> |
| 3842 | EOF |
| 3843 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3844 | { (eval echo configure:3845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3845 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3846 | if test -z "$ac_err"; then |
| 3847 | rm -rf conftest* |
| 3848 | eval "ac_cv_header_$ac_safe=yes" |
| 3849 | else |
| 3850 | echo "$ac_err" >&5 |
| 3851 | echo "configure: failed program was:" >&5 |
| 3852 | cat conftest.$ac_ext >&5 |
| 3853 | rm -rf conftest* |
| 3854 | eval "ac_cv_header_$ac_safe=no" |
| 3855 | fi |
| 3856 | rm -f conftest* |
| 3857 | fi |
| 3858 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3859 | echo "$ac_t""yes" 1>&6 |
| 3860 | cat >> confdefs.h <<\EOF |
| 3861 | #define WITH_THREAD 1 |
| 3862 | EOF |
| 3863 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3864 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3865 | #define BEOS_THREADS 1 |
| 3866 | EOF |
| 3867 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3868 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3869 | else |
| 3870 | echo "$ac_t""no" 1>&6 |
| 3871 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3872 | echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3873 | echo "configure:3874: checking for pthread_create in -lpthreads" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3874 | ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3875 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3876 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3877 | else |
| 3878 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3879 | LIBS="-lpthreads $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3880 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3881 | #line 3882 "configure" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3882 | #include "confdefs.h" |
| 3883 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3884 | /* We use char because int might match the return type of a gcc2 |
| 3885 | builtin and then its argument prototype would still apply. */ |
| 3886 | char pthread_create(); |
| 3887 | |
| 3888 | int main() { |
| 3889 | pthread_create() |
| 3890 | ; return 0; } |
| 3891 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3892 | if { (eval echo configure:3893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3893 | rm -rf conftest* |
| 3894 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3895 | else |
| 3896 | echo "configure: failed program was:" >&5 |
| 3897 | cat conftest.$ac_ext >&5 |
| 3898 | rm -rf conftest* |
| 3899 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3900 | fi |
| 3901 | rm -f conftest* |
| 3902 | LIBS="$ac_save_LIBS" |
| 3903 | |
| 3904 | fi |
| 3905 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3906 | echo "$ac_t""yes" 1>&6 |
| 3907 | cat >> confdefs.h <<\EOF |
| 3908 | #define WITH_THREAD 1 |
| 3909 | EOF |
| 3910 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3911 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3912 | LIBS="$LIBS -lpthreads" |
| 3913 | LIBOBJS="$LIBOBJS thread.o" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3914 | else |
| 3915 | echo "$ac_t""no" 1>&6 |
| 3916 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3917 | echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3918 | echo "configure:3919: checking for pthread_create in -lc_r" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3919 | ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3920 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3921 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3922 | else |
| 3923 | ac_save_LIBS="$LIBS" |
| 3924 | LIBS="-lc_r $LIBS" |
| 3925 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3926 | #line 3927 "configure" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3927 | #include "confdefs.h" |
| 3928 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3929 | /* We use char because int might match the return type of a gcc2 |
| 3930 | builtin and then its argument prototype would still apply. */ |
| 3931 | char pthread_create(); |
| 3932 | |
| 3933 | int main() { |
| 3934 | pthread_create() |
| 3935 | ; return 0; } |
| 3936 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3937 | if { (eval echo configure:3938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3938 | rm -rf conftest* |
| 3939 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3940 | else |
| 3941 | echo "configure: failed program was:" >&5 |
| 3942 | cat conftest.$ac_ext >&5 |
| 3943 | rm -rf conftest* |
| 3944 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3945 | fi |
| 3946 | rm -f conftest* |
| 3947 | LIBS="$ac_save_LIBS" |
| 3948 | |
| 3949 | fi |
| 3950 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3951 | echo "$ac_t""yes" 1>&6 |
| 3952 | cat >> confdefs.h <<\EOF |
| 3953 | #define WITH_THREAD 1 |
| 3954 | EOF |
| 3955 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3956 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3957 | LIBS="$LIBS -lc_r" |
| 3958 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3959 | else |
| 3960 | echo "$ac_t""no" 1>&6 |
| 3961 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3962 | echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3963 | echo "configure:3964: checking for __d6_pthread_create in -lthread" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3964 | ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3965 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3966 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3967 | else |
| 3968 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3969 | LIBS="-lthread $LIBS" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3970 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3971 | #line 3972 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3972 | #include "confdefs.h" |
| 3973 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3974 | /* We use char because int might match the return type of a gcc2 |
| 3975 | builtin and then its argument prototype would still apply. */ |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3976 | char __d6_pthread_create(); |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3977 | |
| 3978 | int main() { |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3979 | __d6_pthread_create() |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3980 | ; return 0; } |
| 3981 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 3982 | if { (eval echo configure:3983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3983 | rm -rf conftest* |
| 3984 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3985 | else |
| 3986 | echo "configure: failed program was:" >&5 |
| 3987 | cat conftest.$ac_ext >&5 |
| 3988 | rm -rf conftest* |
| 3989 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3990 | fi |
| 3991 | rm -f conftest* |
| 3992 | LIBS="$ac_save_LIBS" |
| 3993 | |
| 3994 | fi |
| 3995 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3996 | echo "$ac_t""yes" 1>&6 |
| 3997 | cat >> confdefs.h <<\EOF |
| 3998 | #define WITH_THREAD 1 |
| 3999 | EOF |
| 4000 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4001 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4002 | LIBS="$LIBS -lthread" |
| 4003 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4004 | else |
| 4005 | echo "$ac_t""no" 1>&6 |
| 4006 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4007 | echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4008 | echo "configure:4009: checking for __pthread_create_system in -lpthread" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4009 | ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` |
| 4010 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4011 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4012 | else |
| 4013 | ac_save_LIBS="$LIBS" |
| 4014 | LIBS="-lpthread $LIBS" |
| 4015 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4016 | #line 4017 "configure" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4017 | #include "confdefs.h" |
| 4018 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4019 | /* We use char because int might match the return type of a gcc2 |
| 4020 | builtin and then its argument prototype would still apply. */ |
| 4021 | char __pthread_create_system(); |
| 4022 | |
| 4023 | int main() { |
| 4024 | __pthread_create_system() |
| 4025 | ; return 0; } |
| 4026 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4027 | if { (eval echo configure:4028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4028 | rm -rf conftest* |
| 4029 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4030 | else |
| 4031 | echo "configure: failed program was:" >&5 |
| 4032 | cat conftest.$ac_ext >&5 |
| 4033 | rm -rf conftest* |
| 4034 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4035 | fi |
| 4036 | rm -f conftest* |
| 4037 | LIBS="$ac_save_LIBS" |
| 4038 | |
| 4039 | fi |
| 4040 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4041 | echo "$ac_t""yes" 1>&6 |
| 4042 | cat >> confdefs.h <<\EOF |
| 4043 | #define WITH_THREAD 1 |
| 4044 | EOF |
| 4045 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4046 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4047 | LIBS="$LIBS -lpthread" |
| 4048 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4049 | else |
| 4050 | echo "$ac_t""no" 1>&6 |
| 4051 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4052 | echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4053 | echo "configure:4054: checking for pthread_create in -lcma" >&5 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4054 | ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4055 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4056 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4057 | else |
| 4058 | ac_save_LIBS="$LIBS" |
| 4059 | LIBS="-lcma $LIBS" |
| 4060 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4061 | #line 4062 "configure" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4062 | #include "confdefs.h" |
| 4063 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4064 | /* We use char because int might match the return type of a gcc2 |
| 4065 | builtin and then its argument prototype would still apply. */ |
| 4066 | char pthread_create(); |
| 4067 | |
| 4068 | int main() { |
| 4069 | pthread_create() |
| 4070 | ; return 0; } |
| 4071 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4072 | if { (eval echo configure:4073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4073 | rm -rf conftest* |
| 4074 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4075 | else |
| 4076 | echo "configure: failed program was:" >&5 |
| 4077 | cat conftest.$ac_ext >&5 |
| 4078 | rm -rf conftest* |
| 4079 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4080 | fi |
| 4081 | rm -f conftest* |
| 4082 | LIBS="$ac_save_LIBS" |
| 4083 | |
| 4084 | fi |
| 4085 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4086 | echo "$ac_t""yes" 1>&6 |
| 4087 | cat >> confdefs.h <<\EOF |
| 4088 | #define WITH_THREAD 1 |
| 4089 | EOF |
| 4090 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4091 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4092 | LIBS="$LIBS -lcma" |
| 4093 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4094 | else |
| 4095 | echo "$ac_t""no" 1>&6 |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 4096 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4097 | USE_THREAD_MODULE="#" |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 4098 | fi |
| 4099 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4100 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4101 | fi |
| 4102 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 4103 | fi |
| 4104 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4105 | fi |
| 4106 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4107 | fi |
| 4108 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4109 | fi |
| 4110 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4111 | fi |
| 4112 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4113 | fi |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 4114 | rm -f conftest* |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4115 | fi |
| 4116 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4117 | fi |
| 4118 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4119 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4120 | if test "$posix_threads" = "yes"; then |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4121 | if test "$unistd_defines_pthreads" = "no"; then |
| 4122 | cat >> confdefs.h <<\EOF |
| 4123 | #define _POSIX_THREADS 1 |
| 4124 | EOF |
| 4125 | |
| 4126 | fi |
| 4127 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4128 | echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4129 | echo "configure:4130: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4130 | if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then |
| 4131 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4132 | else |
| 4133 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 4134 | ac_cv_pthread_system_supported=no |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4135 | else |
| 4136 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4137 | #line 4138 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4138 | #include "confdefs.h" |
| 4139 | #include <pthread.h> |
| 4140 | void *foo(void *parm) { |
| 4141 | return NULL; |
| 4142 | } |
| 4143 | main() { |
| 4144 | pthread_attr_t attr; |
| 4145 | if (pthread_attr_init(&attr)) exit(-1); |
| 4146 | if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1); |
| 4147 | if (pthread_create(NULL, &attr, foo, NULL)) exit(-1); |
| 4148 | exit(0); |
| 4149 | } |
| 4150 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4151 | if { (eval echo configure:4152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4152 | then |
| 4153 | ac_cv_pthread_system_supported=yes |
| 4154 | else |
| 4155 | echo "configure: failed program was:" >&5 |
| 4156 | cat conftest.$ac_ext >&5 |
| 4157 | rm -fr conftest* |
| 4158 | ac_cv_pthread_system_supported=no |
| 4159 | fi |
| 4160 | rm -fr conftest* |
| 4161 | fi |
| 4162 | |
| 4163 | |
| 4164 | fi |
| 4165 | |
| 4166 | echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6 |
| 4167 | if test "$ac_cv_pthread_system_supported" = "yes"; then |
| 4168 | cat >> confdefs.h <<\EOF |
| 4169 | #define PTHREAD_SYSTEM_SCHED_SUPPORTED 1 |
| 4170 | EOF |
| 4171 | |
| 4172 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4173 | for ac_func in pthread_sigmask |
| 4174 | do |
| 4175 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4176 | echo "configure:4177: checking for $ac_func" >&5 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4177 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4178 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4179 | else |
| 4180 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4181 | #line 4182 "configure" |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4182 | #include "confdefs.h" |
| 4183 | /* System header to define __stub macros and hopefully few prototypes, |
| 4184 | which can conflict with char $ac_func(); below. */ |
| 4185 | #include <assert.h> |
| 4186 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4187 | /* We use char because int might match the return type of a gcc2 |
| 4188 | builtin and then its argument prototype would still apply. */ |
| 4189 | char $ac_func(); |
| 4190 | |
| 4191 | int main() { |
| 4192 | |
| 4193 | /* The GNU C library defines this for functions which it implements |
| 4194 | to always fail with ENOSYS. Some functions are actually named |
| 4195 | something starting with __ and the normal name is an alias. */ |
| 4196 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4197 | choke me |
| 4198 | #else |
| 4199 | $ac_func(); |
| 4200 | #endif |
| 4201 | |
| 4202 | ; return 0; } |
| 4203 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4204 | if { (eval echo configure:4205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4205 | rm -rf conftest* |
| 4206 | eval "ac_cv_func_$ac_func=yes" |
| 4207 | else |
| 4208 | echo "configure: failed program was:" >&5 |
| 4209 | cat conftest.$ac_ext >&5 |
| 4210 | rm -rf conftest* |
| 4211 | eval "ac_cv_func_$ac_func=no" |
| 4212 | fi |
| 4213 | rm -f conftest* |
| 4214 | fi |
| 4215 | |
| 4216 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4217 | echo "$ac_t""yes" 1>&6 |
| 4218 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4219 | cat >> confdefs.h <<EOF |
| 4220 | #define $ac_tr_func 1 |
| 4221 | EOF |
| 4222 | |
| 4223 | else |
| 4224 | echo "$ac_t""no" 1>&6 |
| 4225 | fi |
| 4226 | done |
| 4227 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4228 | fi |
| 4229 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4230 | echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4231 | echo "configure:4232: checking for usconfig in -lmpc" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4232 | ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4233 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4234 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4235 | else |
| 4236 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4237 | LIBS="-lmpc $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4238 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4239 | #line 4240 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4240 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4241 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4242 | /* We use char because int might match the return type of a gcc2 |
| 4243 | builtin and then its argument prototype would still apply. */ |
| 4244 | char usconfig(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4245 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4246 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4247 | usconfig() |
| 4248 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4249 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4250 | if { (eval echo configure:4251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4251 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4252 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4253 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4254 | echo "configure: failed program was:" >&5 |
| 4255 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4256 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4257 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4258 | fi |
| 4259 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4260 | LIBS="$ac_save_LIBS" |
| 4261 | |
| 4262 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4263 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4264 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4265 | cat >> confdefs.h <<\EOF |
| 4266 | #define WITH_THREAD 1 |
| 4267 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4268 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4269 | LIBS="$LIBS -lmpc" |
| 4270 | LIBOBJS="$LIBOBJS thread.o" |
| 4271 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4272 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4273 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4274 | fi |
| 4275 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4276 | echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4277 | echo "configure:4278: checking for thr_create in -lthread" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4278 | ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4279 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4280 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4281 | else |
| 4282 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4283 | LIBS="-lthread $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4284 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4285 | #line 4286 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4286 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4287 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4288 | /* We use char because int might match the return type of a gcc2 |
| 4289 | builtin and then its argument prototype would still apply. */ |
| 4290 | char thr_create(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4291 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4292 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4293 | thr_create() |
| 4294 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4295 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4296 | if { (eval echo configure:4297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4297 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4298 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4299 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4300 | echo "configure: failed program was:" >&5 |
| 4301 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4302 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4303 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4304 | fi |
| 4305 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4306 | LIBS="$ac_save_LIBS" |
| 4307 | |
| 4308 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4309 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4310 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4311 | cat >> confdefs.h <<\EOF |
| 4312 | #define WITH_THREAD 1 |
| 4313 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4314 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4315 | LIBS="$LIBS -lthread" |
| 4316 | LIBOBJS="$LIBOBJS thread.o" |
| 4317 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4318 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4319 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4320 | fi |
| 4321 | |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4322 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4323 | if test "$USE_THREAD_MODULE" != "#" |
| 4324 | then |
| 4325 | # If the above checks didn't disable threads, (at least) OSF1 |
| 4326 | # needs this '-threads' argument during linking. |
| 4327 | case $ac_sys_system in |
| 4328 | OSF1) LDLAST=-threads;; |
| 4329 | esac |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4330 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4331 | fi |
| 4332 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4333 | # Check for enable-ipv6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4334 | echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4335 | echo "configure:4336: checking if --enable-ipv6 is specified" >&5 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4336 | # Check whether --enable-ipv6 or --disable-ipv6 was given. |
| 4337 | if test "${enable_ipv6+set}" = set; then |
| 4338 | enableval="$enable_ipv6" |
| 4339 | case "$enableval" in |
| 4340 | no) |
| 4341 | echo "$ac_t""no" 1>&6 |
| 4342 | ipv6=no |
| 4343 | ;; |
| 4344 | *) echo "$ac_t""yes" 1>&6 |
| 4345 | cat >> confdefs.h <<\EOF |
| 4346 | #define ENABLE_IPV6 1 |
| 4347 | EOF |
| 4348 | |
| 4349 | ipv6=yes |
| 4350 | ;; |
| 4351 | esac |
| 4352 | else |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4353 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4354 | if test "$cross_compiling" = yes; then |
| 4355 | echo "$ac_t""no" 1>&6 |
| 4356 | ipv6=no |
| 4357 | |
| 4358 | else |
| 4359 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4360 | #line 4361 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4361 | #include "confdefs.h" |
| 4362 | /* AF_INET6 available check */ |
| 4363 | #include <sys/types.h> |
| 4364 | #include <sys/socket.h> |
| 4365 | main() |
| 4366 | { |
| 4367 | if (socket(AF_INET6, SOCK_STREAM, 0) < 0) |
| 4368 | exit(1); |
| 4369 | else |
| 4370 | exit(0); |
| 4371 | } |
| 4372 | |
| 4373 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4374 | if { (eval echo configure:4375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4375 | then |
| 4376 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4377 | ipv6=yes |
| 4378 | else |
| 4379 | echo "configure: failed program was:" >&5 |
| 4380 | cat conftest.$ac_ext >&5 |
| 4381 | rm -fr conftest* |
| 4382 | echo "$ac_t""no" 1>&6 |
| 4383 | ipv6=no |
| 4384 | fi |
| 4385 | rm -fr conftest* |
| 4386 | fi |
| 4387 | |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4388 | |
| 4389 | if test "$ipv6" = "yes"; then |
| 4390 | echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4391 | echo "configure:4392: checking if RFC2553 API is available" >&5 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4392 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4393 | #line 4394 "configure" |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4394 | #include "confdefs.h" |
| 4395 | #include <sys/types.h> |
| 4396 | #include <netinet/in.h> |
| 4397 | int main() { |
| 4398 | struct sockaddr_in6 x; |
| 4399 | x.sin6_scope_id; |
| 4400 | ; return 0; } |
| 4401 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4402 | if { (eval echo configure:4403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4403 | rm -rf conftest* |
| 4404 | echo "$ac_t""yes" 1>&6 |
| 4405 | ipv6=yes |
| 4406 | else |
| 4407 | echo "configure: failed program was:" >&5 |
| 4408 | cat conftest.$ac_ext >&5 |
| 4409 | rm -rf conftest* |
| 4410 | echo "$ac_t""no" 1>&6 |
| 4411 | ipv6=no |
| 4412 | fi |
| 4413 | rm -f conftest* |
| 4414 | fi |
| 4415 | |
| 4416 | if test "$ipv6" = "yes"; then |
| 4417 | cat >> confdefs.h <<\EOF |
| 4418 | #define ENABLE_IPV6 1 |
| 4419 | EOF |
| 4420 | |
| 4421 | fi |
| 4422 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4423 | fi |
| 4424 | |
| 4425 | |
| 4426 | ipv6type=unknown |
| 4427 | ipv6lib=none |
| 4428 | ipv6trylibc=no |
| 4429 | |
| 4430 | if test "$ipv6" = "yes"; then |
| 4431 | echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4432 | echo "configure:4433: checking ipv6 stack type" >&5 |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 4433 | for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; |
| 4434 | do |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4435 | case $i in |
| 4436 | inria) |
| 4437 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4438 | #line 4439 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4439 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4440 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4441 | #include <netinet/in.h> |
| 4442 | #ifdef IPV6_INRIA_VERSION |
| 4443 | yes |
| 4444 | #endif |
| 4445 | EOF |
| 4446 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4447 | egrep "yes" >/dev/null 2>&1; then |
| 4448 | rm -rf conftest* |
| 4449 | ipv6type=$i; |
| 4450 | OPT="-DINET6 $OPT" |
| 4451 | fi |
| 4452 | rm -f conftest* |
| 4453 | |
| 4454 | ;; |
| 4455 | kame) |
| 4456 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4457 | #line 4458 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4458 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4459 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4460 | #include <netinet/in.h> |
| 4461 | #ifdef __KAME__ |
| 4462 | yes |
| 4463 | #endif |
| 4464 | EOF |
| 4465 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4466 | egrep "yes" >/dev/null 2>&1; then |
| 4467 | rm -rf conftest* |
| 4468 | ipv6type=$i; |
| 4469 | ipv6lib=inet6 |
| 4470 | ipv6libdir=/usr/local/v6/lib |
| 4471 | ipv6trylibc=yes |
| 4472 | OPT="-DINET6 $OPT" |
| 4473 | fi |
| 4474 | rm -f conftest* |
| 4475 | |
| 4476 | ;; |
| 4477 | linux-glibc) |
| 4478 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4479 | #line 4480 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4480 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4481 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4482 | #include <features.h> |
| 4483 | #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) |
| 4484 | yes |
| 4485 | #endif |
| 4486 | EOF |
| 4487 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4488 | egrep "yes" >/dev/null 2>&1; then |
| 4489 | rm -rf conftest* |
| 4490 | ipv6type=$i; |
| 4491 | ipv6trylibc=yes |
| 4492 | OPT="-DINET6 $OPT" |
| 4493 | fi |
| 4494 | rm -f conftest* |
| 4495 | |
| 4496 | ;; |
| 4497 | linux-inet6) |
| 4498 | if test -d /usr/inet6; then |
| 4499 | ipv6type=$i |
| 4500 | ipv6lib=inet6 |
| 4501 | ipv6libdir=/usr/inet6/lib |
| 4502 | OPT="-DINET6 -I/usr/inet6/include $OPT" |
| 4503 | fi |
| 4504 | ;; |
| 4505 | solaris) |
| 4506 | if test -f /etc/netconfig; then |
| 4507 | if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then |
| 4508 | ipv6type=$i |
| 4509 | ipv6trylibc=yes |
| 4510 | OPT="-DINET6 $OPT" |
| 4511 | fi |
| 4512 | fi |
| 4513 | ;; |
| 4514 | toshiba) |
| 4515 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4516 | #line 4517 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4517 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4518 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4519 | #include <sys/param.h> |
| 4520 | #ifdef _TOSHIBA_INET6 |
| 4521 | yes |
| 4522 | #endif |
| 4523 | EOF |
| 4524 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4525 | egrep "yes" >/dev/null 2>&1; then |
| 4526 | rm -rf conftest* |
| 4527 | ipv6type=$i; |
| 4528 | ipv6lib=inet6; |
| 4529 | ipv6libdir=/usr/local/v6/lib; |
| 4530 | OPT="-DINET6 $OPT" |
| 4531 | fi |
| 4532 | rm -f conftest* |
| 4533 | |
| 4534 | ;; |
| 4535 | v6d) |
| 4536 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4537 | #line 4538 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4538 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4539 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4540 | #include </usr/local/v6/include/sys/v6config.h> |
| 4541 | #ifdef __V6D__ |
| 4542 | yes |
| 4543 | #endif |
| 4544 | EOF |
| 4545 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4546 | egrep "yes" >/dev/null 2>&1; then |
| 4547 | rm -rf conftest* |
| 4548 | ipv6type=$i; |
| 4549 | ipv6lib=v6; |
| 4550 | ipv6libdir=/usr/local/v6/lib; |
| 4551 | OPT="-I/usr/local/v6/include $OPT" |
| 4552 | fi |
| 4553 | rm -f conftest* |
| 4554 | |
| 4555 | ;; |
| 4556 | zeta) |
| 4557 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4558 | #line 4559 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4559 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4560 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4561 | #include <sys/param.h> |
| 4562 | #ifdef _ZETA_MINAMI_INET6 |
| 4563 | yes |
| 4564 | #endif |
| 4565 | EOF |
| 4566 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4567 | egrep "yes" >/dev/null 2>&1; then |
| 4568 | rm -rf conftest* |
| 4569 | ipv6type=$i; |
| 4570 | ipv6lib=inet6; |
| 4571 | ipv6libdir=/usr/local/v6/lib; |
| 4572 | OPT="-DINET6 $OPT" |
| 4573 | fi |
| 4574 | rm -f conftest* |
| 4575 | |
| 4576 | ;; |
| 4577 | esac |
| 4578 | if test "$ipv6type" != "unknown"; then |
| 4579 | break |
| 4580 | fi |
| 4581 | done |
| 4582 | echo "$ac_t""$ipv6type" 1>&6 |
| 4583 | fi |
| 4584 | |
| 4585 | if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then |
| 4586 | if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then |
| 4587 | LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" |
| 4588 | echo "using lib$ipv6lib" |
| 4589 | else |
| 4590 | if test $ipv6trylibc = "yes"; then |
| 4591 | echo "using libc" |
| 4592 | else |
| 4593 | echo 'Fatal: no $ipv6lib library found. cannot continue.' |
| 4594 | echo "You need to fetch lib$ipv6lib.a from appropriate" |
| 4595 | echo 'ipv6 kit and compile beforehand.' |
| 4596 | exit 1 |
| 4597 | fi |
| 4598 | fi |
| 4599 | fi |
| 4600 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4601 | # Check for GC support |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4602 | echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4603 | echo "configure:4604: checking for --with-cycle-gc" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4604 | # Check whether --with-cycle-gc or --without-cycle-gc was given. |
| 4605 | if test "${with_cycle_gc+set}" = set; then |
| 4606 | withval="$with_cycle_gc" |
| 4607 | : |
| 4608 | fi |
| 4609 | |
| 4610 | |
| 4611 | if test -z "$with_cycle_gc" |
| 4612 | then with_cycle_gc="yes" |
| 4613 | fi |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame] | 4614 | if test "$with_cycle_gc" != "no" |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4615 | then |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4616 | cat >> confdefs.h <<\EOF |
| 4617 | #define WITH_CYCLE_GC 1 |
| 4618 | EOF |
| 4619 | |
| 4620 | fi |
| 4621 | echo "$ac_t""$with_cycle_gc" 1>&6 |
| 4622 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4623 | # Check for Python-specific malloc support |
| 4624 | echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4625 | echo "configure:4626: checking for --with-pymalloc" >&5 |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4626 | # Check whether --with-pymalloc or --without-pymalloc was given. |
| 4627 | if test "${with_pymalloc+set}" = set; then |
| 4628 | withval="$with_pymalloc" |
| 4629 | |
| 4630 | if test "$withval" != no |
| 4631 | then cat >> confdefs.h <<\EOF |
| 4632 | #define WITH_PYMALLOC 1 |
| 4633 | EOF |
| 4634 | echo "$ac_t""yes" 1>&6 |
| 4635 | else echo "$ac_t""no" 1>&6 |
| 4636 | fi |
| 4637 | else |
| 4638 | echo "$ac_t""no" 1>&6 |
| 4639 | fi |
| 4640 | |
| 4641 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4642 | # Check for --with-wctype-functions |
| 4643 | echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4644 | echo "configure:4645: checking for --with-wctype-functions" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4645 | # Check whether --with-wctype-functions or --without-wctype-functions was given. |
| 4646 | if test "${with_wctype_functions+set}" = set; then |
| 4647 | withval="$with_wctype_functions" |
| 4648 | |
| 4649 | if test "$withval" != no |
| 4650 | then cat >> confdefs.h <<\EOF |
| 4651 | #define WANT_WCTYPE_FUNCTIONS 1 |
| 4652 | EOF |
| 4653 | echo "$ac_t""yes" 1>&6 |
| 4654 | else echo "$ac_t""no" 1>&6 |
| 4655 | fi |
| 4656 | else |
| 4657 | echo "$ac_t""no" 1>&6 |
| 4658 | fi |
| 4659 | |
| 4660 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4661 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4662 | |
Guido van Rossum | 98935bf | 2001-09-05 19:13:16 +0000 | [diff] [blame] | 4663 | DLINCLDIR=. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4664 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4665 | echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4666 | echo "configure:4667: checking for --with-sgi-dl" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4667 | # Check whether --with-sgi-dl or --without-sgi-dl was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4668 | if test "${with_sgi_dl+set}" = set; then |
| 4669 | withval="$with_sgi_dl" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4670 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4671 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4672 | cat >> confdefs.h <<\EOF |
| 4673 | #define WITH_SGI_DL 1 |
| 4674 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4675 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4676 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4677 | dldir=$withval |
Guido van Rossum | 4095101 | 2000-10-07 16:21:27 +0000 | [diff] [blame] | 4678 | if test ! -z "$dldir" -a -d "$dldir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 4679 | then LDFLAGS="$LDFLAGS -L$dldir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4680 | else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4681 | fi |
| 4682 | DLINCLDIR=${dldir} |
| 4683 | LIBS="$LIBS -ldl -lmld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4684 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4685 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4686 | fi |
| 4687 | |
| 4688 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4689 | echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4690 | echo "configure:4691: checking for --with-dl-dld" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4691 | # Check whether --with-dl-dld or --without-dl-dld was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4692 | if test "${with_dl_dld+set}" = set; then |
| 4693 | withval="$with_dl_dld" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4694 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4695 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4696 | cat >> confdefs.h <<\EOF |
| 4697 | #define WITH_DL_DLD 1 |
| 4698 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4699 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4700 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4701 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 4702 | dlddir=`echo "$withval" | sed 's/.*,//'` |
Barry Warsaw | 7d1219d | 2000-10-05 18:45:53 +0000 | [diff] [blame] | 4703 | if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 4704 | then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4705 | else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4706 | fi |
| 4707 | DLINCLDIR=${dldir} |
| 4708 | LIBS="$LIBS -ldl -ldld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4709 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4710 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4711 | fi |
| 4712 | |
| 4713 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4714 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 4715 | # platforms, such as AIX, have dlopen(), but don't want to use it. |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4716 | for ac_func in dlopen |
| 4717 | do |
| 4718 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4719 | echo "configure:4720: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4720 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4721 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4722 | else |
| 4723 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4724 | #line 4725 "configure" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4725 | #include "confdefs.h" |
| 4726 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4727 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4728 | #include <assert.h> |
| 4729 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4730 | /* We use char because int might match the return type of a gcc2 |
| 4731 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4732 | char $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4733 | |
| 4734 | int main() { |
| 4735 | |
| 4736 | /* The GNU C library defines this for functions which it implements |
| 4737 | to always fail with ENOSYS. Some functions are actually named |
| 4738 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4739 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4740 | choke me |
| 4741 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4742 | $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4743 | #endif |
| 4744 | |
| 4745 | ; return 0; } |
| 4746 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4747 | if { (eval echo configure:4748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4748 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4749 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4750 | else |
| 4751 | echo "configure: failed program was:" >&5 |
| 4752 | cat conftest.$ac_ext >&5 |
| 4753 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4754 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4755 | fi |
| 4756 | rm -f conftest* |
| 4757 | fi |
| 4758 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4759 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4760 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4761 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4762 | cat >> confdefs.h <<EOF |
| 4763 | #define $ac_tr_func 1 |
| 4764 | EOF |
| 4765 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4766 | else |
| 4767 | echo "$ac_t""no" 1>&6 |
| 4768 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4769 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4770 | |
| 4771 | |
| 4772 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 4773 | # loading of modules. |
| 4774 | |
| 4775 | echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4776 | echo "configure:4777: checking DYNLOADFILE" >&5 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4777 | if test -z "$DYNLOADFILE" |
| 4778 | then |
| 4779 | case $ac_sys_system/$ac_sys_release in |
| 4780 | AIX*) DYNLOADFILE="dynload_aix.o";; |
| 4781 | BeOS*) DYNLOADFILE="dynload_beos.o";; |
| 4782 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4783 | Darwin/*) DYNLOADFILE="dynload_next.o";; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4784 | *) |
| 4785 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 4786 | # out any dynamic loading |
| 4787 | if test "$ac_cv_func_dlopen" = yes |
| 4788 | then DYNLOADFILE="dynload_shlib.o" |
| 4789 | else DYNLOADFILE="dynload_stub.o" |
| 4790 | fi |
| 4791 | ;; |
| 4792 | esac |
| 4793 | fi |
| 4794 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
| 4795 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 4796 | then |
| 4797 | cat >> confdefs.h <<\EOF |
| 4798 | #define HAVE_DYNAMIC_LOADING 1 |
| 4799 | EOF |
| 4800 | |
| 4801 | fi |
| 4802 | |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4803 | # MACHDEP_OBJS can be set to platform-specific object files needed by Python |
| 4804 | |
| 4805 | |
| 4806 | echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4807 | echo "configure:4808: checking MACHDEP_OBJS" >&5 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4808 | if test -z "$MACHDEP_OBJS" |
| 4809 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4810 | MACHDEP_OBJS=$extra_machdep_objs |
| 4811 | else |
| 4812 | MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4813 | fi |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4814 | echo "$ac_t""MACHDEP_OBJS" 1>&6 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4815 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4816 | # checks for library functions |
Martin v. Löwis | 244edc8 | 2001-10-04 22:44:26 +0000 | [diff] [blame] | 4817 | for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4818 | flock fork fsync fdatasync fpathconf ftime ftruncate \ |
Martin v. Löwis | f95dd0a | 2001-08-15 17:14:33 +0000 | [diff] [blame] | 4819 | gai_strerror getgroups getlogin getpeername getpid getpwent getwd \ |
Martin v. Löwis | 864e9ff | 2001-08-04 22:32:03 +0000 | [diff] [blame] | 4820 | hstrerror inet_pton kill link lstat mkfifo mktime mremap \ |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 4821 | nice pathconf pause plock poll pthread_init \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4822 | putenv readlink \ |
Martin v. Löwis | 61c5edf | 2001-10-18 04:06:00 +0000 | [diff] [blame] | 4823 | select setegid seteuid setgid setgroups \ |
Martin v. Löwis | 791bfda | 2001-07-24 06:33:08 +0000 | [diff] [blame] | 4824 | setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4825 | sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ |
Fred Drake | 89143df | 1999-12-09 22:03:25 +0000 | [diff] [blame] | 4826 | tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Thomas Wouters | c2c12dc | 2001-07-11 14:45:34 +0000 | [diff] [blame] | 4827 | truncate uname waitpid _getpty getpriority |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4828 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4829 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4830 | echo "configure:4831: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4831 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4832 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4833 | else |
| 4834 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4835 | #line 4836 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4836 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4837 | /* System header to define __stub macros and hopefully few prototypes, |
| 4838 | which can conflict with char $ac_func(); below. */ |
| 4839 | #include <assert.h> |
| 4840 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4841 | /* We use char because int might match the return type of a gcc2 |
| 4842 | builtin and then its argument prototype would still apply. */ |
| 4843 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4844 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4845 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4846 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4847 | /* The GNU C library defines this for functions which it implements |
| 4848 | to always fail with ENOSYS. Some functions are actually named |
| 4849 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4850 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4851 | choke me |
| 4852 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4853 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4854 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4855 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4856 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4857 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4858 | if { (eval echo configure:4859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4859 | rm -rf conftest* |
| 4860 | eval "ac_cv_func_$ac_func=yes" |
| 4861 | else |
| 4862 | echo "configure: failed program was:" >&5 |
| 4863 | cat conftest.$ac_ext >&5 |
| 4864 | rm -rf conftest* |
| 4865 | eval "ac_cv_func_$ac_func=no" |
| 4866 | fi |
| 4867 | rm -f conftest* |
| 4868 | fi |
| 4869 | |
| 4870 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4871 | echo "$ac_t""yes" 1>&6 |
| 4872 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4873 | cat >> confdefs.h <<EOF |
| 4874 | #define $ac_tr_func 1 |
| 4875 | EOF |
| 4876 | |
| 4877 | else |
| 4878 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4879 | fi |
| 4880 | done |
| 4881 | |
| 4882 | |
| 4883 | # check for openpty and forkpty |
| 4884 | |
| 4885 | for ac_func in openpty |
| 4886 | do |
| 4887 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4888 | echo "configure:4889: checking for $ac_func" >&5 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4889 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4890 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4891 | else |
| 4892 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4893 | #line 4894 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4894 | #include "confdefs.h" |
| 4895 | /* System header to define __stub macros and hopefully few prototypes, |
| 4896 | which can conflict with char $ac_func(); below. */ |
| 4897 | #include <assert.h> |
| 4898 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4899 | /* We use char because int might match the return type of a gcc2 |
| 4900 | builtin and then its argument prototype would still apply. */ |
| 4901 | char $ac_func(); |
| 4902 | |
| 4903 | int main() { |
| 4904 | |
| 4905 | /* The GNU C library defines this for functions which it implements |
| 4906 | to always fail with ENOSYS. Some functions are actually named |
| 4907 | something starting with __ and the normal name is an alias. */ |
| 4908 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4909 | choke me |
| 4910 | #else |
| 4911 | $ac_func(); |
| 4912 | #endif |
| 4913 | |
| 4914 | ; return 0; } |
| 4915 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4916 | if { (eval echo configure:4917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4917 | rm -rf conftest* |
| 4918 | eval "ac_cv_func_$ac_func=yes" |
| 4919 | else |
| 4920 | echo "configure: failed program was:" >&5 |
| 4921 | cat conftest.$ac_ext >&5 |
| 4922 | rm -rf conftest* |
| 4923 | eval "ac_cv_func_$ac_func=no" |
| 4924 | fi |
| 4925 | rm -f conftest* |
| 4926 | fi |
| 4927 | |
| 4928 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4929 | echo "$ac_t""yes" 1>&6 |
| 4930 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4931 | cat >> confdefs.h <<EOF |
| 4932 | #define $ac_tr_func 1 |
| 4933 | EOF |
| 4934 | |
| 4935 | else |
| 4936 | echo "$ac_t""no" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4937 | echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4938 | echo "configure:4939: checking for openpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4939 | ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4940 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4941 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4942 | else |
| 4943 | ac_save_LIBS="$LIBS" |
| 4944 | LIBS="-lutil $LIBS" |
| 4945 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4946 | #line 4947 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4947 | #include "confdefs.h" |
| 4948 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4949 | /* We use char because int might match the return type of a gcc2 |
| 4950 | builtin and then its argument prototype would still apply. */ |
| 4951 | char openpty(); |
| 4952 | |
| 4953 | int main() { |
| 4954 | openpty() |
| 4955 | ; return 0; } |
| 4956 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4957 | if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4958 | rm -rf conftest* |
| 4959 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4960 | else |
| 4961 | echo "configure: failed program was:" >&5 |
| 4962 | cat conftest.$ac_ext >&5 |
| 4963 | rm -rf conftest* |
| 4964 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4965 | fi |
| 4966 | rm -f conftest* |
| 4967 | LIBS="$ac_save_LIBS" |
| 4968 | |
| 4969 | fi |
| 4970 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4971 | echo "$ac_t""yes" 1>&6 |
| 4972 | cat >> confdefs.h <<\EOF |
| 4973 | #define HAVE_OPENPTY 1 |
| 4974 | EOF |
| 4975 | LIBS="$LIBS -lutil" |
| 4976 | else |
| 4977 | echo "$ac_t""no" 1>&6 |
| 4978 | fi |
| 4979 | |
| 4980 | fi |
| 4981 | done |
| 4982 | |
| 4983 | for ac_func in forkpty |
| 4984 | do |
| 4985 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4986 | echo "configure:4987: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4987 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4988 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4989 | else |
| 4990 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 4991 | #line 4992 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4992 | #include "confdefs.h" |
| 4993 | /* System header to define __stub macros and hopefully few prototypes, |
| 4994 | which can conflict with char $ac_func(); below. */ |
| 4995 | #include <assert.h> |
| 4996 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4997 | /* We use char because int might match the return type of a gcc2 |
| 4998 | builtin and then its argument prototype would still apply. */ |
| 4999 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5000 | |
| 5001 | int main() { |
| 5002 | |
| 5003 | /* The GNU C library defines this for functions which it implements |
| 5004 | to always fail with ENOSYS. Some functions are actually named |
| 5005 | something starting with __ and the normal name is an alias. */ |
| 5006 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5007 | choke me |
| 5008 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5009 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5010 | #endif |
| 5011 | |
| 5012 | ; return 0; } |
| 5013 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5014 | if { (eval echo configure:5015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5015 | rm -rf conftest* |
| 5016 | eval "ac_cv_func_$ac_func=yes" |
| 5017 | else |
| 5018 | echo "configure: failed program was:" >&5 |
| 5019 | cat conftest.$ac_ext >&5 |
| 5020 | rm -rf conftest* |
| 5021 | eval "ac_cv_func_$ac_func=no" |
| 5022 | fi |
| 5023 | rm -f conftest* |
| 5024 | fi |
| 5025 | |
| 5026 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5027 | echo "$ac_t""yes" 1>&6 |
| 5028 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5029 | cat >> confdefs.h <<EOF |
| 5030 | #define $ac_tr_func 1 |
| 5031 | EOF |
| 5032 | |
| 5033 | else |
| 5034 | echo "$ac_t""no" 1>&6 |
| 5035 | echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5036 | echo "configure:5037: checking for forkpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5037 | ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5038 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5039 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5040 | else |
| 5041 | ac_save_LIBS="$LIBS" |
| 5042 | LIBS="-lutil $LIBS" |
| 5043 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5044 | #line 5045 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5045 | #include "confdefs.h" |
| 5046 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5047 | /* We use char because int might match the return type of a gcc2 |
| 5048 | builtin and then its argument prototype would still apply. */ |
| 5049 | char forkpty(); |
| 5050 | |
| 5051 | int main() { |
| 5052 | forkpty() |
| 5053 | ; return 0; } |
| 5054 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5055 | if { (eval echo configure:5056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5056 | rm -rf conftest* |
| 5057 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 5058 | else |
| 5059 | echo "configure: failed program was:" >&5 |
| 5060 | cat conftest.$ac_ext >&5 |
| 5061 | rm -rf conftest* |
| 5062 | eval "ac_cv_lib_$ac_lib_var=no" |
| 5063 | fi |
| 5064 | rm -f conftest* |
| 5065 | LIBS="$ac_save_LIBS" |
| 5066 | |
| 5067 | fi |
| 5068 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5069 | echo "$ac_t""yes" 1>&6 |
| 5070 | cat >> confdefs.h <<\EOF |
| 5071 | #define HAVE_FORKPTY 1 |
| 5072 | EOF |
| 5073 | LIBS="$LIBS -lutil" |
| 5074 | else |
| 5075 | echo "$ac_t""no" 1>&6 |
| 5076 | fi |
| 5077 | |
| 5078 | fi |
| 5079 | done |
| 5080 | |
| 5081 | |
| 5082 | # check for long file support functions |
| 5083 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
| 5084 | do |
| 5085 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5086 | echo "configure:5087: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5087 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5088 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5089 | else |
| 5090 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5091 | #line 5092 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5092 | #include "confdefs.h" |
| 5093 | /* System header to define __stub macros and hopefully few prototypes, |
| 5094 | which can conflict with char $ac_func(); below. */ |
| 5095 | #include <assert.h> |
| 5096 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5097 | /* We use char because int might match the return type of a gcc2 |
| 5098 | builtin and then its argument prototype would still apply. */ |
| 5099 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5100 | |
| 5101 | int main() { |
| 5102 | |
| 5103 | /* The GNU C library defines this for functions which it implements |
| 5104 | to always fail with ENOSYS. Some functions are actually named |
| 5105 | something starting with __ and the normal name is an alias. */ |
| 5106 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5107 | choke me |
| 5108 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5109 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5110 | #endif |
| 5111 | |
| 5112 | ; return 0; } |
| 5113 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5114 | if { (eval echo configure:5115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5115 | rm -rf conftest* |
| 5116 | eval "ac_cv_func_$ac_func=yes" |
| 5117 | else |
| 5118 | echo "configure: failed program was:" >&5 |
| 5119 | cat conftest.$ac_ext >&5 |
| 5120 | rm -rf conftest* |
| 5121 | eval "ac_cv_func_$ac_func=no" |
| 5122 | fi |
| 5123 | rm -f conftest* |
| 5124 | fi |
| 5125 | |
| 5126 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5127 | echo "$ac_t""yes" 1>&6 |
| 5128 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5129 | cat >> confdefs.h <<EOF |
| 5130 | #define $ac_tr_func 1 |
| 5131 | EOF |
| 5132 | |
| 5133 | else |
| 5134 | echo "$ac_t""no" 1>&6 |
| 5135 | fi |
| 5136 | done |
| 5137 | |
| 5138 | |
| 5139 | for ac_func in dup2 getcwd strdup strerror memmove |
| 5140 | do |
| 5141 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5142 | echo "configure:5143: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5143 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5144 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5145 | else |
| 5146 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5147 | #line 5148 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5148 | #include "confdefs.h" |
| 5149 | /* System header to define __stub macros and hopefully few prototypes, |
| 5150 | which can conflict with char $ac_func(); below. */ |
| 5151 | #include <assert.h> |
| 5152 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5153 | /* We use char because int might match the return type of a gcc2 |
| 5154 | builtin and then its argument prototype would still apply. */ |
| 5155 | char $ac_func(); |
| 5156 | |
| 5157 | int main() { |
| 5158 | |
| 5159 | /* The GNU C library defines this for functions which it implements |
| 5160 | to always fail with ENOSYS. Some functions are actually named |
| 5161 | something starting with __ and the normal name is an alias. */ |
| 5162 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5163 | choke me |
| 5164 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5165 | $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5166 | #endif |
| 5167 | |
| 5168 | ; return 0; } |
| 5169 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5170 | if { (eval echo configure:5171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5171 | rm -rf conftest* |
| 5172 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5173 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5174 | echo "configure: failed program was:" >&5 |
| 5175 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5176 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5177 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5178 | fi |
| 5179 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5180 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5181 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5182 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5183 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5184 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5185 | cat >> confdefs.h <<EOF |
| 5186 | #define $ac_tr_func 1 |
| 5187 | EOF |
| 5188 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5189 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5190 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 5191 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5192 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5193 | done |
| 5194 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5195 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5196 | for ac_func in getpgrp |
| 5197 | do |
| 5198 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5199 | echo "configure:5200: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5200 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5201 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5202 | else |
| 5203 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5204 | #line 5205 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5205 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5206 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5207 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5208 | #include <assert.h> |
| 5209 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5210 | /* We use char because int might match the return type of a gcc2 |
| 5211 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5212 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5213 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5214 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5215 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5216 | /* The GNU C library defines this for functions which it implements |
| 5217 | to always fail with ENOSYS. Some functions are actually named |
| 5218 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5219 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5220 | choke me |
| 5221 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5222 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5223 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5224 | |
| 5225 | ; return 0; } |
| 5226 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5227 | if { (eval echo configure:5228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5228 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5229 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5230 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5231 | echo "configure: failed program was:" >&5 |
| 5232 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5233 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5234 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5235 | fi |
| 5236 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5237 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5238 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5239 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5240 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5241 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5242 | cat >> confdefs.h <<EOF |
| 5243 | #define $ac_tr_func 1 |
| 5244 | EOF |
| 5245 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5246 | #line 5247 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5247 | #include "confdefs.h" |
| 5248 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5249 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5250 | getpgrp(0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5251 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5252 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5253 | if { (eval echo configure:5254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5254 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5255 | cat >> confdefs.h <<\EOF |
| 5256 | #define GETPGRP_HAVE_ARG 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5257 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5258 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5259 | else |
| 5260 | echo "configure: failed program was:" >&5 |
| 5261 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5262 | fi |
| 5263 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5264 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5265 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5266 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5267 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5268 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5269 | for ac_func in setpgrp |
| 5270 | do |
| 5271 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5272 | echo "configure:5273: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5273 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5274 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5275 | else |
| 5276 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5277 | #line 5278 "configure" |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5278 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5279 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5280 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5281 | #include <assert.h> |
| 5282 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5283 | /* We use char because int might match the return type of a gcc2 |
| 5284 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5285 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5286 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5287 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5288 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5289 | /* The GNU C library defines this for functions which it implements |
| 5290 | to always fail with ENOSYS. Some functions are actually named |
| 5291 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5292 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5293 | choke me |
| 5294 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5295 | $ac_func(); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5296 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5297 | |
| 5298 | ; return 0; } |
| 5299 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5300 | if { (eval echo configure:5301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5301 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5302 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5303 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5304 | echo "configure: failed program was:" >&5 |
| 5305 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5306 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5307 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5308 | fi |
| 5309 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5310 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5311 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5312 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5313 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5314 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5315 | cat >> confdefs.h <<EOF |
| 5316 | #define $ac_tr_func 1 |
| 5317 | EOF |
| 5318 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5319 | #line 5320 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5320 | #include "confdefs.h" |
| 5321 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5322 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5323 | setpgrp(0,0); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5324 | ; return 0; } |
| 5325 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5326 | if { (eval echo configure:5327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5327 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5328 | cat >> confdefs.h <<\EOF |
| 5329 | #define SETPGRP_HAVE_ARG 1 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5330 | EOF |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5331 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5332 | else |
| 5333 | echo "configure: failed program was:" >&5 |
| 5334 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5335 | fi |
| 5336 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5337 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5338 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5339 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5340 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5341 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5342 | for ac_func in gettimeofday |
| 5343 | do |
| 5344 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5345 | echo "configure:5346: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5346 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5347 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5348 | else |
| 5349 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5350 | #line 5351 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5351 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5352 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5353 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5354 | #include <assert.h> |
| 5355 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5356 | /* We use char because int might match the return type of a gcc2 |
| 5357 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5358 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5359 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5360 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5361 | |
| 5362 | /* The GNU C library defines this for functions which it implements |
| 5363 | to always fail with ENOSYS. Some functions are actually named |
| 5364 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5365 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5366 | choke me |
| 5367 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5368 | $ac_func(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5369 | #endif |
| 5370 | |
| 5371 | ; return 0; } |
| 5372 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5373 | if { (eval echo configure:5374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5374 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5375 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5376 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5377 | echo "configure: failed program was:" >&5 |
| 5378 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5379 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5380 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5381 | fi |
| 5382 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5383 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5384 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5385 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5386 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5387 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5388 | cat >> confdefs.h <<EOF |
| 5389 | #define $ac_tr_func 1 |
| 5390 | EOF |
| 5391 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5392 | #line 5393 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5393 | #include "confdefs.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5394 | #include <sys/time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5395 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5396 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
| 5397 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5398 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5399 | if { (eval echo configure:5400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5400 | : |
| 5401 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5402 | echo "configure: failed program was:" >&5 |
| 5403 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5404 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5405 | cat >> confdefs.h <<\EOF |
| 5406 | #define GETTIMEOFDAY_NO_TZ 1 |
| 5407 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5408 | |
| 5409 | fi |
| 5410 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5411 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5412 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5413 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5414 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5415 | |
| 5416 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5417 | for ac_func in getaddrinfo |
| 5418 | do |
| 5419 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5420 | echo "configure:5421: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5421 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5422 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5423 | else |
| 5424 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5425 | #line 5426 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5426 | #include "confdefs.h" |
| 5427 | /* System header to define __stub macros and hopefully few prototypes, |
| 5428 | which can conflict with char $ac_func(); below. */ |
| 5429 | #include <assert.h> |
| 5430 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5431 | /* We use char because int might match the return type of a gcc2 |
| 5432 | builtin and then its argument prototype would still apply. */ |
| 5433 | char $ac_func(); |
| 5434 | |
| 5435 | int main() { |
| 5436 | |
| 5437 | /* The GNU C library defines this for functions which it implements |
| 5438 | to always fail with ENOSYS. Some functions are actually named |
| 5439 | something starting with __ and the normal name is an alias. */ |
| 5440 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5441 | choke me |
| 5442 | #else |
| 5443 | $ac_func(); |
| 5444 | #endif |
| 5445 | |
| 5446 | ; return 0; } |
| 5447 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5448 | if { (eval echo configure:5449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5449 | rm -rf conftest* |
| 5450 | eval "ac_cv_func_$ac_func=yes" |
| 5451 | else |
| 5452 | echo "configure: failed program was:" >&5 |
| 5453 | cat conftest.$ac_ext >&5 |
| 5454 | rm -rf conftest* |
| 5455 | eval "ac_cv_func_$ac_func=no" |
| 5456 | fi |
| 5457 | rm -f conftest* |
| 5458 | fi |
| 5459 | |
| 5460 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5461 | echo "$ac_t""yes" 1>&6 |
| 5462 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5463 | cat >> confdefs.h <<EOF |
| 5464 | #define $ac_tr_func 1 |
| 5465 | EOF |
| 5466 | echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5467 | echo "configure:5468: checking getaddrinfo bug" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5468 | if test "$cross_compiling" = yes; then |
| 5469 | echo "$ac_t""buggy" 1>&6 |
| 5470 | buggygetaddrinfo=yes |
| 5471 | else |
| 5472 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5473 | #line 5474 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5474 | #include "confdefs.h" |
| 5475 | |
| 5476 | #include <sys/types.h> |
| 5477 | #include <netdb.h> |
| 5478 | #include <string.h> |
| 5479 | #include <sys/socket.h> |
| 5480 | #include <netinet/in.h> |
| 5481 | |
| 5482 | main() |
| 5483 | { |
| 5484 | int passive, gaierr, inet4 = 0, inet6 = 0; |
| 5485 | struct addrinfo hints, *ai, *aitop; |
| 5486 | char straddr[INET6_ADDRSTRLEN], strport[16]; |
| 5487 | |
| 5488 | for (passive = 0; passive <= 1; passive++) { |
| 5489 | memset(&hints, 0, sizeof(hints)); |
| 5490 | hints.ai_family = AF_UNSPEC; |
| 5491 | hints.ai_flags = passive ? AI_PASSIVE : 0; |
| 5492 | hints.ai_socktype = SOCK_STREAM; |
| 5493 | if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { |
| 5494 | (void)gai_strerror(gaierr); |
| 5495 | goto bad; |
| 5496 | } |
| 5497 | for (ai = aitop; ai; ai = ai->ai_next) { |
| 5498 | if (ai->ai_addr == NULL || |
| 5499 | ai->ai_addrlen == 0 || |
| 5500 | getnameinfo(ai->ai_addr, ai->ai_addrlen, |
| 5501 | straddr, sizeof(straddr), strport, sizeof(strport), |
| 5502 | NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
| 5503 | goto bad; |
| 5504 | } |
| 5505 | switch (ai->ai_family) { |
| 5506 | case AF_INET: |
| 5507 | if (strcmp(strport, "54321") != 0) { |
| 5508 | goto bad; |
| 5509 | } |
| 5510 | if (passive) { |
| 5511 | if (strcmp(straddr, "0.0.0.0") != 0) { |
| 5512 | goto bad; |
| 5513 | } |
| 5514 | } else { |
| 5515 | if (strcmp(straddr, "127.0.0.1") != 0) { |
| 5516 | goto bad; |
| 5517 | } |
| 5518 | } |
| 5519 | inet4++; |
| 5520 | break; |
| 5521 | case AF_INET6: |
| 5522 | if (strcmp(strport, "54321") != 0) { |
| 5523 | goto bad; |
| 5524 | } |
| 5525 | if (passive) { |
| 5526 | if (strcmp(straddr, "::") != 0) { |
| 5527 | goto bad; |
| 5528 | } |
| 5529 | } else { |
| 5530 | if (strcmp(straddr, "::1") != 0) { |
| 5531 | goto bad; |
| 5532 | } |
| 5533 | } |
| 5534 | inet6++; |
| 5535 | break; |
| 5536 | case AF_UNSPEC: |
| 5537 | goto bad; |
| 5538 | break; |
| 5539 | default: |
| 5540 | /* another family support? */ |
| 5541 | break; |
| 5542 | } |
| 5543 | } |
| 5544 | } |
| 5545 | |
| 5546 | if (!(inet4 == 0 || inet4 == 2)) |
| 5547 | goto bad; |
| 5548 | if (!(inet6 == 0 || inet6 == 2)) |
| 5549 | goto bad; |
| 5550 | |
| 5551 | if (aitop) |
| 5552 | freeaddrinfo(aitop); |
| 5553 | exit(0); |
| 5554 | |
| 5555 | bad: |
| 5556 | if (aitop) |
| 5557 | freeaddrinfo(aitop); |
| 5558 | exit(1); |
| 5559 | } |
| 5560 | |
| 5561 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5562 | if { (eval echo configure:5563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5563 | then |
| 5564 | echo "$ac_t""good" 1>&6 |
| 5565 | buggygetaddrinfo=no |
| 5566 | else |
| 5567 | echo "configure: failed program was:" >&5 |
| 5568 | cat conftest.$ac_ext >&5 |
| 5569 | rm -fr conftest* |
| 5570 | echo "$ac_t""buggy" 1>&6 |
| 5571 | buggygetaddrinfo=yes |
| 5572 | fi |
| 5573 | rm -fr conftest* |
| 5574 | fi |
| 5575 | |
| 5576 | else |
| 5577 | echo "$ac_t""no" 1>&6 |
| 5578 | buggygetaddrinfo=yes |
| 5579 | fi |
| 5580 | done |
| 5581 | |
| 5582 | |
| 5583 | if test "$buggygetaddrinfo" = "yes"; then |
| 5584 | if test "$ipv6" = "yes"; then |
| 5585 | echo 'Fatal: You must get working getaddrinfo() function.' |
| 5586 | echo ' or you can specify "--disable-ipv6"'. |
| 5587 | exit 1 |
| 5588 | fi |
| 5589 | fi |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5590 | for ac_func in getnameinfo |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5591 | do |
| 5592 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5593 | echo "configure:5594: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5594 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5595 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5596 | else |
| 5597 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5598 | #line 5599 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5599 | #include "confdefs.h" |
| 5600 | /* System header to define __stub macros and hopefully few prototypes, |
| 5601 | which can conflict with char $ac_func(); below. */ |
| 5602 | #include <assert.h> |
| 5603 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5604 | /* We use char because int might match the return type of a gcc2 |
| 5605 | builtin and then its argument prototype would still apply. */ |
| 5606 | char $ac_func(); |
| 5607 | |
| 5608 | int main() { |
| 5609 | |
| 5610 | /* The GNU C library defines this for functions which it implements |
| 5611 | to always fail with ENOSYS. Some functions are actually named |
| 5612 | something starting with __ and the normal name is an alias. */ |
| 5613 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5614 | choke me |
| 5615 | #else |
| 5616 | $ac_func(); |
| 5617 | #endif |
| 5618 | |
| 5619 | ; return 0; } |
| 5620 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5621 | if { (eval echo configure:5622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5622 | rm -rf conftest* |
| 5623 | eval "ac_cv_func_$ac_func=yes" |
| 5624 | else |
| 5625 | echo "configure: failed program was:" >&5 |
| 5626 | cat conftest.$ac_ext >&5 |
| 5627 | rm -rf conftest* |
| 5628 | eval "ac_cv_func_$ac_func=no" |
| 5629 | fi |
| 5630 | rm -f conftest* |
| 5631 | fi |
| 5632 | |
| 5633 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5634 | echo "$ac_t""yes" 1>&6 |
| 5635 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5636 | cat >> confdefs.h <<EOF |
| 5637 | #define $ac_tr_func 1 |
| 5638 | EOF |
| 5639 | |
| 5640 | else |
| 5641 | echo "$ac_t""no" 1>&6 |
| 5642 | fi |
| 5643 | done |
| 5644 | |
| 5645 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5646 | # checks for structures |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5647 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5648 | echo "configure:5649: checking whether time.h and sys/time.h may both be included" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5649 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5650 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5651 | else |
| 5652 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5653 | #line 5654 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5654 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5655 | #include <sys/types.h> |
| 5656 | #include <sys/time.h> |
| 5657 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5658 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5659 | struct tm *tp; |
| 5660 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5661 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5662 | if { (eval echo configure:5663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5663 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5664 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5665 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5666 | echo "configure: failed program was:" >&5 |
| 5667 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5668 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5669 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5670 | fi |
| 5671 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5672 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5673 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5674 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5675 | if test $ac_cv_header_time = yes; then |
| 5676 | cat >> confdefs.h <<\EOF |
| 5677 | #define TIME_WITH_SYS_TIME 1 |
| 5678 | EOF |
| 5679 | |
| 5680 | fi |
| 5681 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5682 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5683 | echo "configure:5684: checking whether struct tm is in sys/time.h or time.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5684 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5685 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5686 | else |
| 5687 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5688 | #line 5689 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5689 | #include "confdefs.h" |
| 5690 | #include <sys/types.h> |
| 5691 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5692 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5693 | struct tm *tp; tp->tm_sec; |
| 5694 | ; return 0; } |
| 5695 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5696 | if { (eval echo configure:5697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5697 | rm -rf conftest* |
| 5698 | ac_cv_struct_tm=time.h |
| 5699 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5700 | echo "configure: failed program was:" >&5 |
| 5701 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5702 | rm -rf conftest* |
| 5703 | ac_cv_struct_tm=sys/time.h |
| 5704 | fi |
| 5705 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5706 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5707 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5708 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5709 | if test $ac_cv_struct_tm = sys/time.h; then |
| 5710 | cat >> confdefs.h <<\EOF |
| 5711 | #define TM_IN_SYS_TIME 1 |
| 5712 | EOF |
| 5713 | |
| 5714 | fi |
| 5715 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5716 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5717 | echo "configure:5718: checking for tm_zone in struct tm" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5718 | if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5719 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5720 | else |
| 5721 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5722 | #line 5723 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5723 | #include "confdefs.h" |
| 5724 | #include <sys/types.h> |
| 5725 | #include <$ac_cv_struct_tm> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5726 | int main() { |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5727 | struct tm tm; tm.tm_zone; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5728 | ; return 0; } |
| 5729 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5730 | if { (eval echo configure:5731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5731 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5732 | ac_cv_struct_tm_zone=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5733 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5734 | echo "configure: failed program was:" >&5 |
| 5735 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5736 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5737 | ac_cv_struct_tm_zone=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5738 | fi |
| 5739 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5740 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5741 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5742 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 |
| 5743 | if test "$ac_cv_struct_tm_zone" = yes; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5744 | cat >> confdefs.h <<\EOF |
| 5745 | #define HAVE_TM_ZONE 1 |
| 5746 | EOF |
| 5747 | |
| 5748 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5749 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5750 | echo "configure:5751: checking for tzname" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5751 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5752 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5753 | else |
| 5754 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5755 | #line 5756 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5756 | #include "confdefs.h" |
| 5757 | #include <time.h> |
| 5758 | #ifndef tzname /* For SGI. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5759 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5760 | #endif |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5761 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5762 | atoi(*tzname); |
| 5763 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5764 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5765 | if { (eval echo configure:5766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5766 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5767 | ac_cv_var_tzname=yes |
| 5768 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5769 | echo "configure: failed program was:" >&5 |
| 5770 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5771 | rm -rf conftest* |
| 5772 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5773 | fi |
| 5774 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5775 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5776 | |
| 5777 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5778 | if test $ac_cv_var_tzname = yes; then |
| 5779 | cat >> confdefs.h <<\EOF |
| 5780 | #define HAVE_TZNAME 1 |
| 5781 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5782 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5783 | fi |
| 5784 | fi |
| 5785 | |
| 5786 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5787 | echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5788 | echo "configure:5789: checking for time.h that defines altzone" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5789 | 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] | 5790 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5791 | else |
| 5792 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5793 | #line 5794 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5794 | #include "confdefs.h" |
| 5795 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5796 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5797 | return altzone; |
| 5798 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5799 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5800 | if { (eval echo configure:5801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5801 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5802 | ac_cv_header_time_altzone=yes |
| 5803 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5804 | echo "configure: failed program was:" >&5 |
| 5805 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5806 | rm -rf conftest* |
| 5807 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5808 | fi |
| 5809 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5810 | fi |
| 5811 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5812 | echo "$ac_t""$ac_cv_header_time_altzone" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5813 | if test $ac_cv_header_time_altzone = yes; then |
| 5814 | cat >> confdefs.h <<\EOF |
| 5815 | #define HAVE_ALTZONE 1 |
| 5816 | EOF |
| 5817 | |
| 5818 | fi |
| 5819 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5820 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5821 | echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5822 | echo "configure:5823: 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] | 5823 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5824 | #line 5825 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5825 | #include "confdefs.h" |
| 5826 | |
| 5827 | #include <sys/types.h> |
| 5828 | #include <sys/select.h> |
| 5829 | #include <sys/time.h> |
| 5830 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5831 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5832 | ; |
| 5833 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5834 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5835 | if { (eval echo configure:5836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5836 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5837 | cat >> confdefs.h <<\EOF |
| 5838 | #define SYS_SELECT_WITH_SYS_TIME 1 |
| 5839 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5840 | was_it_defined=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5841 | else |
| 5842 | echo "configure: failed program was:" >&5 |
| 5843 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5844 | fi |
| 5845 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5846 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5847 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5848 | echo $ac_n "checking for addrinfo""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5849 | echo "configure:5850: checking for addrinfo" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5850 | if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then |
| 5851 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5852 | else |
| 5853 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5854 | #line 5855 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5855 | #include "confdefs.h" |
| 5856 | |
| 5857 | # include <netdb.h> |
| 5858 | int main() { |
| 5859 | struct addrinfo a |
| 5860 | ; return 0; } |
| 5861 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5862 | if { (eval echo configure:5863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5863 | rm -rf conftest* |
| 5864 | ac_cv_struct_addrinfo=yes |
| 5865 | else |
| 5866 | echo "configure: failed program was:" >&5 |
| 5867 | cat conftest.$ac_ext >&5 |
| 5868 | rm -rf conftest* |
| 5869 | ac_cv_struct_addrinfo=no |
| 5870 | fi |
| 5871 | rm -f conftest* |
| 5872 | fi |
| 5873 | |
| 5874 | echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6 |
| 5875 | if test $ac_cv_struct_addrinfo = yes; then |
| 5876 | cat >> confdefs.h <<\EOF |
| 5877 | #define HAVE_ADDRINFO 1 |
| 5878 | EOF |
| 5879 | |
| 5880 | fi |
| 5881 | |
| 5882 | echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5883 | echo "configure:5884: checking for sockaddr_storage" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5884 | if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then |
| 5885 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5886 | else |
| 5887 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5888 | #line 5889 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5889 | #include "confdefs.h" |
| 5890 | |
| 5891 | # include <sys/types.h> |
| 5892 | # include <sys/socket.h> |
| 5893 | int main() { |
| 5894 | struct sockaddr_storage s |
| 5895 | ; return 0; } |
| 5896 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5897 | if { (eval echo configure:5898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5898 | rm -rf conftest* |
| 5899 | ac_cv_struct_sockaddr_storage=yes |
| 5900 | else |
| 5901 | echo "configure: failed program was:" >&5 |
| 5902 | cat conftest.$ac_ext >&5 |
| 5903 | rm -rf conftest* |
| 5904 | ac_cv_struct_sockaddr_storage=no |
| 5905 | fi |
| 5906 | rm -f conftest* |
| 5907 | fi |
| 5908 | |
| 5909 | echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6 |
| 5910 | if test $ac_cv_struct_sockaddr_storage = yes; then |
| 5911 | cat >> confdefs.h <<\EOF |
| 5912 | #define HAVE_SOCKADDR_STORAGE 1 |
| 5913 | EOF |
| 5914 | |
| 5915 | fi |
| 5916 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5917 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5918 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5919 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5920 | echo "configure:5921: checking whether char is unsigned" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5921 | 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] | 5922 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5923 | else |
| 5924 | if test "$GCC" = yes; then |
| 5925 | # GCC predefines this symbol on systems where it applies. |
| 5926 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5927 | #line 5928 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5928 | #include "confdefs.h" |
| 5929 | #ifdef __CHAR_UNSIGNED__ |
| 5930 | yes |
| 5931 | #endif |
| 5932 | |
| 5933 | EOF |
| 5934 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 5935 | egrep "yes" >/dev/null 2>&1; then |
| 5936 | rm -rf conftest* |
| 5937 | ac_cv_c_char_unsigned=yes |
| 5938 | else |
| 5939 | rm -rf conftest* |
| 5940 | ac_cv_c_char_unsigned=no |
| 5941 | fi |
| 5942 | rm -f conftest* |
| 5943 | |
| 5944 | else |
| 5945 | if test "$cross_compiling" = yes; then |
| 5946 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 5947 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5948 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5949 | #line 5950 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5950 | #include "confdefs.h" |
| 5951 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5952 | #if !defined(__STDC__) || __STDC__ != 1 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5953 | #define volatile |
| 5954 | #endif |
| 5955 | main() { |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5956 | volatile char c = 255; exit(c < 0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5957 | } |
| 5958 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5959 | if { (eval echo configure:5960: \"$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] | 5960 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5961 | ac_cv_c_char_unsigned=yes |
| 5962 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5963 | echo "configure: failed program was:" >&5 |
| 5964 | cat conftest.$ac_ext >&5 |
| 5965 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5966 | ac_cv_c_char_unsigned=no |
| 5967 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5968 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5969 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5970 | |
| 5971 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5972 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5973 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5974 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5975 | if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then |
| 5976 | cat >> confdefs.h <<\EOF |
| 5977 | #define __CHAR_UNSIGNED__ 1 |
| 5978 | EOF |
| 5979 | |
| 5980 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5981 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5982 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5983 | echo "configure:5984: checking for working const" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5984 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5985 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5986 | else |
| 5987 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 5988 | #line 5989 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5989 | #include "confdefs.h" |
| 5990 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5991 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5992 | |
| 5993 | /* Ultrix mips cc rejects this. */ |
Martin v. Löwis | 9db2f57 | 2001-07-23 01:30:10 +0000 | [diff] [blame] | 5994 | typedef int charset[2]; const charset x; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5995 | /* SunOS 4.1.1 cc rejects this. */ |
| 5996 | char const *const *ccp; |
| 5997 | char **p; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5998 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 5999 | struct point {int x, y;}; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6000 | static struct point const zero = {0,0}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6001 | /* AIX XL C 1.02.0.0 rejects this. |
| 6002 | It does not let you subtract one const X* pointer from another in an arm |
| 6003 | of an if-expression whose if-part is not a constant expression */ |
| 6004 | const char *g = "string"; |
| 6005 | ccp = &g + (g ? g-g : 0); |
| 6006 | /* HPUX 7.0 cc rejects these. */ |
| 6007 | ++ccp; |
| 6008 | p = (char**) ccp; |
| 6009 | ccp = (char const *const *) p; |
| 6010 | { /* SCO 3.2v4 cc rejects this. */ |
| 6011 | char *t; |
| 6012 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
| 6013 | |
| 6014 | *t++ = 0; |
| 6015 | } |
| 6016 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6017 | int x[] = {25, 17}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6018 | const int *foo = &x[0]; |
| 6019 | ++foo; |
| 6020 | } |
| 6021 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 6022 | typedef const int *iptr; |
| 6023 | iptr p = 0; |
| 6024 | ++p; |
| 6025 | } |
| 6026 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 6027 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 6028 | struct s { int j; const int *ap[3]; }; |
| 6029 | struct s *b; b->j = 5; |
| 6030 | } |
| 6031 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 6032 | const int foo = 10; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6033 | } |
| 6034 | |
| 6035 | ; return 0; } |
| 6036 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6037 | if { (eval echo configure:6038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6038 | rm -rf conftest* |
| 6039 | ac_cv_c_const=yes |
| 6040 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6041 | echo "configure: failed program was:" >&5 |
| 6042 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6043 | rm -rf conftest* |
| 6044 | ac_cv_c_const=no |
| 6045 | fi |
| 6046 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6047 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6048 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6049 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6050 | if test $ac_cv_c_const = no; then |
| 6051 | cat >> confdefs.h <<\EOF |
| 6052 | #define const |
| 6053 | EOF |
| 6054 | |
| 6055 | fi |
| 6056 | |
| 6057 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6058 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6059 | echo $ac_n "checking for working volatile""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6060 | echo "configure:6061: checking for working volatile" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6061 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6062 | #line 6063 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6063 | #include "confdefs.h" |
| 6064 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6065 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6066 | volatile int x; x = 0; |
| 6067 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6068 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6069 | if { (eval echo configure:6070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6070 | rm -rf conftest* |
| 6071 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6072 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6073 | echo "configure: failed program was:" >&5 |
| 6074 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6075 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6076 | cat >> confdefs.h <<\EOF |
| 6077 | #define volatile |
| 6078 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6079 | |
| 6080 | fi |
| 6081 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6082 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6083 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6084 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6085 | echo $ac_n "checking for working signed char""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6086 | echo "configure:6087: checking for working signed char" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6087 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6088 | #line 6089 "configure" |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6089 | #include "confdefs.h" |
| 6090 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6091 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6092 | signed char c; |
| 6093 | ; return 0; } |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6094 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6095 | if { (eval echo configure:6096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6096 | rm -rf conftest* |
| 6097 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6098 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6099 | echo "configure: failed program was:" >&5 |
| 6100 | cat conftest.$ac_ext >&5 |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6101 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6102 | cat >> confdefs.h <<\EOF |
| 6103 | #define signed |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6104 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6105 | |
| 6106 | fi |
| 6107 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6108 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6109 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6110 | have_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6111 | echo $ac_n "checking for prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6112 | echo "configure:6113: checking for prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6113 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6114 | #line 6115 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6115 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6116 | int foo(int x) { return 0; } |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6117 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6118 | return foo(10); |
| 6119 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6120 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6121 | if { (eval echo configure:6122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6122 | rm -rf conftest* |
| 6123 | cat >> confdefs.h <<\EOF |
| 6124 | #define HAVE_PROTOTYPES 1 |
| 6125 | EOF |
| 6126 | have_prototypes=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6127 | else |
| 6128 | echo "configure: failed program was:" >&5 |
| 6129 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6130 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6131 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6132 | echo "$ac_t""$have_prototypes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6133 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6134 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6135 | echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6136 | echo "configure:6137: checking for variable length prototypes and stdarg.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6137 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6138 | #line 6139 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6139 | #include "confdefs.h" |
| 6140 | |
| 6141 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6142 | int foo(int x, ...) { |
| 6143 | va_list va; |
| 6144 | va_start(va, x); |
| 6145 | va_arg(va, int); |
| 6146 | va_arg(va, char *); |
| 6147 | va_arg(va, double); |
| 6148 | return 0; |
| 6149 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6150 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6151 | int main() { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6152 | return foo(10, "", 3.14); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6153 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6154 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6155 | if { (eval echo configure:6156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6156 | rm -rf conftest* |
| 6157 | cat >> confdefs.h <<\EOF |
| 6158 | #define HAVE_STDARG_PROTOTYPES 1 |
| 6159 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6160 | works=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6161 | else |
| 6162 | echo "configure: failed program was:" >&5 |
| 6163 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6164 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6165 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6166 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6167 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6168 | if test "$have_prototypes" = yes; then |
| 6169 | bad_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6170 | echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6171 | echo "configure:6172: checking for bad exec* prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6172 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6173 | #line 6174 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6174 | #include "confdefs.h" |
| 6175 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6176 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6177 | char **t;execve("@",t,t); |
| 6178 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6179 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6180 | if { (eval echo configure:6181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6181 | : |
| 6182 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6183 | echo "configure: failed program was:" >&5 |
| 6184 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6185 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6186 | cat >> confdefs.h <<\EOF |
| 6187 | #define BAD_EXEC_PROTOTYPES 1 |
| 6188 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6189 | bad_prototypes=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6190 | fi |
| 6191 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6192 | echo "$ac_t""$bad_prototypes" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6193 | fi |
| 6194 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6195 | # check if sockaddr has sa_len member |
| 6196 | echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6197 | echo "configure:6198: checking if sockaddr has sa_len member" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6198 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6199 | #line 6200 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6200 | #include "confdefs.h" |
| 6201 | #include <sys/types.h> |
| 6202 | #include <sys/socket.h> |
| 6203 | int main() { |
| 6204 | struct sockaddr x; |
| 6205 | x.sa_len = 0; |
| 6206 | ; return 0; } |
| 6207 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6208 | if { (eval echo configure:6209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6209 | rm -rf conftest* |
| 6210 | echo "$ac_t""yes" 1>&6 |
| 6211 | cat >> confdefs.h <<\EOF |
| 6212 | #define HAVE_SOCKADDR_SA_LEN 1 |
| 6213 | EOF |
| 6214 | |
| 6215 | else |
| 6216 | echo "configure: failed program was:" >&5 |
| 6217 | cat conftest.$ac_ext >&5 |
| 6218 | rm -rf conftest* |
| 6219 | echo "$ac_t""no" 1>&6 |
| 6220 | fi |
| 6221 | rm -f conftest* |
| 6222 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6223 | echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6224 | echo "configure:6225: checking for bad static forward" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6225 | if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then |
| 6226 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6227 | else |
| 6228 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6229 | ac_cv_bad_static_forward=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6230 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6231 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6232 | #line 6233 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6233 | #include "confdefs.h" |
| 6234 | |
| 6235 | struct s { int a; int b; }; |
| 6236 | static struct s foo; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6237 | int foobar() { |
| 6238 | static int random; |
| 6239 | random = (int) &foo; |
| 6240 | return random; |
| 6241 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6242 | static struct s foo = { 1, 2 }; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6243 | main() { |
| 6244 | exit(!((int)&foo == foobar())); |
| 6245 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6246 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6247 | if { (eval echo configure:6248: \"$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] | 6248 | then |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6249 | ac_cv_bad_static_forward=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6250 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6251 | echo "configure: failed program was:" >&5 |
| 6252 | cat conftest.$ac_ext >&5 |
| 6253 | rm -fr conftest* |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6254 | ac_cv_bad_static_forward=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6255 | fi |
| 6256 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6257 | fi |
| 6258 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6259 | fi |
| 6260 | |
| 6261 | echo "$ac_t""$ac_cv_bad_static_forward" 1>&6 |
| 6262 | if test "$ac_cv_bad_static_forward" = yes |
| 6263 | then |
| 6264 | cat >> confdefs.h <<\EOF |
| 6265 | #define BAD_STATIC_FORWARD 1 |
| 6266 | EOF |
| 6267 | |
| 6268 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6269 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6270 | va_list_is_array=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6271 | echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6272 | echo "configure:6273: checking whether va_list is an array" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6273 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6274 | #line 6275 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6275 | #include "confdefs.h" |
| 6276 | |
| 6277 | #ifdef HAVE_STDARG_PROTOTYPES |
| 6278 | #include <stdarg.h> |
| 6279 | #else |
| 6280 | #include <varargs.h> |
| 6281 | #endif |
| 6282 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6283 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6284 | va_list list1, list2; list1 = list2; |
| 6285 | ; return 0; } |
| 6286 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6287 | if { (eval echo configure:6288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6288 | : |
| 6289 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6290 | echo "configure: failed program was:" >&5 |
| 6291 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6292 | rm -rf conftest* |
| 6293 | cat >> confdefs.h <<\EOF |
| 6294 | #define VA_LIST_IS_ARRAY 1 |
| 6295 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6296 | va_list_is_array=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6297 | fi |
| 6298 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6299 | echo "$ac_t""$va_list_is_array" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6300 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6301 | # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( |
| 6302 | echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6303 | echo "configure:6304: checking for gethostbyname_r" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6304 | 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] | 6305 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6306 | else |
| 6307 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6308 | #line 6309 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6309 | #include "confdefs.h" |
| 6310 | /* System header to define __stub macros and hopefully few prototypes, |
| 6311 | which can conflict with char gethostbyname_r(); below. */ |
| 6312 | #include <assert.h> |
| 6313 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6314 | /* We use char because int might match the return type of a gcc2 |
| 6315 | builtin and then its argument prototype would still apply. */ |
| 6316 | char gethostbyname_r(); |
| 6317 | |
| 6318 | int main() { |
| 6319 | |
| 6320 | /* The GNU C library defines this for functions which it implements |
| 6321 | to always fail with ENOSYS. Some functions are actually named |
| 6322 | something starting with __ and the normal name is an alias. */ |
| 6323 | #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) |
| 6324 | choke me |
| 6325 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6326 | gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6327 | #endif |
| 6328 | |
| 6329 | ; return 0; } |
| 6330 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6331 | if { (eval echo configure:6332: \"$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] | 6332 | rm -rf conftest* |
| 6333 | eval "ac_cv_func_gethostbyname_r=yes" |
| 6334 | else |
| 6335 | echo "configure: failed program was:" >&5 |
| 6336 | cat conftest.$ac_ext >&5 |
| 6337 | rm -rf conftest* |
| 6338 | eval "ac_cv_func_gethostbyname_r=no" |
| 6339 | fi |
| 6340 | rm -f conftest* |
| 6341 | fi |
| 6342 | |
| 6343 | if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then |
| 6344 | echo "$ac_t""yes" 1>&6 |
| 6345 | |
| 6346 | cat >> confdefs.h <<\EOF |
| 6347 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6348 | EOF |
| 6349 | |
| 6350 | echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6351 | echo "configure:6352: checking gethostbyname_r with 6 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6352 | OLD_CFLAGS=$CFLAGS |
| 6353 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
| 6354 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6355 | #line 6356 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6356 | #include "confdefs.h" |
| 6357 | |
| 6358 | # include <netdb.h> |
| 6359 | |
| 6360 | int main() { |
| 6361 | |
| 6362 | char *name; |
| 6363 | struct hostent *he, *res; |
| 6364 | char buffer[2048]; |
| 6365 | int buflen = 2048; |
| 6366 | int h_errnop; |
| 6367 | |
| 6368 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
| 6369 | |
| 6370 | ; return 0; } |
| 6371 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6372 | if { (eval echo configure:6373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6373 | rm -rf conftest* |
| 6374 | |
| 6375 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6376 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6377 | EOF |
| 6378 | |
| 6379 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6380 | #define HAVE_GETHOSTBYNAME_R_6_ARG 1 |
| 6381 | EOF |
| 6382 | |
| 6383 | echo "$ac_t""yes" 1>&6 |
| 6384 | |
| 6385 | else |
| 6386 | echo "configure: failed program was:" >&5 |
| 6387 | cat conftest.$ac_ext >&5 |
| 6388 | rm -rf conftest* |
| 6389 | |
| 6390 | echo "$ac_t""no" 1>&6 |
| 6391 | echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6392 | echo "configure:6393: checking gethostbyname_r with 5 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6393 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6394 | #line 6395 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6395 | #include "confdefs.h" |
| 6396 | |
| 6397 | # include <netdb.h> |
| 6398 | |
| 6399 | int main() { |
| 6400 | |
| 6401 | char *name; |
| 6402 | struct hostent *he; |
| 6403 | char buffer[2048]; |
| 6404 | int buflen = 2048; |
| 6405 | int h_errnop; |
| 6406 | |
| 6407 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
| 6408 | |
| 6409 | ; return 0; } |
| 6410 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6411 | if { (eval echo configure:6412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6412 | rm -rf conftest* |
| 6413 | |
| 6414 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6415 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6416 | EOF |
| 6417 | |
| 6418 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6419 | #define HAVE_GETHOSTBYNAME_R_5_ARG 1 |
| 6420 | EOF |
| 6421 | |
| 6422 | echo "$ac_t""yes" 1>&6 |
| 6423 | |
| 6424 | else |
| 6425 | echo "configure: failed program was:" >&5 |
| 6426 | cat conftest.$ac_ext >&5 |
| 6427 | rm -rf conftest* |
| 6428 | |
| 6429 | echo "$ac_t""no" 1>&6 |
| 6430 | echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6431 | echo "configure:6432: checking gethostbyname_r with 3 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6432 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6433 | #line 6434 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6434 | #include "confdefs.h" |
| 6435 | |
| 6436 | # include <netdb.h> |
| 6437 | |
| 6438 | int main() { |
| 6439 | |
| 6440 | char *name; |
| 6441 | struct hostent *he; |
| 6442 | struct hostent_data data; |
| 6443 | |
| 6444 | (void) gethostbyname_r(name, he, &data); |
| 6445 | |
| 6446 | ; return 0; } |
| 6447 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6448 | if { (eval echo configure:6449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6449 | rm -rf conftest* |
| 6450 | |
| 6451 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6452 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6453 | EOF |
| 6454 | |
| 6455 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6456 | #define HAVE_GETHOSTBYNAME_R_3_ARG 1 |
| 6457 | EOF |
| 6458 | |
| 6459 | echo "$ac_t""yes" 1>&6 |
| 6460 | |
| 6461 | else |
| 6462 | echo "configure: failed program was:" >&5 |
| 6463 | cat conftest.$ac_ext >&5 |
| 6464 | rm -rf conftest* |
| 6465 | |
| 6466 | echo "$ac_t""no" 1>&6 |
| 6467 | |
| 6468 | fi |
| 6469 | rm -f conftest* |
| 6470 | |
| 6471 | fi |
| 6472 | rm -f conftest* |
| 6473 | |
| 6474 | fi |
| 6475 | rm -f conftest* |
| 6476 | CFLAGS=$OLD_CFLAGS |
| 6477 | |
| 6478 | else |
| 6479 | echo "$ac_t""no" 1>&6 |
| 6480 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6481 | for ac_func in gethostbyname |
| 6482 | do |
| 6483 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6484 | echo "configure:6485: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6485 | 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] | 6486 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6487 | else |
| 6488 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6489 | #line 6490 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6490 | #include "confdefs.h" |
| 6491 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6492 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6493 | #include <assert.h> |
| 6494 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6495 | /* We use char because int might match the return type of a gcc2 |
| 6496 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6497 | char $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6498 | |
| 6499 | int main() { |
| 6500 | |
| 6501 | /* The GNU C library defines this for functions which it implements |
| 6502 | to always fail with ENOSYS. Some functions are actually named |
| 6503 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6504 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6505 | choke me |
| 6506 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6507 | $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6508 | #endif |
| 6509 | |
| 6510 | ; return 0; } |
| 6511 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6512 | if { (eval echo configure:6513: \"$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] | 6513 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6514 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6515 | else |
| 6516 | echo "configure: failed program was:" >&5 |
| 6517 | cat conftest.$ac_ext >&5 |
| 6518 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6519 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6520 | fi |
| 6521 | rm -f conftest* |
| 6522 | fi |
| 6523 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6524 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6525 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6526 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6527 | cat >> confdefs.h <<EOF |
| 6528 | #define $ac_tr_func 1 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6529 | EOF |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6530 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6531 | else |
| 6532 | echo "$ac_t""no" 1>&6 |
| 6533 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6534 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6535 | |
| 6536 | |
| 6537 | fi |
| 6538 | |
| 6539 | |
| 6540 | |
| 6541 | |
| 6542 | |
| 6543 | |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6544 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6545 | # checks for system services |
| 6546 | # (none yet) |
| 6547 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6548 | # Linux requires this for correct f.p. operations |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6549 | echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6550 | echo "configure:6551: checking for __fpu_control" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6551 | if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6552 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6553 | else |
| 6554 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6555 | #line 6556 "configure" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6556 | #include "confdefs.h" |
| 6557 | /* System header to define __stub macros and hopefully few prototypes, |
| 6558 | which can conflict with char __fpu_control(); below. */ |
| 6559 | #include <assert.h> |
| 6560 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6561 | /* We use char because int might match the return type of a gcc2 |
| 6562 | builtin and then its argument prototype would still apply. */ |
| 6563 | char __fpu_control(); |
| 6564 | |
| 6565 | int main() { |
| 6566 | |
| 6567 | /* The GNU C library defines this for functions which it implements |
| 6568 | to always fail with ENOSYS. Some functions are actually named |
| 6569 | something starting with __ and the normal name is an alias. */ |
| 6570 | #if defined (__stub___fpu_control) || defined (__stub_____fpu_control) |
| 6571 | choke me |
| 6572 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6573 | __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6574 | #endif |
| 6575 | |
| 6576 | ; return 0; } |
| 6577 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6578 | if { (eval echo configure:6579: \"$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] | 6579 | rm -rf conftest* |
| 6580 | eval "ac_cv_func___fpu_control=yes" |
| 6581 | else |
| 6582 | echo "configure: failed program was:" >&5 |
| 6583 | cat conftest.$ac_ext >&5 |
| 6584 | rm -rf conftest* |
| 6585 | eval "ac_cv_func___fpu_control=no" |
| 6586 | fi |
| 6587 | rm -f conftest* |
| 6588 | fi |
| 6589 | |
| 6590 | if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then |
| 6591 | echo "$ac_t""yes" 1>&6 |
| 6592 | : |
| 6593 | else |
| 6594 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6595 | echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6596 | echo "configure:6597: checking for __fpu_control in -lieee" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6597 | ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6598 | 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] | 6599 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6600 | else |
| 6601 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6602 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6603 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6604 | #line 6605 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6605 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6606 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6607 | /* We use char because int might match the return type of a gcc2 |
| 6608 | builtin and then its argument prototype would still apply. */ |
| 6609 | char __fpu_control(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6610 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6611 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6612 | __fpu_control() |
| 6613 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6614 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6615 | if { (eval echo configure:6616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6616 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6617 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6618 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6619 | echo "configure: failed program was:" >&5 |
| 6620 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6621 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6622 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6623 | fi |
| 6624 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6625 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6626 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6627 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6628 | 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] | 6629 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6630 | ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 6631 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6632 | cat >> confdefs.h <<EOF |
| 6633 | #define $ac_tr_lib 1 |
| 6634 | EOF |
| 6635 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6636 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6637 | |
| 6638 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6639 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6640 | fi |
| 6641 | |
| 6642 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6643 | fi |
| 6644 | |
| 6645 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6646 | # Check for --with-fpectl |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6647 | echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6648 | echo "configure:6649: checking for --with-fpectl" >&5 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6649 | # Check whether --with-fpectl or --without-fpectl was given. |
| 6650 | if test "${with_fpectl+set}" = set; then |
| 6651 | withval="$with_fpectl" |
| 6652 | |
| 6653 | if test "$withval" != no |
| 6654 | then cat >> confdefs.h <<\EOF |
| 6655 | #define WANT_SIGFPE_HANDLER 1 |
| 6656 | EOF |
| 6657 | echo "$ac_t""yes" 1>&6 |
| 6658 | else echo "$ac_t""no" 1>&6 |
| 6659 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6660 | else |
| 6661 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6662 | fi |
| 6663 | |
| 6664 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6665 | # check for --with-libm=... |
| 6666 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6667 | case $ac_sys_system in |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 6668 | Darwin) ;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 6669 | BeOS) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6670 | *) LIBM=-lm |
| 6671 | esac |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6672 | echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6673 | echo "configure:6674: checking for --with-libm=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6674 | # Check whether --with-libm or --without-libm was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6675 | if test "${with_libm+set}" = set; then |
| 6676 | withval="$with_libm" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6677 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6678 | if test "$withval" = no |
| 6679 | then LIBM= |
| 6680 | echo "$ac_t""force LIBM empty" 1>&6 |
| 6681 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6682 | then LIBM=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6683 | echo "$ac_t""set LIBM=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6684 | 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] | 6685 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6686 | else |
| 6687 | echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6688 | fi |
| 6689 | |
| 6690 | |
| 6691 | # check for --with-libc=... |
| 6692 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6693 | echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6694 | echo "configure:6695: checking for --with-libc=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6695 | # Check whether --with-libc or --without-libc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6696 | if test "${with_libc+set}" = set; then |
| 6697 | withval="$with_libc" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6698 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6699 | if test "$withval" = no |
| 6700 | then LIBC= |
| 6701 | echo "$ac_t""force LIBC empty" 1>&6 |
| 6702 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6703 | then LIBC=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6704 | echo "$ac_t""set LIBC=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6705 | 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] | 6706 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6707 | else |
| 6708 | echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6709 | fi |
| 6710 | |
| 6711 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6712 | # check for hypot() in math library |
| 6713 | LIBS_SAVE=$LIBS |
| 6714 | LIBS="$LIBS $LIBM" |
| 6715 | for ac_func in hypot |
| 6716 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6717 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6718 | echo "configure:6719: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6719 | 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] | 6720 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6721 | else |
| 6722 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6723 | #line 6724 "configure" |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6724 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6725 | /* System header to define __stub macros and hopefully few prototypes, |
| 6726 | which can conflict with char $ac_func(); below. */ |
| 6727 | #include <assert.h> |
| 6728 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6729 | /* We use char because int might match the return type of a gcc2 |
| 6730 | builtin and then its argument prototype would still apply. */ |
| 6731 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6732 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6733 | int main() { |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6734 | |
| 6735 | /* The GNU C library defines this for functions which it implements |
| 6736 | to always fail with ENOSYS. Some functions are actually named |
| 6737 | something starting with __ and the normal name is an alias. */ |
| 6738 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 6739 | choke me |
| 6740 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6741 | $ac_func(); |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6742 | #endif |
| 6743 | |
| 6744 | ; return 0; } |
| 6745 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6746 | if { (eval echo configure:6747: \"$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] | 6747 | rm -rf conftest* |
| 6748 | eval "ac_cv_func_$ac_func=yes" |
| 6749 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6750 | echo "configure: failed program was:" >&5 |
| 6751 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6752 | rm -rf conftest* |
| 6753 | eval "ac_cv_func_$ac_func=no" |
| 6754 | fi |
| 6755 | rm -f conftest* |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6756 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6757 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6758 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 6759 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6760 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6761 | cat >> confdefs.h <<EOF |
| 6762 | #define $ac_tr_func 1 |
| 6763 | EOF |
| 6764 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6765 | else |
| 6766 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 6767 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6768 | fi |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6769 | done |
| 6770 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6771 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6772 | LIBS=$LIBS_SAVE |
| 6773 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6774 | # check whether malloc(0) returns NULL or not |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6775 | echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6776 | echo "configure:6777: checking what malloc(0) returns" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6777 | if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6778 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6779 | else |
| 6780 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6781 | ac_cv_malloc_zero=nonnull |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6782 | else |
| 6783 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6784 | #line 6785 "configure" |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6785 | #include "confdefs.h" |
| 6786 | #include <stdio.h> |
| 6787 | #ifdef HAVE_STDLIB |
| 6788 | #include <stdlib.h> |
| 6789 | #else |
| 6790 | char *malloc(), *realloc(); |
| 6791 | int *free(); |
| 6792 | #endif |
| 6793 | main() { |
| 6794 | char *p; |
| 6795 | p = malloc(0); |
| 6796 | if (p == NULL) exit(1); |
| 6797 | p = realloc(p, 0); |
| 6798 | if (p == NULL) exit(1); |
| 6799 | free(p); |
| 6800 | exit(0); |
| 6801 | } |
| 6802 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6803 | if { (eval echo configure:6804: \"$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] | 6804 | then |
| 6805 | ac_cv_malloc_zero=nonnull |
| 6806 | else |
| 6807 | echo "configure: failed program was:" >&5 |
| 6808 | cat conftest.$ac_ext >&5 |
| 6809 | rm -fr conftest* |
| 6810 | ac_cv_malloc_zero=null |
| 6811 | fi |
| 6812 | rm -fr conftest* |
| 6813 | fi |
| 6814 | |
| 6815 | fi |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6816 | # XXX arm cross-compile? |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6817 | echo "$ac_t""$ac_cv_malloc_zero" 1>&6 |
| 6818 | if test "$ac_cv_malloc_zero" = null |
| 6819 | then |
| 6820 | cat >> confdefs.h <<\EOF |
| 6821 | #define MALLOC_ZERO_RETURNS_NULL 1 |
| 6822 | EOF |
| 6823 | |
| 6824 | fi |
| 6825 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6826 | # check for wchar.h |
| 6827 | ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` |
| 6828 | echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6829 | echo "configure:6830: checking for wchar.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6830 | 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] | 6831 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6832 | else |
| 6833 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6834 | #line 6835 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6835 | #include "confdefs.h" |
| 6836 | #include <wchar.h> |
| 6837 | EOF |
| 6838 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6839 | { (eval echo configure:6840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6840 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 6841 | if test -z "$ac_err"; then |
| 6842 | rm -rf conftest* |
| 6843 | eval "ac_cv_header_$ac_safe=yes" |
| 6844 | else |
| 6845 | echo "$ac_err" >&5 |
| 6846 | echo "configure: failed program was:" >&5 |
| 6847 | cat conftest.$ac_ext >&5 |
| 6848 | rm -rf conftest* |
| 6849 | eval "ac_cv_header_$ac_safe=no" |
| 6850 | fi |
| 6851 | rm -f conftest* |
| 6852 | fi |
| 6853 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 6854 | echo "$ac_t""yes" 1>&6 |
| 6855 | cat >> confdefs.h <<\EOF |
| 6856 | #define HAVE_WCHAR_H 1 |
| 6857 | EOF |
| 6858 | wchar_h="yes" |
| 6859 | else |
| 6860 | echo "$ac_t""no" 1>&6 |
| 6861 | wchar_h="no" |
| 6862 | |
| 6863 | fi |
| 6864 | |
| 6865 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6866 | # determine wchar_t size |
| 6867 | if test "$wchar_h" = yes |
| 6868 | then |
| 6869 | echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6870 | echo "configure:6871: checking size of wchar_t" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6871 | if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then |
| 6872 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6873 | else |
| 6874 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6875 | ac_cv_sizeof_wchar_t=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6876 | else |
| 6877 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6878 | #line 6879 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6879 | #include "confdefs.h" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6880 | #include <stdio.h> |
| 6881 | main() |
| 6882 | { |
| 6883 | FILE *f=fopen("conftestval", "w"); |
| 6884 | if (!f) exit(1); |
| 6885 | fprintf(f, "%d\n", sizeof(wchar_t)); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6886 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6887 | } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6888 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6889 | if { (eval echo configure:6890: \"$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] | 6890 | then |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6891 | ac_cv_sizeof_wchar_t=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6892 | else |
| 6893 | echo "configure: failed program was:" >&5 |
| 6894 | cat conftest.$ac_ext >&5 |
| 6895 | rm -fr conftest* |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6896 | ac_cv_sizeof_wchar_t=0 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6897 | fi |
| 6898 | rm -fr conftest* |
| 6899 | fi |
| 6900 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6901 | fi |
| 6902 | echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 |
| 6903 | cat >> confdefs.h <<EOF |
| 6904 | #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t |
| 6905 | EOF |
| 6906 | |
| 6907 | |
| 6908 | fi |
| 6909 | |
| 6910 | echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6911 | echo "configure:6912: checking what type to use for unicode" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6912 | # Check whether --enable-unicode or --disable-unicode was given. |
| 6913 | if test "${enable_unicode+set}" = set; then |
| 6914 | enableval="$enable_unicode" |
| 6915 | : |
| 6916 | else |
| 6917 | enable_unicode=yes |
| 6918 | fi |
| 6919 | |
| 6920 | |
| 6921 | if test $enable_unicode = yes |
| 6922 | then |
Martin v. Löwis | fd91779 | 2001-06-27 20:22:04 +0000 | [diff] [blame] | 6923 | # Without any arguments, Py_UNICODE defaults to two-byte mode |
| 6924 | enable_unicode="ucs2" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6925 | fi |
| 6926 | |
| 6927 | case "$enable_unicode" in |
| 6928 | ucs2) unicode_size="2" |
| 6929 | cat >> confdefs.h <<\EOF |
| 6930 | #define Py_UNICODE_SIZE 2 |
| 6931 | EOF |
| 6932 | |
| 6933 | ;; |
| 6934 | ucs4) unicode_size="4" |
| 6935 | cat >> confdefs.h <<\EOF |
| 6936 | #define Py_UNICODE_SIZE 4 |
| 6937 | EOF |
| 6938 | |
| 6939 | ;; |
| 6940 | esac |
| 6941 | |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6942 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6943 | if test "$enable_unicode" = "no" |
| 6944 | then |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6945 | UNICODE_OBJS="" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6946 | echo "$ac_t""not used" 1>&6 |
| 6947 | else |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 6948 | UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6949 | cat >> confdefs.h <<\EOF |
| 6950 | #define Py_USING_UNICODE 1 |
| 6951 | EOF |
| 6952 | |
| 6953 | if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" |
| 6954 | then |
| 6955 | PY_UNICODE_TYPE="wchar_t" |
| 6956 | cat >> confdefs.h <<\EOF |
| 6957 | #define HAVE_USABLE_WCHAR_T 1 |
| 6958 | EOF |
| 6959 | |
| 6960 | cat >> confdefs.h <<\EOF |
| 6961 | #define PY_UNICODE_TYPE wchar_t |
| 6962 | EOF |
| 6963 | |
| 6964 | elif test "$ac_cv_sizeof_short" = "$unicode_size" |
| 6965 | then |
| 6966 | PY_UNICODE_TYPE="unsigned short" |
| 6967 | cat >> confdefs.h <<\EOF |
| 6968 | #define PY_UNICODE_TYPE unsigned short |
| 6969 | EOF |
| 6970 | |
| 6971 | elif test "$ac_cv_sizeof_long" = "$unicode_size" |
| 6972 | then |
| 6973 | PY_UNICODE_TYPE="unsigned long" |
| 6974 | cat >> confdefs.h <<\EOF |
| 6975 | #define PY_UNICODE_TYPE unsigned long |
| 6976 | EOF |
| 6977 | |
| 6978 | else |
| 6979 | PY_UNICODE_TYPE="no type found" |
| 6980 | fi |
| 6981 | echo "$ac_t""$PY_UNICODE_TYPE" 1>&6 |
| 6982 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6983 | |
| 6984 | # check for endianness |
| 6985 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6986 | echo "configure:6987: checking whether byte ordering is bigendian" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6987 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6988 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6989 | else |
| 6990 | ac_cv_c_bigendian=unknown |
| 6991 | # See if sys/param.h defines the BYTE_ORDER macro. |
| 6992 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 6993 | #line 6994 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6994 | #include "confdefs.h" |
| 6995 | #include <sys/types.h> |
| 6996 | #include <sys/param.h> |
| 6997 | int main() { |
| 6998 | |
| 6999 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 7000 | bogus endian macros |
| 7001 | #endif |
| 7002 | ; return 0; } |
| 7003 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7004 | if { (eval echo configure:7005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7005 | rm -rf conftest* |
| 7006 | # It does; now see whether it defined to BIG_ENDIAN or not. |
| 7007 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7008 | #line 7009 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7009 | #include "confdefs.h" |
| 7010 | #include <sys/types.h> |
| 7011 | #include <sys/param.h> |
| 7012 | int main() { |
| 7013 | |
| 7014 | #if BYTE_ORDER != BIG_ENDIAN |
| 7015 | not big endian |
| 7016 | #endif |
| 7017 | ; return 0; } |
| 7018 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7019 | if { (eval echo configure:7020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7020 | rm -rf conftest* |
| 7021 | ac_cv_c_bigendian=yes |
| 7022 | else |
| 7023 | echo "configure: failed program was:" >&5 |
| 7024 | cat conftest.$ac_ext >&5 |
| 7025 | rm -rf conftest* |
| 7026 | ac_cv_c_bigendian=no |
| 7027 | fi |
| 7028 | rm -f conftest* |
| 7029 | else |
| 7030 | echo "configure: failed program was:" >&5 |
| 7031 | cat conftest.$ac_ext >&5 |
| 7032 | fi |
| 7033 | rm -f conftest* |
| 7034 | if test $ac_cv_c_bigendian = unknown; then |
| 7035 | if test "$cross_compiling" = yes; then |
| 7036 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 7037 | else |
| 7038 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7039 | #line 7040 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7040 | #include "confdefs.h" |
| 7041 | main () { |
| 7042 | /* Are we little or big endian? From Harbison&Steele. */ |
| 7043 | union |
| 7044 | { |
| 7045 | long l; |
| 7046 | char c[sizeof (long)]; |
| 7047 | } u; |
| 7048 | u.l = 1; |
| 7049 | exit (u.c[sizeof (long) - 1] == 1); |
| 7050 | } |
| 7051 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7052 | if { (eval echo configure:7053: \"$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] | 7053 | then |
| 7054 | ac_cv_c_bigendian=no |
| 7055 | else |
| 7056 | echo "configure: failed program was:" >&5 |
| 7057 | cat conftest.$ac_ext >&5 |
| 7058 | rm -fr conftest* |
| 7059 | ac_cv_c_bigendian=yes |
| 7060 | fi |
| 7061 | rm -fr conftest* |
| 7062 | fi |
| 7063 | |
| 7064 | fi |
| 7065 | fi |
| 7066 | |
| 7067 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 7068 | if test $ac_cv_c_bigendian = yes; then |
| 7069 | cat >> confdefs.h <<\EOF |
| 7070 | #define WORDS_BIGENDIAN 1 |
| 7071 | EOF |
| 7072 | |
| 7073 | fi |
| 7074 | |
| 7075 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7076 | # Check whether right shifting a negative integer extends the sign bit |
| 7077 | # or fills with zeros (like the Cray J90, according to Tim Peters). |
| 7078 | echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7079 | echo "configure:7080: checking whether right shift extends the sign bit" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7080 | if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7081 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7082 | else |
| 7083 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7084 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7085 | ac_cv_rshift_extends_sign=yes |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7086 | else |
| 7087 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7088 | #line 7089 "configure" |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7089 | #include "confdefs.h" |
| 7090 | |
| 7091 | int main() |
| 7092 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7093 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7094 | } |
| 7095 | |
| 7096 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7097 | if { (eval echo configure:7098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7098 | then |
| 7099 | ac_cv_rshift_extends_sign=yes |
| 7100 | else |
| 7101 | echo "configure: failed program was:" >&5 |
| 7102 | cat conftest.$ac_ext >&5 |
| 7103 | rm -fr conftest* |
| 7104 | ac_cv_rshift_extends_sign=no |
| 7105 | fi |
| 7106 | rm -fr conftest* |
| 7107 | fi |
| 7108 | |
| 7109 | fi |
| 7110 | |
| 7111 | echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 |
| 7112 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7113 | then |
| 7114 | cat >> confdefs.h <<\EOF |
| 7115 | #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 |
| 7116 | EOF |
| 7117 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7118 | fi |
| 7119 | |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7120 | # check for getc_unlocked and related locking functions |
| 7121 | echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7122 | echo "configure:7123: checking for getc_unlocked() and friends" >&5 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7123 | if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then |
| 7124 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7125 | else |
| 7126 | |
| 7127 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7128 | #line 7129 "configure" |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7129 | #include "confdefs.h" |
| 7130 | #include <stdio.h> |
| 7131 | int main() { |
| 7132 | |
| 7133 | FILE *f = fopen("/dev/null", "r"); |
| 7134 | flockfile(f); |
| 7135 | getc_unlocked(f); |
| 7136 | funlockfile(f); |
| 7137 | |
| 7138 | ; return 0; } |
| 7139 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7140 | if { (eval echo configure:7141: \"$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] | 7141 | rm -rf conftest* |
| 7142 | ac_cv_have_getc_unlocked=yes |
| 7143 | else |
| 7144 | echo "configure: failed program was:" >&5 |
| 7145 | cat conftest.$ac_ext >&5 |
| 7146 | rm -rf conftest* |
| 7147 | ac_cv_have_getc_unlocked=no |
| 7148 | fi |
| 7149 | rm -f conftest* |
| 7150 | fi |
| 7151 | |
| 7152 | echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6 |
| 7153 | if test "$ac_cv_have_getc_unlocked" = yes |
| 7154 | then |
| 7155 | cat >> confdefs.h <<\EOF |
| 7156 | #define HAVE_GETC_UNLOCKED 1 |
| 7157 | EOF |
| 7158 | |
| 7159 | fi |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7160 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7161 | # check for readline 4.0 |
| 7162 | echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7163 | echo "configure:7164: checking for rl_pre_input_hook in -lreadline" >&5 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7164 | ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'` |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7165 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7166 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7167 | else |
| 7168 | ac_save_LIBS="$LIBS" |
| 7169 | LIBS="-lreadline -ltermcap $LIBS" |
| 7170 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7171 | #line 7172 "configure" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7172 | #include "confdefs.h" |
| 7173 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7174 | /* We use char because int might match the return type of a gcc2 |
| 7175 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7176 | char rl_pre_input_hook(); |
| 7177 | |
| 7178 | int main() { |
| 7179 | rl_pre_input_hook() |
| 7180 | ; return 0; } |
| 7181 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7182 | if { (eval echo configure:7183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7183 | rm -rf conftest* |
| 7184 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 7185 | else |
| 7186 | echo "configure: failed program was:" >&5 |
| 7187 | cat conftest.$ac_ext >&5 |
| 7188 | rm -rf conftest* |
| 7189 | eval "ac_cv_lib_$ac_lib_var=no" |
| 7190 | fi |
| 7191 | rm -f conftest* |
| 7192 | LIBS="$ac_save_LIBS" |
| 7193 | |
| 7194 | fi |
| 7195 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7196 | echo "$ac_t""yes" 1>&6 |
| 7197 | cat >> confdefs.h <<\EOF |
| 7198 | #define HAVE_RL_PRE_INPUT_HOOK 1 |
| 7199 | EOF |
| 7200 | |
| 7201 | else |
| 7202 | echo "$ac_t""no" 1>&6 |
| 7203 | fi |
| 7204 | |
| 7205 | |
| 7206 | # check for readline 4.2 |
| 7207 | echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7208 | echo "configure:7209: checking for rl_completion_matches in -lreadline" >&5 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7209 | ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` |
| 7210 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7211 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7212 | else |
| 7213 | ac_save_LIBS="$LIBS" |
| 7214 | LIBS="-lreadline -ltermcap $LIBS" |
| 7215 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7216 | #line 7217 "configure" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7217 | #include "confdefs.h" |
| 7218 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7219 | /* We use char because int might match the return type of a gcc2 |
| 7220 | builtin and then its argument prototype would still apply. */ |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7221 | char rl_completion_matches(); |
| 7222 | |
| 7223 | int main() { |
| 7224 | rl_completion_matches() |
| 7225 | ; return 0; } |
| 7226 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7227 | if { (eval echo configure:7228: \"$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] | 7228 | rm -rf conftest* |
| 7229 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 7230 | else |
| 7231 | echo "configure: failed program was:" >&5 |
| 7232 | cat conftest.$ac_ext >&5 |
| 7233 | rm -rf conftest* |
| 7234 | eval "ac_cv_lib_$ac_lib_var=no" |
| 7235 | fi |
| 7236 | rm -f conftest* |
| 7237 | LIBS="$ac_save_LIBS" |
| 7238 | |
| 7239 | fi |
| 7240 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7241 | echo "$ac_t""yes" 1>&6 |
| 7242 | cat >> confdefs.h <<\EOF |
| 7243 | #define HAVE_RL_COMPLETION_MATCHES 1 |
| 7244 | EOF |
| 7245 | |
| 7246 | else |
| 7247 | echo "$ac_t""no" 1>&6 |
| 7248 | fi |
| 7249 | |
| 7250 | |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7251 | echo $ac_n "checking for broken nice()""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7252 | echo "configure:7253: checking for broken nice()" >&5 |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7253 | if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then |
| 7254 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7255 | else |
| 7256 | |
| 7257 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7258 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7259 | else |
| 7260 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7261 | #line 7262 "configure" |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7262 | #include "confdefs.h" |
| 7263 | |
| 7264 | int main() |
| 7265 | { |
| 7266 | int val1 = nice(1); |
| 7267 | if (val1 != -1 && val1 == nice(2)) |
| 7268 | exit(0); |
| 7269 | exit(1); |
| 7270 | } |
| 7271 | |
| 7272 | EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7273 | if { (eval echo configure:7274: \"$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] | 7274 | then |
| 7275 | ac_cv_broken_nice=yes |
| 7276 | else |
| 7277 | echo "configure: failed program was:" >&5 |
| 7278 | cat conftest.$ac_ext >&5 |
| 7279 | rm -fr conftest* |
| 7280 | ac_cv_broken_nice=no |
| 7281 | fi |
| 7282 | rm -fr conftest* |
| 7283 | fi |
| 7284 | |
| 7285 | fi |
| 7286 | |
| 7287 | echo "$ac_t""$ac_cv_broken_nice" 1>&6 |
| 7288 | if test "$ac_cv_broken_nice" = yes |
| 7289 | then |
| 7290 | cat >> confdefs.h <<\EOF |
| 7291 | #define HAVE_BROKEN_NICE 1 |
| 7292 | EOF |
| 7293 | |
| 7294 | fi |
| 7295 | |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7296 | # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! |
| 7297 | # Add sys/socket.h to confdefs.h |
| 7298 | cat >> confdefs.h <<\EOF |
| 7299 | #ifdef HAVE_SYS_SOCKET_H |
| 7300 | #include <sys/socket.h> |
| 7301 | #endif |
| 7302 | EOF |
| 7303 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7304 | echo "configure:7305: checking for socklen_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7305 | 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] | 7306 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7307 | else |
| 7308 | cat > conftest.$ac_ext <<EOF |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7309 | #line 7310 "configure" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7310 | #include "confdefs.h" |
| 7311 | #include <sys/types.h> |
| 7312 | #if STDC_HEADERS |
| 7313 | #include <stdlib.h> |
| 7314 | #include <stddef.h> |
| 7315 | #endif |
| 7316 | EOF |
| 7317 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 7318 | egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 7319 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7320 | ac_cv_type_socklen_t=yes |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7321 | else |
| 7322 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7323 | ac_cv_type_socklen_t=no |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7324 | fi |
| 7325 | rm -f conftest* |
| 7326 | |
| 7327 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7328 | echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 |
| 7329 | if test $ac_cv_type_socklen_t = no; then |
| 7330 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7331 | #define socklen_t int |
| 7332 | EOF |
| 7333 | |
| 7334 | fi |
| 7335 | |
| 7336 | |
Neil Schemenauer | f25cf6c | 2001-03-04 06:39:33 +0000 | [diff] [blame] | 7337 | # Add Python/ prefix to LIBOBJS |
| 7338 | libobjs=$LIBOBJS |
| 7339 | LIBOBJS= |
| 7340 | for obj in $libobjs; do |
| 7341 | LIBOBJS="$LIBOBJS Python/$obj" |
| 7342 | done |
| 7343 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7344 | #AC_MSG_CHECKING(for Modules/Setup) |
| 7345 | #if test ! -f Modules/Setup ; then |
| 7346 | # if test ! -d Modules ; then |
| 7347 | # mkdir Modules |
| 7348 | # fi |
| 7349 | # cp "$srcdir/Modules/Setup.dist" Modules/Setup |
| 7350 | # AC_MSG_RESULT(creating) |
| 7351 | #else |
| 7352 | # AC_MSG_RESULT(already exists) |
| 7353 | #fi |
| 7354 | |
| 7355 | |
Neil Schemenauer | acbf9ef | 2001-02-27 02:15:14 +0000 | [diff] [blame] | 7356 | SRCDIRS="Parser Grammar Objects Python Modules" |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7357 | echo $ac_n "checking for build directories""... $ac_c" 1>&6 |
Martin v. Löwis | b7da67a | 2001-10-18 15:35:38 +0000 | [diff] [blame] | 7358 | echo "configure:7359: checking for build directories" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7359 | for dir in $SRCDIRS; do |
| 7360 | if test ! -d $dir; then |
| 7361 | mkdir $dir |
Guido van Rossum | 262cf20 | 2000-11-02 19:33:53 +0000 | [diff] [blame] | 7362 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7363 | done |
| 7364 | echo "$ac_t""done" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 7365 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7366 | # generate output files |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7367 | trap '' 1 2 15 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7368 | cat > confcache <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7369 | # This file is a shell script that caches the results of configure |
| 7370 | # tests run on this system so they can be shared between configure |
| 7371 | # scripts and configure runs. It is not useful on other systems. |
| 7372 | # If it contains results you don't want to keep, you may remove or edit it. |
| 7373 | # |
| 7374 | # By default, configure uses ./config.cache as the cache file, |
| 7375 | # creating it if it does not exist already. You can give configure |
| 7376 | # the --cache-file=FILE option to use a different cache file; that is |
| 7377 | # what configure does when it calls configure scripts in |
| 7378 | # subdirectories, so they share the cache. |
| 7379 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| 7380 | # config.status only pays attention to the cache file if you give it the |
| 7381 | # --recheck option to rerun configure. |
| 7382 | # |
| 7383 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7384 | # The following way of writing the cache mishandles newlines in values, |
| 7385 | # but we know of no workaround that is simple, portable, and efficient. |
| 7386 | # So, don't put newlines in cache variables' values. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7387 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 7388 | # 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] | 7389 | (set) 2>&1 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7390 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7391 | *ac_space=\ *) |
| 7392 | # `set' does not quote correctly, so add quotes (double-quote substitution |
| 7393 | # turns \\\\ into \\, and sed turns \\ into \). |
| 7394 | sed -n \ |
| 7395 | -e "s/'/'\\\\''/g" \ |
| 7396 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| 7397 | ;; |
| 7398 | *) |
| 7399 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 7400 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| 7401 | ;; |
| 7402 | esac >> confcache |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7403 | if cmp -s $cache_file confcache; then |
| 7404 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7405 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7406 | if test -w $cache_file; then |
| 7407 | echo "updating cache $cache_file" |
| 7408 | cat confcache > $cache_file |
| 7409 | else |
| 7410 | echo "not updating unwritable cache $cache_file" |
| 7411 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7412 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7413 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7414 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7415 | 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] | 7416 | |
| 7417 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 7418 | # Let make expand exec_prefix. |
| 7419 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7420 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7421 | # Any assignment to VPATH causes Sun make to only execute |
| 7422 | # the first set of double-colon rules, so remove it if not needed. |
| 7423 | # If there is a colon in the path, we need to keep it. |
| 7424 | if test "x$srcdir" = x.; then |
| 7425 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
| 7426 | fi |
| 7427 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7428 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7429 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7430 | DEFS=-DHAVE_CONFIG_H |
| 7431 | |
| 7432 | # Without the "./", some shells look in PATH for config.status. |
| 7433 | : ${CONFIG_STATUS=./config.status} |
| 7434 | |
| 7435 | echo creating $CONFIG_STATUS |
| 7436 | rm -f $CONFIG_STATUS |
| 7437 | cat > $CONFIG_STATUS <<EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7438 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7439 | # Generated automatically by configure. |
| 7440 | # Run this file to recreate the current configuration. |
| 7441 | # This directory was configured as follows, |
| 7442 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 7443 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7444 | # $0 $ac_configure_args |
| 7445 | # |
| 7446 | # Compiler output produced by configure, useful for debugging |
| 7447 | # configure, is in ./config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7448 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7449 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7450 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7451 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7452 | case "\$ac_option" in |
| 7453 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7454 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
| 7455 | 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] | 7456 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7457 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7458 | exit 0 ;; |
| 7459 | -help | --help | --hel | --he | --h) |
| 7460 | echo "\$ac_cs_usage"; exit 0 ;; |
| 7461 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7462 | esac |
| 7463 | done |
| 7464 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7465 | ac_given_srcdir=$srcdir |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7466 | ac_given_INSTALL="$INSTALL" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7467 | |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7468 | 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] | 7469 | EOF |
| 7470 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7471 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7472 | # Protect against being on the right side of a sed subst in config.status. |
| 7473 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 7474 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7475 | $ac_vpsub |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7476 | $extrasub |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7477 | s%@SHELL@%$SHELL%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7478 | s%@CFLAGS@%$CFLAGS%g |
| 7479 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 7480 | s%@CXXFLAGS@%$CXXFLAGS%g |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7481 | s%@FFLAGS@%$FFLAGS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7482 | s%@DEFS@%$DEFS%g |
| 7483 | s%@LDFLAGS@%$LDFLAGS%g |
| 7484 | s%@LIBS@%$LIBS%g |
| 7485 | s%@exec_prefix@%$exec_prefix%g |
| 7486 | s%@prefix@%$prefix%g |
| 7487 | s%@program_transform_name@%$program_transform_name%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7488 | s%@bindir@%$bindir%g |
| 7489 | s%@sbindir@%$sbindir%g |
| 7490 | s%@libexecdir@%$libexecdir%g |
| 7491 | s%@datadir@%$datadir%g |
| 7492 | s%@sysconfdir@%$sysconfdir%g |
| 7493 | s%@sharedstatedir@%$sharedstatedir%g |
| 7494 | s%@localstatedir@%$localstatedir%g |
| 7495 | s%@libdir@%$libdir%g |
| 7496 | s%@includedir@%$includedir%g |
| 7497 | s%@oldincludedir@%$oldincludedir%g |
| 7498 | s%@infodir@%$infodir%g |
| 7499 | s%@mandir@%$mandir%g |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 7500 | s%@VERSION@%$VERSION%g |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 7501 | s%@CONFIG_ARGS@%$CONFIG_ARGS%g |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 7502 | s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g |
| 7503 | s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g |
| 7504 | s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g |
| 7505 | s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 7506 | s%@MACHDEP@%$MACHDEP%g |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 7507 | s%@SGI_ABI@%$SGI_ABI%g |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 7508 | s%@CXX@%$CXX%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7509 | s%@MAINOBJ@%$MAINOBJ%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7510 | s%@CC@%$CC%g |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 7511 | s%@CPP@%$CPP%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7512 | s%@EXEEXT@%$EXEEXT%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7513 | s%@LIBRARY@%$LIBRARY%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7514 | s%@LDLIBRARY@%$LDLIBRARY%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7515 | s%@DLLLIBRARY@%$DLLLIBRARY%g |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 7516 | s%@BLDLIBRARY@%$BLDLIBRARY%g |
| 7517 | s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 7518 | s%@LINKCC@%$LINKCC%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7519 | s%@RANLIB@%$RANLIB%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7520 | s%@AR@%$AR%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7521 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7522 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7523 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 7524 | s%@LN@%$LN%g |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 7525 | s%@OPT@%$OPT%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7526 | s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7527 | s%@SO@%$SO%g |
| 7528 | s%@LDSHARED@%$LDSHARED%g |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 7529 | s%@BLDSHARED@%$BLDSHARED%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7530 | s%@CCSHARED@%$CCSHARED%g |
| 7531 | s%@LINKFORSHARED@%$LINKFORSHARED%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7532 | s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7533 | s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g |
| 7534 | s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 7535 | s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 7536 | s%@LDLAST@%$LDLAST%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7537 | s%@DLINCLDIR@%$DLINCLDIR%g |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 7538 | s%@DYNLOADFILE@%$DYNLOADFILE%g |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 7539 | s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7540 | s%@LIBOBJS@%$LIBOBJS%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7541 | s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g |
| 7542 | s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g |
| 7543 | 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] | 7544 | s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7545 | s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7546 | s%@LIBM@%$LIBM%g |
| 7547 | s%@LIBC@%$LIBC%g |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7548 | s%@UNICODE_OBJS@%$UNICODE_OBJS%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7549 | s%@SRCDIRS@%$SRCDIRS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7550 | |
| 7551 | CEOF |
| 7552 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7553 | |
| 7554 | cat >> $CONFIG_STATUS <<\EOF |
| 7555 | |
| 7556 | # Split the substitutions into bite-sized pieces for seds with |
| 7557 | # small command number limits, like on Digital OSF/1 and HP-UX. |
| 7558 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 7559 | ac_file=1 # Number of current file. |
| 7560 | ac_beg=1 # First line for current file. |
| 7561 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 7562 | ac_more_lines=: |
| 7563 | ac_sed_cmds="" |
| 7564 | while $ac_more_lines; do |
| 7565 | if test $ac_beg -gt 1; then |
| 7566 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7567 | else |
| 7568 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7569 | fi |
| 7570 | if test ! -s conftest.s$ac_file; then |
| 7571 | ac_more_lines=false |
| 7572 | rm -f conftest.s$ac_file |
| 7573 | else |
| 7574 | if test -z "$ac_sed_cmds"; then |
| 7575 | ac_sed_cmds="sed -f conftest.s$ac_file" |
| 7576 | else |
| 7577 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
| 7578 | fi |
| 7579 | ac_file=`expr $ac_file + 1` |
| 7580 | ac_beg=$ac_end |
| 7581 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
| 7582 | fi |
| 7583 | done |
| 7584 | if test -z "$ac_sed_cmds"; then |
| 7585 | ac_sed_cmds=cat |
| 7586 | fi |
| 7587 | EOF |
| 7588 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7589 | cat >> $CONFIG_STATUS <<EOF |
| 7590 | |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7591 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"} |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7592 | EOF |
| 7593 | cat >> $CONFIG_STATUS <<\EOF |
| 7594 | 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] | 7595 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7596 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7597 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7598 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7599 | *) ac_file_in="${ac_file}.in" ;; |
| 7600 | esac |
| 7601 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7602 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7603 | |
| 7604 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7605 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7606 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7607 | # The file is in a subdirectory. |
| 7608 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7609 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7610 | # A "../" for each directory in $ac_dir_suffix. |
| 7611 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
| 7612 | else |
| 7613 | ac_dir_suffix= ac_dots= |
| 7614 | fi |
| 7615 | |
| 7616 | case "$ac_given_srcdir" in |
| 7617 | .) srcdir=. |
| 7618 | if test -z "$ac_dots"; then top_srcdir=. |
| 7619 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
| 7620 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; |
| 7621 | *) # Relative path. |
| 7622 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 7623 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
| 7624 | esac |
| 7625 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7626 | case "$ac_given_INSTALL" in |
| 7627 | [/$]*) INSTALL="$ac_given_INSTALL" ;; |
| 7628 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
| 7629 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7630 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7631 | echo creating "$ac_file" |
| 7632 | rm -f "$ac_file" |
| 7633 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
| 7634 | case "$ac_file" in |
| 7635 | *Makefile*) ac_comsub="1i\\ |
| 7636 | # $configure_input" ;; |
| 7637 | *) ac_comsub= ;; |
| 7638 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7639 | |
| 7640 | 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] | 7641 | sed -e "$ac_comsub |
| 7642 | s%@configure_input@%$configure_input%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7643 | s%@srcdir@%$srcdir%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7644 | s%@top_srcdir@%$top_srcdir%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7645 | s%@INSTALL@%$INSTALL%g |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7646 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7647 | fi; done |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7648 | rm -f conftest.s* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7649 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7650 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
| 7651 | # 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] | 7652 | # |
| 7653 | # ac_d sets the value in "#define NAME VALUE" lines. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7654 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 7655 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7656 | ac_dC='\3' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7657 | ac_dD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7658 | # 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] | 7659 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7660 | ac_uB='\([ ]\)%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7661 | ac_uC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7662 | ac_uD='\4%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7663 | # 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] | 7664 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7665 | ac_eB='$%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7666 | ac_eC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7667 | ac_eD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7668 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7669 | if test "${CONFIG_HEADERS+set}" != set; then |
| 7670 | EOF |
| 7671 | cat >> $CONFIG_STATUS <<EOF |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7672 | CONFIG_HEADERS="pyconfig.h" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7673 | EOF |
| 7674 | cat >> $CONFIG_STATUS <<\EOF |
| 7675 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7676 | 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] | 7677 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7678 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7679 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7680 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7681 | *) ac_file_in="${ac_file}.in" ;; |
| 7682 | esac |
| 7683 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7684 | echo creating $ac_file |
| 7685 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7686 | rm -f conftest.frag conftest.in conftest.out |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7687 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 7688 | cat $ac_file_inputs > conftest.in |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7689 | |
| 7690 | EOF |
| 7691 | |
| 7692 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
| 7693 | # 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] | 7694 | # 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] | 7695 | # Protect against being in an unquoted here document in config.status. |
| 7696 | rm -f conftest.vals |
| 7697 | cat > conftest.hdr <<\EOF |
| 7698 | s/[\\&%]/\\&/g |
| 7699 | s%[\\$`]%\\&%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7700 | 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] | 7701 | s%ac_d%ac_u%gp |
| 7702 | s%ac_u%ac_e%gp |
| 7703 | EOF |
| 7704 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
| 7705 | rm -f conftest.hdr |
| 7706 | |
| 7707 | # This sed command replaces #undef with comments. This is necessary, for |
| 7708 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 7709 | # on some systems where configure will not decide to define it. |
| 7710 | cat >> conftest.vals <<\EOF |
| 7711 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
| 7712 | EOF |
| 7713 | |
| 7714 | # Break up conftest.vals because some shells have a limit on |
| 7715 | # 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] | 7716 | |
| 7717 | rm -f conftest.tail |
| 7718 | while : |
| 7719 | do |
| 7720 | ac_lines=`grep -c . conftest.vals` |
| 7721 | # grep -c gives empty output for an empty file on some AIX systems. |
| 7722 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 7723 | # Write a limited-size here document to conftest.frag. |
| 7724 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
| 7725 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
| 7726 | echo 'CEOF |
| 7727 | sed -f conftest.frag conftest.in > conftest.out |
| 7728 | rm -f conftest.in |
| 7729 | mv conftest.out conftest.in |
| 7730 | ' >> $CONFIG_STATUS |
| 7731 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
| 7732 | rm -f conftest.vals |
| 7733 | mv conftest.tail conftest.vals |
| 7734 | done |
| 7735 | rm -f conftest.vals |
| 7736 | |
| 7737 | cat >> $CONFIG_STATUS <<\EOF |
| 7738 | rm -f conftest.frag conftest.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7739 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7740 | cat conftest.in >> conftest.h |
| 7741 | rm -f conftest.in |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7742 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7743 | echo "$ac_file is unchanged" |
| 7744 | rm -f conftest.h |
| 7745 | else |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7746 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7747 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7748 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7749 | # The file is in a subdirectory. |
| 7750 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 7751 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7752 | rm -f $ac_file |
| 7753 | mv conftest.h $ac_file |
| 7754 | fi |
| 7755 | fi; done |
| 7756 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7757 | EOF |
| 7758 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7759 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7760 | EOF |
| 7761 | cat >> $CONFIG_STATUS <<\EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7762 | |
| 7763 | exit 0 |
| 7764 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7765 | chmod +x $CONFIG_STATUS |
| 7766 | rm -fr confdefs* $ac_clean_files |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7767 | 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] | 7768 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7769 | |
| 7770 | echo "creating Setup" |
| 7771 | if test ! -f Modules/Setup |
| 7772 | then |
| 7773 | cp $srcdir/Modules/Setup.dist Modules/Setup |
| 7774 | fi |
| 7775 | |
| 7776 | echo "creating Setup.local" |
| 7777 | if test ! -f Modules/Setup.local |
| 7778 | then |
| 7779 | echo "# Edit this file for local setup changes" >Modules/Setup.local |
| 7780 | fi |
| 7781 | |
| 7782 | echo "creating Makefile" |
| 7783 | $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ |
| 7784 | -s Modules Modules/Setup.config \ |
Neil Schemenauer | f8b71c5 | 2001-04-21 17:41:16 +0000 | [diff] [blame] | 7785 | Modules/Setup.local Modules/Setup |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 7786 | mv config.c Modules |