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 | |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3 | # From configure.in Revision: 1.275 |
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 | |
Guido van Rossum | 67b2659 | 2001-10-20 14:21:45 +0000 | [diff] [blame] | 639 | tr -d '/ ' | sed 's/^[A-Z]\.//' | 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 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 1529 | bsdos*|hp*|HP*) |
| 1530 | # install -d does not work on BSDI or HP-UX |
Neil Schemenauer | a42c827 | 2001-03-31 00:01:55 +0000 | [diff] [blame] | 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> |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2407 | #include <sys/types.h> |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2408 | main() |
| 2409 | { |
| 2410 | FILE *f=fopen("conftestval", "w"); |
| 2411 | if (!f) exit(1); |
| 2412 | fprintf(f, "%d\n", sizeof(int)); |
| 2413 | exit(0); |
| 2414 | } |
| 2415 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2416 | if { (eval echo configure:2417: \"$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] | 2417 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2418 | ac_cv_sizeof_int=`cat conftestval` |
| 2419 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2420 | echo "configure: failed program was:" >&5 |
| 2421 | cat conftest.$ac_ext >&5 |
| 2422 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2423 | ac_cv_sizeof_int=0 |
| 2424 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2425 | rm -fr conftest* |
| 2426 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2427 | |
| 2428 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2429 | echo "$ac_t""$ac_cv_sizeof_int" 1>&6 |
| 2430 | cat >> confdefs.h <<EOF |
| 2431 | #define SIZEOF_INT $ac_cv_sizeof_int |
| 2432 | EOF |
| 2433 | |
| 2434 | |
| 2435 | echo $ac_n "checking size of long""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2436 | echo "configure:2437: checking size of long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2437 | if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2438 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2439 | else |
| 2440 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2441 | ac_cv_sizeof_long=4 |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2442 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2443 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2444 | #line 2445 "configure" |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2445 | #include "confdefs.h" |
| 2446 | #include <stdio.h> |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2447 | #include <sys/types.h> |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2448 | main() |
| 2449 | { |
| 2450 | FILE *f=fopen("conftestval", "w"); |
| 2451 | if (!f) exit(1); |
| 2452 | fprintf(f, "%d\n", sizeof(long)); |
| 2453 | exit(0); |
| 2454 | } |
| 2455 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2456 | if { (eval echo configure:2457: \"$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] | 2457 | then |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2458 | ac_cv_sizeof_long=`cat conftestval` |
| 2459 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2460 | echo "configure: failed program was:" >&5 |
| 2461 | cat conftest.$ac_ext >&5 |
| 2462 | rm -fr conftest* |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2463 | ac_cv_sizeof_long=0 |
| 2464 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2465 | rm -fr conftest* |
| 2466 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 2467 | |
| 2468 | fi |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 2469 | echo "$ac_t""$ac_cv_sizeof_long" 1>&6 |
| 2470 | cat >> confdefs.h <<EOF |
| 2471 | #define SIZEOF_LONG $ac_cv_sizeof_long |
| 2472 | EOF |
| 2473 | |
| 2474 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2475 | echo $ac_n "checking size of void *""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2476 | echo "configure:2477: checking size of void *" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2477 | 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] | 2478 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2479 | else |
| 2480 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2481 | ac_cv_sizeof_void_p=4 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2482 | else |
| 2483 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2484 | #line 2485 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2485 | #include "confdefs.h" |
| 2486 | #include <stdio.h> |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2487 | #include <sys/types.h> |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 2488 | main() |
| 2489 | { |
| 2490 | FILE *f=fopen("conftestval", "w"); |
| 2491 | if (!f) exit(1); |
| 2492 | fprintf(f, "%d\n", sizeof(void *)); |
| 2493 | exit(0); |
| 2494 | } |
| 2495 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2496 | if { (eval echo configure:2497: \"$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] | 2497 | then |
| 2498 | ac_cv_sizeof_void_p=`cat conftestval` |
| 2499 | else |
| 2500 | echo "configure: failed program was:" >&5 |
| 2501 | cat conftest.$ac_ext >&5 |
| 2502 | rm -fr conftest* |
| 2503 | ac_cv_sizeof_void_p=0 |
| 2504 | fi |
| 2505 | rm -fr conftest* |
| 2506 | fi |
| 2507 | |
| 2508 | fi |
| 2509 | echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6 |
| 2510 | cat >> confdefs.h <<EOF |
| 2511 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
| 2512 | EOF |
| 2513 | |
| 2514 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2515 | echo $ac_n "checking size of char""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2516 | echo "configure:2517: checking size of char" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2517 | if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2518 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2519 | else |
| 2520 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2521 | ac_cv_sizeof_char=1 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2522 | else |
| 2523 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2524 | #line 2525 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2525 | #include "confdefs.h" |
| 2526 | #include <stdio.h> |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2527 | #include <sys/types.h> |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2528 | main() |
| 2529 | { |
| 2530 | FILE *f=fopen("conftestval", "w"); |
| 2531 | if (!f) exit(1); |
| 2532 | fprintf(f, "%d\n", sizeof(char)); |
| 2533 | exit(0); |
| 2534 | } |
| 2535 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2536 | if { (eval echo configure:2537: \"$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] | 2537 | then |
| 2538 | ac_cv_sizeof_char=`cat conftestval` |
| 2539 | else |
| 2540 | echo "configure: failed program was:" >&5 |
| 2541 | cat conftest.$ac_ext >&5 |
| 2542 | rm -fr conftest* |
| 2543 | ac_cv_sizeof_char=0 |
| 2544 | fi |
| 2545 | rm -fr conftest* |
| 2546 | fi |
| 2547 | |
| 2548 | fi |
| 2549 | echo "$ac_t""$ac_cv_sizeof_char" 1>&6 |
| 2550 | cat >> confdefs.h <<EOF |
| 2551 | #define SIZEOF_CHAR $ac_cv_sizeof_char |
| 2552 | EOF |
| 2553 | |
| 2554 | |
| 2555 | echo $ac_n "checking size of short""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2556 | echo "configure:2557: checking size of short" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2557 | if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2558 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2559 | else |
| 2560 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2561 | ac_cv_sizeof_short=2 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2562 | else |
| 2563 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2564 | #line 2565 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2565 | #include "confdefs.h" |
| 2566 | #include <stdio.h> |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2567 | #include <sys/types.h> |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2568 | main() |
| 2569 | { |
| 2570 | FILE *f=fopen("conftestval", "w"); |
| 2571 | if (!f) exit(1); |
| 2572 | fprintf(f, "%d\n", sizeof(short)); |
| 2573 | exit(0); |
| 2574 | } |
| 2575 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2576 | if { (eval echo configure:2577: \"$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] | 2577 | then |
| 2578 | ac_cv_sizeof_short=`cat conftestval` |
| 2579 | else |
| 2580 | echo "configure: failed program was:" >&5 |
| 2581 | cat conftest.$ac_ext >&5 |
| 2582 | rm -fr conftest* |
| 2583 | ac_cv_sizeof_short=0 |
| 2584 | fi |
| 2585 | rm -fr conftest* |
| 2586 | fi |
| 2587 | |
| 2588 | fi |
| 2589 | echo "$ac_t""$ac_cv_sizeof_short" 1>&6 |
| 2590 | cat >> confdefs.h <<EOF |
| 2591 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
| 2592 | EOF |
| 2593 | |
| 2594 | |
| 2595 | echo $ac_n "checking size of float""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2596 | echo "configure:2597: checking size of float" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2597 | if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2598 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2599 | else |
| 2600 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2601 | ac_cv_sizeof_float=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2602 | else |
| 2603 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2604 | #line 2605 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2605 | #include "confdefs.h" |
| 2606 | #include <stdio.h> |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2607 | #include <sys/types.h> |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2608 | main() |
| 2609 | { |
| 2610 | FILE *f=fopen("conftestval", "w"); |
| 2611 | if (!f) exit(1); |
| 2612 | fprintf(f, "%d\n", sizeof(float)); |
| 2613 | exit(0); |
| 2614 | } |
| 2615 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2616 | if { (eval echo configure:2617: \"$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] | 2617 | then |
| 2618 | ac_cv_sizeof_float=`cat conftestval` |
| 2619 | else |
| 2620 | echo "configure: failed program was:" >&5 |
| 2621 | cat conftest.$ac_ext >&5 |
| 2622 | rm -fr conftest* |
| 2623 | ac_cv_sizeof_float=0 |
| 2624 | fi |
| 2625 | rm -fr conftest* |
| 2626 | fi |
| 2627 | |
| 2628 | fi |
| 2629 | echo "$ac_t""$ac_cv_sizeof_float" 1>&6 |
| 2630 | cat >> confdefs.h <<EOF |
| 2631 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
| 2632 | EOF |
| 2633 | |
| 2634 | |
| 2635 | echo $ac_n "checking size of double""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2636 | echo "configure:2637: checking size of double" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2637 | if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2638 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2639 | else |
| 2640 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2641 | ac_cv_sizeof_double=8 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2642 | else |
| 2643 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2644 | #line 2645 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2645 | #include "confdefs.h" |
| 2646 | #include <stdio.h> |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2647 | #include <sys/types.h> |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 2648 | main() |
| 2649 | { |
| 2650 | FILE *f=fopen("conftestval", "w"); |
| 2651 | if (!f) exit(1); |
| 2652 | fprintf(f, "%d\n", sizeof(double)); |
| 2653 | exit(0); |
| 2654 | } |
| 2655 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2656 | if { (eval echo configure:2657: \"$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] | 2657 | then |
| 2658 | ac_cv_sizeof_double=`cat conftestval` |
| 2659 | else |
| 2660 | echo "configure: failed program was:" >&5 |
| 2661 | cat conftest.$ac_ext >&5 |
| 2662 | rm -fr conftest* |
| 2663 | ac_cv_sizeof_double=0 |
| 2664 | fi |
| 2665 | rm -fr conftest* |
| 2666 | fi |
| 2667 | |
| 2668 | fi |
| 2669 | echo "$ac_t""$ac_cv_sizeof_double" 1>&6 |
| 2670 | cat >> confdefs.h <<EOF |
| 2671 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
| 2672 | EOF |
| 2673 | |
| 2674 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2675 | echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2676 | echo "configure:2677: checking size of fpos_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2677 | 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] | 2678 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2679 | else |
| 2680 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2681 | ac_cv_sizeof_fpos_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2682 | else |
| 2683 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2684 | #line 2685 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2685 | #include "confdefs.h" |
| 2686 | #include <stdio.h> |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2687 | #include <sys/types.h> |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2688 | main() |
| 2689 | { |
| 2690 | FILE *f=fopen("conftestval", "w"); |
| 2691 | if (!f) exit(1); |
| 2692 | fprintf(f, "%d\n", sizeof(fpos_t)); |
| 2693 | exit(0); |
| 2694 | } |
| 2695 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2696 | if { (eval echo configure:2697: \"$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] | 2697 | then |
| 2698 | ac_cv_sizeof_fpos_t=`cat conftestval` |
| 2699 | else |
| 2700 | echo "configure: failed program was:" >&5 |
| 2701 | cat conftest.$ac_ext >&5 |
| 2702 | rm -fr conftest* |
| 2703 | ac_cv_sizeof_fpos_t=0 |
| 2704 | fi |
| 2705 | rm -fr conftest* |
| 2706 | fi |
| 2707 | |
| 2708 | fi |
| 2709 | echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6 |
| 2710 | cat >> confdefs.h <<EOF |
| 2711 | #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t |
| 2712 | EOF |
| 2713 | |
| 2714 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 2715 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2716 | echo $ac_n "checking for long long support""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2717 | echo "configure:2718: checking for long long support" >&5 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2718 | have_long_long=no |
| 2719 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2720 | #line 2721 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2721 | #include "confdefs.h" |
| 2722 | |
| 2723 | int main() { |
| 2724 | long long x; x = (long long)0; |
| 2725 | ; return 0; } |
| 2726 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2727 | if { (eval echo configure:2728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2728 | rm -rf conftest* |
| 2729 | cat >> confdefs.h <<\EOF |
| 2730 | #define HAVE_LONG_LONG 1 |
| 2731 | EOF |
| 2732 | have_long_long=yes |
| 2733 | else |
| 2734 | echo "configure: failed program was:" >&5 |
| 2735 | cat conftest.$ac_ext >&5 |
| 2736 | fi |
| 2737 | rm -f conftest* |
| 2738 | echo "$ac_t""$have_long_long" 1>&6 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2739 | if test "$have_long_long" = yes ; then |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2740 | echo $ac_n "checking size of long long""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2741 | echo "configure:2742: checking size of long long" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2742 | 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] | 2743 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2744 | else |
| 2745 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2746 | ac_cv_sizeof_long_long=8 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2747 | else |
| 2748 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2749 | #line 2750 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2750 | #include "confdefs.h" |
| 2751 | #include <stdio.h> |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2752 | #include <sys/types.h> |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2753 | main() |
| 2754 | { |
| 2755 | FILE *f=fopen("conftestval", "w"); |
| 2756 | if (!f) exit(1); |
| 2757 | fprintf(f, "%d\n", sizeof(long long)); |
| 2758 | exit(0); |
| 2759 | } |
| 2760 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2761 | if { (eval echo configure:2762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 2762 | then |
| 2763 | ac_cv_sizeof_long_long=`cat conftestval` |
| 2764 | else |
| 2765 | echo "configure: failed program was:" >&5 |
| 2766 | cat conftest.$ac_ext >&5 |
| 2767 | rm -fr conftest* |
| 2768 | ac_cv_sizeof_long_long=0 |
| 2769 | fi |
| 2770 | rm -fr conftest* |
| 2771 | fi |
| 2772 | |
| 2773 | fi |
| 2774 | echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6 |
| 2775 | cat >> confdefs.h <<EOF |
| 2776 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 2777 | EOF |
| 2778 | |
| 2779 | |
| 2780 | fi |
| 2781 | |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2782 | echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2783 | echo "configure:2784: checking for uintptr_t support" >&5 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2784 | have_uintptr_t=no |
| 2785 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2786 | #line 2787 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2787 | #include "confdefs.h" |
| 2788 | |
| 2789 | int main() { |
| 2790 | uintptr_t x; x = (uintptr_t)0; |
| 2791 | ; return 0; } |
| 2792 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2793 | if { (eval echo configure:2794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2794 | rm -rf conftest* |
| 2795 | cat >> confdefs.h <<\EOF |
| 2796 | #define HAVE_UINTPTR_T 1 |
| 2797 | EOF |
| 2798 | have_uintptr_t=yes |
| 2799 | else |
| 2800 | echo "configure: failed program was:" >&5 |
| 2801 | cat conftest.$ac_ext >&5 |
| 2802 | fi |
| 2803 | rm -f conftest* |
| 2804 | echo "$ac_t""$have_uintptr_t" 1>&6 |
| 2805 | if test "$have_uintptr_t" = yes ; then |
| 2806 | echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2807 | echo "configure:2808: checking size of uintptr_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2808 | if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2809 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2810 | else |
| 2811 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2812 | ac_cv_sizeof_uintptr_t=4 |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2813 | else |
| 2814 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2815 | #line 2816 "configure" |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2816 | #include "confdefs.h" |
| 2817 | #include <stdio.h> |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2818 | #include <sys/types.h> |
Barry Warsaw | bc7c7f9 | 2000-08-18 04:53:33 +0000 | [diff] [blame] | 2819 | main() |
| 2820 | { |
| 2821 | FILE *f=fopen("conftestval", "w"); |
| 2822 | if (!f) exit(1); |
| 2823 | fprintf(f, "%d\n", sizeof(uintptr_t)); |
| 2824 | exit(0); |
| 2825 | } |
| 2826 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2827 | if { (eval echo configure:2828: \"$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] | 2828 | then |
| 2829 | ac_cv_sizeof_uintptr_t=`cat conftestval` |
| 2830 | else |
| 2831 | echo "configure: failed program was:" >&5 |
| 2832 | cat conftest.$ac_ext >&5 |
| 2833 | rm -fr conftest* |
| 2834 | ac_cv_sizeof_uintptr_t=0 |
| 2835 | fi |
| 2836 | rm -fr conftest* |
| 2837 | fi |
| 2838 | |
| 2839 | fi |
| 2840 | echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6 |
| 2841 | cat >> confdefs.h <<EOF |
| 2842 | #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t |
| 2843 | EOF |
| 2844 | |
| 2845 | |
| 2846 | fi |
| 2847 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2848 | # Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>. |
| 2849 | echo $ac_n "checking size of off_t""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2850 | echo "configure:2851: checking size of off_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2851 | 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] | 2852 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2853 | else |
| 2854 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2855 | ac_cv_sizeof_off_t=4 |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2856 | else |
| 2857 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2858 | #line 2859 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2859 | #include "confdefs.h" |
| 2860 | #include <stdio.h> |
| 2861 | #include <sys/types.h> |
| 2862 | main() |
| 2863 | { |
| 2864 | FILE *f=fopen("conftestval", "w"); |
| 2865 | if (!f) exit(1); |
| 2866 | fprintf(f, "%d\n", sizeof(off_t)); |
| 2867 | exit(0); |
| 2868 | } |
| 2869 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2870 | if { (eval echo configure:2871: \"$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] | 2871 | then |
| 2872 | ac_cv_sizeof_off_t=`cat conftestval` |
| 2873 | else |
| 2874 | echo "configure: failed program was:" >&5 |
| 2875 | cat conftest.$ac_ext >&5 |
| 2876 | rm -fr conftest* |
| 2877 | ac_cv_sizeof_off_t=0 |
| 2878 | fi |
| 2879 | rm -fr conftest* |
| 2880 | fi |
| 2881 | |
| 2882 | |
| 2883 | fi |
| 2884 | |
| 2885 | echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6 |
| 2886 | cat >> confdefs.h <<EOF |
| 2887 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
| 2888 | EOF |
| 2889 | |
| 2890 | |
| 2891 | echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2892 | echo "configure:2893: checking whether to enable large file support" >&5 |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 2893 | if test "$have_long_long" = yes -a \ |
| 2894 | "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ |
| 2895 | "$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] | 2896 | cat >> confdefs.h <<\EOF |
| 2897 | #define HAVE_LARGEFILE_SUPPORT 1 |
| 2898 | EOF |
| 2899 | |
| 2900 | echo "$ac_t""yes" 1>&6 |
| 2901 | else |
| 2902 | echo "$ac_t""no" 1>&6 |
| 2903 | fi |
| 2904 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2905 | # AC_CHECK_SIZEOF() doesn't include <time.h>. |
| 2906 | echo $ac_n "checking size of time_t""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2907 | echo "configure:2908: checking size of time_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2908 | 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] | 2909 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2910 | else |
| 2911 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2912 | ac_cv_sizeof_time_t=4 |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2913 | else |
| 2914 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2915 | #line 2916 "configure" |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 2916 | #include "confdefs.h" |
| 2917 | #include <stdio.h> |
| 2918 | #include <time.h> |
| 2919 | main() |
| 2920 | { |
| 2921 | FILE *f=fopen("conftestval", "w"); |
| 2922 | if (!f) exit(1); |
| 2923 | fprintf(f, "%d\n", sizeof(time_t)); |
| 2924 | exit(0); |
| 2925 | } |
| 2926 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2927 | if { (eval echo configure:2928: \"$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] | 2928 | then |
| 2929 | ac_cv_sizeof_time_t=`cat conftestval` |
| 2930 | else |
| 2931 | echo "configure: failed program was:" >&5 |
| 2932 | cat conftest.$ac_ext >&5 |
| 2933 | rm -fr conftest* |
| 2934 | ac_cv_sizeof_time_t=0 |
| 2935 | fi |
| 2936 | rm -fr conftest* |
| 2937 | fi |
| 2938 | |
| 2939 | |
| 2940 | fi |
| 2941 | |
| 2942 | echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6 |
| 2943 | cat >> confdefs.h <<EOF |
| 2944 | #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
| 2945 | EOF |
| 2946 | |
| 2947 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 2948 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2949 | # if have pthread_t then define SIZEOF_PTHREAD_T |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 2950 | ac_save_cc="$CC" |
| 2951 | if test "$ac_cv_kpthread" = "yes" |
| 2952 | then CC="$CC -Kpthread" |
| 2953 | fi |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2954 | echo $ac_n "checking for pthread_t""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2955 | echo "configure:2956: checking for pthread_t" >&5 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2956 | have_pthread_t=no |
| 2957 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2958 | #line 2959 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2959 | #include "confdefs.h" |
| 2960 | #include <pthread.h> |
| 2961 | int main() { |
Guido van Rossum | 1258049 | 2000-09-24 16:47:19 +0000 | [diff] [blame] | 2962 | pthread_t x; x = *(pthread_t*)0; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2963 | ; return 0; } |
| 2964 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2965 | if { (eval echo configure:2966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2966 | rm -rf conftest* |
| 2967 | have_pthread_t=yes |
| 2968 | else |
| 2969 | echo "configure: failed program was:" >&5 |
| 2970 | cat conftest.$ac_ext >&5 |
| 2971 | fi |
| 2972 | rm -f conftest* |
| 2973 | echo "$ac_t""$have_pthread_t" 1>&6 |
| 2974 | if test "$have_pthread_t" = yes ; then |
| 2975 | # AC_CHECK_SIZEOF() doesn't include <pthread.h>. |
| 2976 | echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2977 | echo "configure:2978: checking size of pthread_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 2978 | if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2979 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 2980 | else |
| 2981 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 2982 | ac_cv_sizeof_pthread_t=4 |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2983 | else |
| 2984 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2985 | #line 2986 "configure" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 2986 | #include "confdefs.h" |
| 2987 | #include <stdio.h> |
| 2988 | #include <pthread.h> |
| 2989 | main() |
| 2990 | { |
| 2991 | FILE *f=fopen("conftestval", "w"); |
| 2992 | if (!f) exit(1); |
| 2993 | fprintf(f, "%d\n", sizeof(pthread_t)); |
| 2994 | exit(0); |
| 2995 | } |
| 2996 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 2997 | if { (eval echo configure:2998: \"$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] | 2998 | then |
| 2999 | ac_cv_sizeof_pthread_t=`cat conftestval` |
| 3000 | else |
| 3001 | echo "configure: failed program was:" >&5 |
| 3002 | cat conftest.$ac_ext >&5 |
| 3003 | rm -fr conftest* |
| 3004 | ac_cv_sizeof_pthread_t=0 |
| 3005 | fi |
| 3006 | rm -fr conftest* |
| 3007 | fi |
| 3008 | |
| 3009 | |
| 3010 | fi |
| 3011 | |
| 3012 | echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6 |
| 3013 | cat >> confdefs.h <<EOF |
| 3014 | #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t |
| 3015 | EOF |
| 3016 | |
| 3017 | fi |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 3018 | CC="$ac_save_cc" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3019 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3020 | echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3021 | echo "configure:3022: checking for --enable-toolbox-glue" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3022 | # Check whether --enable-toolbox-glue or --disable-toolbox-glue was given. |
| 3023 | if test "${enable_toolbox_glue+set}" = set; then |
| 3024 | enableval="$enable_toolbox_glue" |
| 3025 | : |
| 3026 | fi |
| 3027 | |
| 3028 | |
| 3029 | if test -z "$enable_toolbox_glue" |
| 3030 | then |
| 3031 | case $ac_sys_system/$ac_sys_release in |
| 3032 | Darwin/*) |
| 3033 | enable_toolbox_glue="yes";; |
| 3034 | *) |
| 3035 | enable_toolbox_glue="no";; |
| 3036 | esac |
| 3037 | fi |
| 3038 | case "$enable_toolbox_glue" in |
| 3039 | yes) |
| 3040 | extra_frameworks="-framework Carbon -framework Foundation" |
| 3041 | extra_machdep_objs="Python/mactoolboxglue.o" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3042 | extra_undefs="-u __dummy -u _PyMac_Error" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3043 | cat >> confdefs.h <<\EOF |
| 3044 | #define USE_TOOLBOX_OBJECT_GLUE 1 |
| 3045 | EOF |
| 3046 | |
| 3047 | ;; |
| 3048 | *) |
| 3049 | extra_frameworks="" |
| 3050 | extra_machdep_objs="" |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3051 | extra_undefs="" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3052 | ;; |
| 3053 | esac |
| 3054 | echo "$ac_t""$enable_toolbox_glue" 1>&6 |
| 3055 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3056 | |
| 3057 | case $ac_sys_system/$ac_sys_release in |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3058 | Darwin/1.4*) |
| 3059 | ns_undef_sym='_environ' |
| 3060 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym" |
| 3061 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
| 3062 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 3063 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 3064 | Darwin/*) |
| 3065 | ns_undef_sym='_environ' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3066 | LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" |
| 3067 | LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks" |
| 3068 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python' |
| 3069 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3070 | esac |
| 3071 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3072 | echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3073 | echo "configure:3074: checking for --enable-framework" >&5 |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3074 | if test "$enable_framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3075 | then |
Jack Jansen | ca06bc6 | 2001-08-03 15:32:23 +0000 | [diff] [blame] | 3076 | OPT="$OPT -fno-common -dynamic" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3077 | # -U __environ is needed since bundles don't have access |
| 3078 | # to crt0 when built but will always be linked against it |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3079 | # -F. is needed to allow linking to the framework while |
| 3080 | # in the build location. |
| 3081 | |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3082 | case $ac_sys_system/$ac_sys_release in |
| 3083 | Darwin/1.4*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";; |
| 3084 | Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";; |
| 3085 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3086 | cat >> confdefs.h <<\EOF |
| 3087 | #define WITH_NEXT_FRAMEWORK 1 |
| 3088 | EOF |
| 3089 | |
| 3090 | echo "$ac_t""yes" 1>&6 |
| 3091 | else |
| 3092 | echo "$ac_t""no" 1>&6 |
| 3093 | fi |
| 3094 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3095 | echo $ac_n "checking for dyld""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3096 | echo "configure:3097: checking for dyld" >&5 |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3097 | case $ac_sys_system/$ac_sys_release in |
| 3098 | Darwin/*) |
| 3099 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3100 | #define WITH_DYLD 1 |
| 3101 | EOF |
| 3102 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3103 | echo "$ac_t""always on for Darwin" 1>&6 |
| 3104 | ;; |
| 3105 | *) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3106 | echo "$ac_t""no" 1>&6 |
| 3107 | ;; |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 3108 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3109 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3110 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3111 | |
| 3112 | |
| 3113 | |
| 3114 | |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3115 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3116 | # SO is the extension of shared libraries `(including the dot!) |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3117 | # -- usually .so, .sl on HP-UX, .dll on Cygwin |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3118 | echo $ac_n "checking SO""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3119 | echo "configure:3120: checking SO" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3120 | if test -z "$SO" |
| 3121 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3122 | case $ac_sys_system in |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3123 | hp*|HP*) SO=.sl;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3124 | CYGWIN*) SO=.dll;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3125 | *) SO=.so;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3126 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3127 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3128 | echo "$ac_t""$SO" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3129 | # LDSHARED is the ld *command* used to create shared library |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3130 | # -- "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] | 3131 | # (Shared libraries in this instance are shared modules to be loaded into |
| 3132 | # Python, as opposed to building Python itself as a shared library.) |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3133 | echo $ac_n "checking LDSHARED""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3134 | echo "configure:3135: checking LDSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3135 | if test -z "$LDSHARED" |
| 3136 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3137 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3138 | AIX*) |
| 3139 | BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" |
Guido van Rossum | ce608b0 | 2001-09-28 15:59:38 +0000 | [diff] [blame] | 3140 | LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3141 | ;; |
| 3142 | BeOS*) |
| 3143 | BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY" |
Guido van Rossum | ce608b0 | 2001-09-28 15:59:38 +0000 | [diff] [blame] | 3144 | LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3145 | ;; |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3146 | IRIX/5*) LDSHARED="ld -shared";; |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 3147 | IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3148 | SunOS/4*) LDSHARED="ld";; |
Greg Ward | 57c9a66 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3149 | SunOS/5*) |
| 3150 | if test "$GCC" = "yes" |
Neil Schemenauer | 8ba9445 | 2001-02-19 18:18:48 +0000 | [diff] [blame] | 3151 | then LDSHARED='$(CC) -shared' |
Martin v. Löwis | 5b718fc | 2001-09-10 15:34:42 +0000 | [diff] [blame] | 3152 | else LDSHARED="$(CC) -G"; |
Greg Ward | 57c9a66 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 3153 | fi ;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3154 | hp*|HP*) LDSHARED="ld -b";; |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3155 | OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; |
| 3156 | DYNIX/ptx*) LDSHARED="ld -G";; |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 3157 | Darwin/1.4*) |
| 3158 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3159 | if test "$enable_framework" ; then |
| 3160 | # Link against the framework. All externals should be defined. |
| 3161 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3162 | else |
| 3163 | # No framework. Ignore undefined symbols, assuming they come from Python |
| 3164 | LDSHARED="$LDSHARED -flat_namespace -undefined suppress" |
| 3165 | fi ;; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3166 | Darwin/*) |
| 3167 | LDSHARED='$(CC) $(LDFLAGS) -bundle' |
| 3168 | if test "$enable_framework" ; then |
| 3169 | # Link against the framework. All externals should be defined. |
| 3170 | LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' |
| 3171 | else |
| 3172 | # No framework. Ignore undefined symbols, assuming they come from Python |
| 3173 | LDSHARED="$LDSHARED -undefined suppress" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3174 | fi ;; |
Guido van Rossum | 81652ab | 1996-07-21 02:53:27 +0000 | [diff] [blame] | 3175 | Linux*) LDSHARED="gcc -shared";; |
Guido van Rossum | 3c4bb80 | 1997-12-18 23:55:32 +0000 | [diff] [blame] | 3176 | dgux*) LDSHARED="ld -G";; |
Guido van Rossum | 458e7fa | 1999-09-17 15:40:40 +0000 | [diff] [blame] | 3177 | BSD/OS*/4*) LDSHARED="gcc -shared";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3178 | OpenBSD*|NetBSD*|FreeBSD*) |
Jeremy Hylton | 4bcc7c5 | 2000-08-31 17:45:35 +0000 | [diff] [blame] | 3179 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 3180 | then |
| 3181 | LDSHARED="cc -shared ${LDFLAGS}" |
| 3182 | else |
| 3183 | LDSHARED="ld -Bshareable ${LDFLAGS}" |
| 3184 | fi;; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3185 | OpenUNIX*|UnixWare*) |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3186 | if test "$GCC" = "yes" |
| 3187 | then LDSHARED="$(CC) -shared" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3188 | else LDSHARED="$(CC) -G" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3189 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3190 | SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3191 | Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3192 | CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3193 | *) LDSHARED="ld";; |
| 3194 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3195 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3196 | echo "$ac_t""$LDSHARED" 1>&6 |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3197 | BLDSHARED=${BLDSHARED-$LDSHARED} |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3198 | # 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] | 3199 | # library (module) -- this is only needed for a few systems |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3200 | echo $ac_n "checking CCSHARED""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3201 | echo "configure:3202: checking CCSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3202 | if test -z "$CCSHARED" |
| 3203 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3204 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 3205 | SunOS*) if test "$GCC" = yes; |
| 3206 | then CCSHARED="-fPIC"; |
| 3207 | fi;; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3208 | hp*|HP*) if test "$GCC" = yes; |
Martin v. Löwis | 703ad70 | 2001-09-05 08:36:52 +0000 | [diff] [blame] | 3209 | then CCSHARED="-fPIC"; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 3210 | else CCSHARED="+z"; |
| 3211 | fi;; |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3212 | Linux*) CCSHARED="-fPIC";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3213 | BSD/OS*/4*) CCSHARED="-fpic";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3214 | FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3215 | OpenUNIX*|UnixWare*) |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3216 | if test "$GCC" = "yes" |
| 3217 | then CCSHARED="-fPIC" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3218 | else CCSHARED="-KPIC" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 3219 | fi;; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3220 | SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 3221 | Monterey*) CCSHARED="-G";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3222 | IRIX*/6*) case $CC in |
| 3223 | *gcc*) CCSHARED="-shared";; |
Guido van Rossum | ee21f41 | 1998-04-20 18:51:54 +0000 | [diff] [blame] | 3224 | *) CCSHARED="";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3225 | esac;; |
Guido van Rossum | aef734b | 2001-01-10 21:09:12 +0000 | [diff] [blame] | 3226 | CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3227 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3228 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3229 | echo "$ac_t""$CCSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3230 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3231 | # the python executable -- this is only needed for a few systems |
| 3232 | echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3233 | echo "configure:3234: checking LINKFORSHARED" >&5 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3234 | if test -z "$LINKFORSHARED" |
| 3235 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 3236 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3237 | AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 3238 | hp*|HP*) |
Guido van Rossum | 304dd2d | 1997-10-20 23:10:56 +0000 | [diff] [blame] | 3239 | LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 3240 | BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 2d9feed | 1997-11-24 17:36:21 +0000 | [diff] [blame] | 3241 | Linux*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 3242 | # -u libsys_s pulls in all symbols in libsys |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3243 | Darwin/*) |
| 3244 | # -u __dummy makes the linker aware of the objc runtime |
| 3245 | # in System.framework; otherwise, __objcInit (referenced in |
| 3246 | # crt1.o) gets erroneously defined as common, which breaks dynamic |
| 3247 | # loading of any modules which reference it in System.framework. |
| 3248 | # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is |
| 3249 | # not used by the core itself but which needs to be in the core so |
| 3250 | # that dynamically loaded extension modules have access to it. |
Jack Jansen | 591cbed | 2001-08-15 13:55:15 +0000 | [diff] [blame] | 3251 | LINKFORSHARED="$extra_undefs -framework System" |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3252 | if test "$enable_framework" |
| 3253 | then |
| 3254 | LINKFORSHARED="$LINKFORSHARED -framework Python" |
| 3255 | fi |
| 3256 | LINKFORSHARED="$LINKFORSHARED $extra_frameworks";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 3257 | OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";; |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 3258 | SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 3259 | ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; |
Martin v. Löwis | 36546db | 2001-09-05 14:24:43 +0000 | [diff] [blame] | 3260 | FreeBSD*|NetBSD*|OpenBSD*) |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 3261 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 3262 | then |
| 3263 | LINKFORSHARED="-Wl,--export-dynamic" |
| 3264 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3265 | SunOS/5*) case $CC in |
| 3266 | *gcc*) |
Guido van Rossum | ff48418 | 2000-02-03 13:50:24 +0000 | [diff] [blame] | 3267 | if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 3268 | then |
| 3269 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 3270 | fi;; |
| 3271 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3272 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3273 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3274 | echo "$ac_t""$LINKFORSHARED" 1>&6 |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 3275 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3276 | |
| 3277 | echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3278 | echo "configure:3279: checking CFLAGSFORSHARED" >&5 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3279 | if test ! "$LIBRARY" = "$LDLIBRARY" |
| 3280 | then |
Neil Schemenauer | 0c6141f | 2001-01-27 21:40:54 +0000 | [diff] [blame] | 3281 | case $ac_sys_system in |
| 3282 | CYGWIN*) |
| 3283 | # Cygwin needs CCSHARED when building extension DLLs |
| 3284 | # but not when building the interpreter DLL. |
| 3285 | CFLAGSFORSHARED='';; |
| 3286 | *) |
| 3287 | CFLAGSFORSHARED='$(CCSHARED)' |
| 3288 | esac |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 3289 | fi |
| 3290 | echo "$ac_t""$CFLAGSFORSHARED" 1>&6 |
| 3291 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3292 | # checks for libraries |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3293 | echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3294 | echo "configure:3295: checking for dlopen in -ldl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3295 | ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3296 | 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] | 3297 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3298 | else |
| 3299 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3300 | LIBS="-ldl $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3301 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3302 | #line 3303 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3303 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3304 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3305 | /* We use char because int might match the return type of a gcc2 |
| 3306 | builtin and then its argument prototype would still apply. */ |
| 3307 | char dlopen(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3308 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3309 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3310 | dlopen() |
| 3311 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3312 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3313 | if { (eval echo configure:3314: \"$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] | 3314 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3315 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3316 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3317 | echo "configure: failed program was:" >&5 |
| 3318 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3319 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3320 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3321 | fi |
| 3322 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3323 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3324 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3325 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3326 | 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] | 3327 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3328 | ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3329 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3330 | cat >> confdefs.h <<EOF |
| 3331 | #define $ac_tr_lib 1 |
| 3332 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3333 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3334 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3335 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3336 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3337 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3338 | fi |
| 3339 | # Dynamic linking for SunOS/Solaris and SYSV |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3340 | echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3341 | echo "configure:3342: checking for shl_load in -ldld" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3342 | ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3343 | 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] | 3344 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3345 | else |
| 3346 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3347 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3348 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3349 | #line 3350 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3350 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3351 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3352 | /* We use char because int might match the return type of a gcc2 |
| 3353 | builtin and then its argument prototype would still apply. */ |
| 3354 | char shl_load(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3355 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3356 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3357 | shl_load() |
| 3358 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3359 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3360 | if { (eval echo configure:3361: \"$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] | 3361 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3362 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3363 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3364 | echo "configure: failed program was:" >&5 |
| 3365 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3366 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3367 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3368 | fi |
| 3369 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3370 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3371 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3372 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3373 | 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] | 3374 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3375 | ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 3376 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3377 | cat >> confdefs.h <<EOF |
| 3378 | #define $ac_tr_lib 1 |
| 3379 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3380 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3381 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3382 | |
| 3383 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3384 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3385 | fi |
| 3386 | # Dynamic linking for HP-UX |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3387 | |
| 3388 | # checks for system dependent C++ extensions support |
| 3389 | case "$ac_sys_system" in |
| 3390 | AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3391 | echo "configure:3392: checking for genuine AIX C++ extensions support" >&5 |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3392 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3393 | #line 3394 "configure" |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3394 | #include "confdefs.h" |
| 3395 | #include "/usr/lpp/xlC/include/load.h" |
| 3396 | int main() { |
| 3397 | loadAndInit("", 0, "") |
| 3398 | ; return 0; } |
| 3399 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3400 | if { (eval echo configure:3401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 3401 | rm -rf conftest* |
| 3402 | cat >> confdefs.h <<\EOF |
| 3403 | #define AIX_GENUINE_CPLUSPLUS 1 |
| 3404 | EOF |
| 3405 | |
| 3406 | echo "$ac_t""yes" 1>&6 |
| 3407 | else |
| 3408 | echo "configure: failed program was:" >&5 |
| 3409 | cat conftest.$ac_ext >&5 |
| 3410 | rm -rf conftest* |
| 3411 | echo "$ac_t""no" 1>&6 |
| 3412 | fi |
| 3413 | rm -f conftest*;; |
| 3414 | *) ;; |
| 3415 | esac |
| 3416 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3417 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
| 3418 | # However on SGI IRIX, these exist but are broken. |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3419 | # BeOS' sockets are stashed in libnet. |
| 3420 | case "$ac_sys_system" in |
| 3421 | IRIX*) ;; |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 3422 | *) |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3423 | echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3424 | echo "configure:3425: checking for t_open in -lnsl" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3425 | ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3426 | 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] | 3427 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3428 | else |
| 3429 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3430 | LIBS="-lnsl $LIBS" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3431 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3432 | #line 3433 "configure" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3433 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3434 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3435 | /* We use char because int might match the return type of a gcc2 |
| 3436 | builtin and then its argument prototype would still apply. */ |
| 3437 | char t_open(); |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3438 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3439 | int main() { |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3440 | t_open() |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3441 | ; return 0; } |
| 3442 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3443 | if { (eval echo configure:3444: \"$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] | 3444 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3445 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3446 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3447 | echo "configure: failed program was:" >&5 |
| 3448 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3449 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3450 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3451 | fi |
| 3452 | rm -f conftest* |
| 3453 | LIBS="$ac_save_LIBS" |
| 3454 | |
| 3455 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3456 | 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] | 3457 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3458 | LIBS="-lnsl $LIBS" |
| 3459 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3460 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 3461 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 3462 | # SVR4 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3463 | echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3464 | echo "configure:3465: checking for socket in -lsocket" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3465 | ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3466 | 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] | 3467 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3468 | else |
| 3469 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3470 | LIBS="-lsocket $LIBS $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3471 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3472 | #line 3473 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3473 | #include "confdefs.h" |
| 3474 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3475 | /* We use char because int might match the return type of a gcc2 |
| 3476 | builtin and then its argument prototype would still apply. */ |
| 3477 | char socket(); |
| 3478 | |
| 3479 | int main() { |
| 3480 | socket() |
| 3481 | ; return 0; } |
| 3482 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3483 | if { (eval echo configure:3484: \"$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] | 3484 | rm -rf conftest* |
| 3485 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3486 | else |
| 3487 | echo "configure: failed program was:" >&5 |
| 3488 | cat conftest.$ac_ext >&5 |
| 3489 | rm -rf conftest* |
| 3490 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3491 | fi |
| 3492 | rm -f conftest* |
| 3493 | LIBS="$ac_save_LIBS" |
| 3494 | |
| 3495 | fi |
| 3496 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3497 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3498 | LIBS="-lsocket $LIBS" |
| 3499 | else |
| 3500 | echo "$ac_t""no" 1>&6 |
| 3501 | fi |
| 3502 | # SVR4 sockets |
Jeremy Hylton | cb25d5e | 2000-07-27 21:23:28 +0000 | [diff] [blame] | 3503 | ;; |
| 3504 | esac |
| 3505 | case "$ac_sys_system" in |
| 3506 | BeOS*) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3507 | echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3508 | echo "configure:3509: checking for socket in -lnet" >&5 |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3509 | ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3510 | 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] | 3511 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3512 | else |
| 3513 | ac_save_LIBS="$LIBS" |
| 3514 | LIBS="-lnet $LIBS $LIBS" |
| 3515 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3516 | #line 3517 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3517 | #include "confdefs.h" |
| 3518 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3519 | /* We use char because int might match the return type of a gcc2 |
| 3520 | builtin and then its argument prototype would still apply. */ |
| 3521 | char socket(); |
| 3522 | |
| 3523 | int main() { |
| 3524 | socket() |
| 3525 | ; return 0; } |
| 3526 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3527 | if { (eval echo configure:3528: \"$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] | 3528 | rm -rf conftest* |
| 3529 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3530 | else |
| 3531 | echo "configure: failed program was:" >&5 |
| 3532 | cat conftest.$ac_ext >&5 |
| 3533 | rm -rf conftest* |
| 3534 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3535 | fi |
| 3536 | rm -f conftest* |
| 3537 | LIBS="$ac_save_LIBS" |
| 3538 | |
| 3539 | fi |
| 3540 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3541 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3542 | LIBS="-lnet $LIBS" |
| 3543 | else |
| 3544 | echo "$ac_t""no" 1>&6 |
| 3545 | fi |
| 3546 | # BeOS |
| 3547 | ;; |
| 3548 | esac |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 3549 | |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3550 | echo $ac_n "checking for --with-libs""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3551 | echo "configure:3552: checking for --with-libs" >&5 |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 3552 | # Check whether --with-libs or --without-libs was given. |
| 3553 | if test "${with_libs+set}" = set; then |
| 3554 | withval="$with_libs" |
| 3555 | |
| 3556 | echo "$ac_t""$withval" 1>&6 |
| 3557 | LIBS="$withval $LIBS" |
| 3558 | |
| 3559 | else |
| 3560 | echo "$ac_t""no" 1>&6 |
| 3561 | fi |
| 3562 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3563 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3564 | # Determine if signalmodule should be used. |
| 3565 | |
| 3566 | |
| 3567 | echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3568 | echo "configure:3569: checking for --with-signal-module" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 3569 | # Check whether --with-signal-module or --without-signal-module was given. |
| 3570 | if test "${with_signal_module+set}" = set; then |
| 3571 | withval="$with_signal_module" |
| 3572 | : |
| 3573 | fi |
| 3574 | |
| 3575 | |
| 3576 | if test -z "$with_signal_module" |
| 3577 | then with_signal_module="yes" |
| 3578 | fi |
| 3579 | echo "$ac_t""$with_signal_module" 1>&6 |
| 3580 | |
| 3581 | if test "${with_signal_module}" = "yes"; then |
| 3582 | USE_SIGNAL_MODULE="" |
| 3583 | SIGNAL_OBJS="" |
| 3584 | else |
| 3585 | USE_SIGNAL_MODULE="#" |
| 3586 | SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o" |
| 3587 | fi |
| 3588 | |
Guido van Rossum | 3d15bd8 | 2001-01-10 18:53:48 +0000 | [diff] [blame] | 3589 | # This is used to generate Setup.config |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3590 | |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3591 | USE_THREAD_MODULE="" |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 3592 | |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3593 | echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3594 | echo "configure:3595: checking for --with-dec-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3595 | |
| 3596 | # Check whether --with-dec-threads or --without-dec-threads was given. |
| 3597 | if test "${with_dec_threads+set}" = set; then |
| 3598 | withval="$with_dec_threads" |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3599 | |
| 3600 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3601 | LDLAST=-threads |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3602 | if test "${with_thread+set}" != set; then |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3603 | with_thread="$withval"; |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3604 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3605 | else |
| 3606 | echo "$ac_t""no" 1>&6 |
| 3607 | fi |
| 3608 | |
| 3609 | |
| 3610 | echo $ac_n "checking for --with-threads""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3611 | echo "configure:3612: checking for --with-threads" >&5 |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3612 | # Check whether --with-threads or --without-threads was given. |
| 3613 | if test "${with_threads+set}" = set; then |
| 3614 | withval="$with_threads" |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3615 | : |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 3616 | fi |
| 3617 | |
| 3618 | |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3619 | # --with-thread is deprecated, but check for it anyway |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3620 | # Check whether --with-thread or --without-thread was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3621 | if test "${with_thread+set}" = set; then |
| 3622 | withval="$with_thread" |
Barry Warsaw | a0f3c5c | 2000-06-30 16:39:35 +0000 | [diff] [blame] | 3623 | |
| 3624 | with_threads=$with_thread |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3625 | fi |
Barry Warsaw | c0d24d8 | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 3626 | |
| 3627 | |
| 3628 | if test -z "$with_threads" |
| 3629 | then with_threads="yes" |
| 3630 | fi |
| 3631 | echo "$ac_t""$with_threads" 1>&6 |
| 3632 | |
| 3633 | if test "$with_threads" = "no" |
| 3634 | then |
| 3635 | USE_THREAD_MODULE="#" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3636 | elif test "$ac_cv_pthread_is_default" = yes |
| 3637 | then |
| 3638 | cat >> confdefs.h <<\EOF |
| 3639 | #define WITH_THREAD 1 |
| 3640 | EOF |
| 3641 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 3642 | # Defining _REENTRANT on system with POSIX threads should not hurt. |
| 3643 | cat >> confdefs.h <<\EOF |
| 3644 | #define _REENTRANT 1 |
| 3645 | EOF |
| 3646 | |
| 3647 | posix_threads=yes |
| 3648 | LIBOBJS="$LIBOBJS thread.o" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3649 | elif test "$ac_cv_kpthread" = "yes" |
| 3650 | then |
| 3651 | CC="$CC -Kpthread" |
| 3652 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 3653 | #define WITH_THREAD 1 |
| 3654 | EOF |
| 3655 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3656 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3657 | LIBOBJS="$LIBOBJS thread.o" |
| 3658 | else |
| 3659 | if test ! -z "$with_threads" -a -d "$with_threads" |
| 3660 | then LDFLAGS="$LDFLAGS -L$with_threads" |
| 3661 | fi |
| 3662 | if test ! -z "$withval" -a -d "$withval" |
| 3663 | then LDFLAGS="$LDFLAGS -L$withval" |
| 3664 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3665 | |
| 3666 | # According to the POSIX spec, a pthreads implementation must |
| 3667 | # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?) |
| 3668 | echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3669 | echo "configure:3670: checking for _POSIX_THREADS in unistd.h" >&5 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3670 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3671 | #line 3672 "configure" |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3672 | #include "confdefs.h" |
| 3673 | #include <unistd.h> |
| 3674 | #ifdef _POSIX_THREADS |
| 3675 | yes |
| 3676 | #endif |
| 3677 | |
| 3678 | EOF |
| 3679 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 3680 | egrep "yes" >/dev/null 2>&1; then |
| 3681 | rm -rf conftest* |
| 3682 | unistd_defines_pthreads=yes |
| 3683 | else |
| 3684 | rm -rf conftest* |
| 3685 | unistd_defines_pthreads=no |
| 3686 | fi |
| 3687 | rm -f conftest* |
| 3688 | |
| 3689 | echo "$ac_t""$unistd_defines_pthreads" 1>&6 |
| 3690 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3691 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 3692 | #define _REENTRANT 1 |
| 3693 | EOF |
| 3694 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3695 | ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3696 | echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3697 | echo "configure:3698: checking for mach/cthreads.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3698 | 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] | 3699 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3700 | else |
| 3701 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3702 | #line 3703 "configure" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3703 | #include "confdefs.h" |
| 3704 | #include <mach/cthreads.h> |
| 3705 | EOF |
| 3706 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3707 | { (eval echo configure:3708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3708 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3709 | if test -z "$ac_err"; then |
| 3710 | rm -rf conftest* |
| 3711 | eval "ac_cv_header_$ac_safe=yes" |
| 3712 | else |
| 3713 | echo "$ac_err" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3714 | echo "configure: failed program was:" >&5 |
| 3715 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3716 | rm -rf conftest* |
| 3717 | eval "ac_cv_header_$ac_safe=no" |
| 3718 | fi |
| 3719 | rm -f conftest* |
| 3720 | fi |
| 3721 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3722 | echo "$ac_t""yes" 1>&6 |
| 3723 | cat >> confdefs.h <<\EOF |
| 3724 | #define WITH_THREAD 1 |
| 3725 | EOF |
| 3726 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3727 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3728 | #define C_THREADS 1 |
| 3729 | EOF |
| 3730 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3731 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3732 | else |
| 3733 | echo "$ac_t""no" 1>&6 |
| 3734 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3735 | echo $ac_n "checking for --with-pth""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3736 | echo "configure:3737: checking for --with-pth" >&5 |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3737 | # Check whether --with-pth or --without-pth was given. |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3738 | if test "${with_pth+set}" = set; then |
| 3739 | withval="$with_pth" |
| 3740 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3741 | echo "$ac_t""$withval" 1>&6 |
| 3742 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3743 | #define WITH_THREAD 1 |
| 3744 | EOF |
| 3745 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3746 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3747 | #define HAVE_PTH 1 |
| 3748 | EOF |
| 3749 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3750 | LIBS="-lpth $LIBS" |
| 3751 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 9e8181b | 2000-09-19 00:46:46 +0000 | [diff] [blame] | 3752 | else |
| 3753 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3754 | echo "$ac_t""no" 1>&6 |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3755 | |
| 3756 | # Just looking for pthread_create in libpthread is not enough: |
| 3757 | # on HP/UX, pthread.h renames pthread_create to a different symbol name. |
| 3758 | # So we really have to include pthread.h, and then link. |
| 3759 | _libs=$LIBS |
| 3760 | LIBS="$LIBS -lpthread" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3761 | echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3762 | echo "configure:3763: checking for pthread_create in -lpthread" >&5 |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3763 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3764 | #line 3765 "configure" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3765 | #include "confdefs.h" |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3766 | #include <pthread.h> |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3767 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3768 | void * start_routine (void *arg) { exit (0); } |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3769 | int main() { |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3770 | |
| 3771 | pthread_create (NULL, NULL, start_routine, NULL) |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3772 | ; return 0; } |
| 3773 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3774 | if { (eval echo configure:3775: \"$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] | 3775 | rm -rf conftest* |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3776 | |
| 3777 | echo "$ac_t""yes" 1>&6 |
| 3778 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3779 | #define WITH_THREAD 1 |
| 3780 | EOF |
| 3781 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3782 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3783 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 3784 | else |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 3785 | echo "configure: failed program was:" >&5 |
| 3786 | cat conftest.$ac_ext >&5 |
| 3787 | rm -rf conftest* |
| 3788 | |
| 3789 | LIBS=$_libs |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3790 | echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3791 | echo "configure:3792: checking for pthread_detach" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3792 | 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] | 3793 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3794 | else |
| 3795 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3796 | #line 3797 "configure" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3797 | #include "confdefs.h" |
| 3798 | /* System header to define __stub macros and hopefully few prototypes, |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3799 | which can conflict with char pthread_detach(); below. */ |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3800 | #include <assert.h> |
| 3801 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3802 | /* We use char because int might match the return type of a gcc2 |
| 3803 | builtin and then its argument prototype would still apply. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3804 | char pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3805 | |
| 3806 | int main() { |
| 3807 | |
| 3808 | /* The GNU C library defines this for functions which it implements |
| 3809 | to always fail with ENOSYS. Some functions are actually named |
| 3810 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3811 | #if defined (__stub_pthread_detach) || defined (__stub___pthread_detach) |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3812 | choke me |
| 3813 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3814 | pthread_detach(); |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3815 | #endif |
| 3816 | |
| 3817 | ; return 0; } |
| 3818 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3819 | if { (eval echo configure:3820: \"$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] | 3820 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3821 | eval "ac_cv_func_pthread_detach=yes" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3822 | else |
| 3823 | echo "configure: failed program was:" >&5 |
| 3824 | cat conftest.$ac_ext >&5 |
| 3825 | rm -rf conftest* |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3826 | eval "ac_cv_func_pthread_detach=no" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3827 | fi |
| 3828 | rm -f conftest* |
| 3829 | fi |
| 3830 | |
Guido van Rossum | ea51632 | 1998-12-17 18:08:55 +0000 | [diff] [blame] | 3831 | if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3832 | echo "$ac_t""yes" 1>&6 |
| 3833 | cat >> confdefs.h <<\EOF |
| 3834 | #define WITH_THREAD 1 |
| 3835 | EOF |
| 3836 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 3837 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3838 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 3839 | else |
| 3840 | echo "$ac_t""no" 1>&6 |
| 3841 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3842 | ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3843 | echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3844 | echo "configure:3845: checking for kernel/OS.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3845 | 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] | 3846 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3847 | else |
| 3848 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3849 | #line 3850 "configure" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3850 | #include "confdefs.h" |
| 3851 | #include <kernel/OS.h> |
| 3852 | EOF |
| 3853 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3854 | { (eval echo configure:3855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3855 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3856 | if test -z "$ac_err"; then |
| 3857 | rm -rf conftest* |
| 3858 | eval "ac_cv_header_$ac_safe=yes" |
| 3859 | else |
| 3860 | echo "$ac_err" >&5 |
| 3861 | echo "configure: failed program was:" >&5 |
| 3862 | cat conftest.$ac_ext >&5 |
| 3863 | rm -rf conftest* |
| 3864 | eval "ac_cv_header_$ac_safe=no" |
| 3865 | fi |
| 3866 | rm -f conftest* |
| 3867 | fi |
| 3868 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 3869 | echo "$ac_t""yes" 1>&6 |
| 3870 | cat >> confdefs.h <<\EOF |
| 3871 | #define WITH_THREAD 1 |
| 3872 | EOF |
| 3873 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3874 | cat >> confdefs.h <<\EOF |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3875 | #define BEOS_THREADS 1 |
| 3876 | EOF |
| 3877 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3878 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 3879 | else |
| 3880 | echo "$ac_t""no" 1>&6 |
| 3881 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3882 | echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3883 | echo "configure:3884: checking for pthread_create in -lpthreads" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3884 | ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3885 | 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] | 3886 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3887 | else |
| 3888 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 3889 | LIBS="-lpthreads $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 3890 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3891 | #line 3892 "configure" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3892 | #include "confdefs.h" |
| 3893 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3894 | /* We use char because int might match the return type of a gcc2 |
| 3895 | builtin and then its argument prototype would still apply. */ |
| 3896 | char pthread_create(); |
| 3897 | |
| 3898 | int main() { |
| 3899 | pthread_create() |
| 3900 | ; return 0; } |
| 3901 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3902 | if { (eval echo configure:3903: \"$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] | 3903 | rm -rf conftest* |
| 3904 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3905 | else |
| 3906 | echo "configure: failed program was:" >&5 |
| 3907 | cat conftest.$ac_ext >&5 |
| 3908 | rm -rf conftest* |
| 3909 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3910 | fi |
| 3911 | rm -f conftest* |
| 3912 | LIBS="$ac_save_LIBS" |
| 3913 | |
| 3914 | fi |
| 3915 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3916 | echo "$ac_t""yes" 1>&6 |
| 3917 | cat >> confdefs.h <<\EOF |
| 3918 | #define WITH_THREAD 1 |
| 3919 | EOF |
| 3920 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3921 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3922 | LIBS="$LIBS -lpthreads" |
| 3923 | LIBOBJS="$LIBOBJS thread.o" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3924 | else |
| 3925 | echo "$ac_t""no" 1>&6 |
| 3926 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3927 | echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3928 | echo "configure:3929: checking for pthread_create in -lc_r" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3929 | ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3930 | 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] | 3931 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3932 | else |
| 3933 | ac_save_LIBS="$LIBS" |
| 3934 | LIBS="-lc_r $LIBS" |
| 3935 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3936 | #line 3937 "configure" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 3937 | #include "confdefs.h" |
| 3938 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3939 | /* We use char because int might match the return type of a gcc2 |
| 3940 | builtin and then its argument prototype would still apply. */ |
| 3941 | char pthread_create(); |
| 3942 | |
| 3943 | int main() { |
| 3944 | pthread_create() |
| 3945 | ; return 0; } |
| 3946 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3947 | if { (eval echo configure:3948: \"$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] | 3948 | rm -rf conftest* |
| 3949 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3950 | else |
| 3951 | echo "configure: failed program was:" >&5 |
| 3952 | cat conftest.$ac_ext >&5 |
| 3953 | rm -rf conftest* |
| 3954 | eval "ac_cv_lib_$ac_lib_var=no" |
| 3955 | fi |
| 3956 | rm -f conftest* |
| 3957 | LIBS="$ac_save_LIBS" |
| 3958 | |
| 3959 | fi |
| 3960 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 3961 | echo "$ac_t""yes" 1>&6 |
| 3962 | cat >> confdefs.h <<\EOF |
| 3963 | #define WITH_THREAD 1 |
| 3964 | EOF |
| 3965 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 3966 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3967 | LIBS="$LIBS -lc_r" |
| 3968 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3969 | else |
| 3970 | echo "$ac_t""no" 1>&6 |
| 3971 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3972 | echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3973 | echo "configure:3974: checking for __d6_pthread_create in -lthread" >&5 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3974 | ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 3975 | 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] | 3976 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 3977 | else |
| 3978 | ac_save_LIBS="$LIBS" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3979 | LIBS="-lthread $LIBS" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3980 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3981 | #line 3982 "configure" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3982 | #include "confdefs.h" |
| 3983 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 3984 | /* We use char because int might match the return type of a gcc2 |
| 3985 | builtin and then its argument prototype would still apply. */ |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3986 | char __d6_pthread_create(); |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3987 | |
| 3988 | int main() { |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 3989 | __d6_pthread_create() |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 3990 | ; return 0; } |
| 3991 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 3992 | if { (eval echo configure:3993: \"$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] | 3993 | rm -rf conftest* |
| 3994 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 3995 | else |
| 3996 | echo "configure: failed program was:" >&5 |
| 3997 | cat conftest.$ac_ext >&5 |
| 3998 | rm -rf conftest* |
| 3999 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4000 | fi |
| 4001 | rm -f conftest* |
| 4002 | LIBS="$ac_save_LIBS" |
| 4003 | |
| 4004 | fi |
| 4005 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4006 | echo "$ac_t""yes" 1>&6 |
| 4007 | cat >> confdefs.h <<\EOF |
| 4008 | #define WITH_THREAD 1 |
| 4009 | EOF |
| 4010 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4011 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4012 | LIBS="$LIBS -lthread" |
| 4013 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4014 | else |
| 4015 | echo "$ac_t""no" 1>&6 |
| 4016 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4017 | echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4018 | echo "configure:4019: checking for __pthread_create_system in -lpthread" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4019 | ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'` |
| 4020 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 4021 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4022 | else |
| 4023 | ac_save_LIBS="$LIBS" |
| 4024 | LIBS="-lpthread $LIBS" |
| 4025 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4026 | #line 4027 "configure" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4027 | #include "confdefs.h" |
| 4028 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4029 | /* We use char because int might match the return type of a gcc2 |
| 4030 | builtin and then its argument prototype would still apply. */ |
| 4031 | char __pthread_create_system(); |
| 4032 | |
| 4033 | int main() { |
| 4034 | __pthread_create_system() |
| 4035 | ; return 0; } |
| 4036 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4037 | if { (eval echo configure:4038: \"$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] | 4038 | rm -rf conftest* |
| 4039 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4040 | else |
| 4041 | echo "configure: failed program was:" >&5 |
| 4042 | cat conftest.$ac_ext >&5 |
| 4043 | rm -rf conftest* |
| 4044 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4045 | fi |
| 4046 | rm -f conftest* |
| 4047 | LIBS="$ac_save_LIBS" |
| 4048 | |
| 4049 | fi |
| 4050 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4051 | echo "$ac_t""yes" 1>&6 |
| 4052 | cat >> confdefs.h <<\EOF |
| 4053 | #define WITH_THREAD 1 |
| 4054 | EOF |
| 4055 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4056 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4057 | LIBS="$LIBS -lpthread" |
| 4058 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4059 | else |
| 4060 | echo "$ac_t""no" 1>&6 |
| 4061 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4062 | echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4063 | echo "configure:4064: checking for pthread_create in -lcma" >&5 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4064 | ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4065 | 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] | 4066 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4067 | else |
| 4068 | ac_save_LIBS="$LIBS" |
| 4069 | LIBS="-lcma $LIBS" |
| 4070 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4071 | #line 4072 "configure" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4072 | #include "confdefs.h" |
| 4073 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4074 | /* We use char because int might match the return type of a gcc2 |
| 4075 | builtin and then its argument prototype would still apply. */ |
| 4076 | char pthread_create(); |
| 4077 | |
| 4078 | int main() { |
| 4079 | pthread_create() |
| 4080 | ; return 0; } |
| 4081 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4082 | if { (eval echo configure:4083: \"$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] | 4083 | rm -rf conftest* |
| 4084 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4085 | else |
| 4086 | echo "configure: failed program was:" >&5 |
| 4087 | cat conftest.$ac_ext >&5 |
| 4088 | rm -rf conftest* |
| 4089 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4090 | fi |
| 4091 | rm -f conftest* |
| 4092 | LIBS="$ac_save_LIBS" |
| 4093 | |
| 4094 | fi |
| 4095 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4096 | echo "$ac_t""yes" 1>&6 |
| 4097 | cat >> confdefs.h <<\EOF |
| 4098 | #define WITH_THREAD 1 |
| 4099 | EOF |
| 4100 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4101 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4102 | LIBS="$LIBS -lcma" |
| 4103 | LIBOBJS="$LIBOBJS thread.o" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4104 | else |
| 4105 | echo "$ac_t""no" 1>&6 |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 4106 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4107 | USE_THREAD_MODULE="#" |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 4108 | fi |
| 4109 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4110 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4111 | fi |
| 4112 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 4113 | fi |
| 4114 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4115 | fi |
| 4116 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 4117 | fi |
| 4118 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 4119 | fi |
| 4120 | |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 4121 | fi |
| 4122 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 4123 | fi |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 4124 | rm -f conftest* |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 4125 | fi |
| 4126 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4127 | fi |
| 4128 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 4129 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4130 | if test "$posix_threads" = "yes"; then |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4131 | if test "$unistd_defines_pthreads" = "no"; then |
| 4132 | cat >> confdefs.h <<\EOF |
| 4133 | #define _POSIX_THREADS 1 |
| 4134 | EOF |
| 4135 | |
| 4136 | fi |
| 4137 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4138 | echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4139 | echo "configure:4140: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4140 | if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then |
| 4141 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4142 | else |
| 4143 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 4144 | ac_cv_pthread_system_supported=no |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4145 | else |
| 4146 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4147 | #line 4148 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4148 | #include "confdefs.h" |
| 4149 | #include <pthread.h> |
| 4150 | void *foo(void *parm) { |
| 4151 | return NULL; |
| 4152 | } |
| 4153 | main() { |
| 4154 | pthread_attr_t attr; |
| 4155 | if (pthread_attr_init(&attr)) exit(-1); |
| 4156 | if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1); |
| 4157 | if (pthread_create(NULL, &attr, foo, NULL)) exit(-1); |
| 4158 | exit(0); |
| 4159 | } |
| 4160 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4161 | if { (eval echo configure:4162: \"$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] | 4162 | then |
| 4163 | ac_cv_pthread_system_supported=yes |
| 4164 | else |
| 4165 | echo "configure: failed program was:" >&5 |
| 4166 | cat conftest.$ac_ext >&5 |
| 4167 | rm -fr conftest* |
| 4168 | ac_cv_pthread_system_supported=no |
| 4169 | fi |
| 4170 | rm -fr conftest* |
| 4171 | fi |
| 4172 | |
| 4173 | |
| 4174 | fi |
| 4175 | |
| 4176 | echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6 |
| 4177 | if test "$ac_cv_pthread_system_supported" = "yes"; then |
| 4178 | cat >> confdefs.h <<\EOF |
| 4179 | #define PTHREAD_SYSTEM_SCHED_SUPPORTED 1 |
| 4180 | EOF |
| 4181 | |
| 4182 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4183 | for ac_func in pthread_sigmask |
| 4184 | do |
| 4185 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4186 | echo "configure:4187: checking for $ac_func" >&5 |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4187 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4188 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4189 | else |
| 4190 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4191 | #line 4192 "configure" |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 4192 | #include "confdefs.h" |
| 4193 | /* System header to define __stub macros and hopefully few prototypes, |
| 4194 | which can conflict with char $ac_func(); below. */ |
| 4195 | #include <assert.h> |
| 4196 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4197 | /* We use char because int might match the return type of a gcc2 |
| 4198 | builtin and then its argument prototype would still apply. */ |
| 4199 | char $ac_func(); |
| 4200 | |
| 4201 | int main() { |
| 4202 | |
| 4203 | /* The GNU C library defines this for functions which it implements |
| 4204 | to always fail with ENOSYS. Some functions are actually named |
| 4205 | something starting with __ and the normal name is an alias. */ |
| 4206 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4207 | choke me |
| 4208 | #else |
| 4209 | $ac_func(); |
| 4210 | #endif |
| 4211 | |
| 4212 | ; return 0; } |
| 4213 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4214 | if { (eval echo configure:4215: \"$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] | 4215 | rm -rf conftest* |
| 4216 | eval "ac_cv_func_$ac_func=yes" |
| 4217 | else |
| 4218 | echo "configure: failed program was:" >&5 |
| 4219 | cat conftest.$ac_ext >&5 |
| 4220 | rm -rf conftest* |
| 4221 | eval "ac_cv_func_$ac_func=no" |
| 4222 | fi |
| 4223 | rm -f conftest* |
| 4224 | fi |
| 4225 | |
| 4226 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4227 | echo "$ac_t""yes" 1>&6 |
| 4228 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4229 | cat >> confdefs.h <<EOF |
| 4230 | #define $ac_tr_func 1 |
| 4231 | EOF |
| 4232 | |
| 4233 | else |
| 4234 | echo "$ac_t""no" 1>&6 |
| 4235 | fi |
| 4236 | done |
| 4237 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4238 | fi |
| 4239 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4240 | echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4241 | echo "configure:4242: checking for usconfig in -lmpc" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4242 | ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4243 | 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] | 4244 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4245 | else |
| 4246 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4247 | LIBS="-lmpc $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4248 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4249 | #line 4250 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4250 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4251 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4252 | /* We use char because int might match the return type of a gcc2 |
| 4253 | builtin and then its argument prototype would still apply. */ |
| 4254 | char usconfig(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4255 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4256 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4257 | usconfig() |
| 4258 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4259 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4260 | if { (eval echo configure:4261: \"$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] | 4261 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4262 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4263 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4264 | echo "configure: failed program was:" >&5 |
| 4265 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4266 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4267 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4268 | fi |
| 4269 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4270 | LIBS="$ac_save_LIBS" |
| 4271 | |
| 4272 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4273 | 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] | 4274 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4275 | cat >> confdefs.h <<\EOF |
| 4276 | #define WITH_THREAD 1 |
| 4277 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4278 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4279 | LIBS="$LIBS -lmpc" |
| 4280 | LIBOBJS="$LIBOBJS thread.o" |
| 4281 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4282 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4283 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4284 | fi |
| 4285 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4286 | echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4287 | echo "configure:4288: checking for thr_create in -lthread" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4288 | ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4289 | 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] | 4290 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4291 | else |
| 4292 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4293 | LIBS="-lthread $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4294 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4295 | #line 4296 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4296 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4297 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4298 | /* We use char because int might match the return type of a gcc2 |
| 4299 | builtin and then its argument prototype would still apply. */ |
| 4300 | char thr_create(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4301 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4302 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4303 | thr_create() |
| 4304 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4305 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4306 | if { (eval echo configure:4307: \"$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] | 4307 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4308 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4309 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4310 | echo "configure: failed program was:" >&5 |
| 4311 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4312 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4313 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4314 | fi |
| 4315 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4316 | LIBS="$ac_save_LIBS" |
| 4317 | |
| 4318 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4319 | 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] | 4320 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4321 | cat >> confdefs.h <<\EOF |
| 4322 | #define WITH_THREAD 1 |
| 4323 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4324 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4325 | LIBS="$LIBS -lthread" |
| 4326 | LIBOBJS="$LIBOBJS thread.o" |
| 4327 | USE_THREAD_MODULE="" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4328 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4329 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4330 | fi |
| 4331 | |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4332 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 4333 | if test "$USE_THREAD_MODULE" != "#" |
| 4334 | then |
| 4335 | # If the above checks didn't disable threads, (at least) OSF1 |
| 4336 | # needs this '-threads' argument during linking. |
| 4337 | case $ac_sys_system in |
| 4338 | OSF1) LDLAST=-threads;; |
| 4339 | esac |
Jeremy Hylton | 1a2ca86 | 2000-10-16 16:59:12 +0000 | [diff] [blame] | 4340 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4341 | fi |
| 4342 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4343 | # Check for enable-ipv6 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4344 | echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4345 | echo "configure:4346: checking if --enable-ipv6 is specified" >&5 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4346 | # Check whether --enable-ipv6 or --disable-ipv6 was given. |
| 4347 | if test "${enable_ipv6+set}" = set; then |
| 4348 | enableval="$enable_ipv6" |
| 4349 | case "$enableval" in |
| 4350 | no) |
| 4351 | echo "$ac_t""no" 1>&6 |
| 4352 | ipv6=no |
| 4353 | ;; |
| 4354 | *) echo "$ac_t""yes" 1>&6 |
| 4355 | cat >> confdefs.h <<\EOF |
| 4356 | #define ENABLE_IPV6 1 |
| 4357 | EOF |
| 4358 | |
| 4359 | ipv6=yes |
| 4360 | ;; |
| 4361 | esac |
| 4362 | else |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4363 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4364 | if test "$cross_compiling" = yes; then |
| 4365 | echo "$ac_t""no" 1>&6 |
| 4366 | ipv6=no |
| 4367 | |
| 4368 | else |
| 4369 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4370 | #line 4371 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4371 | #include "confdefs.h" |
| 4372 | /* AF_INET6 available check */ |
| 4373 | #include <sys/types.h> |
| 4374 | #include <sys/socket.h> |
| 4375 | main() |
| 4376 | { |
| 4377 | if (socket(AF_INET6, SOCK_STREAM, 0) < 0) |
| 4378 | exit(1); |
| 4379 | else |
| 4380 | exit(0); |
| 4381 | } |
| 4382 | |
| 4383 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4384 | if { (eval echo configure:4385: \"$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] | 4385 | then |
| 4386 | echo "$ac_t""yes" 1>&6 |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4387 | ipv6=yes |
| 4388 | else |
| 4389 | echo "configure: failed program was:" >&5 |
| 4390 | cat conftest.$ac_ext >&5 |
| 4391 | rm -fr conftest* |
| 4392 | echo "$ac_t""no" 1>&6 |
| 4393 | ipv6=no |
| 4394 | fi |
| 4395 | rm -fr conftest* |
| 4396 | fi |
| 4397 | |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4398 | |
| 4399 | if test "$ipv6" = "yes"; then |
| 4400 | echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4401 | echo "configure:4402: checking if RFC2553 API is available" >&5 |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4402 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4403 | #line 4404 "configure" |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4404 | #include "confdefs.h" |
| 4405 | #include <sys/types.h> |
| 4406 | #include <netinet/in.h> |
| 4407 | int main() { |
| 4408 | struct sockaddr_in6 x; |
| 4409 | x.sin6_scope_id; |
| 4410 | ; return 0; } |
| 4411 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4412 | if { (eval echo configure:4413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 4413 | rm -rf conftest* |
| 4414 | echo "$ac_t""yes" 1>&6 |
| 4415 | ipv6=yes |
| 4416 | else |
| 4417 | echo "configure: failed program was:" >&5 |
| 4418 | cat conftest.$ac_ext >&5 |
| 4419 | rm -rf conftest* |
| 4420 | echo "$ac_t""no" 1>&6 |
| 4421 | ipv6=no |
| 4422 | fi |
| 4423 | rm -f conftest* |
| 4424 | fi |
| 4425 | |
| 4426 | if test "$ipv6" = "yes"; then |
| 4427 | cat >> confdefs.h <<\EOF |
| 4428 | #define ENABLE_IPV6 1 |
| 4429 | EOF |
| 4430 | |
| 4431 | fi |
| 4432 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4433 | fi |
| 4434 | |
| 4435 | |
| 4436 | ipv6type=unknown |
| 4437 | ipv6lib=none |
| 4438 | ipv6trylibc=no |
| 4439 | |
| 4440 | if test "$ipv6" = "yes"; then |
| 4441 | echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4442 | echo "configure:4443: checking ipv6 stack type" >&5 |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 4443 | for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; |
| 4444 | do |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4445 | case $i in |
| 4446 | inria) |
| 4447 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4448 | #line 4449 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4449 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4450 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4451 | #include <netinet/in.h> |
| 4452 | #ifdef IPV6_INRIA_VERSION |
| 4453 | yes |
| 4454 | #endif |
| 4455 | EOF |
| 4456 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4457 | egrep "yes" >/dev/null 2>&1; then |
| 4458 | rm -rf conftest* |
| 4459 | ipv6type=$i; |
| 4460 | OPT="-DINET6 $OPT" |
| 4461 | fi |
| 4462 | rm -f conftest* |
| 4463 | |
| 4464 | ;; |
| 4465 | kame) |
| 4466 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4467 | #line 4468 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4468 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4469 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4470 | #include <netinet/in.h> |
| 4471 | #ifdef __KAME__ |
| 4472 | yes |
| 4473 | #endif |
| 4474 | EOF |
| 4475 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4476 | egrep "yes" >/dev/null 2>&1; then |
| 4477 | rm -rf conftest* |
| 4478 | ipv6type=$i; |
| 4479 | ipv6lib=inet6 |
| 4480 | ipv6libdir=/usr/local/v6/lib |
| 4481 | ipv6trylibc=yes |
| 4482 | OPT="-DINET6 $OPT" |
| 4483 | fi |
| 4484 | rm -f conftest* |
| 4485 | |
| 4486 | ;; |
| 4487 | linux-glibc) |
| 4488 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4489 | #line 4490 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4490 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4491 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4492 | #include <features.h> |
| 4493 | #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) |
| 4494 | yes |
| 4495 | #endif |
| 4496 | EOF |
| 4497 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4498 | egrep "yes" >/dev/null 2>&1; then |
| 4499 | rm -rf conftest* |
| 4500 | ipv6type=$i; |
| 4501 | ipv6trylibc=yes |
| 4502 | OPT="-DINET6 $OPT" |
| 4503 | fi |
| 4504 | rm -f conftest* |
| 4505 | |
| 4506 | ;; |
| 4507 | linux-inet6) |
| 4508 | if test -d /usr/inet6; then |
| 4509 | ipv6type=$i |
| 4510 | ipv6lib=inet6 |
| 4511 | ipv6libdir=/usr/inet6/lib |
| 4512 | OPT="-DINET6 -I/usr/inet6/include $OPT" |
| 4513 | fi |
| 4514 | ;; |
| 4515 | solaris) |
| 4516 | if test -f /etc/netconfig; then |
| 4517 | if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then |
| 4518 | ipv6type=$i |
| 4519 | ipv6trylibc=yes |
| 4520 | OPT="-DINET6 $OPT" |
| 4521 | fi |
| 4522 | fi |
| 4523 | ;; |
| 4524 | toshiba) |
| 4525 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4526 | #line 4527 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4527 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4528 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4529 | #include <sys/param.h> |
| 4530 | #ifdef _TOSHIBA_INET6 |
| 4531 | yes |
| 4532 | #endif |
| 4533 | EOF |
| 4534 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4535 | egrep "yes" >/dev/null 2>&1; then |
| 4536 | rm -rf conftest* |
| 4537 | ipv6type=$i; |
| 4538 | ipv6lib=inet6; |
| 4539 | ipv6libdir=/usr/local/v6/lib; |
| 4540 | OPT="-DINET6 $OPT" |
| 4541 | fi |
| 4542 | rm -f conftest* |
| 4543 | |
| 4544 | ;; |
| 4545 | v6d) |
| 4546 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4547 | #line 4548 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4548 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4549 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4550 | #include </usr/local/v6/include/sys/v6config.h> |
| 4551 | #ifdef __V6D__ |
| 4552 | yes |
| 4553 | #endif |
| 4554 | EOF |
| 4555 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4556 | egrep "yes" >/dev/null 2>&1; then |
| 4557 | rm -rf conftest* |
| 4558 | ipv6type=$i; |
| 4559 | ipv6lib=v6; |
| 4560 | ipv6libdir=/usr/local/v6/lib; |
| 4561 | OPT="-I/usr/local/v6/include $OPT" |
| 4562 | fi |
| 4563 | rm -f conftest* |
| 4564 | |
| 4565 | ;; |
| 4566 | zeta) |
| 4567 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4568 | #line 4569 "configure" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4569 | #include "confdefs.h" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 4570 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 4571 | #include <sys/param.h> |
| 4572 | #ifdef _ZETA_MINAMI_INET6 |
| 4573 | yes |
| 4574 | #endif |
| 4575 | EOF |
| 4576 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4577 | egrep "yes" >/dev/null 2>&1; then |
| 4578 | rm -rf conftest* |
| 4579 | ipv6type=$i; |
| 4580 | ipv6lib=inet6; |
| 4581 | ipv6libdir=/usr/local/v6/lib; |
| 4582 | OPT="-DINET6 $OPT" |
| 4583 | fi |
| 4584 | rm -f conftest* |
| 4585 | |
| 4586 | ;; |
| 4587 | esac |
| 4588 | if test "$ipv6type" != "unknown"; then |
| 4589 | break |
| 4590 | fi |
| 4591 | done |
| 4592 | echo "$ac_t""$ipv6type" 1>&6 |
| 4593 | fi |
| 4594 | |
| 4595 | if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then |
| 4596 | if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then |
| 4597 | LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" |
| 4598 | echo "using lib$ipv6lib" |
| 4599 | else |
| 4600 | if test $ipv6trylibc = "yes"; then |
| 4601 | echo "using libc" |
| 4602 | else |
| 4603 | echo 'Fatal: no $ipv6lib library found. cannot continue.' |
| 4604 | echo "You need to fetch lib$ipv6lib.a from appropriate" |
| 4605 | echo 'ipv6 kit and compile beforehand.' |
| 4606 | exit 1 |
| 4607 | fi |
| 4608 | fi |
| 4609 | fi |
| 4610 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4611 | # Check for GC support |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4612 | echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4613 | echo "configure:4614: checking for --with-cycle-gc" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4614 | # Check whether --with-cycle-gc or --without-cycle-gc was given. |
| 4615 | if test "${with_cycle_gc+set}" = set; then |
| 4616 | withval="$with_cycle_gc" |
| 4617 | : |
| 4618 | fi |
| 4619 | |
| 4620 | |
| 4621 | if test -z "$with_cycle_gc" |
| 4622 | then with_cycle_gc="yes" |
| 4623 | fi |
Neil Schemenauer | cf22946 | 2001-08-29 23:58:47 +0000 | [diff] [blame] | 4624 | if test "$with_cycle_gc" != "no" |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4625 | then |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4626 | cat >> confdefs.h <<\EOF |
| 4627 | #define WITH_CYCLE_GC 1 |
| 4628 | EOF |
| 4629 | |
| 4630 | fi |
| 4631 | echo "$ac_t""$with_cycle_gc" 1>&6 |
| 4632 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4633 | # Check for Python-specific malloc support |
| 4634 | echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4635 | echo "configure:4636: checking for --with-pymalloc" >&5 |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 4636 | # Check whether --with-pymalloc or --without-pymalloc was given. |
| 4637 | if test "${with_pymalloc+set}" = set; then |
| 4638 | withval="$with_pymalloc" |
| 4639 | |
| 4640 | if test "$withval" != no |
| 4641 | then cat >> confdefs.h <<\EOF |
| 4642 | #define WITH_PYMALLOC 1 |
| 4643 | EOF |
| 4644 | echo "$ac_t""yes" 1>&6 |
| 4645 | else echo "$ac_t""no" 1>&6 |
| 4646 | fi |
| 4647 | else |
| 4648 | echo "$ac_t""no" 1>&6 |
| 4649 | fi |
| 4650 | |
| 4651 | |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4652 | # Check for --with-wctype-functions |
| 4653 | echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4654 | echo "configure:4655: checking for --with-wctype-functions" >&5 |
Barry Warsaw | ef82cd7 | 2000-06-30 16:21:01 +0000 | [diff] [blame] | 4655 | # Check whether --with-wctype-functions or --without-wctype-functions was given. |
| 4656 | if test "${with_wctype_functions+set}" = set; then |
| 4657 | withval="$with_wctype_functions" |
| 4658 | |
| 4659 | if test "$withval" != no |
| 4660 | then cat >> confdefs.h <<\EOF |
| 4661 | #define WANT_WCTYPE_FUNCTIONS 1 |
| 4662 | EOF |
| 4663 | echo "$ac_t""yes" 1>&6 |
| 4664 | else echo "$ac_t""no" 1>&6 |
| 4665 | fi |
| 4666 | else |
| 4667 | echo "$ac_t""no" 1>&6 |
| 4668 | fi |
| 4669 | |
| 4670 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4671 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4672 | |
Guido van Rossum | 98935bf | 2001-09-05 19:13:16 +0000 | [diff] [blame] | 4673 | DLINCLDIR=. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4674 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4675 | echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4676 | echo "configure:4677: checking for --with-sgi-dl" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4677 | # Check whether --with-sgi-dl or --without-sgi-dl was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4678 | if test "${with_sgi_dl+set}" = set; then |
| 4679 | withval="$with_sgi_dl" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4680 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4681 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4682 | cat >> confdefs.h <<\EOF |
| 4683 | #define WITH_SGI_DL 1 |
| 4684 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4685 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4686 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4687 | dldir=$withval |
Guido van Rossum | 4095101 | 2000-10-07 16:21:27 +0000 | [diff] [blame] | 4688 | if test ! -z "$dldir" -a -d "$dldir" |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 4689 | then LDFLAGS="$LDFLAGS -L$dldir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4690 | 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] | 4691 | fi |
| 4692 | DLINCLDIR=${dldir} |
| 4693 | LIBS="$LIBS -ldl -lmld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4694 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4695 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4696 | fi |
| 4697 | |
| 4698 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4699 | echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4700 | echo "configure:4701: checking for --with-dl-dld" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4701 | # Check whether --with-dl-dld or --without-dl-dld was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4702 | if test "${with_dl_dld+set}" = set; then |
| 4703 | withval="$with_dl_dld" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4704 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4705 | echo "$ac_t""$withval" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4706 | cat >> confdefs.h <<\EOF |
| 4707 | #define WITH_DL_DLD 1 |
| 4708 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4709 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4710 | DYNLOADFILE="dynload_dl.o" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4711 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 4712 | dlddir=`echo "$withval" | sed 's/.*,//'` |
Barry Warsaw | 7d1219d | 2000-10-05 18:45:53 +0000 | [diff] [blame] | 4713 | 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] | 4714 | then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4715 | 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] | 4716 | fi |
| 4717 | DLINCLDIR=${dldir} |
| 4718 | LIBS="$LIBS -ldl -ldld" |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 4719 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4720 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4721 | fi |
| 4722 | |
| 4723 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4724 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 4725 | # 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] | 4726 | for ac_func in dlopen |
| 4727 | do |
| 4728 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4729 | echo "configure:4730: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4730 | 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] | 4731 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4732 | else |
| 4733 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4734 | #line 4735 "configure" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4735 | #include "confdefs.h" |
| 4736 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4737 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4738 | #include <assert.h> |
| 4739 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4740 | /* We use char because int might match the return type of a gcc2 |
| 4741 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4742 | char $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4743 | |
| 4744 | int main() { |
| 4745 | |
| 4746 | /* The GNU C library defines this for functions which it implements |
| 4747 | to always fail with ENOSYS. Some functions are actually named |
| 4748 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4749 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4750 | choke me |
| 4751 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4752 | $ac_func(); |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4753 | #endif |
| 4754 | |
| 4755 | ; return 0; } |
| 4756 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4757 | if { (eval echo configure:4758: \"$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] | 4758 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4759 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4760 | else |
| 4761 | echo "configure: failed program was:" >&5 |
| 4762 | cat conftest.$ac_ext >&5 |
| 4763 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4764 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4765 | fi |
| 4766 | rm -f conftest* |
| 4767 | fi |
| 4768 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4769 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4770 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4771 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4772 | cat >> confdefs.h <<EOF |
| 4773 | #define $ac_tr_func 1 |
| 4774 | EOF |
| 4775 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4776 | else |
| 4777 | echo "$ac_t""no" 1>&6 |
| 4778 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 4779 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4780 | |
| 4781 | |
| 4782 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 4783 | # loading of modules. |
| 4784 | |
| 4785 | echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4786 | echo "configure:4787: checking DYNLOADFILE" >&5 |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4787 | if test -z "$DYNLOADFILE" |
| 4788 | then |
| 4789 | case $ac_sys_system/$ac_sys_release in |
| 4790 | AIX*) DYNLOADFILE="dynload_aix.o";; |
| 4791 | BeOS*) DYNLOADFILE="dynload_beos.o";; |
| 4792 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4793 | Darwin/*) DYNLOADFILE="dynload_next.o";; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 4794 | *) |
| 4795 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 4796 | # out any dynamic loading |
| 4797 | if test "$ac_cv_func_dlopen" = yes |
| 4798 | then DYNLOADFILE="dynload_shlib.o" |
| 4799 | else DYNLOADFILE="dynload_stub.o" |
| 4800 | fi |
| 4801 | ;; |
| 4802 | esac |
| 4803 | fi |
| 4804 | echo "$ac_t""$DYNLOADFILE" 1>&6 |
| 4805 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 4806 | then |
| 4807 | cat >> confdefs.h <<\EOF |
| 4808 | #define HAVE_DYNAMIC_LOADING 1 |
| 4809 | EOF |
| 4810 | |
| 4811 | fi |
| 4812 | |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4813 | # MACHDEP_OBJS can be set to platform-specific object files needed by Python |
| 4814 | |
| 4815 | |
| 4816 | echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4817 | echo "configure:4818: checking MACHDEP_OBJS" >&5 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4818 | if test -z "$MACHDEP_OBJS" |
| 4819 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4820 | MACHDEP_OBJS=$extra_machdep_objs |
| 4821 | else |
| 4822 | MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4823 | fi |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 4824 | echo "$ac_t""MACHDEP_OBJS" 1>&6 |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 4825 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4826 | # checks for library functions |
Martin v. Löwis | 244edc8 | 2001-10-04 22:44:26 +0000 | [diff] [blame] | 4827 | 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] | 4828 | flock fork fsync fdatasync fpathconf ftime ftruncate \ |
Martin v. Löwis | f95dd0a | 2001-08-15 17:14:33 +0000 | [diff] [blame] | 4829 | gai_strerror getgroups getlogin getpeername getpid getpwent getwd \ |
Martin v. Löwis | 864e9ff | 2001-08-04 22:32:03 +0000 | [diff] [blame] | 4830 | hstrerror inet_pton kill link lstat mkfifo mktime mremap \ |
Andrew M. Kuchling | 5821b77 | 2000-08-25 01:14:08 +0000 | [diff] [blame] | 4831 | nice pathconf pause plock poll pthread_init \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4832 | putenv readlink \ |
Martin v. Löwis | 61c5edf | 2001-10-18 04:06:00 +0000 | [diff] [blame] | 4833 | select setegid seteuid setgid setgroups \ |
Martin v. Löwis | 791bfda | 2001-07-24 06:33:08 +0000 | [diff] [blame] | 4834 | setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \ |
Fred Drake | 35a092f | 1999-12-13 16:23:35 +0000 | [diff] [blame] | 4835 | sigaction siginterrupt sigrelse strftime strptime symlink sysconf \ |
Fred Drake | 89143df | 1999-12-09 22:03:25 +0000 | [diff] [blame] | 4836 | tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Guido van Rossum | c524d95 | 2001-10-19 01:31:59 +0000 | [diff] [blame] | 4837 | truncate uname unsetenv waitpid _getpty getpriority |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4838 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4839 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4840 | echo "configure:4841: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4841 | 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] | 4842 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4843 | else |
| 4844 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4845 | #line 4846 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4846 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4847 | /* System header to define __stub macros and hopefully few prototypes, |
| 4848 | which can conflict with char $ac_func(); below. */ |
| 4849 | #include <assert.h> |
| 4850 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 4851 | /* We use char because int might match the return type of a gcc2 |
| 4852 | builtin and then its argument prototype would still apply. */ |
| 4853 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 4854 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4855 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4856 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4857 | /* The GNU C library defines this for functions which it implements |
| 4858 | to always fail with ENOSYS. Some functions are actually named |
| 4859 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4860 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4861 | choke me |
| 4862 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4863 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4864 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4865 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 4866 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4867 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4868 | if { (eval echo configure:4869: \"$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] | 4869 | rm -rf conftest* |
| 4870 | eval "ac_cv_func_$ac_func=yes" |
| 4871 | else |
| 4872 | echo "configure: failed program was:" >&5 |
| 4873 | cat conftest.$ac_ext >&5 |
| 4874 | rm -rf conftest* |
| 4875 | eval "ac_cv_func_$ac_func=no" |
| 4876 | fi |
| 4877 | rm -f conftest* |
| 4878 | fi |
| 4879 | |
| 4880 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4881 | echo "$ac_t""yes" 1>&6 |
| 4882 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4883 | cat >> confdefs.h <<EOF |
| 4884 | #define $ac_tr_func 1 |
| 4885 | EOF |
| 4886 | |
| 4887 | else |
| 4888 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4889 | fi |
| 4890 | done |
| 4891 | |
| 4892 | |
| 4893 | # check for openpty and forkpty |
| 4894 | |
| 4895 | for ac_func in openpty |
| 4896 | do |
| 4897 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4898 | echo "configure:4899: checking for $ac_func" >&5 |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4899 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 4900 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4901 | else |
| 4902 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4903 | #line 4904 "configure" |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 4904 | #include "confdefs.h" |
| 4905 | /* System header to define __stub macros and hopefully few prototypes, |
| 4906 | which can conflict with char $ac_func(); below. */ |
| 4907 | #include <assert.h> |
| 4908 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4909 | /* We use char because int might match the return type of a gcc2 |
| 4910 | builtin and then its argument prototype would still apply. */ |
| 4911 | char $ac_func(); |
| 4912 | |
| 4913 | int main() { |
| 4914 | |
| 4915 | /* The GNU C library defines this for functions which it implements |
| 4916 | to always fail with ENOSYS. Some functions are actually named |
| 4917 | something starting with __ and the normal name is an alias. */ |
| 4918 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 4919 | choke me |
| 4920 | #else |
| 4921 | $ac_func(); |
| 4922 | #endif |
| 4923 | |
| 4924 | ; return 0; } |
| 4925 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4926 | if { (eval echo configure:4927: \"$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] | 4927 | rm -rf conftest* |
| 4928 | eval "ac_cv_func_$ac_func=yes" |
| 4929 | else |
| 4930 | echo "configure: failed program was:" >&5 |
| 4931 | cat conftest.$ac_ext >&5 |
| 4932 | rm -rf conftest* |
| 4933 | eval "ac_cv_func_$ac_func=no" |
| 4934 | fi |
| 4935 | rm -f conftest* |
| 4936 | fi |
| 4937 | |
| 4938 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 4939 | echo "$ac_t""yes" 1>&6 |
| 4940 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 4941 | cat >> confdefs.h <<EOF |
| 4942 | #define $ac_tr_func 1 |
| 4943 | EOF |
| 4944 | |
| 4945 | else |
| 4946 | echo "$ac_t""no" 1>&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4947 | echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4948 | echo "configure:4949: checking for openpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4949 | ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4950 | 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] | 4951 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4952 | else |
| 4953 | ac_save_LIBS="$LIBS" |
| 4954 | LIBS="-lutil $LIBS" |
| 4955 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4956 | #line 4957 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4957 | #include "confdefs.h" |
| 4958 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 4959 | /* We use char because int might match the return type of a gcc2 |
| 4960 | builtin and then its argument prototype would still apply. */ |
| 4961 | char openpty(); |
| 4962 | |
| 4963 | int main() { |
| 4964 | openpty() |
| 4965 | ; return 0; } |
| 4966 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4967 | if { (eval echo configure:4968: \"$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] | 4968 | rm -rf conftest* |
| 4969 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 4970 | else |
| 4971 | echo "configure: failed program was:" >&5 |
| 4972 | cat conftest.$ac_ext >&5 |
| 4973 | rm -rf conftest* |
| 4974 | eval "ac_cv_lib_$ac_lib_var=no" |
| 4975 | fi |
| 4976 | rm -f conftest* |
| 4977 | LIBS="$ac_save_LIBS" |
| 4978 | |
| 4979 | fi |
| 4980 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 4981 | echo "$ac_t""yes" 1>&6 |
| 4982 | cat >> confdefs.h <<\EOF |
| 4983 | #define HAVE_OPENPTY 1 |
| 4984 | EOF |
| 4985 | LIBS="$LIBS -lutil" |
| 4986 | else |
| 4987 | echo "$ac_t""no" 1>&6 |
| 4988 | fi |
| 4989 | |
| 4990 | fi |
| 4991 | done |
| 4992 | |
| 4993 | for ac_func in forkpty |
| 4994 | do |
| 4995 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 4996 | echo "configure:4997: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 4997 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 4998 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 4999 | else |
| 5000 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5001 | #line 5002 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5002 | #include "confdefs.h" |
| 5003 | /* System header to define __stub macros and hopefully few prototypes, |
| 5004 | which can conflict with char $ac_func(); below. */ |
| 5005 | #include <assert.h> |
| 5006 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5007 | /* We use char because int might match the return type of a gcc2 |
| 5008 | builtin and then its argument prototype would still apply. */ |
| 5009 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5010 | |
| 5011 | int main() { |
| 5012 | |
| 5013 | /* The GNU C library defines this for functions which it implements |
| 5014 | to always fail with ENOSYS. Some functions are actually named |
| 5015 | something starting with __ and the normal name is an alias. */ |
| 5016 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5017 | choke me |
| 5018 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5019 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5020 | #endif |
| 5021 | |
| 5022 | ; return 0; } |
| 5023 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5024 | if { (eval echo configure:5025: \"$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] | 5025 | rm -rf conftest* |
| 5026 | eval "ac_cv_func_$ac_func=yes" |
| 5027 | else |
| 5028 | echo "configure: failed program was:" >&5 |
| 5029 | cat conftest.$ac_ext >&5 |
| 5030 | rm -rf conftest* |
| 5031 | eval "ac_cv_func_$ac_func=no" |
| 5032 | fi |
| 5033 | rm -f conftest* |
| 5034 | fi |
| 5035 | |
| 5036 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5037 | echo "$ac_t""yes" 1>&6 |
| 5038 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5039 | cat >> confdefs.h <<EOF |
| 5040 | #define $ac_tr_func 1 |
| 5041 | EOF |
| 5042 | |
| 5043 | else |
| 5044 | echo "$ac_t""no" 1>&6 |
| 5045 | echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5046 | echo "configure:5047: checking for forkpty in -lutil" >&5 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5047 | ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5048 | 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] | 5049 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5050 | else |
| 5051 | ac_save_LIBS="$LIBS" |
| 5052 | LIBS="-lutil $LIBS" |
| 5053 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5054 | #line 5055 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5055 | #include "confdefs.h" |
| 5056 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5057 | /* We use char because int might match the return type of a gcc2 |
| 5058 | builtin and then its argument prototype would still apply. */ |
| 5059 | char forkpty(); |
| 5060 | |
| 5061 | int main() { |
| 5062 | forkpty() |
| 5063 | ; return 0; } |
| 5064 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5065 | if { (eval echo configure:5066: \"$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] | 5066 | rm -rf conftest* |
| 5067 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 5068 | else |
| 5069 | echo "configure: failed program was:" >&5 |
| 5070 | cat conftest.$ac_ext >&5 |
| 5071 | rm -rf conftest* |
| 5072 | eval "ac_cv_lib_$ac_lib_var=no" |
| 5073 | fi |
| 5074 | rm -f conftest* |
| 5075 | LIBS="$ac_save_LIBS" |
| 5076 | |
| 5077 | fi |
| 5078 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 5079 | echo "$ac_t""yes" 1>&6 |
| 5080 | cat >> confdefs.h <<\EOF |
| 5081 | #define HAVE_FORKPTY 1 |
| 5082 | EOF |
| 5083 | LIBS="$LIBS -lutil" |
| 5084 | else |
| 5085 | echo "$ac_t""no" 1>&6 |
| 5086 | fi |
| 5087 | |
| 5088 | fi |
| 5089 | done |
| 5090 | |
| 5091 | |
| 5092 | # check for long file support functions |
| 5093 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
| 5094 | do |
| 5095 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5096 | echo "configure:5097: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5097 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5098 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5099 | else |
| 5100 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5101 | #line 5102 "configure" |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5102 | #include "confdefs.h" |
| 5103 | /* System header to define __stub macros and hopefully few prototypes, |
| 5104 | which can conflict with char $ac_func(); below. */ |
| 5105 | #include <assert.h> |
| 5106 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5107 | /* We use char because int might match the return type of a gcc2 |
| 5108 | builtin and then its argument prototype would still apply. */ |
| 5109 | char $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5110 | |
| 5111 | int main() { |
| 5112 | |
| 5113 | /* The GNU C library defines this for functions which it implements |
| 5114 | to always fail with ENOSYS. Some functions are actually named |
| 5115 | something starting with __ and the normal name is an alias. */ |
| 5116 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5117 | choke me |
| 5118 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5119 | $ac_func(); |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 5120 | #endif |
| 5121 | |
| 5122 | ; return 0; } |
| 5123 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5124 | if { (eval echo configure:5125: \"$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] | 5125 | rm -rf conftest* |
| 5126 | eval "ac_cv_func_$ac_func=yes" |
| 5127 | else |
| 5128 | echo "configure: failed program was:" >&5 |
| 5129 | cat conftest.$ac_ext >&5 |
| 5130 | rm -rf conftest* |
| 5131 | eval "ac_cv_func_$ac_func=no" |
| 5132 | fi |
| 5133 | rm -f conftest* |
| 5134 | fi |
| 5135 | |
| 5136 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5137 | echo "$ac_t""yes" 1>&6 |
| 5138 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5139 | cat >> confdefs.h <<EOF |
| 5140 | #define $ac_tr_func 1 |
| 5141 | EOF |
| 5142 | |
| 5143 | else |
| 5144 | echo "$ac_t""no" 1>&6 |
| 5145 | fi |
| 5146 | done |
| 5147 | |
| 5148 | |
| 5149 | for ac_func in dup2 getcwd strdup strerror memmove |
| 5150 | do |
| 5151 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5152 | echo "configure:5153: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5153 | 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] | 5154 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5155 | else |
| 5156 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5157 | #line 5158 "configure" |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5158 | #include "confdefs.h" |
| 5159 | /* System header to define __stub macros and hopefully few prototypes, |
| 5160 | which can conflict with char $ac_func(); below. */ |
| 5161 | #include <assert.h> |
| 5162 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5163 | /* We use char because int might match the return type of a gcc2 |
| 5164 | builtin and then its argument prototype would still apply. */ |
| 5165 | char $ac_func(); |
| 5166 | |
| 5167 | int main() { |
| 5168 | |
| 5169 | /* The GNU C library defines this for functions which it implements |
| 5170 | to always fail with ENOSYS. Some functions are actually named |
| 5171 | something starting with __ and the normal name is an alias. */ |
| 5172 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5173 | choke me |
| 5174 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5175 | $ac_func(); |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 5176 | #endif |
| 5177 | |
| 5178 | ; return 0; } |
| 5179 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5180 | if { (eval echo configure:5181: \"$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] | 5181 | rm -rf conftest* |
| 5182 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5183 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5184 | echo "configure: failed program was:" >&5 |
| 5185 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5186 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5187 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5188 | fi |
| 5189 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5190 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5191 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5192 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5193 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5194 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5195 | cat >> confdefs.h <<EOF |
| 5196 | #define $ac_tr_func 1 |
| 5197 | EOF |
| 5198 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5199 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5200 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 5201 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5202 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5203 | done |
| 5204 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5205 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5206 | for ac_func in getpgrp |
| 5207 | do |
| 5208 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5209 | echo "configure:5210: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5210 | 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] | 5211 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5212 | else |
| 5213 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5214 | #line 5215 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5215 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5216 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5217 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5218 | #include <assert.h> |
| 5219 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5220 | /* We use char because int might match the return type of a gcc2 |
| 5221 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5222 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5223 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5224 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5225 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5226 | /* The GNU C library defines this for functions which it implements |
| 5227 | to always fail with ENOSYS. Some functions are actually named |
| 5228 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5229 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5230 | choke me |
| 5231 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5232 | $ac_func(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5233 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5234 | |
| 5235 | ; return 0; } |
| 5236 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5237 | if { (eval echo configure:5238: \"$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] | 5238 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5239 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5240 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5241 | echo "configure: failed program was:" >&5 |
| 5242 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5243 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5244 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5245 | fi |
| 5246 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5247 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5248 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5249 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5250 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5251 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5252 | cat >> confdefs.h <<EOF |
| 5253 | #define $ac_tr_func 1 |
| 5254 | EOF |
| 5255 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5256 | #line 5257 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5257 | #include "confdefs.h" |
| 5258 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5259 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5260 | getpgrp(0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5261 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5262 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5263 | if { (eval echo configure:5264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5264 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5265 | cat >> confdefs.h <<\EOF |
| 5266 | #define GETPGRP_HAVE_ARG 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5267 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5268 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5269 | else |
| 5270 | echo "configure: failed program was:" >&5 |
| 5271 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5272 | fi |
| 5273 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5274 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5275 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5276 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5277 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5278 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5279 | for ac_func in setpgrp |
| 5280 | do |
| 5281 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5282 | echo "configure:5283: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5283 | 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] | 5284 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5285 | else |
| 5286 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5287 | #line 5288 "configure" |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5288 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5289 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5290 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5291 | #include <assert.h> |
| 5292 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5293 | /* We use char because int might match the return type of a gcc2 |
| 5294 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5295 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5296 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5297 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5298 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5299 | /* The GNU C library defines this for functions which it implements |
| 5300 | to always fail with ENOSYS. Some functions are actually named |
| 5301 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5302 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5303 | choke me |
| 5304 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5305 | $ac_func(); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5306 | #endif |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5307 | |
| 5308 | ; return 0; } |
| 5309 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5310 | if { (eval echo configure:5311: \"$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] | 5311 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5312 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5313 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5314 | echo "configure: failed program was:" >&5 |
| 5315 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5316 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5317 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5318 | fi |
| 5319 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5320 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5321 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5322 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5323 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5324 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5325 | cat >> confdefs.h <<EOF |
| 5326 | #define $ac_tr_func 1 |
| 5327 | EOF |
| 5328 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5329 | #line 5330 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5330 | #include "confdefs.h" |
| 5331 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5332 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5333 | setpgrp(0,0); |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5334 | ; return 0; } |
| 5335 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5336 | if { (eval echo configure:5337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5337 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5338 | cat >> confdefs.h <<\EOF |
| 5339 | #define SETPGRP_HAVE_ARG 1 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5340 | EOF |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5341 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5342 | else |
| 5343 | echo "configure: failed program was:" >&5 |
| 5344 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5345 | fi |
| 5346 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5347 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5348 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5349 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5350 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 5351 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5352 | for ac_func in gettimeofday |
| 5353 | do |
| 5354 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5355 | echo "configure:5356: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5356 | 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] | 5357 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5358 | else |
| 5359 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5360 | #line 5361 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5361 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5362 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5363 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5364 | #include <assert.h> |
| 5365 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5366 | /* We use char because int might match the return type of a gcc2 |
| 5367 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5368 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5369 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5370 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5371 | |
| 5372 | /* The GNU C library defines this for functions which it implements |
| 5373 | to always fail with ENOSYS. Some functions are actually named |
| 5374 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5375 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5376 | choke me |
| 5377 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5378 | $ac_func(); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5379 | #endif |
| 5380 | |
| 5381 | ; return 0; } |
| 5382 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5383 | if { (eval echo configure:5384: \"$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] | 5384 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5385 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5386 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5387 | echo "configure: failed program was:" >&5 |
| 5388 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5389 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5390 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5391 | fi |
| 5392 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5393 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5394 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5395 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5396 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5397 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5398 | cat >> confdefs.h <<EOF |
| 5399 | #define $ac_tr_func 1 |
| 5400 | EOF |
| 5401 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5402 | #line 5403 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5403 | #include "confdefs.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5404 | #include <sys/time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5405 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5406 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
| 5407 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5408 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5409 | if { (eval echo configure:5410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5410 | : |
| 5411 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5412 | echo "configure: failed program was:" >&5 |
| 5413 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5414 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5415 | cat >> confdefs.h <<\EOF |
| 5416 | #define GETTIMEOFDAY_NO_TZ 1 |
| 5417 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5418 | |
| 5419 | fi |
| 5420 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5421 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5422 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5423 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 5424 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5425 | |
| 5426 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5427 | for ac_func in getaddrinfo |
| 5428 | do |
| 5429 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5430 | echo "configure:5431: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5431 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5432 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5433 | else |
| 5434 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5435 | #line 5436 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5436 | #include "confdefs.h" |
| 5437 | /* System header to define __stub macros and hopefully few prototypes, |
| 5438 | which can conflict with char $ac_func(); below. */ |
| 5439 | #include <assert.h> |
| 5440 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5441 | /* We use char because int might match the return type of a gcc2 |
| 5442 | builtin and then its argument prototype would still apply. */ |
| 5443 | char $ac_func(); |
| 5444 | |
| 5445 | int main() { |
| 5446 | |
| 5447 | /* The GNU C library defines this for functions which it implements |
| 5448 | to always fail with ENOSYS. Some functions are actually named |
| 5449 | something starting with __ and the normal name is an alias. */ |
| 5450 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5451 | choke me |
| 5452 | #else |
| 5453 | $ac_func(); |
| 5454 | #endif |
| 5455 | |
| 5456 | ; return 0; } |
| 5457 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5458 | if { (eval echo configure:5459: \"$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] | 5459 | rm -rf conftest* |
| 5460 | eval "ac_cv_func_$ac_func=yes" |
| 5461 | else |
| 5462 | echo "configure: failed program was:" >&5 |
| 5463 | cat conftest.$ac_ext >&5 |
| 5464 | rm -rf conftest* |
| 5465 | eval "ac_cv_func_$ac_func=no" |
| 5466 | fi |
| 5467 | rm -f conftest* |
| 5468 | fi |
| 5469 | |
| 5470 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5471 | echo "$ac_t""yes" 1>&6 |
| 5472 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5473 | cat >> confdefs.h <<EOF |
| 5474 | #define $ac_tr_func 1 |
| 5475 | EOF |
| 5476 | echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5477 | echo "configure:5478: checking getaddrinfo bug" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5478 | if test "$cross_compiling" = yes; then |
| 5479 | echo "$ac_t""buggy" 1>&6 |
| 5480 | buggygetaddrinfo=yes |
| 5481 | else |
| 5482 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5483 | #line 5484 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5484 | #include "confdefs.h" |
| 5485 | |
| 5486 | #include <sys/types.h> |
| 5487 | #include <netdb.h> |
| 5488 | #include <string.h> |
| 5489 | #include <sys/socket.h> |
| 5490 | #include <netinet/in.h> |
| 5491 | |
| 5492 | main() |
| 5493 | { |
| 5494 | int passive, gaierr, inet4 = 0, inet6 = 0; |
| 5495 | struct addrinfo hints, *ai, *aitop; |
| 5496 | char straddr[INET6_ADDRSTRLEN], strport[16]; |
| 5497 | |
| 5498 | for (passive = 0; passive <= 1; passive++) { |
| 5499 | memset(&hints, 0, sizeof(hints)); |
| 5500 | hints.ai_family = AF_UNSPEC; |
| 5501 | hints.ai_flags = passive ? AI_PASSIVE : 0; |
| 5502 | hints.ai_socktype = SOCK_STREAM; |
| 5503 | if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { |
| 5504 | (void)gai_strerror(gaierr); |
| 5505 | goto bad; |
| 5506 | } |
| 5507 | for (ai = aitop; ai; ai = ai->ai_next) { |
| 5508 | if (ai->ai_addr == NULL || |
| 5509 | ai->ai_addrlen == 0 || |
| 5510 | getnameinfo(ai->ai_addr, ai->ai_addrlen, |
| 5511 | straddr, sizeof(straddr), strport, sizeof(strport), |
| 5512 | NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
| 5513 | goto bad; |
| 5514 | } |
| 5515 | switch (ai->ai_family) { |
| 5516 | case AF_INET: |
| 5517 | if (strcmp(strport, "54321") != 0) { |
| 5518 | goto bad; |
| 5519 | } |
| 5520 | if (passive) { |
| 5521 | if (strcmp(straddr, "0.0.0.0") != 0) { |
| 5522 | goto bad; |
| 5523 | } |
| 5524 | } else { |
| 5525 | if (strcmp(straddr, "127.0.0.1") != 0) { |
| 5526 | goto bad; |
| 5527 | } |
| 5528 | } |
| 5529 | inet4++; |
| 5530 | break; |
| 5531 | case AF_INET6: |
| 5532 | if (strcmp(strport, "54321") != 0) { |
| 5533 | goto bad; |
| 5534 | } |
| 5535 | if (passive) { |
| 5536 | if (strcmp(straddr, "::") != 0) { |
| 5537 | goto bad; |
| 5538 | } |
| 5539 | } else { |
| 5540 | if (strcmp(straddr, "::1") != 0) { |
| 5541 | goto bad; |
| 5542 | } |
| 5543 | } |
| 5544 | inet6++; |
| 5545 | break; |
| 5546 | case AF_UNSPEC: |
| 5547 | goto bad; |
| 5548 | break; |
| 5549 | default: |
| 5550 | /* another family support? */ |
| 5551 | break; |
| 5552 | } |
| 5553 | } |
| 5554 | } |
| 5555 | |
| 5556 | if (!(inet4 == 0 || inet4 == 2)) |
| 5557 | goto bad; |
| 5558 | if (!(inet6 == 0 || inet6 == 2)) |
| 5559 | goto bad; |
| 5560 | |
| 5561 | if (aitop) |
| 5562 | freeaddrinfo(aitop); |
| 5563 | exit(0); |
| 5564 | |
| 5565 | bad: |
| 5566 | if (aitop) |
| 5567 | freeaddrinfo(aitop); |
| 5568 | exit(1); |
| 5569 | } |
| 5570 | |
| 5571 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5572 | if { (eval echo configure:5573: \"$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] | 5573 | then |
| 5574 | echo "$ac_t""good" 1>&6 |
| 5575 | buggygetaddrinfo=no |
| 5576 | else |
| 5577 | echo "configure: failed program was:" >&5 |
| 5578 | cat conftest.$ac_ext >&5 |
| 5579 | rm -fr conftest* |
| 5580 | echo "$ac_t""buggy" 1>&6 |
| 5581 | buggygetaddrinfo=yes |
| 5582 | fi |
| 5583 | rm -fr conftest* |
| 5584 | fi |
| 5585 | |
| 5586 | else |
| 5587 | echo "$ac_t""no" 1>&6 |
| 5588 | buggygetaddrinfo=yes |
| 5589 | fi |
| 5590 | done |
| 5591 | |
| 5592 | |
| 5593 | if test "$buggygetaddrinfo" = "yes"; then |
| 5594 | if test "$ipv6" = "yes"; then |
| 5595 | echo 'Fatal: You must get working getaddrinfo() function.' |
| 5596 | echo ' or you can specify "--disable-ipv6"'. |
| 5597 | exit 1 |
| 5598 | fi |
| 5599 | fi |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 5600 | for ac_func in getnameinfo |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5601 | do |
| 5602 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5603 | echo "configure:5604: checking for $ac_func" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5604 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
| 5605 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5606 | else |
| 5607 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5608 | #line 5609 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5609 | #include "confdefs.h" |
| 5610 | /* System header to define __stub macros and hopefully few prototypes, |
| 5611 | which can conflict with char $ac_func(); below. */ |
| 5612 | #include <assert.h> |
| 5613 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 5614 | /* We use char because int might match the return type of a gcc2 |
| 5615 | builtin and then its argument prototype would still apply. */ |
| 5616 | char $ac_func(); |
| 5617 | |
| 5618 | int main() { |
| 5619 | |
| 5620 | /* The GNU C library defines this for functions which it implements |
| 5621 | to always fail with ENOSYS. Some functions are actually named |
| 5622 | something starting with __ and the normal name is an alias. */ |
| 5623 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 5624 | choke me |
| 5625 | #else |
| 5626 | $ac_func(); |
| 5627 | #endif |
| 5628 | |
| 5629 | ; return 0; } |
| 5630 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5631 | if { (eval echo configure:5632: \"$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] | 5632 | rm -rf conftest* |
| 5633 | eval "ac_cv_func_$ac_func=yes" |
| 5634 | else |
| 5635 | echo "configure: failed program was:" >&5 |
| 5636 | cat conftest.$ac_ext >&5 |
| 5637 | rm -rf conftest* |
| 5638 | eval "ac_cv_func_$ac_func=no" |
| 5639 | fi |
| 5640 | rm -f conftest* |
| 5641 | fi |
| 5642 | |
| 5643 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 5644 | echo "$ac_t""yes" 1>&6 |
| 5645 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 5646 | cat >> confdefs.h <<EOF |
| 5647 | #define $ac_tr_func 1 |
| 5648 | EOF |
| 5649 | |
| 5650 | else |
| 5651 | echo "$ac_t""no" 1>&6 |
| 5652 | fi |
| 5653 | done |
| 5654 | |
| 5655 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5656 | # checks for structures |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5657 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5658 | echo "configure:5659: 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] | 5659 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5660 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5661 | else |
| 5662 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5663 | #line 5664 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5664 | #include "confdefs.h" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5665 | #include <sys/types.h> |
| 5666 | #include <sys/time.h> |
| 5667 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5668 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5669 | struct tm *tp; |
| 5670 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5671 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5672 | if { (eval echo configure:5673: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5673 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5674 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5675 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5676 | echo "configure: failed program was:" >&5 |
| 5677 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5678 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5679 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5680 | fi |
| 5681 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5682 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5683 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5684 | echo "$ac_t""$ac_cv_header_time" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5685 | if test $ac_cv_header_time = yes; then |
| 5686 | cat >> confdefs.h <<\EOF |
| 5687 | #define TIME_WITH_SYS_TIME 1 |
| 5688 | EOF |
| 5689 | |
| 5690 | fi |
| 5691 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5692 | echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5693 | echo "configure:5694: 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] | 5694 | if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5695 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5696 | else |
| 5697 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5698 | #line 5699 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5699 | #include "confdefs.h" |
| 5700 | #include <sys/types.h> |
| 5701 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5702 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5703 | struct tm *tp; tp->tm_sec; |
| 5704 | ; return 0; } |
| 5705 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5706 | if { (eval echo configure:5707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5707 | rm -rf conftest* |
| 5708 | ac_cv_struct_tm=time.h |
| 5709 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5710 | echo "configure: failed program was:" >&5 |
| 5711 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5712 | rm -rf conftest* |
| 5713 | ac_cv_struct_tm=sys/time.h |
| 5714 | fi |
| 5715 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5716 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5717 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5718 | echo "$ac_t""$ac_cv_struct_tm" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5719 | if test $ac_cv_struct_tm = sys/time.h; then |
| 5720 | cat >> confdefs.h <<\EOF |
| 5721 | #define TM_IN_SYS_TIME 1 |
| 5722 | EOF |
| 5723 | |
| 5724 | fi |
| 5725 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5726 | echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5727 | echo "configure:5728: checking for tm_zone in struct tm" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5728 | 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] | 5729 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5730 | else |
| 5731 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5732 | #line 5733 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5733 | #include "confdefs.h" |
| 5734 | #include <sys/types.h> |
| 5735 | #include <$ac_cv_struct_tm> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5736 | int main() { |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5737 | struct tm tm; tm.tm_zone; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5738 | ; return 0; } |
| 5739 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5740 | if { (eval echo configure:5741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5741 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5742 | ac_cv_struct_tm_zone=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5743 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5744 | echo "configure: failed program was:" >&5 |
| 5745 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5746 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5747 | ac_cv_struct_tm_zone=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5748 | fi |
| 5749 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5750 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5751 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5752 | echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 |
| 5753 | if test "$ac_cv_struct_tm_zone" = yes; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5754 | cat >> confdefs.h <<\EOF |
| 5755 | #define HAVE_TM_ZONE 1 |
| 5756 | EOF |
| 5757 | |
| 5758 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5759 | echo $ac_n "checking for tzname""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5760 | echo "configure:5761: checking for tzname" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5761 | if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5762 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5763 | else |
| 5764 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5765 | #line 5766 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5766 | #include "confdefs.h" |
| 5767 | #include <time.h> |
| 5768 | #ifndef tzname /* For SGI. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5769 | extern char *tzname[]; /* RS6000 and others reject char **tzname. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5770 | #endif |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5771 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5772 | atoi(*tzname); |
| 5773 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5774 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5775 | if { (eval echo configure:5776: \"$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] | 5776 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5777 | ac_cv_var_tzname=yes |
| 5778 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5779 | echo "configure: failed program was:" >&5 |
| 5780 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5781 | rm -rf conftest* |
| 5782 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5783 | fi |
| 5784 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5785 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 5786 | |
| 5787 | echo "$ac_t""$ac_cv_var_tzname" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5788 | if test $ac_cv_var_tzname = yes; then |
| 5789 | cat >> confdefs.h <<\EOF |
| 5790 | #define HAVE_TZNAME 1 |
| 5791 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5792 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5793 | fi |
| 5794 | fi |
| 5795 | |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5796 | echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5797 | echo "configure:5798: checking for st_rdev in struct stat" >&5 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5798 | if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then |
| 5799 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5800 | else |
| 5801 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5802 | #line 5803 "configure" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5803 | #include "confdefs.h" |
| 5804 | #include <sys/types.h> |
| 5805 | #include <sys/stat.h> |
| 5806 | int main() { |
| 5807 | struct stat s; s.st_rdev; |
| 5808 | ; return 0; } |
| 5809 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5810 | if { (eval echo configure:5811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5811 | rm -rf conftest* |
| 5812 | ac_cv_struct_st_rdev=yes |
| 5813 | else |
| 5814 | echo "configure: failed program was:" >&5 |
| 5815 | cat conftest.$ac_ext >&5 |
| 5816 | rm -rf conftest* |
| 5817 | ac_cv_struct_st_rdev=no |
| 5818 | fi |
| 5819 | rm -f conftest* |
| 5820 | fi |
| 5821 | |
| 5822 | echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6 |
| 5823 | if test $ac_cv_struct_st_rdev = yes; then |
| 5824 | cat >> confdefs.h <<\EOF |
| 5825 | #define HAVE_ST_RDEV 1 |
| 5826 | EOF |
| 5827 | |
| 5828 | fi |
| 5829 | |
| 5830 | echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5831 | echo "configure:5832: checking for st_blksize in struct stat" >&5 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5832 | if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then |
| 5833 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5834 | else |
| 5835 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5836 | #line 5837 "configure" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5837 | #include "confdefs.h" |
| 5838 | #include <sys/types.h> |
| 5839 | #include <sys/stat.h> |
| 5840 | int main() { |
| 5841 | struct stat s; s.st_blksize; |
| 5842 | ; return 0; } |
| 5843 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5844 | if { (eval echo configure:5845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5845 | rm -rf conftest* |
| 5846 | ac_cv_struct_st_blksize=yes |
| 5847 | else |
| 5848 | echo "configure: failed program was:" >&5 |
| 5849 | cat conftest.$ac_ext >&5 |
| 5850 | rm -rf conftest* |
| 5851 | ac_cv_struct_st_blksize=no |
| 5852 | fi |
| 5853 | rm -f conftest* |
| 5854 | fi |
| 5855 | |
| 5856 | echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6 |
| 5857 | if test $ac_cv_struct_st_blksize = yes; then |
| 5858 | cat >> confdefs.h <<\EOF |
| 5859 | #define HAVE_ST_BLKSIZE 1 |
| 5860 | EOF |
| 5861 | |
| 5862 | fi |
| 5863 | |
| 5864 | echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5865 | echo "configure:5866: checking for st_blocks in struct stat" >&5 |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5866 | if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then |
| 5867 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5868 | else |
| 5869 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5870 | #line 5871 "configure" |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5871 | #include "confdefs.h" |
| 5872 | #include <sys/types.h> |
| 5873 | #include <sys/stat.h> |
| 5874 | int main() { |
| 5875 | struct stat s; s.st_blocks; |
| 5876 | ; return 0; } |
| 5877 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5878 | if { (eval echo configure:5879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 5879 | rm -rf conftest* |
| 5880 | ac_cv_struct_st_blocks=yes |
| 5881 | else |
| 5882 | echo "configure: failed program was:" >&5 |
| 5883 | cat conftest.$ac_ext >&5 |
| 5884 | rm -rf conftest* |
| 5885 | ac_cv_struct_st_blocks=no |
| 5886 | fi |
| 5887 | rm -f conftest* |
| 5888 | fi |
| 5889 | |
| 5890 | echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6 |
| 5891 | if test $ac_cv_struct_st_blocks = yes; then |
| 5892 | cat >> confdefs.h <<\EOF |
| 5893 | #define HAVE_ST_BLOCKS 1 |
| 5894 | EOF |
| 5895 | |
| 5896 | else |
| 5897 | LIBOBJS="$LIBOBJS fileblocks.${ac_objext}" |
| 5898 | fi |
| 5899 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5900 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5901 | echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5902 | echo "configure:5903: checking for time.h that defines altzone" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 5903 | 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] | 5904 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5905 | else |
| 5906 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5907 | #line 5908 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5908 | #include "confdefs.h" |
| 5909 | #include <time.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5910 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5911 | return altzone; |
| 5912 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5913 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5914 | if { (eval echo configure:5915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5915 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5916 | ac_cv_header_time_altzone=yes |
| 5917 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5918 | echo "configure: failed program was:" >&5 |
| 5919 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5920 | rm -rf conftest* |
| 5921 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5922 | fi |
| 5923 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5924 | fi |
| 5925 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5926 | echo "$ac_t""$ac_cv_header_time_altzone" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5927 | if test $ac_cv_header_time_altzone = yes; then |
| 5928 | cat >> confdefs.h <<\EOF |
| 5929 | #define HAVE_ALTZONE 1 |
| 5930 | EOF |
| 5931 | |
| 5932 | fi |
| 5933 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5934 | was_it_defined=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5935 | echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5936 | echo "configure:5937: 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] | 5937 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5938 | #line 5939 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5939 | #include "confdefs.h" |
| 5940 | |
| 5941 | #include <sys/types.h> |
| 5942 | #include <sys/select.h> |
| 5943 | #include <sys/time.h> |
| 5944 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5945 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5946 | ; |
| 5947 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5948 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5949 | if { (eval echo configure:5950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5950 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 5951 | cat >> confdefs.h <<\EOF |
| 5952 | #define SYS_SELECT_WITH_SYS_TIME 1 |
| 5953 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 5954 | was_it_defined=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 5955 | else |
| 5956 | echo "configure: failed program was:" >&5 |
| 5957 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 5958 | fi |
| 5959 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 5960 | echo "$ac_t""$was_it_defined" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 5961 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5962 | echo $ac_n "checking for addrinfo""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5963 | echo "configure:5964: checking for addrinfo" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5964 | if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then |
| 5965 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 5966 | else |
| 5967 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5968 | #line 5969 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5969 | #include "confdefs.h" |
| 5970 | |
| 5971 | # include <netdb.h> |
| 5972 | int main() { |
| 5973 | struct addrinfo a |
| 5974 | ; return 0; } |
| 5975 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5976 | if { (eval echo configure:5977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5977 | rm -rf conftest* |
| 5978 | ac_cv_struct_addrinfo=yes |
| 5979 | else |
| 5980 | echo "configure: failed program was:" >&5 |
| 5981 | cat conftest.$ac_ext >&5 |
| 5982 | rm -rf conftest* |
| 5983 | ac_cv_struct_addrinfo=no |
| 5984 | fi |
| 5985 | rm -f conftest* |
| 5986 | fi |
| 5987 | |
| 5988 | echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6 |
| 5989 | if test $ac_cv_struct_addrinfo = yes; then |
| 5990 | cat >> confdefs.h <<\EOF |
| 5991 | #define HAVE_ADDRINFO 1 |
| 5992 | EOF |
| 5993 | |
| 5994 | fi |
| 5995 | |
| 5996 | echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 5997 | echo "configure:5998: checking for sockaddr_storage" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 5998 | if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then |
| 5999 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6000 | else |
| 6001 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6002 | #line 6003 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6003 | #include "confdefs.h" |
| 6004 | |
| 6005 | # include <sys/types.h> |
| 6006 | # include <sys/socket.h> |
| 6007 | int main() { |
| 6008 | struct sockaddr_storage s |
| 6009 | ; return 0; } |
| 6010 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6011 | if { (eval echo configure:6012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6012 | rm -rf conftest* |
| 6013 | ac_cv_struct_sockaddr_storage=yes |
| 6014 | else |
| 6015 | echo "configure: failed program was:" >&5 |
| 6016 | cat conftest.$ac_ext >&5 |
| 6017 | rm -rf conftest* |
| 6018 | ac_cv_struct_sockaddr_storage=no |
| 6019 | fi |
| 6020 | rm -f conftest* |
| 6021 | fi |
| 6022 | |
| 6023 | echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6 |
| 6024 | if test $ac_cv_struct_sockaddr_storage = yes; then |
| 6025 | cat >> confdefs.h <<\EOF |
| 6026 | #define HAVE_SOCKADDR_STORAGE 1 |
| 6027 | EOF |
| 6028 | |
| 6029 | fi |
| 6030 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6031 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6032 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6033 | echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6034 | echo "configure:6035: checking whether char is unsigned" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6035 | 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] | 6036 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6037 | else |
| 6038 | if test "$GCC" = yes; then |
| 6039 | # GCC predefines this symbol on systems where it applies. |
| 6040 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6041 | #line 6042 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6042 | #include "confdefs.h" |
| 6043 | #ifdef __CHAR_UNSIGNED__ |
| 6044 | yes |
| 6045 | #endif |
| 6046 | |
| 6047 | EOF |
| 6048 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 6049 | egrep "yes" >/dev/null 2>&1; then |
| 6050 | rm -rf conftest* |
| 6051 | ac_cv_c_char_unsigned=yes |
| 6052 | else |
| 6053 | rm -rf conftest* |
| 6054 | ac_cv_c_char_unsigned=no |
| 6055 | fi |
| 6056 | rm -f conftest* |
| 6057 | |
| 6058 | else |
| 6059 | if test "$cross_compiling" = yes; then |
| 6060 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 6061 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6062 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6063 | #line 6064 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6064 | #include "confdefs.h" |
| 6065 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6066 | #if !defined(__STDC__) || __STDC__ != 1 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6067 | #define volatile |
| 6068 | #endif |
| 6069 | main() { |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6070 | volatile char c = 255; exit(c < 0); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6071 | } |
| 6072 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6073 | if { (eval echo configure:6074: \"$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] | 6074 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6075 | ac_cv_c_char_unsigned=yes |
| 6076 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6077 | echo "configure: failed program was:" >&5 |
| 6078 | cat conftest.$ac_ext >&5 |
| 6079 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6080 | ac_cv_c_char_unsigned=no |
| 6081 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6082 | rm -fr conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6083 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6084 | |
| 6085 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6086 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6087 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6088 | echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6089 | if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then |
| 6090 | cat >> confdefs.h <<\EOF |
| 6091 | #define __CHAR_UNSIGNED__ 1 |
| 6092 | EOF |
| 6093 | |
| 6094 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6095 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6096 | echo $ac_n "checking for working const""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6097 | echo "configure:6098: checking for working const" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6098 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6099 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6100 | else |
| 6101 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6102 | #line 6103 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6103 | #include "confdefs.h" |
| 6104 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6105 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6106 | |
| 6107 | /* Ultrix mips cc rejects this. */ |
Martin v. Löwis | 9db2f57 | 2001-07-23 01:30:10 +0000 | [diff] [blame] | 6108 | typedef int charset[2]; const charset x; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6109 | /* SunOS 4.1.1 cc rejects this. */ |
| 6110 | char const *const *ccp; |
| 6111 | char **p; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6112 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 6113 | struct point {int x, y;}; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6114 | static struct point const zero = {0,0}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6115 | /* AIX XL C 1.02.0.0 rejects this. |
| 6116 | It does not let you subtract one const X* pointer from another in an arm |
| 6117 | of an if-expression whose if-part is not a constant expression */ |
| 6118 | const char *g = "string"; |
| 6119 | ccp = &g + (g ? g-g : 0); |
| 6120 | /* HPUX 7.0 cc rejects these. */ |
| 6121 | ++ccp; |
| 6122 | p = (char**) ccp; |
| 6123 | ccp = (char const *const *) p; |
| 6124 | { /* SCO 3.2v4 cc rejects this. */ |
| 6125 | char *t; |
| 6126 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
| 6127 | |
| 6128 | *t++ = 0; |
| 6129 | } |
| 6130 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6131 | int x[] = {25, 17}; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6132 | const int *foo = &x[0]; |
| 6133 | ++foo; |
| 6134 | } |
| 6135 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 6136 | typedef const int *iptr; |
| 6137 | iptr p = 0; |
| 6138 | ++p; |
| 6139 | } |
| 6140 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 6141 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 6142 | struct s { int j; const int *ap[3]; }; |
| 6143 | struct s *b; b->j = 5; |
| 6144 | } |
| 6145 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 6146 | const int foo = 10; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6147 | } |
| 6148 | |
| 6149 | ; return 0; } |
| 6150 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6151 | if { (eval echo configure:6152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6152 | rm -rf conftest* |
| 6153 | ac_cv_c_const=yes |
| 6154 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6155 | echo "configure: failed program was:" >&5 |
| 6156 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6157 | rm -rf conftest* |
| 6158 | ac_cv_c_const=no |
| 6159 | fi |
| 6160 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6161 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6162 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6163 | echo "$ac_t""$ac_cv_c_const" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6164 | if test $ac_cv_c_const = no; then |
| 6165 | cat >> confdefs.h <<\EOF |
| 6166 | #define const |
| 6167 | EOF |
| 6168 | |
| 6169 | fi |
| 6170 | |
| 6171 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6172 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6173 | echo $ac_n "checking for working volatile""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6174 | echo "configure:6175: checking for working volatile" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6175 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6176 | #line 6177 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6177 | #include "confdefs.h" |
| 6178 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6179 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6180 | volatile int x; x = 0; |
| 6181 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6182 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6183 | if { (eval echo configure:6184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6184 | rm -rf conftest* |
| 6185 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6186 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6187 | echo "configure: failed program was:" >&5 |
| 6188 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6189 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6190 | cat >> confdefs.h <<\EOF |
| 6191 | #define volatile |
| 6192 | EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6193 | |
| 6194 | fi |
| 6195 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6196 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6197 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6198 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6199 | echo $ac_n "checking for working signed char""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6200 | echo "configure:6201: checking for working signed char" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6201 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6202 | #line 6203 "configure" |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6203 | #include "confdefs.h" |
| 6204 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6205 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6206 | signed char c; |
| 6207 | ; return 0; } |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6208 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6209 | if { (eval echo configure:6210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6210 | rm -rf conftest* |
| 6211 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6212 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6213 | echo "configure: failed program was:" >&5 |
| 6214 | cat conftest.$ac_ext >&5 |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 6215 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6216 | cat >> confdefs.h <<\EOF |
| 6217 | #define signed |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6218 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6219 | |
| 6220 | fi |
| 6221 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6222 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6223 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6224 | have_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6225 | echo $ac_n "checking for prototypes""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6226 | echo "configure:6227: checking for prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6227 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6228 | #line 6229 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6229 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6230 | int foo(int x) { return 0; } |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6231 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6232 | return foo(10); |
| 6233 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6234 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6235 | if { (eval echo configure:6236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6236 | rm -rf conftest* |
| 6237 | cat >> confdefs.h <<\EOF |
| 6238 | #define HAVE_PROTOTYPES 1 |
| 6239 | EOF |
| 6240 | have_prototypes=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6241 | else |
| 6242 | echo "configure: failed program was:" >&5 |
| 6243 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6244 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6245 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6246 | echo "$ac_t""$have_prototypes" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6247 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6248 | works=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6249 | echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6250 | echo "configure:6251: checking for variable length prototypes and stdarg.h" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6251 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6252 | #line 6253 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6253 | #include "confdefs.h" |
| 6254 | |
| 6255 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6256 | int foo(int x, ...) { |
| 6257 | va_list va; |
| 6258 | va_start(va, x); |
| 6259 | va_arg(va, int); |
| 6260 | va_arg(va, char *); |
| 6261 | va_arg(va, double); |
| 6262 | return 0; |
| 6263 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6264 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6265 | int main() { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 6266 | return foo(10, "", 3.14); |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6267 | ; return 0; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6268 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6269 | if { (eval echo configure:6270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6270 | rm -rf conftest* |
| 6271 | cat >> confdefs.h <<\EOF |
| 6272 | #define HAVE_STDARG_PROTOTYPES 1 |
| 6273 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6274 | works=yes |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6275 | else |
| 6276 | echo "configure: failed program was:" >&5 |
| 6277 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6278 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6279 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6280 | echo "$ac_t""$works" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6281 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6282 | if test "$have_prototypes" = yes; then |
| 6283 | bad_prototypes=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6284 | echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6285 | echo "configure:6286: checking for bad exec* prototypes" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6286 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6287 | #line 6288 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6288 | #include "confdefs.h" |
| 6289 | #include <unistd.h> |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6290 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6291 | char **t;execve("@",t,t); |
| 6292 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6293 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6294 | if { (eval echo configure:6295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6295 | : |
| 6296 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6297 | echo "configure: failed program was:" >&5 |
| 6298 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6299 | rm -rf conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6300 | cat >> confdefs.h <<\EOF |
| 6301 | #define BAD_EXEC_PROTOTYPES 1 |
| 6302 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6303 | bad_prototypes=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6304 | fi |
| 6305 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6306 | echo "$ac_t""$bad_prototypes" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6307 | fi |
| 6308 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6309 | # check if sockaddr has sa_len member |
| 6310 | echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6311 | echo "configure:6312: checking if sockaddr has sa_len member" >&5 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6312 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6313 | #line 6314 "configure" |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6314 | #include "confdefs.h" |
| 6315 | #include <sys/types.h> |
| 6316 | #include <sys/socket.h> |
| 6317 | int main() { |
| 6318 | struct sockaddr x; |
| 6319 | x.sa_len = 0; |
| 6320 | ; return 0; } |
| 6321 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6322 | if { (eval echo configure:6323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 6323 | rm -rf conftest* |
| 6324 | echo "$ac_t""yes" 1>&6 |
| 6325 | cat >> confdefs.h <<\EOF |
| 6326 | #define HAVE_SOCKADDR_SA_LEN 1 |
| 6327 | EOF |
| 6328 | |
| 6329 | else |
| 6330 | echo "configure: failed program was:" >&5 |
| 6331 | cat conftest.$ac_ext >&5 |
| 6332 | rm -rf conftest* |
| 6333 | echo "$ac_t""no" 1>&6 |
| 6334 | fi |
| 6335 | rm -f conftest* |
| 6336 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6337 | echo $ac_n "checking for bad static forward""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6338 | echo "configure:6339: checking for bad static forward" >&5 |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6339 | if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then |
| 6340 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6341 | else |
| 6342 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6343 | ac_cv_bad_static_forward=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6344 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6345 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6346 | #line 6347 "configure" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6347 | #include "confdefs.h" |
| 6348 | |
| 6349 | struct s { int a; int b; }; |
| 6350 | static struct s foo; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6351 | int foobar() { |
| 6352 | static int random; |
| 6353 | random = (int) &foo; |
| 6354 | return random; |
| 6355 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6356 | static struct s foo = { 1, 2 }; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6357 | main() { |
| 6358 | exit(!((int)&foo == foobar())); |
| 6359 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6360 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6361 | if { (eval echo configure:6362: \"$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] | 6362 | then |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6363 | ac_cv_bad_static_forward=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6364 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6365 | echo "configure: failed program was:" >&5 |
| 6366 | cat conftest.$ac_ext >&5 |
| 6367 | rm -fr conftest* |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6368 | ac_cv_bad_static_forward=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6369 | fi |
| 6370 | rm -fr conftest* |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6371 | fi |
| 6372 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 6373 | fi |
| 6374 | |
| 6375 | echo "$ac_t""$ac_cv_bad_static_forward" 1>&6 |
| 6376 | if test "$ac_cv_bad_static_forward" = yes |
| 6377 | then |
| 6378 | cat >> confdefs.h <<\EOF |
| 6379 | #define BAD_STATIC_FORWARD 1 |
| 6380 | EOF |
| 6381 | |
| 6382 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6383 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6384 | va_list_is_array=no |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6385 | echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6386 | echo "configure:6387: checking whether va_list is an array" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6387 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6388 | #line 6389 "configure" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6389 | #include "confdefs.h" |
| 6390 | |
| 6391 | #ifdef HAVE_STDARG_PROTOTYPES |
| 6392 | #include <stdarg.h> |
| 6393 | #else |
| 6394 | #include <varargs.h> |
| 6395 | #endif |
| 6396 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6397 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6398 | va_list list1, list2; list1 = list2; |
| 6399 | ; return 0; } |
| 6400 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6401 | if { (eval echo configure:6402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6402 | : |
| 6403 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6404 | echo "configure: failed program was:" >&5 |
| 6405 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6406 | rm -rf conftest* |
| 6407 | cat >> confdefs.h <<\EOF |
| 6408 | #define VA_LIST_IS_ARRAY 1 |
| 6409 | EOF |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 6410 | va_list_is_array=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6411 | fi |
| 6412 | rm -f conftest* |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6413 | echo "$ac_t""$va_list_is_array" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6414 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6415 | # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( |
| 6416 | echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6417 | echo "configure:6418: checking for gethostbyname_r" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6418 | 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] | 6419 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6420 | else |
| 6421 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6422 | #line 6423 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6423 | #include "confdefs.h" |
| 6424 | /* System header to define __stub macros and hopefully few prototypes, |
| 6425 | which can conflict with char gethostbyname_r(); below. */ |
| 6426 | #include <assert.h> |
| 6427 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6428 | /* We use char because int might match the return type of a gcc2 |
| 6429 | builtin and then its argument prototype would still apply. */ |
| 6430 | char gethostbyname_r(); |
| 6431 | |
| 6432 | int main() { |
| 6433 | |
| 6434 | /* The GNU C library defines this for functions which it implements |
| 6435 | to always fail with ENOSYS. Some functions are actually named |
| 6436 | something starting with __ and the normal name is an alias. */ |
| 6437 | #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r) |
| 6438 | choke me |
| 6439 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6440 | gethostbyname_r(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6441 | #endif |
| 6442 | |
| 6443 | ; return 0; } |
| 6444 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6445 | if { (eval echo configure:6446: \"$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] | 6446 | rm -rf conftest* |
| 6447 | eval "ac_cv_func_gethostbyname_r=yes" |
| 6448 | else |
| 6449 | echo "configure: failed program was:" >&5 |
| 6450 | cat conftest.$ac_ext >&5 |
| 6451 | rm -rf conftest* |
| 6452 | eval "ac_cv_func_gethostbyname_r=no" |
| 6453 | fi |
| 6454 | rm -f conftest* |
| 6455 | fi |
| 6456 | |
| 6457 | if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then |
| 6458 | echo "$ac_t""yes" 1>&6 |
| 6459 | |
| 6460 | cat >> confdefs.h <<\EOF |
| 6461 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6462 | EOF |
| 6463 | |
| 6464 | echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6465 | echo "configure:6466: checking gethostbyname_r with 6 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6466 | OLD_CFLAGS=$CFLAGS |
| 6467 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
| 6468 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6469 | #line 6470 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6470 | #include "confdefs.h" |
| 6471 | |
| 6472 | # include <netdb.h> |
| 6473 | |
| 6474 | int main() { |
| 6475 | |
| 6476 | char *name; |
| 6477 | struct hostent *he, *res; |
| 6478 | char buffer[2048]; |
| 6479 | int buflen = 2048; |
| 6480 | int h_errnop; |
| 6481 | |
| 6482 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
| 6483 | |
| 6484 | ; return 0; } |
| 6485 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6486 | if { (eval echo configure:6487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6487 | rm -rf conftest* |
| 6488 | |
| 6489 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6490 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6491 | EOF |
| 6492 | |
| 6493 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6494 | #define HAVE_GETHOSTBYNAME_R_6_ARG 1 |
| 6495 | EOF |
| 6496 | |
| 6497 | echo "$ac_t""yes" 1>&6 |
| 6498 | |
| 6499 | else |
| 6500 | echo "configure: failed program was:" >&5 |
| 6501 | cat conftest.$ac_ext >&5 |
| 6502 | rm -rf conftest* |
| 6503 | |
| 6504 | echo "$ac_t""no" 1>&6 |
| 6505 | echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6506 | echo "configure:6507: checking gethostbyname_r with 5 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6507 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6508 | #line 6509 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6509 | #include "confdefs.h" |
| 6510 | |
| 6511 | # include <netdb.h> |
| 6512 | |
| 6513 | int main() { |
| 6514 | |
| 6515 | char *name; |
| 6516 | struct hostent *he; |
| 6517 | char buffer[2048]; |
| 6518 | int buflen = 2048; |
| 6519 | int h_errnop; |
| 6520 | |
| 6521 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
| 6522 | |
| 6523 | ; return 0; } |
| 6524 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6525 | if { (eval echo configure:6526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6526 | rm -rf conftest* |
| 6527 | |
| 6528 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6529 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6530 | EOF |
| 6531 | |
| 6532 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6533 | #define HAVE_GETHOSTBYNAME_R_5_ARG 1 |
| 6534 | EOF |
| 6535 | |
| 6536 | echo "$ac_t""yes" 1>&6 |
| 6537 | |
| 6538 | else |
| 6539 | echo "configure: failed program was:" >&5 |
| 6540 | cat conftest.$ac_ext >&5 |
| 6541 | rm -rf conftest* |
| 6542 | |
| 6543 | echo "$ac_t""no" 1>&6 |
| 6544 | echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6545 | echo "configure:6546: checking gethostbyname_r with 3 args" >&5 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6546 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6547 | #line 6548 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6548 | #include "confdefs.h" |
| 6549 | |
| 6550 | # include <netdb.h> |
| 6551 | |
| 6552 | int main() { |
| 6553 | |
| 6554 | char *name; |
| 6555 | struct hostent *he; |
| 6556 | struct hostent_data data; |
| 6557 | |
| 6558 | (void) gethostbyname_r(name, he, &data); |
| 6559 | |
| 6560 | ; return 0; } |
| 6561 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6562 | if { (eval echo configure:6563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6563 | rm -rf conftest* |
| 6564 | |
| 6565 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6566 | #define HAVE_GETHOSTBYNAME_R 1 |
| 6567 | EOF |
| 6568 | |
| 6569 | cat >> confdefs.h <<\EOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6570 | #define HAVE_GETHOSTBYNAME_R_3_ARG 1 |
| 6571 | EOF |
| 6572 | |
| 6573 | echo "$ac_t""yes" 1>&6 |
| 6574 | |
| 6575 | else |
| 6576 | echo "configure: failed program was:" >&5 |
| 6577 | cat conftest.$ac_ext >&5 |
| 6578 | rm -rf conftest* |
| 6579 | |
| 6580 | echo "$ac_t""no" 1>&6 |
| 6581 | |
| 6582 | fi |
| 6583 | rm -f conftest* |
| 6584 | |
| 6585 | fi |
| 6586 | rm -f conftest* |
| 6587 | |
| 6588 | fi |
| 6589 | rm -f conftest* |
| 6590 | CFLAGS=$OLD_CFLAGS |
| 6591 | |
| 6592 | else |
| 6593 | echo "$ac_t""no" 1>&6 |
| 6594 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6595 | for ac_func in gethostbyname |
| 6596 | do |
| 6597 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6598 | echo "configure:6599: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6599 | 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] | 6600 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6601 | else |
| 6602 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6603 | #line 6604 "configure" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6604 | #include "confdefs.h" |
| 6605 | /* System header to define __stub macros and hopefully few prototypes, |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6606 | which can conflict with char $ac_func(); below. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6607 | #include <assert.h> |
| 6608 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6609 | /* We use char because int might match the return type of a gcc2 |
| 6610 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6611 | char $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6612 | |
| 6613 | int main() { |
| 6614 | |
| 6615 | /* The GNU C library defines this for functions which it implements |
| 6616 | to always fail with ENOSYS. Some functions are actually named |
| 6617 | something starting with __ and the normal name is an alias. */ |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6618 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6619 | choke me |
| 6620 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6621 | $ac_func(); |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6622 | #endif |
| 6623 | |
| 6624 | ; return 0; } |
| 6625 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6626 | if { (eval echo configure:6627: \"$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] | 6627 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6628 | eval "ac_cv_func_$ac_func=yes" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6629 | else |
| 6630 | echo "configure: failed program was:" >&5 |
| 6631 | cat conftest.$ac_ext >&5 |
| 6632 | rm -rf conftest* |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6633 | eval "ac_cv_func_$ac_func=no" |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6634 | fi |
| 6635 | rm -f conftest* |
| 6636 | fi |
| 6637 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6638 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6639 | echo "$ac_t""yes" 1>&6 |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6640 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6641 | cat >> confdefs.h <<EOF |
| 6642 | #define $ac_tr_func 1 |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6643 | EOF |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6644 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6645 | else |
| 6646 | echo "$ac_t""no" 1>&6 |
| 6647 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 6648 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 6649 | |
| 6650 | |
| 6651 | fi |
| 6652 | |
| 6653 | |
| 6654 | |
| 6655 | |
| 6656 | |
| 6657 | |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 6658 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6659 | # checks for system services |
| 6660 | # (none yet) |
| 6661 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6662 | # Linux requires this for correct f.p. operations |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6663 | echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6664 | echo "configure:6665: checking for __fpu_control" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6665 | if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6666 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6667 | else |
| 6668 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6669 | #line 6670 "configure" |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6670 | #include "confdefs.h" |
| 6671 | /* System header to define __stub macros and hopefully few prototypes, |
| 6672 | which can conflict with char __fpu_control(); below. */ |
| 6673 | #include <assert.h> |
| 6674 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6675 | /* We use char because int might match the return type of a gcc2 |
| 6676 | builtin and then its argument prototype would still apply. */ |
| 6677 | char __fpu_control(); |
| 6678 | |
| 6679 | int main() { |
| 6680 | |
| 6681 | /* The GNU C library defines this for functions which it implements |
| 6682 | to always fail with ENOSYS. Some functions are actually named |
| 6683 | something starting with __ and the normal name is an alias. */ |
| 6684 | #if defined (__stub___fpu_control) || defined (__stub_____fpu_control) |
| 6685 | choke me |
| 6686 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6687 | __fpu_control(); |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6688 | #endif |
| 6689 | |
| 6690 | ; return 0; } |
| 6691 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6692 | if { (eval echo configure:6693: \"$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] | 6693 | rm -rf conftest* |
| 6694 | eval "ac_cv_func___fpu_control=yes" |
| 6695 | else |
| 6696 | echo "configure: failed program was:" >&5 |
| 6697 | cat conftest.$ac_ext >&5 |
| 6698 | rm -rf conftest* |
| 6699 | eval "ac_cv_func___fpu_control=no" |
| 6700 | fi |
| 6701 | rm -f conftest* |
| 6702 | fi |
| 6703 | |
| 6704 | if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then |
| 6705 | echo "$ac_t""yes" 1>&6 |
| 6706 | : |
| 6707 | else |
| 6708 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6709 | echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6710 | echo "configure:6711: checking for __fpu_control in -lieee" >&5 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6711 | ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'` |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6712 | 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] | 6713 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6714 | else |
| 6715 | ac_save_LIBS="$LIBS" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6716 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6717 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6718 | #line 6719 "configure" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6719 | #include "confdefs.h" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6720 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 6721 | /* We use char because int might match the return type of a gcc2 |
| 6722 | builtin and then its argument prototype would still apply. */ |
| 6723 | char __fpu_control(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6724 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6725 | int main() { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6726 | __fpu_control() |
| 6727 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6728 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6729 | if { (eval echo configure:6730: \"$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] | 6730 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6731 | eval "ac_cv_lib_$ac_lib_var=yes" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6732 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6733 | echo "configure: failed program was:" >&5 |
| 6734 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6735 | rm -rf conftest* |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6736 | eval "ac_cv_lib_$ac_lib_var=no" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6737 | fi |
| 6738 | rm -f conftest* |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6739 | LIBS="$ac_save_LIBS" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6740 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6741 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6742 | 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] | 6743 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6744 | ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
| 6745 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6746 | cat >> confdefs.h <<EOF |
| 6747 | #define $ac_tr_lib 1 |
| 6748 | EOF |
| 6749 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6750 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6751 | |
| 6752 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6753 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 6754 | fi |
| 6755 | |
| 6756 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 6757 | fi |
| 6758 | |
| 6759 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6760 | # Check for --with-fpectl |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6761 | echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6762 | echo "configure:6763: checking for --with-fpectl" >&5 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6763 | # Check whether --with-fpectl or --without-fpectl was given. |
| 6764 | if test "${with_fpectl+set}" = set; then |
| 6765 | withval="$with_fpectl" |
| 6766 | |
| 6767 | if test "$withval" != no |
| 6768 | then cat >> confdefs.h <<\EOF |
| 6769 | #define WANT_SIGFPE_HANDLER 1 |
| 6770 | EOF |
| 6771 | echo "$ac_t""yes" 1>&6 |
| 6772 | else echo "$ac_t""no" 1>&6 |
| 6773 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6774 | else |
| 6775 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6776 | fi |
| 6777 | |
| 6778 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6779 | # check for --with-libm=... |
| 6780 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6781 | case $ac_sys_system in |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 6782 | Darwin) ;; |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 6783 | BeOS) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 6784 | *) LIBM=-lm |
| 6785 | esac |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6786 | echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6787 | echo "configure:6788: checking for --with-libm=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6788 | # Check whether --with-libm or --without-libm was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6789 | if test "${with_libm+set}" = set; then |
| 6790 | withval="$with_libm" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6791 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6792 | if test "$withval" = no |
| 6793 | then LIBM= |
| 6794 | echo "$ac_t""force LIBM empty" 1>&6 |
| 6795 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6796 | then LIBM=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6797 | echo "$ac_t""set LIBM=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6798 | 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] | 6799 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6800 | else |
| 6801 | echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6802 | fi |
| 6803 | |
| 6804 | |
| 6805 | # check for --with-libc=... |
| 6806 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6807 | echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6808 | echo "configure:6809: checking for --with-libc=STRING" >&5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6809 | # Check whether --with-libc or --without-libc was given. |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6810 | if test "${with_libc+set}" = set; then |
| 6811 | withval="$with_libc" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6812 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6813 | if test "$withval" = no |
| 6814 | then LIBC= |
| 6815 | echo "$ac_t""force LIBC empty" 1>&6 |
| 6816 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6817 | then LIBC=$withval |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6818 | echo "$ac_t""set LIBC=\"$withval\"" 1>&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 6819 | 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] | 6820 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 6821 | else |
| 6822 | echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 6823 | fi |
| 6824 | |
| 6825 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6826 | # check for hypot() in math library |
| 6827 | LIBS_SAVE=$LIBS |
| 6828 | LIBS="$LIBS $LIBM" |
| 6829 | for ac_func in hypot |
| 6830 | do |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6831 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6832 | echo "configure:6833: checking for $ac_func" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6833 | 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] | 6834 | echo $ac_n "(cached) $ac_c" 1>&6 |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6835 | else |
| 6836 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6837 | #line 6838 "configure" |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6838 | #include "confdefs.h" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6839 | /* System header to define __stub macros and hopefully few prototypes, |
| 6840 | which can conflict with char $ac_func(); below. */ |
| 6841 | #include <assert.h> |
| 6842 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 6843 | /* We use char because int might match the return type of a gcc2 |
| 6844 | builtin and then its argument prototype would still apply. */ |
| 6845 | char $ac_func(); |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 6846 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6847 | int main() { |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6848 | |
| 6849 | /* The GNU C library defines this for functions which it implements |
| 6850 | to always fail with ENOSYS. Some functions are actually named |
| 6851 | something starting with __ and the normal name is an alias. */ |
| 6852 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
| 6853 | choke me |
| 6854 | #else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6855 | $ac_func(); |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6856 | #endif |
| 6857 | |
| 6858 | ; return 0; } |
| 6859 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6860 | if { (eval echo configure:6861: \"$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] | 6861 | rm -rf conftest* |
| 6862 | eval "ac_cv_func_$ac_func=yes" |
| 6863 | else |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6864 | echo "configure: failed program was:" >&5 |
| 6865 | cat conftest.$ac_ext >&5 |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6866 | rm -rf conftest* |
| 6867 | eval "ac_cv_func_$ac_func=no" |
| 6868 | fi |
| 6869 | rm -f conftest* |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6870 | fi |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6871 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6872 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
| 6873 | echo "$ac_t""yes" 1>&6 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6874 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
| 6875 | cat >> confdefs.h <<EOF |
| 6876 | #define $ac_tr_func 1 |
| 6877 | EOF |
| 6878 | |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6879 | else |
| 6880 | echo "$ac_t""no" 1>&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 6881 | LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6882 | fi |
Guido van Rossum | 2b3ac69 | 1996-08-30 15:18:41 +0000 | [diff] [blame] | 6883 | done |
| 6884 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 6885 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 6886 | LIBS=$LIBS_SAVE |
| 6887 | |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6888 | # check whether malloc(0) returns NULL or not |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6889 | echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6890 | echo "configure:6891: checking what malloc(0) returns" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6891 | if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6892 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6893 | else |
| 6894 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6895 | ac_cv_malloc_zero=nonnull |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6896 | else |
| 6897 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6898 | #line 6899 "configure" |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6899 | #include "confdefs.h" |
| 6900 | #include <stdio.h> |
| 6901 | #ifdef HAVE_STDLIB |
| 6902 | #include <stdlib.h> |
| 6903 | #else |
| 6904 | char *malloc(), *realloc(); |
| 6905 | int *free(); |
| 6906 | #endif |
| 6907 | main() { |
| 6908 | char *p; |
| 6909 | p = malloc(0); |
| 6910 | if (p == NULL) exit(1); |
| 6911 | p = realloc(p, 0); |
| 6912 | if (p == NULL) exit(1); |
| 6913 | free(p); |
| 6914 | exit(0); |
| 6915 | } |
| 6916 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6917 | if { (eval echo configure:6918: \"$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] | 6918 | then |
| 6919 | ac_cv_malloc_zero=nonnull |
| 6920 | else |
| 6921 | echo "configure: failed program was:" >&5 |
| 6922 | cat conftest.$ac_ext >&5 |
| 6923 | rm -fr conftest* |
| 6924 | ac_cv_malloc_zero=null |
| 6925 | fi |
| 6926 | rm -fr conftest* |
| 6927 | fi |
| 6928 | |
| 6929 | fi |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6930 | # XXX arm cross-compile? |
Guido van Rossum | ad71370 | 1997-07-10 22:42:38 +0000 | [diff] [blame] | 6931 | echo "$ac_t""$ac_cv_malloc_zero" 1>&6 |
| 6932 | if test "$ac_cv_malloc_zero" = null |
| 6933 | then |
| 6934 | cat >> confdefs.h <<\EOF |
| 6935 | #define MALLOC_ZERO_RETURNS_NULL 1 |
| 6936 | EOF |
| 6937 | |
| 6938 | fi |
| 6939 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6940 | # check for wchar.h |
| 6941 | ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'` |
| 6942 | echo $ac_n "checking for wchar.h""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6943 | echo "configure:6944: checking for wchar.h" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 6944 | 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] | 6945 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6946 | else |
| 6947 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6948 | #line 6949 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6949 | #include "confdefs.h" |
| 6950 | #include <wchar.h> |
| 6951 | EOF |
| 6952 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6953 | { (eval echo configure:6954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6954 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
| 6955 | if test -z "$ac_err"; then |
| 6956 | rm -rf conftest* |
| 6957 | eval "ac_cv_header_$ac_safe=yes" |
| 6958 | else |
| 6959 | echo "$ac_err" >&5 |
| 6960 | echo "configure: failed program was:" >&5 |
| 6961 | cat conftest.$ac_ext >&5 |
| 6962 | rm -rf conftest* |
| 6963 | eval "ac_cv_header_$ac_safe=no" |
| 6964 | fi |
| 6965 | rm -f conftest* |
| 6966 | fi |
| 6967 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
| 6968 | echo "$ac_t""yes" 1>&6 |
| 6969 | cat >> confdefs.h <<\EOF |
| 6970 | #define HAVE_WCHAR_H 1 |
| 6971 | EOF |
| 6972 | wchar_h="yes" |
| 6973 | else |
| 6974 | echo "$ac_t""no" 1>&6 |
| 6975 | wchar_h="no" |
| 6976 | |
| 6977 | fi |
| 6978 | |
| 6979 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6980 | # determine wchar_t size |
| 6981 | if test "$wchar_h" = yes |
| 6982 | then |
| 6983 | echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6984 | echo "configure:6985: checking size of wchar_t" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6985 | if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then |
| 6986 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 6987 | else |
| 6988 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 6989 | ac_cv_sizeof_wchar_t=4 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6990 | else |
| 6991 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6992 | #line 6993 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 6993 | #include "confdefs.h" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6994 | #include <stdio.h> |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 6995 | #include <sys/types.h> |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 6996 | main() |
| 6997 | { |
| 6998 | FILE *f=fopen("conftestval", "w"); |
| 6999 | if (!f) exit(1); |
| 7000 | fprintf(f, "%d\n", sizeof(wchar_t)); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7001 | exit(0); |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7002 | } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7003 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7004 | if { (eval echo configure:7005: \"$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] | 7005 | then |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7006 | ac_cv_sizeof_wchar_t=`cat conftestval` |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7007 | else |
| 7008 | echo "configure: failed program was:" >&5 |
| 7009 | cat conftest.$ac_ext >&5 |
| 7010 | rm -fr conftest* |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7011 | ac_cv_sizeof_wchar_t=0 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7012 | fi |
| 7013 | rm -fr conftest* |
| 7014 | fi |
| 7015 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7016 | fi |
| 7017 | echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 |
| 7018 | cat >> confdefs.h <<EOF |
| 7019 | #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t |
| 7020 | EOF |
| 7021 | |
| 7022 | |
| 7023 | fi |
| 7024 | |
| 7025 | echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7026 | echo "configure:7027: checking what type to use for unicode" >&5 |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7027 | # Check whether --enable-unicode or --disable-unicode was given. |
| 7028 | if test "${enable_unicode+set}" = set; then |
| 7029 | enableval="$enable_unicode" |
| 7030 | : |
| 7031 | else |
| 7032 | enable_unicode=yes |
| 7033 | fi |
| 7034 | |
| 7035 | |
| 7036 | if test $enable_unicode = yes |
| 7037 | then |
Martin v. Löwis | fd91779 | 2001-06-27 20:22:04 +0000 | [diff] [blame] | 7038 | # Without any arguments, Py_UNICODE defaults to two-byte mode |
| 7039 | enable_unicode="ucs2" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7040 | fi |
| 7041 | |
| 7042 | case "$enable_unicode" in |
| 7043 | ucs2) unicode_size="2" |
| 7044 | cat >> confdefs.h <<\EOF |
| 7045 | #define Py_UNICODE_SIZE 2 |
| 7046 | EOF |
| 7047 | |
| 7048 | ;; |
| 7049 | ucs4) unicode_size="4" |
| 7050 | cat >> confdefs.h <<\EOF |
| 7051 | #define Py_UNICODE_SIZE 4 |
| 7052 | EOF |
| 7053 | |
| 7054 | ;; |
| 7055 | esac |
| 7056 | |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7057 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7058 | if test "$enable_unicode" = "no" |
| 7059 | then |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7060 | UNICODE_OBJS="" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7061 | echo "$ac_t""not used" 1>&6 |
| 7062 | else |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7063 | UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 7064 | cat >> confdefs.h <<\EOF |
| 7065 | #define Py_USING_UNICODE 1 |
| 7066 | EOF |
| 7067 | |
| 7068 | if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" |
| 7069 | then |
| 7070 | PY_UNICODE_TYPE="wchar_t" |
| 7071 | cat >> confdefs.h <<\EOF |
| 7072 | #define HAVE_USABLE_WCHAR_T 1 |
| 7073 | EOF |
| 7074 | |
| 7075 | cat >> confdefs.h <<\EOF |
| 7076 | #define PY_UNICODE_TYPE wchar_t |
| 7077 | EOF |
| 7078 | |
| 7079 | elif test "$ac_cv_sizeof_short" = "$unicode_size" |
| 7080 | then |
| 7081 | PY_UNICODE_TYPE="unsigned short" |
| 7082 | cat >> confdefs.h <<\EOF |
| 7083 | #define PY_UNICODE_TYPE unsigned short |
| 7084 | EOF |
| 7085 | |
| 7086 | elif test "$ac_cv_sizeof_long" = "$unicode_size" |
| 7087 | then |
| 7088 | PY_UNICODE_TYPE="unsigned long" |
| 7089 | cat >> confdefs.h <<\EOF |
| 7090 | #define PY_UNICODE_TYPE unsigned long |
| 7091 | EOF |
| 7092 | |
| 7093 | else |
| 7094 | PY_UNICODE_TYPE="no type found" |
| 7095 | fi |
| 7096 | echo "$ac_t""$PY_UNICODE_TYPE" 1>&6 |
| 7097 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7098 | |
| 7099 | # check for endianness |
| 7100 | echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7101 | echo "configure:7102: checking whether byte ordering is bigendian" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7102 | if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7103 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7104 | else |
| 7105 | ac_cv_c_bigendian=unknown |
| 7106 | # See if sys/param.h defines the BYTE_ORDER macro. |
| 7107 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7108 | #line 7109 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7109 | #include "confdefs.h" |
| 7110 | #include <sys/types.h> |
| 7111 | #include <sys/param.h> |
| 7112 | int main() { |
| 7113 | |
| 7114 | #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN |
| 7115 | bogus endian macros |
| 7116 | #endif |
| 7117 | ; return 0; } |
| 7118 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7119 | if { (eval echo configure:7120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7120 | rm -rf conftest* |
| 7121 | # It does; now see whether it defined to BIG_ENDIAN or not. |
| 7122 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7123 | #line 7124 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7124 | #include "confdefs.h" |
| 7125 | #include <sys/types.h> |
| 7126 | #include <sys/param.h> |
| 7127 | int main() { |
| 7128 | |
| 7129 | #if BYTE_ORDER != BIG_ENDIAN |
| 7130 | not big endian |
| 7131 | #endif |
| 7132 | ; return 0; } |
| 7133 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7134 | if { (eval echo configure:7135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7135 | rm -rf conftest* |
| 7136 | ac_cv_c_bigendian=yes |
| 7137 | else |
| 7138 | echo "configure: failed program was:" >&5 |
| 7139 | cat conftest.$ac_ext >&5 |
| 7140 | rm -rf conftest* |
| 7141 | ac_cv_c_bigendian=no |
| 7142 | fi |
| 7143 | rm -f conftest* |
| 7144 | else |
| 7145 | echo "configure: failed program was:" >&5 |
| 7146 | cat conftest.$ac_ext >&5 |
| 7147 | fi |
| 7148 | rm -f conftest* |
| 7149 | if test $ac_cv_c_bigendian = unknown; then |
| 7150 | if test "$cross_compiling" = yes; then |
| 7151 | { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } |
| 7152 | else |
| 7153 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7154 | #line 7155 "configure" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 7155 | #include "confdefs.h" |
| 7156 | main () { |
| 7157 | /* Are we little or big endian? From Harbison&Steele. */ |
| 7158 | union |
| 7159 | { |
| 7160 | long l; |
| 7161 | char c[sizeof (long)]; |
| 7162 | } u; |
| 7163 | u.l = 1; |
| 7164 | exit (u.c[sizeof (long) - 1] == 1); |
| 7165 | } |
| 7166 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7167 | if { (eval echo configure:7168: \"$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] | 7168 | then |
| 7169 | ac_cv_c_bigendian=no |
| 7170 | else |
| 7171 | echo "configure: failed program was:" >&5 |
| 7172 | cat conftest.$ac_ext >&5 |
| 7173 | rm -fr conftest* |
| 7174 | ac_cv_c_bigendian=yes |
| 7175 | fi |
| 7176 | rm -fr conftest* |
| 7177 | fi |
| 7178 | |
| 7179 | fi |
| 7180 | fi |
| 7181 | |
| 7182 | echo "$ac_t""$ac_cv_c_bigendian" 1>&6 |
| 7183 | if test $ac_cv_c_bigendian = yes; then |
| 7184 | cat >> confdefs.h <<\EOF |
| 7185 | #define WORDS_BIGENDIAN 1 |
| 7186 | EOF |
| 7187 | |
| 7188 | fi |
| 7189 | |
| 7190 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7191 | # Check whether right shifting a negative integer extends the sign bit |
| 7192 | # or fills with zeros (like the Cray J90, according to Tim Peters). |
| 7193 | echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7194 | echo "configure:7195: checking whether right shift extends the sign bit" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7195 | if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7196 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7197 | else |
| 7198 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7199 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7200 | ac_cv_rshift_extends_sign=yes |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7201 | else |
| 7202 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7203 | #line 7204 "configure" |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7204 | #include "confdefs.h" |
| 7205 | |
| 7206 | int main() |
| 7207 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 7208 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7209 | } |
| 7210 | |
| 7211 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7212 | if { (eval echo configure:7213: \"$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] | 7213 | then |
| 7214 | ac_cv_rshift_extends_sign=yes |
| 7215 | else |
| 7216 | echo "configure: failed program was:" >&5 |
| 7217 | cat conftest.$ac_ext >&5 |
| 7218 | rm -fr conftest* |
| 7219 | ac_cv_rshift_extends_sign=no |
| 7220 | fi |
| 7221 | rm -fr conftest* |
| 7222 | fi |
| 7223 | |
| 7224 | fi |
| 7225 | |
| 7226 | echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6 |
| 7227 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7228 | then |
| 7229 | cat >> confdefs.h <<\EOF |
| 7230 | #define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1 |
| 7231 | EOF |
| 7232 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7233 | fi |
| 7234 | |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7235 | # check for getc_unlocked and related locking functions |
| 7236 | echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7237 | echo "configure:7238: checking for getc_unlocked() and friends" >&5 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7238 | if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then |
| 7239 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7240 | else |
| 7241 | |
| 7242 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7243 | #line 7244 "configure" |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 7244 | #include "confdefs.h" |
| 7245 | #include <stdio.h> |
| 7246 | int main() { |
| 7247 | |
| 7248 | FILE *f = fopen("/dev/null", "r"); |
| 7249 | flockfile(f); |
| 7250 | getc_unlocked(f); |
| 7251 | funlockfile(f); |
| 7252 | |
| 7253 | ; return 0; } |
| 7254 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7255 | if { (eval echo configure:7256: \"$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] | 7256 | rm -rf conftest* |
| 7257 | ac_cv_have_getc_unlocked=yes |
| 7258 | else |
| 7259 | echo "configure: failed program was:" >&5 |
| 7260 | cat conftest.$ac_ext >&5 |
| 7261 | rm -rf conftest* |
| 7262 | ac_cv_have_getc_unlocked=no |
| 7263 | fi |
| 7264 | rm -f conftest* |
| 7265 | fi |
| 7266 | |
| 7267 | echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6 |
| 7268 | if test "$ac_cv_have_getc_unlocked" = yes |
| 7269 | then |
| 7270 | cat >> confdefs.h <<\EOF |
| 7271 | #define HAVE_GETC_UNLOCKED 1 |
| 7272 | EOF |
| 7273 | |
| 7274 | fi |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 7275 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7276 | # check for readline 4.0 |
| 7277 | echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7278 | echo "configure:7279: checking for rl_pre_input_hook in -lreadline" >&5 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7279 | 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] | 7280 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7281 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7282 | else |
| 7283 | ac_save_LIBS="$LIBS" |
| 7284 | LIBS="-lreadline -ltermcap $LIBS" |
| 7285 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7286 | #line 7287 "configure" |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7287 | #include "confdefs.h" |
| 7288 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7289 | /* We use char because int might match the return type of a gcc2 |
| 7290 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7291 | char rl_pre_input_hook(); |
| 7292 | |
| 7293 | int main() { |
| 7294 | rl_pre_input_hook() |
| 7295 | ; return 0; } |
| 7296 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7297 | if { (eval echo configure:7298: \"$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] | 7298 | rm -rf conftest* |
| 7299 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 7300 | else |
| 7301 | echo "configure: failed program was:" >&5 |
| 7302 | cat conftest.$ac_ext >&5 |
| 7303 | rm -rf conftest* |
| 7304 | eval "ac_cv_lib_$ac_lib_var=no" |
| 7305 | fi |
| 7306 | rm -f conftest* |
| 7307 | LIBS="$ac_save_LIBS" |
| 7308 | |
| 7309 | fi |
| 7310 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7311 | echo "$ac_t""yes" 1>&6 |
| 7312 | cat >> confdefs.h <<\EOF |
| 7313 | #define HAVE_RL_PRE_INPUT_HOOK 1 |
| 7314 | EOF |
| 7315 | |
| 7316 | else |
| 7317 | echo "$ac_t""no" 1>&6 |
| 7318 | fi |
| 7319 | |
| 7320 | |
| 7321 | # check for readline 4.2 |
| 7322 | echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7323 | echo "configure:7324: checking for rl_completion_matches in -lreadline" >&5 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7324 | ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` |
| 7325 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then |
| 7326 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7327 | else |
| 7328 | ac_save_LIBS="$LIBS" |
| 7329 | LIBS="-lreadline -ltermcap $LIBS" |
| 7330 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7331 | #line 7332 "configure" |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 7332 | #include "confdefs.h" |
| 7333 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 7334 | /* We use char because int might match the return type of a gcc2 |
| 7335 | builtin and then its argument prototype would still apply. */ |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 7336 | char rl_completion_matches(); |
| 7337 | |
| 7338 | int main() { |
| 7339 | rl_completion_matches() |
| 7340 | ; return 0; } |
| 7341 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7342 | if { (eval echo configure:7343: \"$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] | 7343 | rm -rf conftest* |
| 7344 | eval "ac_cv_lib_$ac_lib_var=yes" |
| 7345 | else |
| 7346 | echo "configure: failed program was:" >&5 |
| 7347 | cat conftest.$ac_ext >&5 |
| 7348 | rm -rf conftest* |
| 7349 | eval "ac_cv_lib_$ac_lib_var=no" |
| 7350 | fi |
| 7351 | rm -f conftest* |
| 7352 | LIBS="$ac_save_LIBS" |
| 7353 | |
| 7354 | fi |
| 7355 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then |
| 7356 | echo "$ac_t""yes" 1>&6 |
| 7357 | cat >> confdefs.h <<\EOF |
| 7358 | #define HAVE_RL_COMPLETION_MATCHES 1 |
| 7359 | EOF |
| 7360 | |
| 7361 | else |
| 7362 | echo "$ac_t""no" 1>&6 |
| 7363 | fi |
| 7364 | |
| 7365 | |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7366 | echo $ac_n "checking for broken nice()""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7367 | echo "configure:7368: checking for broken nice()" >&5 |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7368 | if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then |
| 7369 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7370 | else |
| 7371 | |
| 7372 | if test "$cross_compiling" = yes; then |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 7373 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7374 | else |
| 7375 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7376 | #line 7377 "configure" |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 7377 | #include "confdefs.h" |
| 7378 | |
| 7379 | int main() |
| 7380 | { |
| 7381 | int val1 = nice(1); |
| 7382 | if (val1 != -1 && val1 == nice(2)) |
| 7383 | exit(0); |
| 7384 | exit(1); |
| 7385 | } |
| 7386 | |
| 7387 | EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7388 | if { (eval echo configure:7389: \"$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] | 7389 | then |
| 7390 | ac_cv_broken_nice=yes |
| 7391 | else |
| 7392 | echo "configure: failed program was:" >&5 |
| 7393 | cat conftest.$ac_ext >&5 |
| 7394 | rm -fr conftest* |
| 7395 | ac_cv_broken_nice=no |
| 7396 | fi |
| 7397 | rm -fr conftest* |
| 7398 | fi |
| 7399 | |
| 7400 | fi |
| 7401 | |
| 7402 | echo "$ac_t""$ac_cv_broken_nice" 1>&6 |
| 7403 | if test "$ac_cv_broken_nice" = yes |
| 7404 | then |
| 7405 | cat >> confdefs.h <<\EOF |
| 7406 | #define HAVE_BROKEN_NICE 1 |
| 7407 | EOF |
| 7408 | |
| 7409 | fi |
| 7410 | |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7411 | # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! |
| 7412 | # Add sys/socket.h to confdefs.h |
| 7413 | cat >> confdefs.h <<\EOF |
| 7414 | #ifdef HAVE_SYS_SOCKET_H |
| 7415 | #include <sys/socket.h> |
| 7416 | #endif |
| 7417 | EOF |
| 7418 | echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7419 | echo "configure:7420: checking for socklen_t" >&5 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7420 | 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] | 7421 | echo $ac_n "(cached) $ac_c" 1>&6 |
| 7422 | else |
| 7423 | cat > conftest.$ac_ext <<EOF |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7424 | #line 7425 "configure" |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7425 | #include "confdefs.h" |
| 7426 | #include <sys/types.h> |
| 7427 | #if STDC_HEADERS |
| 7428 | #include <stdlib.h> |
| 7429 | #include <stddef.h> |
| 7430 | #endif |
| 7431 | EOF |
| 7432 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 7433 | egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then |
| 7434 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7435 | ac_cv_type_socklen_t=yes |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7436 | else |
| 7437 | rm -rf conftest* |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7438 | ac_cv_type_socklen_t=no |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7439 | fi |
| 7440 | rm -f conftest* |
| 7441 | |
| 7442 | fi |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7443 | echo "$ac_t""$ac_cv_type_socklen_t" 1>&6 |
| 7444 | if test $ac_cv_type_socklen_t = no; then |
| 7445 | cat >> confdefs.h <<\EOF |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 7446 | #define socklen_t int |
| 7447 | EOF |
| 7448 | |
| 7449 | fi |
| 7450 | |
| 7451 | |
Neil Schemenauer | f25cf6c | 2001-03-04 06:39:33 +0000 | [diff] [blame] | 7452 | # Add Python/ prefix to LIBOBJS |
| 7453 | libobjs=$LIBOBJS |
| 7454 | LIBOBJS= |
| 7455 | for obj in $libobjs; do |
| 7456 | LIBOBJS="$LIBOBJS Python/$obj" |
| 7457 | done |
| 7458 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7459 | #AC_MSG_CHECKING(for Modules/Setup) |
| 7460 | #if test ! -f Modules/Setup ; then |
| 7461 | # if test ! -d Modules ; then |
| 7462 | # mkdir Modules |
| 7463 | # fi |
| 7464 | # cp "$srcdir/Modules/Setup.dist" Modules/Setup |
| 7465 | # AC_MSG_RESULT(creating) |
| 7466 | #else |
| 7467 | # AC_MSG_RESULT(already exists) |
| 7468 | #fi |
| 7469 | |
| 7470 | |
Neil Schemenauer | acbf9ef | 2001-02-27 02:15:14 +0000 | [diff] [blame] | 7471 | SRCDIRS="Parser Grammar Objects Python Modules" |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7472 | echo $ac_n "checking for build directories""... $ac_c" 1>&6 |
Neil Schemenauer | af5567f | 2001-10-21 22:32:04 +0000 | [diff] [blame] | 7473 | echo "configure:7474: checking for build directories" >&5 |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7474 | for dir in $SRCDIRS; do |
| 7475 | if test ! -d $dir; then |
| 7476 | mkdir $dir |
Guido van Rossum | 262cf20 | 2000-11-02 19:33:53 +0000 | [diff] [blame] | 7477 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7478 | done |
| 7479 | echo "$ac_t""done" 1>&6 |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 7480 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7481 | # generate output files |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7482 | trap '' 1 2 15 |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7483 | cat > confcache <<\EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7484 | # This file is a shell script that caches the results of configure |
| 7485 | # tests run on this system so they can be shared between configure |
| 7486 | # scripts and configure runs. It is not useful on other systems. |
| 7487 | # If it contains results you don't want to keep, you may remove or edit it. |
| 7488 | # |
| 7489 | # By default, configure uses ./config.cache as the cache file, |
| 7490 | # creating it if it does not exist already. You can give configure |
| 7491 | # the --cache-file=FILE option to use a different cache file; that is |
| 7492 | # what configure does when it calls configure scripts in |
| 7493 | # subdirectories, so they share the cache. |
| 7494 | # Giving --cache-file=/dev/null disables caching, for debugging configure. |
| 7495 | # config.status only pays attention to the cache file if you give it the |
| 7496 | # --recheck option to rerun configure. |
| 7497 | # |
| 7498 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7499 | # The following way of writing the cache mishandles newlines in values, |
| 7500 | # but we know of no workaround that is simple, portable, and efficient. |
| 7501 | # So, don't put newlines in cache variables' values. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7502 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 7503 | # 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] | 7504 | (set) 2>&1 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7505 | case `(ac_space=' '; set | grep ac_space) 2>&1` in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7506 | *ac_space=\ *) |
| 7507 | # `set' does not quote correctly, so add quotes (double-quote substitution |
| 7508 | # turns \\\\ into \\, and sed turns \\ into \). |
| 7509 | sed -n \ |
| 7510 | -e "s/'/'\\\\''/g" \ |
| 7511 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" |
| 7512 | ;; |
| 7513 | *) |
| 7514 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 7515 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' |
| 7516 | ;; |
| 7517 | esac >> confcache |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7518 | if cmp -s $cache_file confcache; then |
| 7519 | : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7520 | else |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7521 | if test -w $cache_file; then |
| 7522 | echo "updating cache $cache_file" |
| 7523 | cat confcache > $cache_file |
| 7524 | else |
| 7525 | echo "not updating unwritable cache $cache_file" |
| 7526 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7527 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7528 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7529 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7530 | 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] | 7531 | |
| 7532 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 7533 | # Let make expand exec_prefix. |
| 7534 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7535 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7536 | # Any assignment to VPATH causes Sun make to only execute |
| 7537 | # the first set of double-colon rules, so remove it if not needed. |
| 7538 | # If there is a colon in the path, we need to keep it. |
| 7539 | if test "x$srcdir" = x.; then |
| 7540 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
| 7541 | fi |
| 7542 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7543 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7544 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7545 | DEFS=-DHAVE_CONFIG_H |
| 7546 | |
| 7547 | # Without the "./", some shells look in PATH for config.status. |
| 7548 | : ${CONFIG_STATUS=./config.status} |
| 7549 | |
| 7550 | echo creating $CONFIG_STATUS |
| 7551 | rm -f $CONFIG_STATUS |
| 7552 | cat > $CONFIG_STATUS <<EOF |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7553 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7554 | # Generated automatically by configure. |
| 7555 | # Run this file to recreate the current configuration. |
| 7556 | # This directory was configured as follows, |
| 7557 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 7558 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7559 | # $0 $ac_configure_args |
| 7560 | # |
| 7561 | # Compiler output produced by configure, useful for debugging |
| 7562 | # configure, is in ./config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7563 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7564 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7565 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7566 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7567 | case "\$ac_option" in |
| 7568 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7569 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" |
| 7570 | 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] | 7571 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7572 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7573 | exit 0 ;; |
| 7574 | -help | --help | --hel | --he | --h) |
| 7575 | echo "\$ac_cs_usage"; exit 0 ;; |
| 7576 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7577 | esac |
| 7578 | done |
| 7579 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7580 | ac_given_srcdir=$srcdir |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7581 | ac_given_INSTALL="$INSTALL" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7582 | |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7583 | 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] | 7584 | EOF |
| 7585 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7586 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7587 | # Protect against being on the right side of a sed subst in config.status. |
| 7588 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; |
| 7589 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7590 | $ac_vpsub |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7591 | $extrasub |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7592 | s%@SHELL@%$SHELL%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7593 | s%@CFLAGS@%$CFLAGS%g |
| 7594 | s%@CPPFLAGS@%$CPPFLAGS%g |
| 7595 | s%@CXXFLAGS@%$CXXFLAGS%g |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 7596 | s%@FFLAGS@%$FFLAGS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7597 | s%@DEFS@%$DEFS%g |
| 7598 | s%@LDFLAGS@%$LDFLAGS%g |
| 7599 | s%@LIBS@%$LIBS%g |
| 7600 | s%@exec_prefix@%$exec_prefix%g |
| 7601 | s%@prefix@%$prefix%g |
| 7602 | s%@program_transform_name@%$program_transform_name%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7603 | s%@bindir@%$bindir%g |
| 7604 | s%@sbindir@%$sbindir%g |
| 7605 | s%@libexecdir@%$libexecdir%g |
| 7606 | s%@datadir@%$datadir%g |
| 7607 | s%@sysconfdir@%$sysconfdir%g |
| 7608 | s%@sharedstatedir@%$sharedstatedir%g |
| 7609 | s%@localstatedir@%$localstatedir%g |
| 7610 | s%@libdir@%$libdir%g |
| 7611 | s%@includedir@%$includedir%g |
| 7612 | s%@oldincludedir@%$oldincludedir%g |
| 7613 | s%@infodir@%$infodir%g |
| 7614 | s%@mandir@%$mandir%g |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 7615 | s%@VERSION@%$VERSION%g |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 7616 | s%@CONFIG_ARGS@%$CONFIG_ARGS%g |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 7617 | s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g |
| 7618 | s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g |
| 7619 | s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g |
| 7620 | s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 7621 | s%@MACHDEP@%$MACHDEP%g |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 7622 | s%@SGI_ABI@%$SGI_ABI%g |
Martin v. Löwis | 2235295 | 2000-12-13 17:37:02 +0000 | [diff] [blame] | 7623 | s%@CXX@%$CXX%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7624 | s%@MAINOBJ@%$MAINOBJ%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7625 | s%@CC@%$CC%g |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 7626 | s%@CPP@%$CPP%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7627 | s%@EXEEXT@%$EXEEXT%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7628 | s%@LIBRARY@%$LIBRARY%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7629 | s%@LDLIBRARY@%$LDLIBRARY%g |
Guido van Rossum | ca563f2 | 2001-01-23 01:52:44 +0000 | [diff] [blame] | 7630 | s%@DLLLIBRARY@%$DLLLIBRARY%g |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 7631 | s%@BLDLIBRARY@%$BLDLIBRARY%g |
| 7632 | s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g |
Guido van Rossum | 76c5fe2 | 1997-08-14 19:45:07 +0000 | [diff] [blame] | 7633 | s%@LINKCC@%$LINKCC%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7634 | s%@RANLIB@%$RANLIB%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7635 | s%@AR@%$AR%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7636 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7637 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 7638 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 7639 | s%@LN@%$LN%g |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 7640 | s%@OPT@%$OPT%g |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 7641 | s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7642 | s%@SO@%$SO%g |
| 7643 | s%@LDSHARED@%$LDSHARED%g |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 7644 | s%@BLDSHARED@%$BLDSHARED%g |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 7645 | s%@CCSHARED@%$CCSHARED%g |
| 7646 | s%@LINKFORSHARED@%$LINKFORSHARED%g |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7647 | s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7648 | s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g |
| 7649 | s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 7650 | s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 7651 | s%@LDLAST@%$LDLAST%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7652 | s%@DLINCLDIR@%$DLINCLDIR%g |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 7653 | s%@DYNLOADFILE@%$DYNLOADFILE%g |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 7654 | s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7655 | s%@LIBOBJS@%$LIBOBJS%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7656 | s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g |
| 7657 | s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g |
| 7658 | 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] | 7659 | s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 7660 | s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7661 | s%@LIBM@%$LIBM%g |
| 7662 | s%@LIBC@%$LIBC%g |
Martin v. Löwis | 339d0f7 | 2001-08-17 18:39:25 +0000 | [diff] [blame] | 7663 | s%@UNICODE_OBJS@%$UNICODE_OBJS%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7664 | s%@SRCDIRS@%$SRCDIRS%g |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7665 | |
| 7666 | CEOF |
| 7667 | EOF |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7668 | |
| 7669 | cat >> $CONFIG_STATUS <<\EOF |
| 7670 | |
| 7671 | # Split the substitutions into bite-sized pieces for seds with |
| 7672 | # small command number limits, like on Digital OSF/1 and HP-UX. |
| 7673 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. |
| 7674 | ac_file=1 # Number of current file. |
| 7675 | ac_beg=1 # First line for current file. |
| 7676 | ac_end=$ac_max_sed_cmds # Line after last line for current file. |
| 7677 | ac_more_lines=: |
| 7678 | ac_sed_cmds="" |
| 7679 | while $ac_more_lines; do |
| 7680 | if test $ac_beg -gt 1; then |
| 7681 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7682 | else |
| 7683 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file |
| 7684 | fi |
| 7685 | if test ! -s conftest.s$ac_file; then |
| 7686 | ac_more_lines=false |
| 7687 | rm -f conftest.s$ac_file |
| 7688 | else |
| 7689 | if test -z "$ac_sed_cmds"; then |
| 7690 | ac_sed_cmds="sed -f conftest.s$ac_file" |
| 7691 | else |
| 7692 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" |
| 7693 | fi |
| 7694 | ac_file=`expr $ac_file + 1` |
| 7695 | ac_beg=$ac_end |
| 7696 | ac_end=`expr $ac_end + $ac_max_sed_cmds` |
| 7697 | fi |
| 7698 | done |
| 7699 | if test -z "$ac_sed_cmds"; then |
| 7700 | ac_sed_cmds=cat |
| 7701 | fi |
| 7702 | EOF |
| 7703 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7704 | cat >> $CONFIG_STATUS <<EOF |
| 7705 | |
Andrew M. Kuchling | 8abedde | 2001-01-26 22:55:24 +0000 | [diff] [blame] | 7706 | CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"} |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7707 | EOF |
| 7708 | cat >> $CONFIG_STATUS <<\EOF |
| 7709 | 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] | 7710 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7711 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7712 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7713 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7714 | *) ac_file_in="${ac_file}.in" ;; |
| 7715 | esac |
| 7716 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7717 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7718 | |
| 7719 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7720 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7721 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7722 | # The file is in a subdirectory. |
| 7723 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 7724 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7725 | # A "../" for each directory in $ac_dir_suffix. |
| 7726 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
| 7727 | else |
| 7728 | ac_dir_suffix= ac_dots= |
| 7729 | fi |
| 7730 | |
| 7731 | case "$ac_given_srcdir" in |
| 7732 | .) srcdir=. |
| 7733 | if test -z "$ac_dots"; then top_srcdir=. |
| 7734 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; |
| 7735 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; |
| 7736 | *) # Relative path. |
| 7737 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 7738 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
| 7739 | esac |
| 7740 | |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7741 | case "$ac_given_INSTALL" in |
| 7742 | [/$]*) INSTALL="$ac_given_INSTALL" ;; |
| 7743 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; |
| 7744 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7745 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7746 | echo creating "$ac_file" |
| 7747 | rm -f "$ac_file" |
| 7748 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." |
| 7749 | case "$ac_file" in |
| 7750 | *Makefile*) ac_comsub="1i\\ |
| 7751 | # $configure_input" ;; |
| 7752 | *) ac_comsub= ;; |
| 7753 | esac |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7754 | |
| 7755 | 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] | 7756 | sed -e "$ac_comsub |
| 7757 | s%@configure_input@%$configure_input%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7758 | s%@srcdir@%$srcdir%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7759 | s%@top_srcdir@%$top_srcdir%g |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 7760 | s%@INSTALL@%$INSTALL%g |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7761 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7762 | fi; done |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7763 | rm -f conftest.s* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7764 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7765 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where |
| 7766 | # 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] | 7767 | # |
| 7768 | # ac_d sets the value in "#define NAME VALUE" lines. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7769 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 7770 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7771 | ac_dC='\3' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7772 | ac_dD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7773 | # 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] | 7774 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7775 | ac_uB='\([ ]\)%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7776 | ac_uC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7777 | ac_uD='\4%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7778 | # 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] | 7779 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 7780 | ac_eB='$%\1#\2define\3' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7781 | ac_eC=' ' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7782 | ac_eD='%g' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7783 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7784 | if test "${CONFIG_HEADERS+set}" != set; then |
| 7785 | EOF |
| 7786 | cat >> $CONFIG_STATUS <<EOF |
Martin v. Löwis | 4f1cd8b | 2001-07-26 13:41:06 +0000 | [diff] [blame] | 7787 | CONFIG_HEADERS="pyconfig.h" |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7788 | EOF |
| 7789 | cat >> $CONFIG_STATUS <<\EOF |
| 7790 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7791 | 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] | 7792 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7793 | case "$ac_file" in |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7794 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7795 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; |
| 7796 | *) ac_file_in="${ac_file}.in" ;; |
| 7797 | esac |
| 7798 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7799 | echo creating $ac_file |
| 7800 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7801 | rm -f conftest.frag conftest.in conftest.out |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7802 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` |
| 7803 | cat $ac_file_inputs > conftest.in |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7804 | |
| 7805 | EOF |
| 7806 | |
| 7807 | # Transform confdefs.h into a sed script conftest.vals that substitutes |
| 7808 | # 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] | 7809 | # 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] | 7810 | # Protect against being in an unquoted here document in config.status. |
| 7811 | rm -f conftest.vals |
| 7812 | cat > conftest.hdr <<\EOF |
| 7813 | s/[\\&%]/\\&/g |
| 7814 | s%[\\$`]%\\&%g |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7815 | 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] | 7816 | s%ac_d%ac_u%gp |
| 7817 | s%ac_u%ac_e%gp |
| 7818 | EOF |
| 7819 | sed -n -f conftest.hdr confdefs.h > conftest.vals |
| 7820 | rm -f conftest.hdr |
| 7821 | |
| 7822 | # This sed command replaces #undef with comments. This is necessary, for |
| 7823 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 7824 | # on some systems where configure will not decide to define it. |
| 7825 | cat >> conftest.vals <<\EOF |
| 7826 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% |
| 7827 | EOF |
| 7828 | |
| 7829 | # Break up conftest.vals because some shells have a limit on |
| 7830 | # 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] | 7831 | |
| 7832 | rm -f conftest.tail |
| 7833 | while : |
| 7834 | do |
| 7835 | ac_lines=`grep -c . conftest.vals` |
| 7836 | # grep -c gives empty output for an empty file on some AIX systems. |
| 7837 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 7838 | # Write a limited-size here document to conftest.frag. |
| 7839 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS |
| 7840 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS |
| 7841 | echo 'CEOF |
| 7842 | sed -f conftest.frag conftest.in > conftest.out |
| 7843 | rm -f conftest.in |
| 7844 | mv conftest.out conftest.in |
| 7845 | ' >> $CONFIG_STATUS |
| 7846 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail |
| 7847 | rm -f conftest.vals |
| 7848 | mv conftest.tail conftest.vals |
| 7849 | done |
| 7850 | rm -f conftest.vals |
| 7851 | |
| 7852 | cat >> $CONFIG_STATUS <<\EOF |
| 7853 | rm -f conftest.frag conftest.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7854 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7855 | cat conftest.in >> conftest.h |
| 7856 | rm -f conftest.in |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7857 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7858 | echo "$ac_file is unchanged" |
| 7859 | rm -f conftest.h |
| 7860 | else |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 7861 | # Remove last slash and all that follows it. Not all systems have dirname. |
| 7862 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 7863 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then |
| 7864 | # The file is in a subdirectory. |
| 7865 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 7866 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7867 | rm -f $ac_file |
| 7868 | mv conftest.h $ac_file |
| 7869 | fi |
| 7870 | fi; done |
| 7871 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7872 | EOF |
| 7873 | cat >> $CONFIG_STATUS <<EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 7874 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 7875 | EOF |
| 7876 | cat >> $CONFIG_STATUS <<\EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7877 | |
| 7878 | exit 0 |
| 7879 | EOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7880 | chmod +x $CONFIG_STATUS |
| 7881 | rm -fr confdefs* $ac_clean_files |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 7882 | 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] | 7883 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 7884 | |
| 7885 | echo "creating Setup" |
| 7886 | if test ! -f Modules/Setup |
| 7887 | then |
| 7888 | cp $srcdir/Modules/Setup.dist Modules/Setup |
| 7889 | fi |
| 7890 | |
| 7891 | echo "creating Setup.local" |
| 7892 | if test ! -f Modules/Setup.local |
| 7893 | then |
| 7894 | echo "# Edit this file for local setup changes" >Modules/Setup.local |
| 7895 | fi |
| 7896 | |
| 7897 | echo "creating Makefile" |
| 7898 | $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ |
| 7899 | -s Modules Modules/Setup.config \ |
Neil Schemenauer | f8b71c5 | 2001-04-21 17:41:16 +0000 | [diff] [blame] | 7900 | Modules/Setup.local Modules/Setup |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 7901 | mv config.c Modules |